Add constants for the min and max prom addresses. Use these instead of

magic numbers.  Use stxa_sync instead of stxa; membar #Sync; to ensure
that no instruction is placed between the two.  This can cause random
corruption even though interrupts are already disabled.
This commit is contained in:
Jake Burkholder 2002-06-17 15:44:10 +00:00
parent 3e2ec6ea88
commit e3957e9d67
2 changed files with 6 additions and 3 deletions

View File

@ -159,6 +159,9 @@
#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + KVA_RANGE - PAGE_SIZE)
#define KERNBASE (VM_MIN_KERNEL_ADDRESS)
#define VM_MIN_PROM_ADDRESS (0xf0000000)
#define VM_MAX_PROM_ADDRESS (0xffffe000)
/*
* Initial pagein size of beginning of executable file.
*/

View File

@ -359,7 +359,8 @@ pmap_bootstrap(vm_offset_t ekva)
"translation: start=%#lx size=%#lx tte=%#lx",
translations[i].om_start, translations[i].om_size,
translations[i].om_tte);
if (translations[i].om_start < 0xf0000000) /* XXX!!! */
if (translations[i].om_start < VM_MIN_PROM_ADDRESS ||
translations[i].om_start > VM_MAX_PROM_ADDRESS)
continue;
for (off = 0; off < translations[i].om_size;
off += PAGE_SIZE) {
@ -418,8 +419,7 @@ pmap_map_tsb(void)
TD_P | TD_W;
stxa(AA_DMMU_TAR, ASI_DMMU, TLB_TAR_VA(va) |
TLB_TAR_CTX(TLB_CTX_KERNEL));
stxa(0, ASI_DTLB_DATA_IN_REG, data);
membar(Sync);
stxa_sync(0, ASI_DTLB_DATA_IN_REG, data);
}
/*