mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
Fixed the raminit.inc so they don't need a working %esp.
Removed set of %esp from entry16.inc
This commit is contained in:
parent
68221584cc
commit
bfa9200c03
3 changed files with 10 additions and 25 deletions
|
@ -135,14 +135,3 @@ _realstart:
|
|||
movw %ax, %fs
|
||||
movw %ax, %gs
|
||||
|
||||
/* This is a redundant stack setup.
|
||||
* It redoes the more complete stack setup
|
||||
* in crt0.S. We do this here because on entry to crt0.S
|
||||
* some chipsets have memory set up and others don't. We have found
|
||||
* that some code in CRT0_PARAMETERS assume the stack is working
|
||||
* enough for call/return. So we have to have working stack or
|
||||
* things will crash. This fix as of 8/23/01 RGM
|
||||
*/
|
||||
/* set new stack */
|
||||
movl $_estack, %esp
|
||||
|
||||
|
|
|
@ -42,16 +42,11 @@ register_setting_start:
|
|||
init_northbridge:
|
||||
lodsw (%esi), %ax # load the register address/value to %ax
|
||||
xchgb %al, %ah # exchange address/values for write_common
|
||||
call write_northbridge_register
|
||||
loopnz init_northbridge
|
||||
|
||||
jmp register_setting_end
|
||||
|
||||
write_northbridge_register:
|
||||
/* Input: AH - register number. AL - register value. */
|
||||
movl $NORTH_BRIDGE_BASE_ADDR, %edx
|
||||
|
||||
write_common:
|
||||
movl %eax, %ebx # Save %eax to %ebx.
|
||||
|
||||
movzbl %bh, %eax # add register address to
|
||||
|
@ -65,7 +60,9 @@ write_common:
|
|||
addb %al, %dl
|
||||
movb %bl, %al
|
||||
outb %al, %dx
|
||||
ret # End of write_[lpc|pci]_reg
|
||||
loopnz init_northbridge
|
||||
|
||||
jmp register_setting_end
|
||||
|
||||
#ifdef SIS630S
|
||||
#include "630s_regs.inc"
|
||||
|
|
|
@ -42,16 +42,10 @@ register_setting_start:
|
|||
init_northbridge:
|
||||
lodsw (%esi), %ax # load the register address/value to %ax
|
||||
xchgb %al, %ah # exchange address/values for write_common
|
||||
call write_northbridge_register
|
||||
loopnz init_northbridge
|
||||
|
||||
jmp register_setting_end
|
||||
|
||||
write_northbridge_register:
|
||||
/* Input: AH - register number. AL - register value. */
|
||||
movl $NORTH_BRIDGE_BASE_ADDR, %edx
|
||||
|
||||
write_common:
|
||||
movl %eax, %ebx # Save %eax to %ebx.
|
||||
|
||||
movzbl %bh, %eax # add register address to
|
||||
|
@ -65,7 +59,12 @@ write_common:
|
|||
addb %al, %dl
|
||||
movb %bl, %al
|
||||
outb %al, %dx
|
||||
ret # End of write_[lpc|pci]_reg
|
||||
|
||||
loopnz init_northbridge
|
||||
|
||||
jmp register_setting_end
|
||||
|
||||
|
||||
|
||||
#include "730s_regs.inc"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue