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:
parent
3e2ec6ea88
commit
e3957e9d67
@ -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.
|
||||
*/
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user