Hello; I am trying to run coreboot on F2A85-M motherboard (without VGA support enabled). The CPU used is AMD Trinity A8-5600K, RAM is Kingston HyperX PnP 4GB (2x2GB) DDR3 1866 (http://www.kingston.com/datasheets/KHX1866C11D3P1K2_4G.pdf).
I cloned the coreboot repository and ran 'make menuconfig'. The only options I set were motherboard vendor and type (RAM voltage is the default value of 1.5V). The desired payload is the default SeaBIOS. I have no interest in enabling VGA, thus I did not try to enable it. I used flashrom to flash the image. When I try to boot, execution fails with the following message (full log in the attachment):
Enabling resources...
Fam15 - domain_enable_resources: AmdInitMid. agesawrapper_amdinitmid Unexpected Exception: 0 @ 10:0022fabf - Halting Code: 0 eflags: 00010046 eax: 0002e630 ebx: 0000014d ecx: 00000002 edx: 00000000 edi: 100123e3 esi: 00000000 ebp: 10000660 esp: 002bcd60
The number on my PCI POST card is "0x1".
Unfortunately I have no other RAM modules to try. I tried to change the position from blue slots to black slots but then I got:
coreboot-4.0-5584-ge92155f-dirty Sat Mar 1 21:05:40 CET 2014 starting... BSP Family_Model: 00610f01 cpu_init_detectedx = 00000000 agesawrapper_amdinitreset Fch OEM config in INIT RESET Done Got past agesawrapper_amdinitearly ASSERTION FAILED: file 'src/vendorcode/amd/agesa/f15tn/Proc/Mem/Main/mmExcludeDimm.c', line 236
The command 'make crossgcc' also seems not to help at all.
I will appreciate any ideas.
Regards; Rostislav Lisovy
Rostislav Lisovy [mailto:lisovy@gmail.com] wrote:
]Hello; ]I am trying to run coreboot on F2A85-M motherboard (without VGA support ]enabled). The CPU used is AMD Trinity A8-5600K, RAM is Kingston HyperX ]PnP 4GB (2x2GB) DDR3 1866 ](http://www.kingston.com/datasheets/KHX1866C11D3P1K2_4G.pdf). ] ]I cloned the coreboot repository and ran 'make menuconfig'. The only ]options I set were motherboard vendor and type (RAM voltage is the ]default value of 1.5V). The desired payload is the default SeaBIOS. I ]have no interest in enabling VGA, thus I did not try to enable it. ]I used flashrom to flash the image. When I try to boot, execution fails ]with the following message (full log in the attachment): ] ] Enabling resources... ] ] Fam15 - domain_enable_resources: AmdInitMid. ] agesawrapper_amdinitmid Unexpected Exception: 0 @ 10:0022fabf - Halting ] Code: 0 eflags: 00010046 ] eax: 0002e630 ebx: 0000014d ecx: 00000002 edx: 00000000 ] edi: 100123e3 esi: 00000000 ebp: 10000660 esp: 002bcd60
This looks like a divide exception. Finding the source code for the failing divide might help narrow down the problem. I can't recreate your binary exactly so I can't find the failing instruction from the eip value. But based on register values, it looks like it is somewhere around line 334 of file amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GfxGmcInitTN.c You might be able to use the link map, disassembly, or debug prints to figure out the exact source line that is failing. Thanks, Scott
]The number on my PCI POST card is "0x1". ] ]Unfortunately I have no other RAM modules to try. I tried to change the ]position from blue slots to black slots but then I got: ] ] coreboot-4.0-5584-ge92155f-dirty Sat Mar 1 21:05:40 CET 2014 starting... ] BSP Family_Model: 00610f01 ] cpu_init_detectedx = 00000000 ] agesawrapper_amdinitreset Fch OEM config in INIT RESET Done ] Got past agesawrapper_amdinitearly ] ASSERTION FAILED: file 'src/vendorcode/amd/agesa/f15tn/Proc/Mem/Main/mmExcludeDimm.c', line 236 ] ]The command 'make crossgcc' also seems not to help at all. ] ]I will appreciate any ideas. ] ]Regards; ]Rostislav Lisovy
On Sun, 2014-03-02 at 00:00 -0600, Scott Duplichan wrote:
This looks like a divide exception. Finding the source code for the failing divide might help narrow down the problem. I can't recreate your binary exactly so I can't find the failing instruction from the eip value. But based on register values, it looks like it is somewhere around line 334 of file amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GfxGmcInitTN.c You might be able to use the link map, disassembly, or debug prints to figure out the exact source line that is failing.
I compiled the GDB support and connected to it from the other computer. The outcome of the debugging:
_text () at src/arch/x86/lib/c_start.S:89 warning: Source file is more recent than executable. 89 call main (gdb) c Continuing.
Program received signal SIGFPE, Arithmetic exception. 0x0022fabf in GfxGmcInitializeSequencerTN (Gfx=0x10000660) at src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GfxGmcInitTN.c:334 warning: Source file is more recent than executable. 334 scale_mp0 = (GfxLibGetMaxSclk (GnbLibGetHeader (Gfx)) * 100) / memps0_freq;
(gdb) p memps0_freq $1 = 0
(gdb) p Gfx $2 = (GFX_PLATFORM_CONFIG *) 0x10000660
(gdb) l 329 } 330 331 //scale_mp0 = sclk_max_freq / memps0_freq 332 //scale_mp1 = sclk_max_freq / memps1_freq 333 //Multiply it by 100 to avoid dealing with floating point values 334 scale_mp0 = (GfxLibGetMaxSclk (GnbLibGetHeader (Gfx)) * 100) / memps0_freq; 335 scale_mp1 = (GfxLibGetMaxSclk (GnbLibGetHeader (Gfx)) * 100) / memps1_freq; 336 337 GnbRegisterReadTN (TYPE_GMM , 0x2774 , &ex1047.Value, 0, GnbLibGetHeader (Gfx)); 338 GnbRegisterReadTN (TYPE_GMM , 0x2778 , &ex1048.Value, 0, GnbLibGetHeader (Gfx));
(gdb) p memps1_freq $5 = 333
Regards; Rostislav Lisovy
Rostislav Lisovy [mailto:lisovy@gmail.com] wrote:
]On Sun, 2014-03-02 at 00:00 -0600, Scott Duplichan wrote: ]> This looks like a divide exception. Finding the source code ]> for the failing divide might help narrow down the problem. I ]> can't recreate your binary exactly so I can't find the failing ]> instruction from the eip value. But based on register values, ]> it looks like it is somewhere around line 334 of file ]> amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GfxGmcInitTN.c ]> You might be able to use the link map, disassembly, or debug ]> prints to figure out the exact source line that is failing. ] ]I compiled the GDB support and connected to it from the other computer. ]The outcome of the debugging: ] ]_text () at src/arch/x86/lib/c_start.S:89 ]warning: Source file is more recent than executable. ]89 call main ](gdb) c ]Continuing. ] ]Program received signal SIGFPE, Arithmetic exception. ]0x0022fabf in GfxGmcInitializeSequencerTN (Gfx=0x10000660) at ]src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GfxGmcInitTN.c:334 ]warning: Source file is more recent than executable. ]334 scale_mp0 = (GfxLibGetMaxSclk (GnbLibGetHeader (Gfx)) * 100) / memps0_freq; ] ](gdb) p memps0_freq ]$1 = 0 ] ](gdb) p Gfx ]$2 = (GFX_PLATFORM_CONFIG *) 0x10000660 ] ](gdb) l ]329 } ]330 ]331 //scale_mp0 = sclk_max_freq / memps0_freq ]332 //scale_mp1 = sclk_max_freq / memps1_freq ]333 //Multiply it by 100 to avoid dealing with floating point values ]334 scale_mp0 = (GfxLibGetMaxSclk (GnbLibGetHeader (Gfx)) * 100) / memps0_freq; ]335 scale_mp1 = (GfxLibGetMaxSclk (GnbLibGetHeader (Gfx)) * 100) / memps1_freq; ]336 ]337 GnbRegisterReadTN (TYPE_GMM , 0x2774 , &ex1047.Value, 0, GnbLibGetHeader (Gfx)); ]338 GnbRegisterReadTN (TYPE_GMM , 0x2778 , &ex1048.Value, 0, GnbLibGetHeader (Gfx)); ] ](gdb) p memps1_freq ]$5 = 333
It is good to see you have a debugger working. That confirms the problem really is line 334. You dumped memps1_freq, but line 334 divides by memps0_freq. Presumable memps0_freq is zero. If the failing instruction is "div esi", then memps0_freq=0 is confirmed by your original email that shows value 0 in the esi register.
Apparently something is going wrong with the code a few lines above that initializes memps0_freq. You could step through that code and try to understand the problem. You could also try forcing a non-zero value such as 333 into memps0_freq to see how much farther execution gets. Thanks, Scott
]Regards; ]Rostislav Lisovy
On Sun, 2014-03-02 at 00:00 -0600, Scott Duplichan wrote:
This looks like a divide exception. Finding the source code for the failing divide might help narrow down the problem. I can't recreate your binary exactly so I can't find the failing instruction from the eip value. But based on register values, it looks like it is somewhere around line 334 of file amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GfxGmcInitTN.c You might be able to use the link map, disassembly, or debug prints to figure out the exact source line that is failing.
I forgot to add backtrace so here it comes:
Program received signal SIGFPE, Arithmetic exception. 0x0022fabf in GfxGmcInitializeSequencerTN (Gfx=0x10000660) at src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GfxGmcInitTN.c:334 warning: Source file is more recent than executable. 334 scale_mp0 = (GfxLibGetMaxSclk (GnbLibGetHeader (Gfx)) * 100) / memps0_freq;
(gdb) bt #0 0x0022fabf in GfxGmcInitializeSequencerTN (Gfx=0x10000660) at src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GfxGmcInitTN.c:334 #1 GfxGmcInitTN (Gfx=0x10000660) at src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GfxGmcInitTN.c:534 #2 0x00231898 in GfxMidInterfaceTN (StdHeader=0x100123e3) at src/vendorcode/amd/agesa/f15tn/Proc/GNB/Modules/GnbInitTN/GfxMidInitTN.c:183 #3 0x00239f90 in GnbLibDispatchFeatures (ConfigTable=0x2b1a10 <GnbMidFeatureTable+12>, StdHeader=StdHeader@entry=0x100123e3) at src/vendorcode/amd/agesa/f15tn/Proc/GNB/Common/GnbLibFeatures.c:99 #4 0x0023a107 in GnbInitAtMid (MidParamsPtr=MidParamsPtr@entry=0x100123e3) at src/vendorcode/amd/agesa/f15tn/Proc/GNB/GnbInitAtMid.c:92 #5 0x00246d98 in AmdInitMid (MidParams=0x100123e3) at src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitMid.c:159 #6 0x00262629 in agesawrapper_amdinitmid () at src/mainboard/asus/f2a85-m/agesawrapper.c:398 #7 0x00260308 in domain_enable_resources (dev=0x2afab4 <_dev5>) at src/northbridge/amd/agesa/family15tn/northbridge.c:570 #8 0x0026a4f1 in enable_resources (link=0x2af680 <dev_root_links>) at src/device/device.c:876 #9 0x0026b64f in dev_enable () at src/device/device.c:1121 #10 0x00264a65 in bs_dev_enable (arg=0x0) at src/lib/hardwaremain.c:163 #11 0x00277749 in bs_walk_state_machine () at src/lib/hardwaremain.c:382 #12 main () at src/lib/hardwaremain.c:479
Thanks; Rostislav Lisovy
Hi all,
I'm back. Any news on this issue?
Thanks Rudolf
On Mon, 2014-03-10 at 18:13 +0100, Rudolf Marek wrote:
I'm back. Any news on this issue?
Hello Rudolf; I tried to debug it but with no success. I will hopefully continue when I will have more time.
Regards; Rostislav