diff options
Diffstat (limited to 'sys/boot/sparc64/loader')
-rw-r--r-- | sys/boot/sparc64/loader/locore.S | 2 | ||||
-rw-r--r-- | sys/boot/sparc64/loader/main.c | 21 | ||||
-rw-r--r-- | sys/boot/sparc64/loader/metadata.c | 13 |
3 files changed, 18 insertions, 18 deletions
diff --git a/sys/boot/sparc64/loader/locore.S b/sys/boot/sparc64/loader/locore.S index 9ad5346..c1b3e2b 100644 --- a/sys/boot/sparc64/loader/locore.S +++ b/sys/boot/sparc64/loader/locore.S @@ -92,7 +92,6 @@ ENTRY(dtlb_va_to_pa) ENTRY(itlb_enter) rdpr %pstate, %o4 wrpr %o4, PSTATE_IE, %pstate - sllx %o0, PAGE_SHIFT, %o0 mov AA_IMMU_TAR, %o3 stxa %o0, [%o3] ASI_IMMU stxa %o1, [%g0] ASI_ITLB_DATA_IN_REG @@ -103,7 +102,6 @@ ENTRY(itlb_enter) ENTRY(dtlb_enter) rdpr %pstate, %o4 wrpr %o4, PSTATE_IE, %pstate - sllx %o0, PAGE_SHIFT, %o0 mov AA_DMMU_TAR, %o3 stxa %o0, [%o3] ASI_DMMU stxa %o1, [%g0] ASI_DTLB_DATA_IN_REG diff --git a/sys/boot/sparc64/loader/main.c b/sys/boot/sparc64/loader/main.c index c07f138..3d6fffb 100644 --- a/sys/boot/sparc64/loader/main.c +++ b/sys/boot/sparc64/loader/main.c @@ -63,8 +63,8 @@ static int mmu_mapin(vm_offset_t, vm_size_t); char __progname[] = "FreeBSD/sparc64 loader"; -struct tte *dtlb_store; -struct tte *itlb_store; +struct tlb_entry *dtlb_store; +struct tlb_entry *itlb_store; int dtlb_slot; int itlb_slot; @@ -240,7 +240,7 @@ static int mmu_mapin(vm_offset_t va, vm_size_t len) { vm_offset_t pa, mva; - struct tte tte; + u_long data; if (va + len > curkva) curkva = va + len; @@ -275,13 +275,16 @@ mmu_mapin(vm_offset_t va, vm_size_t len) panic("mmu_mapin: out of dtlb_slots"); if (itlb_slot >= itlb_slot_max) panic("mmu_mapin: out of itlb_slots"); - tte.tte_vpn = TV_VPN(va); - tte.tte_data = TD_V | TD_4M | TD_PA(pa) | TD_L | TD_CP | + data = TD_V | TD_4M | TD_PA(pa) | TD_L | TD_CP | TD_CV | TD_P | TD_W; - dtlb_store[dtlb_slot++] = tte; - itlb_store[itlb_slot++] = tte; - dtlb_enter(tte.tte_vpn, tte.tte_data); - itlb_enter(tte.tte_vpn, tte.tte_data); + dtlb_store[dtlb_slot].te_pa = pa; + dtlb_store[dtlb_slot].te_va = va; + itlb_store[itlb_slot].te_pa = pa; + itlb_store[itlb_slot].te_va = va; + dtlb_slot++; + itlb_slot++; + dtlb_enter(va, data); + itlb_enter(va, data); pa = (vm_offset_t)-1; } len -= len > PAGE_SIZE_4M ? PAGE_SIZE_4M : len; diff --git a/sys/boot/sparc64/loader/metadata.c b/sys/boot/sparc64/loader/metadata.c index bb2e47e..88364e3 100644 --- a/sys/boot/sparc64/loader/metadata.c +++ b/sys/boot/sparc64/loader/metadata.c @@ -31,15 +31,14 @@ #include <sys/param.h> #include <sys/reboot.h> #include <sys/linker.h> -#include <machine/tte.h> #include <machine/metadata.h> #include "bootstrap.h" #include "libofw.h" -extern struct tte *dtlb_store; -extern struct tte *itlb_store; +extern struct tlb_entry *dtlb_store; +extern struct tlb_entry *itlb_store; extern int dtlb_slot; extern int itlb_slot; @@ -318,10 +317,10 @@ md_load(char *args, vm_offset_t *modulep) file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); file_addmetadata(kfp, MODINFOMD_DTLB_SLOTS, sizeof dtlb_slots, &dtlb_slots); file_addmetadata(kfp, MODINFOMD_ITLB_SLOTS, sizeof itlb_slots, &itlb_slots); - file_addmetadata(kfp, MODINFOMD_DTLB, dtlb_slots * sizeof(struct tte), - dtlb_store); - file_addmetadata(kfp, MODINFOMD_ITLB, itlb_slots * sizeof(struct tte), - itlb_store); + file_addmetadata(kfp, MODINFOMD_DTLB, + dtlb_slots * sizeof(*dtlb_store), dtlb_store); + file_addmetadata(kfp, MODINFOMD_ITLB, + itlb_slots * sizeof(*itlb_store), itlb_store); *modulep = addr; size = md_copymodules(0); |