From 8c17f83f516947173272091dad80c7f9581205b0 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 21 Mar 2012 23:27:31 +0100 Subject: [PATCH 1/2] Stop advertising S3 and S4 in DSDT (bz#704467) Conflicts: seabios.spec --- seabios-do-not-advertise-S4-S3-in-DSDT.patch | 65 ++++++++++++++++++++ seabios.spec | 12 +++- 2 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 seabios-do-not-advertise-S4-S3-in-DSDT.patch diff --git a/seabios-do-not-advertise-S4-S3-in-DSDT.patch b/seabios-do-not-advertise-S4-S3-in-DSDT.patch new file mode 100644 index 0000000..469c46a --- /dev/null +++ b/seabios-do-not-advertise-S4-S3-in-DSDT.patch @@ -0,0 +1,65 @@ +From 526d703a74752b66fd54ac4a9133a3de31c90549 Mon Sep 17 00:00:00 2001 +From: Gleb Natapov +Date: Sun, 11 Sep 2011 09:05:50 +0200 +Subject: [PATCH] do not advertise S4/S3 in DSDT + +RH-Author: Gleb Natapov +Message-id: <20110911090550.GF21417@redhat.com> +Patchwork-id: 32631 +O-Subject: [PATCHv2 RHEL6.2 SEABIOS] do not advertise S4/S3 in DSDT +Bugzilla: 736522 +RH-Acked-by: Gerd Hoffmann +RH-Acked-by: Marcelo Tosatti +RH-Acked-by: Markus Armbruster + +To compile Seabios with PM support run make "DSDT_CPP_FLAGS=-DDSDT_PM" + +BZ: 736522 +Upstream: local patch + +Signed-off-by: Gleb Natapov +-- + Gleb. + +Signed-off-by: Michal Novotny +--- + Makefile | 2 +- + src/acpi-dsdt.dsl | 2 ++ + 2 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index b185ac8..f5c7104 100644 +--- a/Makefile ++++ b/Makefile +@@ -186,7 +186,7 @@ $(OUT)vgabios.bin: $(OUT)vgabios.bin.raw tools/buildrom.py + ####### dsdt build rules + src/%.hex: src/%.dsl + @echo "Compiling DSDT" +- $(Q)cpp -P $< > $(OUT)$*.dsl.i ++ $(Q)cpp $(DSDT_CPP_FLAGS) -P $< > $(OUT)$*.dsl.i + $(Q)iasl -tc -p $(OUT)$* $(OUT)$*.dsl.i + $(Q)cp $(OUT)$*.hex $@ + +diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl +index b54c558..1db5ae9 100644 +--- a/src/acpi-dsdt.dsl ++++ b/src/acpi-dsdt.dsl +@@ -722,6 +722,7 @@ DefinitionBlock ( + } + } + ++#ifdef DSDT_PM + /* + * S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes: + * must match piix4 emulation. +@@ -740,6 +741,7 @@ DefinitionBlock ( + Zero, /* reserved */ + Zero /* reserved */ + }) ++#endif + Name (\_S5, Package (0x04) + { + Zero, /* PM1a_CNT.SLP_TYP */ +-- +1.7.4.4 + diff --git a/seabios.spec b/seabios.spec index 72ae825..8f2fb7c 100644 --- a/seabios.spec +++ b/seabios.spec @@ -1,6 +1,6 @@ Name: seabios Version: 0.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open-source legacy BIOS implementation Group: Applications/Emulators @@ -8,9 +8,11 @@ License: LGPLv3 URL: http://www.coreboot.org/SeaBIOS Source0: http://www.linuxtogo.org/~kevin/SeaBIOS/%{name}-%{version}.tar.gz +Patch00: seabios-do-not-advertise-S4-S3-in-DSDT.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: python +BuildRequires: python iasl ExclusiveArch: %{ix86} x86_64 Requires: %{name}-bin = %{version}-%{release} @@ -38,6 +40,8 @@ that a typical x86 proprietary BIOS implements. %prep %setup -q +%patch00 -p1 + # Makefile changes version to include date and buildhost sed -i 's,VERSION=%{version}.*,VERSION=%{version},g' Makefile @@ -74,6 +78,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Mar 21 2012 Paolo Bonzini - 0.6.1-2 +- Stop advertising S3 and S4 in DSDT (bz#704467) +- incdule iasl buildreq + * Mon Feb 14 2011 Justin M. forbes - 0.6.1-1 - Update to 0.6.1 upstream for a number of bugfixes From 47ed691f1fad69e755905e446492d103bf4836e0 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 21 Mar 2012 23:32:24 +0100 Subject: [PATCH 2/2] add fix-bregs-for-gcc.patch --- fix-bregs-for-gcc.patch | 17 +++++++++++++++++ seabios.spec | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 fix-bregs-for-gcc.patch diff --git a/fix-bregs-for-gcc.patch b/fix-bregs-for-gcc.patch new file mode 100644 index 0000000..99f9f71 --- /dev/null +++ b/fix-bregs-for-gcc.patch @@ -0,0 +1,17 @@ +diff --git a/src/bregs.h b/src/bregs.h +index 9a381d0..8e1af4d 100644 +--- a/src/bregs.h ++++ b/src/bregs.h +@@ -37,9 +37,9 @@ + struct bregs { + u16 ds; + u16 es; +- UREG(edi, di, di_hi, di_lo); +- UREG(esi, si, si_hi, si_lo); +- UREG(ebp, bp, bp_hi, bp_lo); ++ UREG(edi, di, dih, dil); ++ UREG(esi, si, sih, sil); ++ UREG(ebp, bp, bph, bpl); + UREG(ebx, bx, bh, bl); + UREG(edx, dx, dh, dl); + UREG(ecx, cx, ch, cl); diff --git a/seabios.spec b/seabios.spec index 8f2fb7c..4d9227f 100644 --- a/seabios.spec +++ b/seabios.spec @@ -9,6 +9,7 @@ URL: http://www.coreboot.org/SeaBIOS Source0: http://www.linuxtogo.org/~kevin/SeaBIOS/%{name}-%{version}.tar.gz Patch00: seabios-do-not-advertise-S4-S3-in-DSDT.patch +Patch01: fix-bregs-for-gcc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -41,6 +42,7 @@ that a typical x86 proprietary BIOS implements. %setup -q %patch00 -p1 +%patch01 -p1 # Makefile changes version to include date and buildhost sed -i 's,VERSION=%{version}.*,VERSION=%{version},g' Makefile @@ -79,6 +81,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Wed Mar 21 2012 Paolo Bonzini - 0.6.1-2 +- include fix for newer GCC - Stop advertising S3 and S4 in DSDT (bz#704467) - incdule iasl buildreq