1/*- 2 * Initial implementation: 3 * Copyright (c) 2001 Robert Drehmel 4 * All rights reserved. 5 * 6 * As long as the above copyright statement and this notice remain 7 * unchanged, you can do what ever you want with this file. 8 */ 9 10#include <machine/asm.h> 11__FBSDID("$FreeBSD$"); 12 13#define LOCORE 14 15#include <machine/frame.h> 16#include <machine/fsr.h> 17#include <machine/intr_machdep.h> 18#include <machine/pstate.h> 19 20#define PAGE_SIZE 8192 21#define PAGE_SHIFT 13 22 23#define STACK_SIZE (2 * PAGE_SIZE) 24 25ENTRY(_start) 26 /* Limit interrupts. */ 27 wrpr %g0, PIL_TICK - 1, %pil 28 29 /* 30 * PSTATE: privileged, interrupts enabled, floating point 31 * unit enabled 32 */ 33 wrpr %g0, PSTATE_PRIV | PSTATE_IE | PSTATE_PEF, %pstate 34 wr %g0, FPRS_FEF, %fprs 35 36 setx stack + STACK_SIZE - SPOFF - CCFSZ, %l7, %l6 37 mov %l6, %sp 38 call main 39 mov %o4, %o0 40 sir 41 42 .comm stack, STACK_SIZE, 32 43