Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1905 → Rev 1906

/trunk/kernel/arch/sparc64/src/start.S
76,18 → 76,6
wrpr %g0, 0, %pil ! intialize %pil
 
/*
* Copy the bootinfo structure passed from the boot loader
* to the kernel bootinfo structure.
*/
brz %l7, 0f ! skip if you are not the bootstrap CPU
nop
sethi %hi(bootinfo), %o0
call memcpy
or %o0, %lo(bootinfo), %o0
0:
 
/*
* Switch to kernel trap table.
*/
sethi %hi(trap_table), %g1
209,18 → 197,9
stxa %g1, [%g0] ASI_ITLB_DATA_IN_REG
flush %g5
 
! switch to context 0
stxa %g0, [VA_PRIMARY_CONTEXT_REG] %asi ! ASI_DMMU is correct here !!!
flush %g5
 
! ensure nucleus mapping
! enter nucleus - using context 0
wrpr %g0, 1, %tl
 
! set context 1 in the primary context register
mov MEM_CONTEXT_TEMP, %g1
stxa %g1, [VA_PRIMARY_CONTEXT_REG] %asi ! ASI_DMMU is correct here !!!
flush %g5
 
! demap context 1
SET_TLB_DEMAP_CMD(g1, TLB_DEMAP_PRIMARY)
stxa %g0, [%g1] ASI_IMMU_DEMAP
230,12 → 209,16
stxa %g0, [VA_PRIMARY_CONTEXT_REG] %asi ! ASI_DMMU is correct here !!!
flush %g5
! set TL back to 0
! leave nucleus - using primary context, i.e. context 0
wrpr %g0, 0, %tl
 
brz %l7, 1f ! skip if you are not the bootstrap CPU
nop
 
sethi %hi(bootinfo), %o0
call memcpy ! copy bootinfo
or %o0, %lo(bootinfo), %o0
 
call arch_pre_main
nop
271,7 → 254,6
bne 2b
nop
 
 
/*
* Configure stack for the AP.
* The AP is expected to use the stack saved
/trunk/boot/arch/sparc64/loader/boot.S
58,12 → 58,10
/*
* Disable interrupts and disable address masking.
*/
rdpr %pstate, %g2
and %g2, ~(PSTATE_IE_BIT|PSTATE_AM_BIT), %g2
wrpr %g2, 0, %pstate
wrpr %g0, PSTATE_PRIV_BIT, %pstate
 
set initial_stack_top, %g3
add %g3, -STACK_BIAS, %sp
set initial_stack_top, %sp
add %sp, -STACK_BIAS, %sp
 
set ofw_cif, %l0
/trunk/boot/arch/sparc64/loader/register.h
30,6 → 30,7
#define BOOT_sparc64_REGISTER_H_
 
#define PSTATE_IE_BIT 2
#define PSTATE_PRIV_BIT 4
#define PSTATE_AM_BIT 8
 
#define ASI_UPA_CONFIG 0x4a