Hi,
My background is low level ARM and I want to get familiar with low level x86. I bought galileo v1 because it is cheap, small and handy x86 board.
I have built coreboot code. It does not boot "out of the box". I had to add rmu.bin into coreboot.rom. With this logging on uart works. It seems SD/MMC controller also works.
Now I'm struggling with: [INFO ] CBFS: Found 'fspm.bin' @0x31c40 size 0x2f000 in mcache @0x80004f84 [ERROR] CBFS ERROR: 'fspm.bin' allocation failure [EMERG] FSPM not available or failed to load!
Regards, Łukasz
Hi,
I've got a progress: now it hangs at the last message 'No working controllers found'.
##
[DEBUG] BS: BS_PAYLOAD_LOAD exit times (exec / console): 0 / 825 ms [DEBUG] Jumping to boot code at 0x01110000(0x0fe84000)
U-Boot 2023.01-rc1-00019-g77b5cc2948 (Nov 08 2022 - 00:27:58 +0000)
CPU: x86, vendor Intel, device 590h DRAM: 253.9 MiB Core: 14 devices, 12 uclasses, devicetree: separate MMC: Loading Environment from nowhere... OK Video: No video mode configured in coreboot (err=-6) Video: No video mode configured in coreboot (err=-6) Vendor: Intel Model: Galileo BIOS Version: 4.18-402-g9429844f81-dirty BIOS date: 11/08/2022 Net: No ethernet found. No working controllers found
Regards, Łukasz
On 6.11.2022 20:40, Łukasz Jeleń wrote:
Hi,
My background is low level ARM and I want to get familiar with low level x86. I bought galileo v1 because it is cheap, small and handy x86 board.
I have built coreboot code. It does not boot "out of the box". I had to add rmu.bin into coreboot.rom. With this logging on uart works. It seems SD/MMC controller also works.
Now I'm struggling with: [INFO ] CBFS: Found 'fspm.bin' @0x31c40 size 0x2f000 in mcache @0x80004f84 [ERROR] CBFS ERROR: 'fspm.bin' allocation failure [EMERG] FSPM not available or failed to load!
Regards, Łukasz
Dear Łukasz,
Welcome to coreboot, and thank you for engaging with the project.
Am 08.11.22 um 21:23 schrieb Łukasz Jeleń:
I've got a progress: now it hangs at the last message 'No working controllers found'.
##
[DEBUG] BS: BS_PAYLOAD_LOAD exit times (exec / console): 0 / 825 ms [DEBUG] Jumping to boot code at 0x01110000(0x0fe84000)
U-Boot 2023.01-rc1-00019-g77b5cc2948 (Nov 08 2022 - 00:27:58 +0000)
CPU: x86, vendor Intel, device 590h DRAM: 253.9 MiB Core: 14 devices, 12 uclasses, devicetree: separate MMC: Loading Environment from nowhere... OK Video: No video mode configured in coreboot (err=-6) Video: No video mode configured in coreboot (err=-6) Vendor: Intel Model: Galileo BIOS Version: 4.18-402-g9429844f81-dirty BIOS date: 11/08/2022 Net: No ethernet found. No working controllers found
Congratulations. It looks like coreboot works and is able to load a payload. I do not know U-Boot, so I do not know what controllers are meant here. Maybe only the network controller, and U-Boot needs a driver?
As Intel Galileo is x86, please try another payload like GRUB, SeaBIOS or EDK Ⅱ.
It’d be great if you pushed your coreboot patches to Gerrit for review and others.
Kind regards,
Paul
Dear Paul,
Welcome to coreboot, and thank you for engaging with the project.
thanks
Congratulations. It looks like coreboot works and is able to load a payload. I do not know U-Boot, so I do not know what controllers are meant here. Maybe only the network controller, and U-Boot needs a driver?
I'll try to trace the place of hang - I did little tracing and suppose it hangs somewhere during cache initialization. (connected with FSP_M). Maybe that FSP_M_XIP setting I've chosen is wrong.
As Intel Galileo is x86, please try another payload like GRUB, SeaBIOS or EDK Ⅱ.
For GRUB and SeaBIOS the last thing I see is:
[DEBUG] BS: BS_PAYLOAD_LOAD exit times (exec / console): 0 / 825 ms [DEBUG] Jumping to boot code at 0x00009000(0x0fe83000)
For EDK II I get a compile time error:
HEAD is now at a8b0baabf8 MdeModulePkg/FaultTolerantWrite: Don't check for block alignment EDK2: Checking uuid-dev: Found! EDK2: Checking nasm: Not found! ERROR: Please install nasm. make[1]: *** [Makefile:161: checktools] Error 1 make: *** [payloads/external/Makefile.inc:158: build/UEFIPAYLOAD.fd] Błąd 2
It’d be great if you pushed your coreboot patches to Gerrit for review and others.
I'm a novice open source contributor, but I'll try to.
Kind regards, Łukasz
Dear Paul,
I've got some progress:
```
[DEBUG] Jumping to boot code at 0x000fd25b(0x0fe8d000) SeaBIOS (version rel-1.16.0-0-gd239552) BUILD: gcc: (coreboot toolchain v2022-09-18_c8870b1334) 11.2.0 binutils: (GNU Binutils) 2.37 SeaBIOS (version rel-1.16.0-0-gd239552) BUILD: gcc: (coreboot toolchain v2022-09-18_c8870b1334) 11.2.0 binutils: (GNU Binutils) 2.37 Found coreboot cbmem console @ fece000 Found mainboard Intel Galileo Relocating init from 0x000e0460 to 0x0fe03ac0 (size 54432) Found CBFS header at 0xffe0022c multiboot: eax=feb4f58, ebx=feb4f24 Found 15 PCI devices (max PCI bus is 01) Copying SMBIOS from 0x0fe51000 to 0x000f67c0 Copying SMBIOS 3.0 from 0x0fe51020 to 0x000f67a0 Copying ACPI RSDP from 0x0fe69000 to 0x000f6770 table(50434146)=0x0fe692f0 (via xsdt) Using pmtimer, ioport 0x1008 table(324d5054)=0x0fe69480 (via xsdt) WARNING - Timeout at wait_reg8:81! Scan for VGA option rom No VGA found, scan for other display Turning on vga text mode console SeaBIOS (version rel-1.16.0-0-gd239552) WARNING - internal error detected at pci_enable_membar:186! WARNING - internal error detected at pci_enable_membar:186! WARNING - Timeout at i8042_flush:71! All threads complete. WARNING - internal error detected at pci_enable_membar:186! All threads complete. Searching bootorder for: HALT Found 0 lpt ports Found 0 serial ports Scan for option roms
Press ESC for boot menu.
```
Then I press ESC and nothing happens.
Previously it did not work because I set wrong value to the CONFIG_CONSOLE_UART_BASE_ADDRESS.
Kind regards,
Łukasz
On 9.11.2022 08:27, Paul Menzel wrote:
Dear Łukasz,
Welcome to coreboot, and thank you for engaging with the project.
Am 08.11.22 um 21:23 schrieb Łukasz Jeleń:
I've got a progress: now it hangs at the last message 'No working controllers found'.
##
[DEBUG] BS: BS_PAYLOAD_LOAD exit times (exec / console): 0 / 825 ms [DEBUG] Jumping to boot code at 0x01110000(0x0fe84000)
U-Boot 2023.01-rc1-00019-g77b5cc2948 (Nov 08 2022 - 00:27:58 +0000)
CPU: x86, vendor Intel, device 590h DRAM: 253.9 MiB Core: 14 devices, 12 uclasses, devicetree: separate MMC: Loading Environment from nowhere... OK Video: No video mode configured in coreboot (err=-6) Video: No video mode configured in coreboot (err=-6) Vendor: Intel Model: Galileo BIOS Version: 4.18-402-g9429844f81-dirty BIOS date: 11/08/2022 Net: No ethernet found. No working controllers found
Congratulations. It looks like coreboot works and is able to load a payload. I do not know U-Boot, so I do not know what controllers are meant here. Maybe only the network controller, and U-Boot needs a driver?
As Intel Galileo is x86, please try another payload like GRUB, SeaBIOS or EDK Ⅱ.
It’d be great if you pushed your coreboot patches to Gerrit for review and others.
Kind regards,
Paul
Dear Paul,
I think GRUB does not work because it needs a VGA: https://www.coreboot.org/SeaBIOS#Adding_sgabios_support
and Galileo does not have one. I've build coreboot with payload 'GRUB atop SeaBIOS', then add vgaroms/sgabios.bin to coreboot.rom, but it still does not show anything.
I've managed to build EDK2 -> I had to install "nasm" on my host machine. I thought EDK2 will use nasm that was build by coreboot.
Łukasz
On 9.11.2022 08:27, Paul Menzel wrote:
Dear Łukasz,
Welcome to coreboot, and thank you for engaging with the project.
Am 08.11.22 um 21:23 schrieb Łukasz Jeleń:
I've got a progress: now it hangs at the last message 'No working controllers found'.
##
[DEBUG] BS: BS_PAYLOAD_LOAD exit times (exec / console): 0 / 825 ms [DEBUG] Jumping to boot code at 0x01110000(0x0fe84000)
U-Boot 2023.01-rc1-00019-g77b5cc2948 (Nov 08 2022 - 00:27:58 +0000)
CPU: x86, vendor Intel, device 590h DRAM: 253.9 MiB Core: 14 devices, 12 uclasses, devicetree: separate MMC: Loading Environment from nowhere... OK Video: No video mode configured in coreboot (err=-6) Video: No video mode configured in coreboot (err=-6) Vendor: Intel Model: Galileo BIOS Version: 4.18-402-g9429844f81-dirty BIOS date: 11/08/2022 Net: No ethernet found. No working controllers found
Congratulations. It looks like coreboot works and is able to load a payload. I do not know U-Boot, so I do not know what controllers are meant here. Maybe only the network controller, and U-Boot needs a driver?
As Intel Galileo is x86, please try another payload like GRUB, SeaBIOS or EDK Ⅱ.
It’d be great if you pushed your coreboot patches to Gerrit for review and others.
Kind regards,
Paul
Dear Łukasz,
Thank you for your continuous updates.
Am 13.12.22 um 04:56 schrieb Łukasz Jeleń:
I think GRUB does not work because it needs a VGA: https://www.coreboot.org/SeaBIOS#Adding_sgabios_support
and Galileo does not have one.
Do you mean a Video BIOS/VGA Option ROM port? Doesn’t SeaBIOS also need one?
GRUB can also log to the serial console, so it would still be worth a try.
I've build coreboot with payload 'GRUB atop SeaBIOS', then add vgaroms/sgabios.bin to coreboot.rom, but it still does not show anything.
As SeaBIOS is the primary payload, that means, it is loaded first, and it didn’t work before, it’s unfortunately the expected result.
I've managed to build EDK2 -> I had to install "nasm" on my host machine. I thought EDK2 will use nasm that was build by coreboot.
Interesting. No idea, if it’s a bug with the coreboot toolchain.
But, you left out the most important part: Does it work with EDK2, you built?
Kind regards,
Paul
Dear Paul,
Unfortunatelly EDK2 does not work.
SeaBios works after setting serial port address with: config option 'CONSOLE_UART_BASE_ADDRESS' to 0xA0019000 previously CONSOLE_UART_BASE_ADDRESS was empty, so SeaBIOS didn't know where to log data
Now the log from Galileo looks like this:
``` [DEBUG] Jumping to boot code at 0x000fd25b(0x0fe8d000) SeaBIOS (version rel-1.16.0-0-gd239552) BUILD: gcc: (coreboot toolchain v2022-09-18_c8870b1334) 11.2.0 binutils: (GNU Binutils) 2.37 SeaBIOS (version rel-1.16.0-0-gd239552) BUILD: gcc: (coreboot toolchain v2022-09-18_c8870b1334) 11.2.0 binutils: (GNU Binutils) 2.37 Found coreboot cbmem console @ fece000 Found mainboard Intel Galileo Relocating init from 0x000e0460 to 0x0fe03ac0 (size 54432) Found CBFS header at 0xffe0022c multiboot: eax=feb4f58, ebx=feb4f24 boot order: 1: /rom@img/grub2 2: Found 15 PCI devices (max PCI bus is 01) Copying SMBIOS from 0x0fe51000 to 0x000f67c0 Copying SMBIOS 3.0 from 0x0fe51020 to 0x000f67a0 Copying ACPI RSDP from 0x0fe69000 to 0x000f6770 table(50434146)=0x0fe692f0 (via xsdt) Using pmtimer, ioport 0x1008 table(324d5054)=0x0fe69480 (via xsdt) WARNING - Timeout at wait_reg8:81! Scan for VGA option rom No VGA found, scan for other display Turning on vga text mode console SeaBIOS (version rel-1.16.0-0-gd239552) WARNING - internal error detected at pci_enable_membar:186! WARNING - internal error detected at pci_enable_membar:186! WARNING - Timeout at i8042_flush:71! All threads complete. WARNING - internal error detected at pci_enable_membar:186! All threads complete. Searching bootorder for: HALT Found 0 lpt ports Found 0 serial ports Searching bootorder for: /rom@img/grub2 Scan for option roms Searching bootorder for: HALT Space available for UMB: c0000-ed000, f5fe0-f6770 Returned 262144 bytes of ZoneHigh e820 map has 5 items: 0: 0000000000000000 - 000000000009fc00 = 1 RAM 1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED 2: 00000000000f0000 - 0000000000100000 = 2 RESERVED 3: 0000000000100000 - 000000000fe51000 = 1 RAM 4: 000000000fe51000 - 0000000100000000 = 2 RESERVED enter handle_19: NULL Booting from CBFS... Run img/grub2 Calling addr 0x00009000
```
GRUB can also log to the serial console, so it would still be worth a
try.
OK, I'll try to get logs over serial port from GRUB
Thanks for your support,
Łukasz
On 13.12.2022 08:01, Paul Menzel wrote:
Dear Łukasz,
Thank you for your continuous updates.
Am 13.12.22 um 04:56 schrieb Łukasz Jeleń:
I think GRUB does not work because it needs a VGA: https://www.coreboot.org/SeaBIOS#Adding_sgabios_support
and Galileo does not have one.
Do you mean a Video BIOS/VGA Option ROM port? Doesn’t SeaBIOS also need one?
GRUB can also log to the serial console, so it would still be worth a try.
I've build coreboot with payload 'GRUB atop SeaBIOS', then add vgaroms/sgabios.bin to coreboot.rom, but it still does not show anything.
As SeaBIOS is the primary payload, that means, it is loaded first, and it didn’t work before, it’s unfortunately the expected result.
I've managed to build EDK2 -> I had to install "nasm" on my host machine. I thought EDK2 will use nasm that was build by coreboot.
Interesting. No idea, if it’s a bug with the coreboot toolchain.
But, you left out the most important part: Does it work with EDK2, you built?
Kind regards,
Paul
Hi Lukasz,
I have two Intel Galileo boards here (one each of Gen 1 and Gen 2) that would generously bought by the coreboot community for me to attempt to support the latest version of coreboot on them.
Over the last year, both personal and professional life has taken some unexpected twists and turns and I haven’t been able to commit the necessary amount of time to work with them. The boards are probably of more use to you now than they are to me. If you can send me an email with your postal address then I can arrange to get them shipped to you if you would like them.
-Andy.
Hi Andy,
I'll contact you. Galileo Gen 2 should be enough.
Łukasz
On 29.12.2022 10:28, Andy Pont wrote:
Hi Lukasz,
I have two Intel Galileo boards here (one each of Gen 1 and Gen 2) that would generously bought by the coreboot community for me to attempt to support the latest version of coreboot on them.
Over the last year, both personal and professional life has taken some unexpected twists and turns and I haven’t been able to commit the necessary amount of time to work with them. The boards are probably of more use to you now than they are to me. If you can send me an email with your postal address then I can arrange to get them shipped to you if you would like them.
-Andy.
Hello! Andy has the Gen 1 board been spoken for yet? I have both, but I'm more interested in the Gen 1 design. If it hasn't please advise and I'll supply my contact methods off list of course. ----- Gregg C Levine gregg.drwho8@gmail.com "This signature fought the Time Wars, time and again."
On Thu, Dec 29, 2022 at 11:39 AM Łukasz Jeleń deerjelen@gmail.com wrote:
Hi Andy,
I'll contact you. Galileo Gen 2 should be enough.
Łukasz
On 29.12.2022 10:28, Andy Pont wrote:
Hi Lukasz,
I have two Intel Galileo boards here (one each of Gen 1 and Gen 2) that would generously bought by the coreboot community for me to attempt to support the latest version of coreboot on them.
Over the last year, both personal and professional life has taken some unexpected twists and turns and I haven’t been able to commit the necessary amount of time to work with them. The boards are probably of more use to you now than they are to me. If you can send me an email with your postal address then I can arrange to get them shipped to you if you would like them.
-Andy.
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
Dear Paul,
i've tried to turn on logging on serial console with:
serial --port=0xA0019000 --speed=115200 --word=8 --parity=no --stop=1 terminal_input --append serial terminal_output --append serial
added to grub.cfg, but it does not work.
The thing I found: Quark soc has HSUART connected to MMIO32 at 0xA0019000, but GRUB expects serial to be at standard IO port e.g.: 0x03F8
Is there a way to make use MMIO32 serial with GRUB?
In SeaBIOS I can choose MMIO32 port at building stage with CONFIG_DEBUG_SERIAL_MMIO and CONFIG_DEBUG_SERIAL_MEM_ADDRESS and it works.
Kind regards, Łukasz
On 13.12.2022 08:01, Paul Menzel wrote:
Dear Łukasz,
Thank you for your continuous updates.
Am 13.12.22 um 04:56 schrieb Łukasz Jeleń:
I think GRUB does not work because it needs a VGA: https://www.coreboot.org/SeaBIOS#Adding_sgabios_support
and Galileo does not have one.
Do you mean a Video BIOS/VGA Option ROM port? Doesn’t SeaBIOS also need one?
GRUB can also log to the serial console, so it would still be worth a try.
I've build coreboot with payload 'GRUB atop SeaBIOS', then add vgaroms/sgabios.bin to coreboot.rom, but it still does not show anything.
As SeaBIOS is the primary payload, that means, it is loaded first, and it didn’t work before, it’s unfortunately the expected result.
I've managed to build EDK2 -> I had to install "nasm" on my host machine. I thought EDK2 will use nasm that was build by coreboot.
Interesting. No idea, if it’s a bug with the coreboot toolchain.
But, you left out the most important part: Does it work with EDK2, you built?
Kind regards,
Paul
Dear Łukasz,
Am 03.02.23 um 10:24 schrieb Łukasz Jeleń:
i've tried to turn on logging on serial console with:
serial --port=0xA0019000 --speed=115200 --word=8 --parity=no --stop=1 terminal_input --append serial terminal_output --append serial
added to grub.cfg, but it does not work.
The thing I found: Quark soc has HSUART connected to MMIO32 at 0xA0019000, but GRUB expects serial to be at standard IO port e.g.: 0x03F8
Is there a way to make use MMIO32 serial with GRUB?
I just know of the patches posted to the mailing list [1], but never dealt with that topic.
In SeaBIOS I can choose MMIO32 port at building stage with CONFIG_DEBUG_SERIAL_MMIO and CONFIG_DEBUG_SERIAL_MEM_ADDRESS and it works.
Where does it fail with SeaBIOS?
Kind regards,
Paul
[1]: https://lists.gnu.org/archive/html/grub-devel/2022-12/msg00261.html
Dear Paul,
On 6.02.2023 14:54, Paul Menzel wrote:
Dear Łukasz,
Am 03.02.23 um 10:24 schrieb Łukasz Jeleń:
i've tried to turn on logging on serial console with:
serial --port=0xA0019000 --speed=115200 --word=8 --parity=no --stop=1 terminal_input --append serial terminal_output --append serial
added to grub.cfg, but it does not work.
The thing I found: Quark soc has HSUART connected to MMIO32 at 0xA0019000, but GRUB expects serial to be at standard IO port e.g.: 0x03F8
Is there a way to make use MMIO32 serial with GRUB?
I just know of the patches posted to the mailing list [1], but never dealt with that topic.
I'll check that.
In SeaBIOS I can choose MMIO32 port at building stage with CONFIG_DEBUG_SERIAL_MMIO and CONFIG_DEBUG_SERIAL_MEM_ADDRESS and it works.
Where does it fail with SeaBIOS?
Here are logs from SeaBIOS (config: GRUB atop SeaBIOS):
""" SeaBIOS (version rel-1.16.1-0-g3208b09) BUILD: gcc: (coreboot toolchain v2023-02-01_b63eb4d172) 11.2.0 binutils: (GNU Binutils) 2.37 SeaBIOS (version rel-1.16.1-0-g3208b09) BUILD: gcc: (coreboot toolchain v2023-02-01_b63eb4d172) 11.2.0 binutils: (GNU Binutils) 2.37 Found coreboot cbmem console @ fece000 Found mainboard Intel Galileo Relocating init from 0x000e0440 to 0x0ee40aa0 (size 54464) Found CBFS header at 0xffe0022c multiboot: eax=feb5c18, ebx=feb5be4 Found 15 PCI devices (max PCI bus is 01) Copying SMBIOS from 0x0fe4e000 to 0x000f67c0 Copying SMBIOS 3.0 from 0x0fe4e020 to 0x000f67a0 Copying ACPI RSDP from 0x0fe66000 to 0x000f6770 table(50434146)=0x0fe662f0 (via xsdt) Using pmtimer, ioport 0x1008 table(324d5054)=0x0fe66480 (via xsdt) WARNING - Timeout at wait_reg8:81! Scan for VGA option rom No VGA found, scan for other display Turning on vga text mode console SeaBIOS (version rel-1.16.1-0-g3208b09) WARNING - internal error detected at pci_enable_membar:186! WARNING - internal error detected at pci_enable_membar:186! WARNING - Timeout at i8042_flush:71! All threads complete. WARNING - internal error detected at pci_enable_membar:186! All threads complete. Searching bootorder for: HALT Found 0 lpt ports Found 0 serial ports Searching bootorder for: /rom@img/grub2 Scan for option roms Searching bootorder for: HALT Space available for UMB: c0000-ed000, f5fe0-f6770 Returned 16777216 bytes of ZoneHigh e820 map has 5 items: 0: 0000000000000000 - 000000000009fc00 = 1 RAM 1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED 2: 00000000000f0000 - 0000000000100000 = 2 RESERVED 3: 0000000000100000 - 000000000fe4e000 = 1 RAM 4: 000000000fe4e000 - 0000000100000000 = 2 RESERVED enter handle_19: NULL Booting from CBFS... Run img/grub2 Calling addr 0x00009000 """
It means it hands over control to GRUB. I've checked with qemu that after "Calling addr 0x00009000" GRUB starts logging on screen / serial. So I see two possible scenarios: - GRUB started to work, but it cannot log to MMIO32 so it looks like it hung - GRUB doesn't work.
I'll check that MMIO32 patch and experiment with LED.
Kind regards, Łukasz
Dear Paul,
I ran newest GRUB2 atop SeaBIOS. It contains MMIO serial patch.
I also provided etc/grub.cfg in the coreboot payload
Last readable serial output output is:
' Run img/grub2 Calling addr 0x00009000 '
and after ~1s i get those bytes: 0x88 0x88 0x0C 0x0A 0x0A 0x00
I assume those bytes comes from GRUB
Kind regards,
Łukasz
W dniu 6.02.2023 o 14:54, Paul Menzel pisze:
Dear Łukasz,
Am 03.02.23 um 10:24 schrieb Łukasz Jeleń:
i've tried to turn on logging on serial console with:
serial --port=0xA0019000 --speed=115200 --word=8 --parity=no --stop=1 terminal_input --append serial terminal_output --append serial
added to grub.cfg, but it does not work.
The thing I found: Quark soc has HSUART connected to MMIO32 at 0xA0019000, but GRUB expects serial to be at standard IO port e.g.: 0x03F8
Is there a way to make use MMIO32 serial with GRUB?
I just know of the patches posted to the mailing list [1], but never dealt with that topic.
In SeaBIOS I can choose MMIO32 port at building stage with CONFIG_DEBUG_SERIAL_MMIO and CONFIG_DEBUG_SERIAL_MEM_ADDRESS and it works.
Where does it fail with SeaBIOS?
Kind regards,
Paul