Hello Mats and others,
Like you, I am trying to get Coreboot-v2 up and running on a 440BX-based board (Abit AB-BM6), with more than the currently hardcoded 64 MB of RAM. I think I'm also running into the same problem.
My current setup involves 384 MB of RAM, with the appropriate changes to the hardcoded values in raminit.c (I haven't tried auto-detecting them yet, but I'm curious for your patch), and uses Coreinfo as the payload for now.
So long as I didn't change the values hardcoding the 64 MB limit, I could boot fine into the payload, even with all three DIMMs present. With the changes in raminit.c, elfboot/Coreinfo stops with an exception 6 (illegal opcode), as per the log below.
The curious thing is though, that when I first boot Linux with the original BIOS, flash the chip to Coreboot, and then do a warm reboot into my freshly burned Coreboot, it does succeed. Because of this, I'm guessing there's something that Coreboot neglects to initialize, but luckily also doesn't reset.
I've compared the dumps from "Northbridge following SDRAM init:" for the cold boot and the warm reboot from Linux, and there are indeed some differences. My prime suspect for now is the Memory Buffer Strength Control Register (0x69-0x6e), but I haven't had the chance to test that yet, and am not certain by a long shot that it's it. I'm including the dumps below, in case you can use them to better understand the problem with your own board.
With a bit of luck I can test my theory this evening, I'll keep you posted.
Kind regards, Tim.
*** Coreinfo crash:
elfboot: Attempting to load payload. rom_stream: 0xfffe0000 - 0xfffeffff Found ELF candidate at offset 0 header_offset is 0 Try to load at offset 0x0 malloc Enter, size 32, free_mem_ptr 00024ce4 malloc 0x00024ce4 New segment addr 0x100000 size 0x36310 offset 0x1000 filesize 0x9460 (cleaned up) New segment addr 0x100000 size 0x36310 offset 0x1000 filesize 0x9460 lb: [0x0000000000004000, 0x0000000000028000) Dropping non PT_LOAD segment Dropping non PT_LOAD segment Loading Segment: addr: 0x0000000000100000 memsz: 0x0000000000036310 filesz: 0x0000000000009460 [ 0x0000000000100000, 0000000000109460, 0x0000000000136310) <- 0000000000001000 Clearing Segment: addr: 0x0000000000109460 memsz: 0x000000000002ceb0 Loaded segments verified segments closed down stream Jumping to boot code at 0x101990 entry = 0x00101990 lb_start = 0x00004000 lb_size = 0x00024000 adjust = 0x17fd8000 buffer = 0x17fb8000 elf_boot_notes = 0x0001ed58 adjusted_boot_notes = 0x17ff6d58 Unexpected Exception: 6 @ 10:a54ea13a - Halting Code: 0 eflags: 00010006 eax: 00023eb4 ebx: 17fd8000 ecx: 00000000 edx: 00024000 edi: 18000000 esi: 00028000 ebp: 00023ebc esp: 17ffbe66
*** Warm reboot from original BIOS and Linux (seems to work):
Northbridge following SDRAM init: PCI: 00:00.00 00: 86 80 90 71 06 00 10 22 03 00 00 06 00 40 00 00 10: 08 00 00 e8 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30: 00 00 00 00 a0 00 00 00 00 00 00 00 00 00 00 00 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 50: 0c a0 00 ff 00 00 00 09 03 30 33 33 33 33 33 33 60: 08 10 18 20 30 30 30 30 00 03 28 f0 03 ca 00 00 70: 20 1f 0a 78 55 02 03 00 27 ff 10 38 00 00 00 00 80: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90: 98 88 00 00 04 61 00 00 00 05 00 00 00 00 00 00 a0: 02 00 10 00 03 02 00 1f 00 00 00 00 00 00 00 00 b0: 80 20 00 00 30 00 00 00 00 00 4d 17 20 10 00 00 c0: 00 00 00 00 00 00 00 00 18 0c 00 00 00 00 00 00 d0: 00 00 00 00 00 00 00 00 0c 00 00 00 00 00 00 00 e0: 4c ad ff bb 8a 3e 00 80 2c d3 f7 cf 9d 3e 00 00 f0: 40 01 00 00 00 f8 00 60 20 0f 00 00 00 00 00 00
*** cold reboot with Coreboot (crashes):
Northbridge following SDRAM init: PCI: 00:00.00 00: 86 80 90 71 06 00 10 22 03 00 00 06 00 40 00 00 10: 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30: 00 00 00 00 a0 00 00 00 00 00 00 00 00 00 00 00 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 50: 0c a0 00 ff 00 00 00 09 03 30 33 33 33 33 33 33 60: 08 10 18 20 30 30 30 30 00 03 00 00 00 00 00 00 70: 00 1f 02 38 55 02 03 00 27 ff 10 38 00 00 00 00 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90: 80 00 00 00 04 61 00 00 00 05 00 00 00 00 00 00 a0: 02 00 10 00 03 02 00 1f 00 00 00 00 00 00 00 00 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0: 00 00 00 00 00 00 00 00 18 0c 00 00 00 00 00 00 d0: 00 00 00 00 00 00 00 00 0c 00 00 00 00 00 00 00 e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f0: 00 00 00 00 00 f8 00 00 20 0f 00 00 00 00 00 00