diff options
author | jake <jake@FreeBSD.org> | 2002-02-23 11:06:37 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-02-23 11:06:37 +0000 |
commit | 33e8ee5265ca2838260ab581a9cebdedb1e1e29b (patch) | |
tree | 1049a0be439b4808c81cd4904a54ea8a5373d761 /sys/boot/sparc64/loader/locore.S | |
parent | cb7151318ebc080fcd1fd2c9049283fc99d2087a (diff) | |
download | FreeBSD-src-33e8ee5265ca2838260ab581a9cebdedb1e1e29b.zip FreeBSD-src-33e8ee5265ca2838260ab581a9cebdedb1e1e29b.tar.gz |
Keep track of the ttes used to map the kernel and pass them to it as loader
metadata. Modify tlb handling functions to take a tte, instead of virtual
address, physical address and flags.
Diffstat (limited to 'sys/boot/sparc64/loader/locore.S')
-rw-r--r-- | sys/boot/sparc64/loader/locore.S | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/sys/boot/sparc64/loader/locore.S b/sys/boot/sparc64/loader/locore.S index 8d89c3d..920171a 100644 --- a/sys/boot/sparc64/loader/locore.S +++ b/sys/boot/sparc64/loader/locore.S @@ -8,9 +8,14 @@ * * $FreeBSD$ */ + +#define LOCORE + #include <machine/asi.h> #include <machine/asm.h> #include <machine/pstate.h> +#include <machine/smp.h> +#include <machine/upa.h> #define PAGE_SIZE 8192 #define PAGE_SHIFT 13 @@ -33,7 +38,7 @@ ENTRY(_start) mov %l6, %sp call main mov %o4, %o0 - illtrap + sir /* * %o0 input VA constant @@ -82,18 +87,17 @@ ENTRY(dtlb_va_to_pa) /* * %o0 = slot number - * %o1 = pa - * %o2 = va - * %o3 = flags + * %o1 = vpn + * %o2 = tte data */ ENTRY(itlb_enter) rdpr %pstate, %o4 wrpr %o4, PSTATE_IE, %pstate sllx %o0, 3, %o0 - or %o1, %o3, %o1 + sllx %o1, PAGE_SHIFT, %o1 mov AA_IMMU_TAR, %o3 - stxa %o2, [%o3] ASI_IMMU - stxa %o1, [%o0] ASI_ITLB_DATA_ACCESS_REG + stxa %o1, [%o3] ASI_IMMU + stxa %o2, [%o0] ASI_ITLB_DATA_ACCESS_REG membar #Sync retl wrpr %o4, 0, %pstate @@ -102,12 +106,13 @@ ENTRY(dtlb_enter) rdpr %pstate, %o4 wrpr %o4, PSTATE_IE, %pstate sllx %o0, 3, %o0 - or %o1, %o3, %o1 + sllx %o1, PAGE_SHIFT, %o1 mov AA_DMMU_TAR, %o3 - stxa %o2, [%o3] ASI_DMMU - stxa %o1, [%o0] ASI_DTLB_DATA_ACCESS_REG + stxa %o1, [%o3] ASI_DMMU + stxa %o2, [%o0] ASI_DTLB_DATA_ACCESS_REG membar #Sync retl wrpr %o4, 0, %pstate .comm stack, STACK_SIZE, 32 + .comm smp_stack, STACK_SIZE, 32 |