Project

General

Profile

Actions

Bug #549

open

coreboot 24.05: SeaBIOS Windows 10/11 BSOD "ACPI BIOS ERROR" (Thinkpad W530)

Added by Anonymous 5 months ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
board support
Target version:
Start date:
07/31/2024
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Lenovo ThinkPad W530
Affected OS:
Windows 10/11

Description

When using the latest coreboot (i.e. using command git clone https://review.coreboot.org/coreboot), which is currently 24.05, to build a rom for Thinkpad W530, I get BSOD with "ACPI BIOS ERROR" when trying to boot into Windows 10 or 11 from SeaBIOS. Even just booting from a Windows install usb will show this error.

This is even with incorporating the vga bios files (so i can external displays to work) - see my defconfig.

Did consider using EDK2 apparently Windows support is pretty solid, but could never make a successful build - not that make command had errors, but once flashing, would just having white underscore and have to recover with external flashing. A separate issue to write about in and of itself, but I prefer SeaBIOS so I'll be sticking with that.

I am quite new to coreboot - using for only about 2-3 months now. Let me know if there is further information I should provide.


Files

defconfig (590 Bytes) defconfig My coreboot defconfig Anonymous, 07/31/2024 02:21 PM
w530_bsod.jpg (1.98 MB) w530_bsod.jpg Windows BSOD ACPI Error Picture Anonymous, 07/31/2024 02:34 PM
dsl_files.zip (25 KB) dsl_files.zip Anonymous, 07/31/2024 03:00 PM
boot.jpg (2.95 MB) boot.jpg The first thing I see Anonymous, 08/01/2024 05:12 PM
shell.jpg (2.96 MB) shell.jpg When I press any key Anonymous, 08/01/2024 05:12 PM
menu.jpg (2.02 MB) menu.jpg Boot menu Anonymous, 08/01/2024 05:12 PM
ventoy-win11.jpg (2.35 MB) ventoy-win11.jpg Anonymous, 08/05/2024 02:58 PM
rufus-win11.png (6.99 MB) rufus-win11.png Anonymous, 08/05/2024 09:10 PM
vga_rom_display_1.png (64.5 KB) vga_rom_display_1.png Anonymous, 08/11/2024 11:51 AM
vga_rom_display_2.png (71.4 KB) vga_rom_display_2.png Anonymous, 08/11/2024 11:51 AM
vga_rom_display_3.png (58.5 KB) vga_rom_display_3.png Anonymous, 08/11/2024 11:51 AM
vga_rom_display_4.png (73.3 KB) vga_rom_display_4.png Anonymous, 08/11/2024 11:51 AM
Actions #1

Updated by Matt DeVillier 5 months ago

Simon Dominic wrote:

When using the latest coreboot (i.e. using command git clone https://review.coreboot.org/coreboot), which is currently 24.05, to build a rom for Thinkpad W530, I get BSOD with "ACPI BIOS ERROR" when trying to boot into Windows 10 or 11 from SeaBIOS. Even just booting from a Windows install usb will show this error.

This is even with incorporating the vga bios files (so i can external displays to work) - see my defconfig.

Did consider using EDK2 apparently Windows support is pretty solid, but could never make a successful build - not that make command had errors, but once flashing, would just having white underscore and have to recover with external flashing. A separate issue to write about in and of itself, but I prefer SeaBIOS so I'll be sticking with that.

I am quite new to coreboot - using for only about 2-3 months now. Let me know if there is further information I should provide.

quite simply, coreboot's ACPI for your device booted in legacy BIOS mode isn't Windows compliant. Boot linux, install acpica-tools, run sudo acpidump -b then sudo iasl -d *.dat and zip/attach the resulting .dsl files here.

IMO edk2 is the better choice for running Win10/11, and is known to work well. A flashing cursor sounds like you changed the display mode to text vs graphical, or didn't reset your config when changing payloads. edk2 + libgfxinit with defaults should boot Windows on your device.

Actions #2

Updated by Anonymous 5 months ago

Actions #3

Updated by Anonymous 5 months ago

Matt DeVillier wrote in #note-1:

IMO edk2 is the better choice for running Win10/11, and is known to work well. A flashing cursor sounds like you changed the display mode to text vs graphical, or didn't reset your config when changing payloads. edk2 + libgfxinit with defaults should boot Windows on your device.

You're talking about Devices --> Graphics initialization, right? That's probably it - I didn't touch that and by default is set to "Run VGA Option ROMS".

Btw, if I use the me_cleaner script to shrink the me, what should the size of cbfs be set to take up the free space?

Actions #4

Updated by Matt DeVillier 5 months ago · Edited

You're talking about Devices --> Graphics initialization, right? That's probably it - I didn't touch that and by default is set to "Run VGA Option ROMS".

Btw, if I use the me_cleaner script to shrink the me, what should the size of cbfs be set to take up the free space?

edk2 requires a graphical framebuffer, either libgfxinit w/linear high-res framebuffer, or VGA BIOS with a VESA mode set. The latter is not recommended, nor the default when edk2 is selected as the payload from a clean config.

don't mess with ME cleaner until you have coreboot working properly, no need to add another variable to the mix. the CBFS size can be set plenty large enough for edk2 (2MB should suffice) without needed to shrink the ME region / enlarge the bios region.

here is a sane defconfig for W530 + edk2:

CONFIG_VENDOR_LENOVO=y
CONFIG_CBFS_SIZE=0x200000
CONFIG_BOARD_LENOVO_W530=y
CONFIG_PAYLOAD_EDK2=y
CONFIG_EDK2_BOOT_MANAGER_ESCAPE=y
CONFIG_EDK2_FOLLOW_BGRT_SPEC=y
# CONFIG_EDK2_FULL_SCREEN_SETUP is not set

obviously since no IFD/ME blobs are included, you would just flash the bios region (using --ifd -i bios)

Actions #5

Updated by Anonymous 5 months ago

What's your verdict on the .dsl files provided?

Actions #6

Updated by Matt DeVillier 5 months ago

Simon Dominic wrote in #note-5:

What's your verdict on the .dsl files provided?

nothing jumps out at me, but I also don't know what Windows in legacy boot vs Windows in UEFI boot wants differently -- just that they are

Updated by Anonymous 5 months ago

Finally able to boot into edk2 - thanks a lot! Will test with Windows later.

The only problem is I can't boot into my existing (Debian) Linux drive encrypted with LUKS.

Pictures of the errors provided.

Actions #8

Updated by Matt DeVillier 5 months ago

Simon Dominic wrote in #note-7:

Finally able to boot into edk2 - thanks a lot! Will test with Windows later.

The only problem is I can't boot into my existing (Debian) Linux drive encrypted with LUKS.

Pictures of the errors provided.

well, if it's legacy installed, you need to migrate to a UEFI-compatible bootloader. Plenty of guides on adding an EFI partition and installing the bootloader

Actions #9

Updated by Anonymous 5 months ago · Edited

Matt DeVillier wrote in #note-4:

here is a sane defconfig for W530 + edk2:

CONFIG_VENDOR_LENOVO=y
CONFIG_CBFS_SIZE=0x200000
CONFIG_BOARD_LENOVO_W530=y
CONFIG_PAYLOAD_EDK2=y
CONFIG_EDK2_BOOT_MANAGER_ESCAPE=y
CONFIG_EDK2_FOLLOW_BGRT_SPEC=y
# CONFIG_EDK2_FULL_SCREEN_SETUP is not set

With that defconfig confirmed to be working, I tried adding a few other things, including vga bios (to get external displays working):

CONFIG_VENDOR_LENOVO=y
CONFIG_CBFS_SIZE=0x200000
CONFIG_VGA_BIOS_DGPU_ID="10de,0ffc"
CONFIG_VGA_BIOS=y
CONFIG_IFD_BIN_PATH="descriptor.bin"
CONFIG_ME_BIN_PATH="me.bin"
CONFIG_GBE_BIN_PATH="gbe.bin"
CONFIG_VGA_BIOS_FILE="vgabios/8086,0166.rom"
CONFIG_HAVE_IFD_BIN=y
CONFIG_BOARD_LENOVO_W530=y
CONFIG_H8_FN_CTRL_SWAP=y
CONFIG_HAVE_ME_BIN=y
CONFIG_USE_ME_CLEANER=y
CONFIG_HAVE_GBE_BIN=y
CONFIG_MAINBOARD_USE_LIBGFXINIT=y
CONFIG_VGA_BIOS_DGPU=y
CONFIG_VGA_BIOS_DGPU_FILE="vgabios/10de,0ffc.rom"
CONFIG_PAYLOAD_EDK2=y
CONFIG_EDK2_BOOT_MANAGER_ESCAPE=y
# CONFIG_EDK2_FULL_SCREEN_SETUP is not set

However, CBFS at 2MB (0x200000) is too small to have VGA BIOS. Thus, I get this error:

Image SIZE 12582912
    CBFS       cpu_microcode_blob.bin
    CBFS       fallback/ramstage
    CBFS       config
    CBFS       revision
    CBFS       build_info
    CBFS       fallback/dsdt.aml
    CBFS       vbt.bin
    CBFS       cmos_layout.bin
    CBFS       pci8086,0166.rom
    CBFS       pci10de,0ffc.rom
    CBFS       fallback/postcar
    CBFS       fallback/payload
E: Could not add [build/UEFIPAYLOAD.fd, 1308190 bytes (1277 KB)@0x0]; too big?
E: Failed to add 'build/UEFIPAYLOAD.fd' into ROM image.
E: Failed while operating on 'COREBOOT' region!
E: The image will be left unmodified.
make: *** [Makefile.mk:1214: build/coreboot.pre] Error 1

Changing it to 3MB (0x300000) creates a successful build. I assume CBFS at 3MB is acceptable/sane?

Btw, where do I find CONFIG_EDK2_FOLLOW_BGRT_SPEC=y in menuconfig?

Actions #10

Updated by Anonymous 5 months ago

Simon Dominic wrote in #note-7:

Finally able to boot into edk2 - thanks a lot! Will test with Windows later.

The only problem is I can't boot into my existing (Debian) Linux drive encrypted with LUKS.

Pictures of the errors provided.

I reinstalled Debian but I still get the same message (boot.jpg). However, I have to manually boot from file EFI/debian/grubx64.efi. How can this be fixed to boot from there automatically?

Also, when I use nvramtool to change hybrid_graphics_mode to "Discrete Only", I get black screen. But displays shows for "Integrated Only" and "Dual Graphics".

Actions #11

Updated by Matt DeVillier 5 months ago

Simon Dominic wrote in #note-10:

I reinstalled Debian but I still get the same message (boot.jpg). However, I have to manually boot from file EFI/debian/grubx64.efi. How can this be fixed to boot from there automatically?

Normally, the bootloader would add the boot entry to the bootorder list. Do you have SMMSTORE enabled? That's needed for UEFI NVRAM to work. If so, you can add a bootorder entry manually for that target

Also, when I use nvramtool to change hybrid_graphics_mode to "Discrete Only", I get black screen. But displays shows for "Integrated Only" and "Dual Graphics".

I have no experience with dGPUs or hybrid graphics unfortunately

Actions #12

Updated by Anonymous 5 months ago

Matt DeVillier wrote in #note-1:

IMO edk2 is the better choice for running Win10/11, and is known to work well.

When I try to boot Windows iso from ventoy usb, I get an error: "The Boot Configuration Data for your PC is missing or contains errors."

Actions #13

Updated by Matt DeVillier 5 months ago

Simon Dominic wrote in #note-12:

When I try to boot Windows iso from ventoy usb, I get an error: "The Boot Configuration Data for your PC is missing or contains errors."

no experience doing it that way, only via an ISO written to USB using MS' tool or Rufus.

Actions #14

Updated by Anonymous 5 months ago

Matt DeVillier wrote in #note-13:

no experience doing it that way, only via an ISO written to USB using MS' tool or Rufus.

Tried doing it with Rufus (keeping "Partition scheme" as GPT), but I get this.

Actions #15

Updated by Matt DeVillier 5 months ago · Edited

Simon Dominic wrote in #note-14:

Tried doing it with Rufus (keeping "Partition scheme" as GPT), but I get this.

Rufus is breaking things by trying to unload the existing NTFS EFI driver and load its own. Version 4.5 added this new feature, anything earlier should work properly.

edit: the bug is in the UEFI-NTFS driver that Rufus is using, it's been fixed in the latest one but Rufus has yet to update.

ref: https://github.com/pbatard/uefi-ntfs/releases

Updated by Anonymous 4 months ago

Matt DeVillier wrote in #note-4:

edk2 requires a graphical framebuffer, either libgfxinit w/linear high-res framebuffer, or VGA BIOS with a VESA mode set. The latter is not recommended, nor the default when edk2 is selected as the payload from a clean config.

I could be completely wrong, but I gather libgfxinit (as opposed to "VGA Option ROMS") is disabling (full) activation of the dGPU. If I wanted to go that latter not-recommended route, how should display mode be set up?

Attached is what menuconfig shows if I look through some of the settings for "Display" (if I choose "VGA Option ROMS" as "Graphics initialization"):

  • Screenshot 1 is what "Display" looks like without touching anything (Here, "Framebuffer mode" can only be set to "Legacy VGA text mode").
  • 2 is ticking "Set framebuffer graphics resolution" and touching nothing else.
  • 3 shows the options for "Framebuffer mode" after doing 2.
  • 4 shows what it looks like after setting "Framebuffer mode" to "VESA framebuffer".
Actions #17

Updated by Anonymous 4 months ago

Simon Dominic wrote in #note-16:

I could be completely wrong, but I gather libgfxinit (as opposed to "VGA Option ROMS") is disabling (full) activation of the dGPU. If I wanted to go that latter not-recommended route, how should display mode be set up?

Any thoughts?

Actions

Also available in: Atom PDF