diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2010-05-18 11:34:54 -0500 |
---|---|---|
committer | Patrick Williams <iawillia@us.ibm.com> | 2010-05-18 11:34:54 -0500 |
commit | 512cc04b8f681a7583fff88bd903f327d549bd3d (patch) | |
tree | 3efc0f86654708fb17c58b2c8d7eb88bda01e29d /start.S | |
parent | 4324ee74d2a77c20704323dae57762b36301ea8a (diff) | |
download | talos-hostboot-512cc04b8f681a7583fff88bd903f327d549bd3d.tar.gz talos-hostboot-512cc04b8f681a7583fff88bd903f327d549bd3d.zip |
Move stack init to asm stub.
Diffstat (limited to 'start.S')
-rw-r--r-- | start.S | 36 |
1 files changed, 31 insertions, 5 deletions
@@ -60,11 +60,6 @@ relocate_loop: blr finished_relocate: - ;// Set up initial TOC Base - lis 2, opd_load_address@h - ori 2, 2, opd_load_address@l - ld 2,8(2) - ;// Jump to main. b _main @@ -72,6 +67,37 @@ finished_relocate: intvect_system_reset: b _start +.section .text +_main: + ;// Set up initial TOC Base + lis 2, opd_load_address@h + ori 2, 2, opd_load_address@l + ld 2,8(2) + + ;// Set up initial stack + lis 1, kernel_stack@h + ori 1, 1, kernel_stack@l + addi 1, 1, 16368 + + ;// Set up exception stack + lis 3, exception_stack@h + ori 3, 3, exception_stack@l + addi 3, 3, 16368 + mtsprg0 3 + + ;// Call main. + bl main +_main_loop: + b _main_loop + + +.section .data + .balign 1024 +kernel_stack: + .space 16*1024 +exception_stack: + .space 16*1024 + .section .text.hreset hreset: b _start |