From e752ca9fdd5707e533e46b3258a609f681aa3a31 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 15:37:08 +0000 Subject: import seabios-1.7.5-11.el7 --- diff --git a/SOURCES/seabios-boot-switch-default-menu-key-to-ESC.patch b/SOURCES/seabios-boot-switch-default-menu-key-to-ESC.patch new file mode 100644 index 0000000..cea5605 --- /dev/null +++ b/SOURCES/seabios-boot-switch-default-menu-key-to-ESC.patch @@ -0,0 +1,50 @@ +From 24de64725e1000741dc9694464a3c4db4eaa0e36 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Thu, 9 Apr 2015 13:17:21 +0200 +Subject: [PATCH 2/2] boot: switch default menu key to ESC + +Message-id: <1428585441-26367-3-git-send-email-pbonzini@redhat.com> +Patchwork-id: 64759 +O-Subject: [PATCH RHEL7.2 seabios 2/2] boot: switch default menu key to ESC +Bugzilla: 841638 +RH-Acked-by: Miroslav Rezanina +RH-Acked-by: Gerd Hoffmann +RH-Acked-by: Laszlo Ersek + +On some platforms, F12 may be hard to access; for example, on OS X +machines F9-F12 have been intercepted by the OS for a long time, and +on newer OS X releases function keys are basically gone for good. + +Which keys are and are not available depends on the client, not on +the server, but only function keys are usually trapped by terminals. +Hence, using ESC for the boot menu avoids the problems associated +with F12. + +Signed-off-by: Paolo Bonzini +(cherry picked from commit a1ac8861049a5ffefc26ca294293ad666954fcc8) +Signed-off-by: Miroslav Rezanina + +Conflicts: + docs/Runtime_config.md [not in RHEL]. +--- + src/boot.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/boot.c b/src/boot.c +index ac79724..a719349 100644 +--- a/src/boot.c ++++ b/src/boot.c +@@ -459,8 +459,8 @@ interactive_bootmenu(void) + ; + + char *bootmsg = romfile_loadfile("etc/boot-menu-message", NULL); +- int menukey = romfile_loadint("etc/boot-menu-key", 0x86); +- printf("%s", bootmsg ?: "\nPress F12 for boot menu.\n\n"); ++ int menukey = romfile_loadint("etc/boot-menu-key", 1); ++ printf("%s", bootmsg ?: "\nPress ESC for boot menu.\n\n"); + free(bootmsg); + + u32 menutime = romfile_loadint("etc/boot-menu-wait", DEFAULT_BOOTMENU_WAIT); +-- +1.8.3.1 + diff --git a/SOURCES/seabios-boot.c-delay-exiting-boot-if-menu-key-is-ESC.patch b/SOURCES/seabios-boot.c-delay-exiting-boot-if-menu-key-is-ESC.patch new file mode 100644 index 0000000..7c22a4f --- /dev/null +++ b/SOURCES/seabios-boot.c-delay-exiting-boot-if-menu-key-is-ESC.patch @@ -0,0 +1,50 @@ +From 268461b7509f5d5a6b9b6d37ee8178966a3ff855 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Thu, 9 Apr 2015 13:17:20 +0200 +Subject: [PATCH 1/2] boot.c: delay exiting boot if menu key is ESC + +Message-id: <1428585441-26367-2-git-send-email-pbonzini@redhat.com> +Patchwork-id: 64758 +O-Subject: [PATCH RHEL7.2 seabios 1/2] boot.c: delay exiting boot if menu key is ESC +Bugzilla: 841638 +RH-Acked-by: Miroslav Rezanina +RH-Acked-by: Gerd Hoffmann +RH-Acked-by: Laszlo Ersek + +If the menu key is ESC, do not restart boot unless +1.5 seconds have passed. Otherwise users (trained by years of +repeatedly hitting keys to enter the BIOS) will end up hitting ESC +multiple times and immediately booting the primary boot device. + +Suggested-by: Matt DeVillier +Signed-off-by: Paolo Bonzini +(cherry picked from commit 80aae26c9ef060bde15aebd84d0cc79a978706a9) +Signed-off-by: Miroslav Rezanina +--- + src/boot.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/boot.c b/src/boot.c +index e60ed3e..ac79724 100644 +--- a/src/boot.c ++++ b/src/boot.c +@@ -486,9 +486,15 @@ interactive_bootmenu(void) + , strtcpy(desc, pos->description, ARRAY_SIZE(desc))); + } + +- // Get key press ++ // Get key press. If the menu key is ESC, do not restart boot unless ++ // 1.5 seconds have passed. Otherwise users (trained by years of ++ // repeatedly hitting keys to enter the BIOS) will end up hitting ESC ++ // multiple times and immediately booting the primary boot device. ++ int esc_accepted_time = irqtimer_calc(menukey == 1 ? 1500 : 0); + for (;;) { + scan_code = get_keystroke(1000); ++ if (scan_code == 1 && !irqtimer_check(esc_accepted_time)) ++ continue; + if (scan_code >= 1 && scan_code <= maxmenu+1) + break; + } +-- +1.8.3.1 + diff --git a/SOURCES/seabios-bootorder-Update-extra-pci-root-buses-bootorder-form.patch b/SOURCES/seabios-bootorder-Update-extra-pci-root-buses-bootorder-form.patch new file mode 100644 index 0000000..6614e9e --- /dev/null +++ b/SOURCES/seabios-bootorder-Update-extra-pci-root-buses-bootorder-form.patch @@ -0,0 +1,46 @@ +From 1522cd13558aa821de7435b291d47009907f3466 Mon Sep 17 00:00:00 2001 +From: Marcel Apfelbaum +Date: Tue, 14 Jul 2015 15:23:13 -0400 +Subject: [PATCH] bootorder: Update "extra pci root" buses bootorder format to + match qemu + +Message-id: <1436887393-17958-1-git-send-email-marcel@redhat.com> +Patchwork-id: 67011 +O-Subject: [RHEL-7.2 seabios PATCH] bootorder: Update "extra pci root" buses bootorder format to match qemu +Bugzilla: 1242968 +RH-Acked-by: Miroslav Rezanina +RH-Acked-by: Gerd Hoffmann +RH-Acked-by: Laszlo Ersek + +From: Kevin O'Connor + +The QEMU code will use the prefix "/pci@i0cf8,%x/" for devices on +extra pci root buses, so change the SeaBIOS code to match that. + +Signed-off-by: Kevin O'Connor +(cherry picked from commit 1202f03583f3b8b46e2de6b82630054d53e24801) +Signed-off-by: Marcel Apfelbaum +Signed-off-by: ymankad +--- + src/boot.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/boot.c b/src/boot.c +index a719349..05cb3e4 100644 +--- a/src/boot.c ++++ b/src/boot.c +@@ -111,9 +111,9 @@ build_pci_path(char *buf, int max, const char *devname, struct pci_device *pci) + if (pci->parent) { + p = build_pci_path(p, max, "pci-bridge", pci->parent); + } else { +- if (pci->rootbus) +- p += snprintf(p, max, "/pci-root@%x", pci->rootbus); + p += snprintf(p, buf+max-p, "%s", FW_PCI_DOMAIN); ++ if (pci->rootbus) ++ p += snprintf(p, buf+max-p, ",%x", pci->rootbus); + } + + int dev = pci_bdf_to_dev(pci->bdf), fn = pci_bdf_to_fn(pci->bdf); +-- +2.4.0 + diff --git a/SOURCES/seabios-fw-pci-map-memory-and-IO-regions-for-multiple-pci-ro.patch b/SOURCES/seabios-fw-pci-map-memory-and-IO-regions-for-multiple-pci-ro.patch new file mode 100644 index 0000000..f6d217e --- /dev/null +++ b/SOURCES/seabios-fw-pci-map-memory-and-IO-regions-for-multiple-pci-ro.patch @@ -0,0 +1,57 @@ +From 6a0ca65b28bdc8a4ddde752602cc36d4b825464a Mon Sep 17 00:00:00 2001 +From: Marcel Apfelbaum +Date: Wed, 24 Jun 2015 13:45:13 +0200 +Subject: [PATCH 2/2] fw/pci: map memory and IO regions for multiple pci root + buses + +Message-id: <1435153513-25431-3-git-send-email-marcel@redhat.com> +Patchwork-id: 66383 +O-Subject: [RHEL-7.2 seabios PATCH 2/2] fw/pci: map memory and IO regions for multiple pci root buses +Bugzilla: 1235381 +RH-Acked-by: Miroslav Rezanina +RH-Acked-by: Gerd Hoffmann +RH-Acked-by: Laszlo Ersek + +For resource sizing and mapping purposes treat devices on extra root +buses as if they are on the default root bus (bus 0). + +Signed-off-by: Kevin O'Connor +Signed-off-by: Marcel Apfelbaum +Signed-off-by: Gerd Hoffmann +(cherry picked from commit 0fe4c9ee7af5f6bb3a1fcbf1d39116a894600c90) +Signed-off-by: Miroslav Rezanina +--- + src/fw/pciinit.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c +index b2fd659..0ce7325 100644 +--- a/src/fw/pciinit.c ++++ b/src/fw/pciinit.c +@@ -655,6 +655,11 @@ static int pci_bios_check_devices(struct pci_bus *busses) + busses[pci->secondary_bus].bus_dev = pci; + + struct pci_bus *bus = &busses[pci_bdf_to_bus(pci->bdf)]; ++ if (!bus->bus_dev) ++ /* ++ * Resources for all root busses go in busses[0] ++ */ ++ bus = &busses[0]; + int i; + for (i = 0; i < PCI_NUM_REGIONS; i++) { + if ((pci->class == PCI_CLASS_BRIDGE_PCI) && +@@ -685,6 +690,11 @@ static int pci_bios_check_devices(struct pci_bus *busses) + if (!s->bus_dev) + continue; + struct pci_bus *parent = &busses[pci_bdf_to_bus(s->bus_dev->bdf)]; ++ if (!parent->bus_dev) ++ /* ++ * Resources for all root busses go in busses[0] ++ */ ++ parent = &busses[0]; + int type; + u8 shpc_cap = pci_find_capability(s->bus_dev, PCI_CAP_ID_SHPC); + for (type = 0; type < PCI_REGION_TYPE_COUNT; type++) { +-- +1.8.3.1 + diff --git a/SOURCES/seabios-fw-pci-scan-all-buses-if-extraroots-romfile-is-prese.patch b/SOURCES/seabios-fw-pci-scan-all-buses-if-extraroots-romfile-is-prese.patch new file mode 100644 index 0000000..13e0352 --- /dev/null +++ b/SOURCES/seabios-fw-pci-scan-all-buses-if-extraroots-romfile-is-prese.patch @@ -0,0 +1,51 @@ +From 25940705b84d4e1148789f018738a2cfeec74ab6 Mon Sep 17 00:00:00 2001 +From: Marcel Apfelbaum +Date: Wed, 24 Jun 2015 13:45:12 +0200 +Subject: [PATCH 1/2] fw/pci: scan all buses if extraroots romfile is present + +Message-id: <1435153513-25431-2-git-send-email-marcel@redhat.com> +Patchwork-id: 66382 +O-Subject: [RHEL-7.2 seabios PATCH 1/2] fw/pci: scan all buses if extraroots romfile is present +Bugzilla: 1235381 +RH-Acked-by: Miroslav Rezanina +RH-Acked-by: Gerd Hoffmann +RH-Acked-by: Laszlo Ersek + +From: Marcel Apfelbaum + +If there are extra primary root buses, scanning the bus's 0 +subtree is not enough. Scan all the range. + +Signed-off-by: Marcel Apfelbaum +Signed-off-by: Gerd Hoffmann +(cherry picked from commit 5cc7eece39721f20b417770374a4112c454be801) +Signed-off-by: Miroslav Rezanina +--- + src/fw/pciinit.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c +index 2e6382f..b2fd659 100644 +--- a/src/fw/pciinit.c ++++ b/src/fw/pciinit.c +@@ -498,8 +498,17 @@ pci_bios_init_bus_rec(int bus, u8 *pci_bus) + static void + pci_bios_init_bus(void) + { ++ u8 extraroots = romfile_loadint("etc/extra-pci-roots", 0); + u8 pci_bus = 0; ++ + pci_bios_init_bus_rec(0 /* host bus */, &pci_bus); ++ ++ if (extraroots) { ++ while (pci_bus < 0xff) { ++ pci_bus++; ++ pci_bios_init_bus_rec(pci_bus, &pci_bus); ++ } ++ } + } + + +-- +1.8.3.1 + diff --git a/SPECS/seabios.spec b/SPECS/seabios.spec index 8cde040..1a9d475 100644 --- a/SPECS/seabios.spec +++ b/SPECS/seabios.spec @@ -1,6 +1,6 @@ Name: seabios Version: 1.7.5 -Release: 8%{?dist} +Release: 11%{?dist} Summary: Open-source legacy BIOS implementation Group: Applications/Emulators @@ -31,6 +31,16 @@ Patch4: seabios-smbios-set-bios-vendor-version-fields-to-Seabios-0.5.patch Patch5: seabios-Workaround-for-a-win8.1-32-S4-resume-bug.patch # For bz#1096560 - fail to assign correct order for the boot device in seabios as we specified the bootindex in qemu-kvm cli(under the same virtio-scsi-pci) Patch6: seabios-boot-Fix-boot-order-for-SCSI-target-lun-9.patch +# For bz#841638 - Provide a platform agnostic approach to invoking the BIOS, boot menu, or other BIOS functions +Patch7: seabios-boot.c-delay-exiting-boot-if-menu-key-is-ESC.patch +# For bz#841638 - Provide a platform agnostic approach to invoking the BIOS, boot menu, or other BIOS functions +Patch8: seabios-boot-switch-default-menu-key-to-ESC.patch +# For bz#1235381 - RFE: configure guest NUMA node locality for guest PCI devices +Patch9: seabios-fw-pci-scan-all-buses-if-extraroots-romfile-is-prese.patch +# For bz#1235381 - RFE: configure guest NUMA node locality for guest PCI devices +Patch10: seabios-fw-pci-map-memory-and-IO-regions-for-multiple-pci-ro.patch +# For bz#1242968 - pci: support booting of devices behind PXB +Patch11: seabios-bootorder-Update-extra-pci-root-buses-bootorder-form.patch BuildRequires: python iasl ExclusiveArch: x86_64 %{power64} @@ -87,6 +97,11 @@ SeaVGABIOS is an open-source VGABIOS implementation. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 # Store version to be used echo "%{name}-%{version}-%release" > .version @@ -141,6 +156,23 @@ install -m 0644 binaries/vgabios*.bin $RPM_BUILD_ROOT%{_datadir}/seavgabios %endif %changelog +* Wed Jul 15 2015 Yash Mankad - 1.7.5-11.el7 +- seabios-bootorder-Update-extra-pci-root-buses-bootorder-form.patch [bz#1242968] +- Resolves: bz#1242968 + (pci: support booting of devices behind PXB) + +* Tue Jul 07 2015 Miroslav Rezanina - 1.7.5-10.el7 +- seabios-fw-pci-scan-all-buses-if-extraroots-romfile-is-prese.patch [bz#1235381] +- seabios-fw-pci-map-memory-and-IO-regions-for-multiple-pci-ro.patch [bz#1235381] +- Resolves: bz#1235381 + (RFE: configure guest NUMA node locality for guest PCI devices) + +* Thu Apr 23 2015 Miroslav Rezanina - 1.7.5-9.el7_1 +- seabios-boot.c-delay-exiting-boot-if-menu-key-is-ESC.patch [bz#841638] +- seabios-boot-switch-default-menu-key-to-ESC.patch [bz#841638] +- Resolves: bz#841638 + (Provide a platform agnostic approach to invoking the BIOS, boot menu, or other BIOS functions) + * Tue Jan 20 2015 Miroslav Rezanina - 1.7.5-8.el7 - seabios-turn-off-stack-switching-for-vgabios.patch [bz#1182634] - Resolves: bz#1182634