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