mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
stage1_main() calling conventions changed to use two parameters instead
of one. This resulted in a stack underflow for i586 and GeodeLX because the stack was set up for only one parameter in their stage0 asm code. Untested. Note that this didn't trigger on K8 because the stack setup there has excessive room, something that should be fixed as well. This is a band-aid and we should do it right instead. Discussion follows: Carl-Daniel Hailfinger wrote: > Can't we determine init_detected from C code and avoid working with it > in asm? > The Fam10h BKDG states in section 2.3.1: > "determine the type of this reset. One method is to use [The Link > Initialization Control Register] F0x6C[InitDet] bit." > The same register is suggested by the Athlon64/Operon BKDG and the > Fam0fh BKDG. > > That should work from C and make our lives easier. To be honest, I > have no idea why we use bit 11 of MTRRdefType_MSR for the > init_detected purpose. Ron Minnich wrote: > I plan to change that in future. For now, I want to change as little > as I can, since this code is so mysterious anyway. I would say let's > leave it in with a warning of some sort. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/coreboot-v3@838 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
d130a25c0d
commit
08f7cd8688
2 changed files with 6 additions and 0 deletions
|
@ -365,6 +365,9 @@ lout:
|
|||
movl $0, %eax
|
||||
pushl %eax
|
||||
|
||||
/* Store zero for the unused init_detected parameter. */
|
||||
pushl %eax
|
||||
|
||||
/* Restore the BIST result. */
|
||||
movl %ebp, %eax
|
||||
|
||||
|
|
|
@ -439,6 +439,9 @@ lout:
|
|||
movl $0, %eax
|
||||
pushl %eax
|
||||
|
||||
/* Store zero for the unused init_detected parameter. */
|
||||
pushl %eax
|
||||
|
||||
/* Restore the BIST result */
|
||||
movl %ebp, %eax
|
||||
/* We need to set ebp ? No need */
|
||||
|
|
Loading…
Add table
Reference in a new issue