diff options
author | jake <jake@FreeBSD.org> | 2002-06-17 15:44:10 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-06-17 15:44:10 +0000 |
commit | 384222848c2eefef86ad23f4d4568b3b47e2b6e4 (patch) | |
tree | 780810ff6969e0f9252cd21cb539dd4a648cb23f /sys | |
parent | 4d5cb9b473c4e6c7e55e7a38a8dc1f3764def159 (diff) | |
download | FreeBSD-src-384222848c2eefef86ad23f4d4568b3b47e2b6e4.zip FreeBSD-src-384222848c2eefef86ad23f4d4568b3b47e2b6e4.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sparc64/include/vmparam.h | 3 | ||||
-rw-r--r-- | sys/sparc64/sparc64/pmap.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/sparc64/include/vmparam.h b/sys/sparc64/include/vmparam.h index 3aff8a0..0e7dae5 100644 --- a/sys/sparc64/include/vmparam.h +++ b/sys/sparc64/include/vmparam.h @@ -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. */ diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index 171df8f..22a7cb1 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -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); } /* |