summaryrefslogtreecommitdiff
path: root/resources/seabios
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2021-05-18 13:56:12 +0100
committerLeah Rowe <leah@libreboot.org>2021-05-18 13:56:12 +0100
commit89517ed6b9e89321e1387ed8f534d7f080ffdf57 (patch)
tree6f2085cb89b035d3cb62ad49b470a514672102d6 /resources/seabios
libreboot!
this is forked from the "libre" branch in osboot, which is itself a libre, deblobbed fork of osboot, a blobbed up fork of libreboot libreboot needed to be purged clean. this is the new libreboot development repository. the old one has been abandoned
Diffstat (limited to 'resources/seabios')
-rw-r--r--resources/seabios/config/libgfxinit95
-rw-r--r--resources/seabios/config/vgarom91
-rw-r--r--resources/seabios/patches/0001-Add-runtime-option-etc-only-load-option-roms-load-bu.patch58
3 files changed, 244 insertions, 0 deletions
diff --git a/resources/seabios/config/libgfxinit b/resources/seabios/config/libgfxinit
new file mode 100644
index 00000000..9c9fbe63
--- /dev/null
+++ b/resources/seabios/config/libgfxinit
@@ -0,0 +1,95 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# SeaBIOS Configuration
+#
+
+#
+# General Features
+#
+CONFIG_COREBOOT=y
+# CONFIG_QEMU is not set
+# CONFIG_CSM is not set
+# CONFIG_QEMU_HARDWARE is not set
+CONFIG_THREADS=y
+CONFIG_RELOCATE_INIT=y
+CONFIG_BOOTMENU=y
+CONFIG_BOOTSPLASH=y
+CONFIG_BOOTORDER=y
+CONFIG_HOST_BIOS_GEOMETRY=y
+CONFIG_COREBOOT_FLASH=y
+CONFIG_LZMA=y
+CONFIG_CBFS_LOCATION=0
+CONFIG_MULTIBOOT=y
+CONFIG_ENTRY_EXTRASTACK=y
+CONFIG_MALLOC_UPPERMEMORY=y
+CONFIG_ROM_SIZE=0
+
+#
+# Hardware support
+#
+CONFIG_ATA=y
+CONFIG_ATA_DMA=y
+# CONFIG_ATA_PIO32 is not set
+CONFIG_AHCI=y
+CONFIG_SDCARD=y
+CONFIG_MEGASAS=y
+CONFIG_FLOPPY=y
+CONFIG_FLASH_FLOPPY=y
+CONFIG_NVME=y
+CONFIG_PS2PORT=y
+CONFIG_USB=y
+CONFIG_USB_UHCI=y
+CONFIG_USB_OHCI=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_XHCI=y
+CONFIG_USB_MSC=y
+CONFIG_USB_UAS=y
+CONFIG_USB_HUB=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_USB_MOUSE=y
+CONFIG_SERIAL=y
+CONFIG_SERCON=y
+CONFIG_LPT=y
+CONFIG_RTC_TIMER=y
+CONFIG_HARDWARE_IRQ=y
+CONFIG_PMTIMER=y
+CONFIG_TSC_TIMER=y
+
+#
+# BIOS interfaces
+#
+CONFIG_DRIVES=y
+CONFIG_CDROM_BOOT=y
+CONFIG_CDROM_EMU=y
+CONFIG_PCIBIOS=y
+CONFIG_APMBIOS=y
+CONFIG_PNPBIOS=y
+CONFIG_OPTIONROMS=y
+CONFIG_PMM=y
+CONFIG_BOOT=y
+CONFIG_KEYBOARD=y
+CONFIG_KBD_CALL_INT15_4F=y
+CONFIG_MOUSE=y
+CONFIG_S3_RESUME=y
+CONFIG_VGAHOOKS=y
+# CONFIG_DISABLE_A20 is not set
+CONFIG_TCGBIOS=y
+
+#
+# VGA ROM
+#
+# CONFIG_NO_VGABIOS is not set
+# CONFIG_VGA_GEODEGX2 is not set
+# CONFIG_VGA_GEODELX is not set
+CONFIG_VGA_COREBOOT=y
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_EMULATE_TEXT=y
+CONFIG_VGA_FIXUP_ASM=y
+CONFIG_VGA_ALLOCATE_EXTRA_STACK=y
+CONFIG_VGA_EXTRA_STACK_SIZE=512
+CONFIG_VGA_VBE=y
+
+#
+# Debugging
+#
+CONFIG_DEBUG_LEVEL=0
diff --git a/resources/seabios/config/vgarom b/resources/seabios/config/vgarom
new file mode 100644
index 00000000..92b9c56c
--- /dev/null
+++ b/resources/seabios/config/vgarom
@@ -0,0 +1,91 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# SeaBIOS Configuration
+#
+
+#
+# General Features
+#
+CONFIG_COREBOOT=y
+# CONFIG_QEMU is not set
+# CONFIG_CSM is not set
+# CONFIG_QEMU_HARDWARE is not set
+CONFIG_THREADS=y
+CONFIG_RELOCATE_INIT=y
+CONFIG_BOOTMENU=y
+CONFIG_BOOTSPLASH=y
+CONFIG_BOOTORDER=y
+CONFIG_HOST_BIOS_GEOMETRY=y
+CONFIG_COREBOOT_FLASH=y
+CONFIG_LZMA=y
+CONFIG_CBFS_LOCATION=0
+CONFIG_MULTIBOOT=y
+CONFIG_ENTRY_EXTRASTACK=y
+CONFIG_MALLOC_UPPERMEMORY=y
+CONFIG_ROM_SIZE=0
+
+#
+# Hardware support
+#
+CONFIG_ATA=y
+CONFIG_ATA_DMA=y
+# CONFIG_ATA_PIO32 is not set
+CONFIG_AHCI=y
+CONFIG_SDCARD=y
+CONFIG_MEGASAS=y
+CONFIG_FLOPPY=y
+CONFIG_FLASH_FLOPPY=y
+CONFIG_NVME=y
+CONFIG_PS2PORT=y
+CONFIG_USB=y
+CONFIG_USB_UHCI=y
+CONFIG_USB_OHCI=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_XHCI=y
+CONFIG_USB_MSC=y
+CONFIG_USB_UAS=y
+CONFIG_USB_HUB=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_USB_MOUSE=y
+CONFIG_SERIAL=y
+CONFIG_SERCON=y
+CONFIG_LPT=y
+CONFIG_RTC_TIMER=y
+CONFIG_HARDWARE_IRQ=y
+CONFIG_PMTIMER=y
+CONFIG_TSC_TIMER=y
+
+#
+# BIOS interfaces
+#
+CONFIG_DRIVES=y
+CONFIG_CDROM_BOOT=y
+CONFIG_CDROM_EMU=y
+CONFIG_PCIBIOS=y
+CONFIG_APMBIOS=y
+CONFIG_PNPBIOS=y
+CONFIG_OPTIONROMS=y
+CONFIG_PMM=y
+CONFIG_BOOT=y
+CONFIG_KEYBOARD=y
+CONFIG_KBD_CALL_INT15_4F=y
+CONFIG_MOUSE=y
+CONFIG_S3_RESUME=y
+CONFIG_VGAHOOKS=y
+# CONFIG_DISABLE_A20 is not set
+CONFIG_TCGBIOS=y
+
+#
+# VGA ROM
+#
+CONFIG_NO_VGABIOS=y
+# CONFIG_VGA_GEODEGX2 is not set
+# CONFIG_VGA_GEODELX is not set
+# CONFIG_VGA_COREBOOT is not set
+# CONFIG_BUILD_VGABIOS is not set
+CONFIG_VGA_EXTRA_STACK_SIZE=512
+
+#
+# Debugging
+#
+CONFIG_DEBUG_LEVEL=0
diff --git a/resources/seabios/patches/0001-Add-runtime-option-etc-only-load-option-roms-load-bu.patch b/resources/seabios/patches/0001-Add-runtime-option-etc-only-load-option-roms-load-bu.patch
new file mode 100644
index 00000000..ee91d8c6
--- /dev/null
+++ b/resources/seabios/patches/0001-Add-runtime-option-etc-only-load-option-roms-load-bu.patch
@@ -0,0 +1,58 @@
+From 69d303f3860b4127343613785ceb5d52fa715321 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Sun, 16 May 2021 00:16:30 +0100
+Subject: [PATCH 1/1] Add runtime option: etc/only-load-option-roms (load, but
+ don't run)
+
+From anecdotal reports, sometimes it is useful; I've heard of instances where
+certain Nvidia graphics cards can, if using the nouveau driver on a GNU+Linux
+system, be used without running any option ROM, but where the option ROM has
+certain data tables in it that the driver can use.
+
+If set to 1, this will disable *all* option ROM loading, even SeaVGABIOS. It
+also affects CSM. In practise, the only time someone would ever use this is if
+they were using a graphics card in the above scenario. Such a use-case is
+incredibly rare.
+
+If set to 0, the normal behaviour can be observed (load, and execute). The
+run time option etc/pci-optionrom-exec will still be in effect.
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ src/optionroms.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/optionroms.c b/src/optionroms.c
+index e906ab9..db5e893 100644
+--- a/src/optionroms.c
++++ b/src/optionroms.c
+@@ -23,7 +23,7 @@
+ #include "util.h" // get_pnp_offset
+ #include "tcgbios.h" // tpm_*
+
+-static int EnforceChecksum, S3ResumeVga, RunPCIroms;
++static int EnforceChecksum, S3ResumeVga, RunPCIroms, OnlyLoadOptionRoms;
+
+
+ /****************************************************************
+@@ -34,6 +34,9 @@ static int EnforceChecksum, S3ResumeVga, RunPCIroms;
+ static void
+ __callrom(struct rom_header *rom, u16 offset, u16 bdf)
+ {
++ if (OnlyLoadOptionRoms)
++ return;
++
+ u16 seg = FLATPTR_TO_SEG(rom);
+ dprintf(1, "Running option rom at %04x:%04x\n", seg, offset);
+
+@@ -461,6 +464,7 @@ vgarom_setup(void)
+ EnforceChecksum = romfile_loadint("etc/optionroms-checksum", 1);
+ S3ResumeVga = romfile_loadint("etc/s3-resume-vga-init", CONFIG_QEMU);
+ RunPCIroms = romfile_loadint("etc/pci-optionrom-exec", 2);
++ OnlyLoadOptionRoms = romfile_loadint("etc/only-load-option-roms", 0);
+ ScreenAndDebug = romfile_loadint("etc/screen-and-debug", 1);
+
+ // Clear option rom memory
+--
+2.25.1
+