Rev 1789 | Rev 1792 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1789 | Rev 1791 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | # |
27 | # |
28 | 28 | ||
- | 29 | #include <stack.h> |
|
29 | #define INITIAL_STACK 0x0 |
30 | #include <register.h> |
30 | 31 | ||
31 | #define PSTATE_IE_BIT 2 |
- | |
32 | #define PSTATE_AM_BIT 8 |
32 | #define INITIAL_STACK_SIZE 1024 |
33 | 33 | ||
34 | .register %g2, #scratch |
34 | .register %g2, #scratch |
35 | .register %g3, #scratch |
35 | .register %g3, #scratch |
36 | .register %g6, #scratch |
36 | .register %g6, #scratch |
37 | .register %g7, #scratch |
37 | .register %g7, #scratch |
Line 60... | Line 60... | ||
60 | */ |
60 | */ |
61 | rdpr %pstate, %g2 |
61 | rdpr %pstate, %g2 |
62 | and %g2, ~(PSTATE_IE_BIT|PSTATE_AM_BIT), %g2 |
62 | and %g2, ~(PSTATE_IE_BIT|PSTATE_AM_BIT), %g2 |
63 | wrpr %g2, 0, %pstate |
63 | wrpr %g2, 0, %pstate |
64 | 64 | ||
65 | # TODO: set initial stack |
65 | set initial_stack_top, %g3 |
- | 66 | add %g3, -STACK_BIAS, %sp |
|
66 | 67 | ||
67 | set ofw_cif, %l0 |
68 | set ofw_cif, %l0 |
68 | 69 | ||
69 | call ofw_init ! initialize OpenFirmware |
70 | call ofw_init ! initialize OpenFirmware |
70 | stx %o4, [%l0] |
71 | stx %o4, [%l0] |
71 | 72 | ||
72 | b bootstrap |
73 | b bootstrap |
73 | nop |
74 | nop |
- | 75 | ||
- | 76 | .align 16 |
|
- | 77 | initial_stack: |
|
- | 78 | .space INITIAL_STACK_SIZE |
|
- | 79 | initial_stack_top: |
|
- | 80 | .space STACK_WINDOW_SAVE_AREA_SIZE |