/boot/trunk/arch/sparc64/loader/asm.S |
---|
26,6 → 26,10 |
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
# |
#define STACK_WINDOW_SAVE_AREA_SIZE (16*8) |
#define PSTATE_AM_BIT 8 |
.text |
.global halt |
94,6 → 98,24 |
mov %o1, %o0 |
jump_to_kernel: |
set ofw, %l0 |
set ofw_cif, %l0 |
jmp %o0 ! jump to kernel |
ldx [%l0], %o4 ! pass OpenFirmware address in %o4 |
.global ofw |
ofw: |
save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
set ofw_cif, %l0 |
ldx [%l0], %l0 |
rdpr %pstate, %l1 |
and %l1, ~PSTATE_AM_BIT, %l2 |
wrpr %l2, 0, %pstate |
jmpl %l0, %o7 |
mov %i0, %o0 |
wrpr %l1, 0, %pstate |
ret |
restore %o0, 0, %o0 |
/boot/trunk/arch/sparc64/loader/boot.S |
---|
28,6 → 28,8 |
#define INITIAL_STACK 0x0 |
#define PSTATE_IE_BIT 2 |
.register %g2, #scratch |
.register %g3, #scratch |
.register %g6, #scratch |
52,9 → 54,16 |
1: |
flushw |
/* |
* Disable interrupts. |
*/ |
rdpr %pstate, %g2 |
and %g2, ~PSTATE_IE_BIT, %g2 ! mask the Interrupt Enable bit |
wrpr %g2, 0, %pstate |
# TODO: set initial stack |
set ofw, %l0 |
set ofw_cif, %l0 |
call init ! initialize OpenFirmware |
stx %o4, [%l0] |
/boot/trunk/arch/sparc64/loader/main.c |
---|
51,12 → 51,6 |
for (i = 0; i < COMPONENTS; i++) |
printf(" %L: %s image (size %d bytes)\n", components[i].start, components[i].name, components[i].size); |
screen_t scr; |
ofw_screen(&scr); |
printf("\n%P: fb, %dx%dx%d\n", ofw_translate(scr.addr), scr.width, scr.height, scr.bpp); |
printf("\nCopying components\n"); |
unsigned int top = 0; |
bootinfo.cnt = 0; |
/boot/trunk/arch/sparc64/loader/ofw.c |
---|
39,3 → 39,8 |
ofw_write(&str[i], 1); |
} |
} |
int ofw_translate_failed(ofw_arg_t flag) |
{ |
return flag != -1; |
} |