[SeaBIOS] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
QEMU may want to disable guest's S3/S4 support and it wants to distinguish between regular powerdown and S4 powerdown. To support that new fw_cfg option was added that passes supported system states and what value should guest use to enter each state. States are passed in 6 byte array. Each byte

[SeaBIOS] [PATCH 1/3] Fix aml_name_string() to recognize block name modifiers.

2012-05-20 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- tools/acpi_extract.py |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py index 5f613e4..8038269 100755 --- a/tools/acpi_extract.py +++ b/tools/acpi_extract.py @@ -121,7

Re: [SeaBIOS] [PATCH 1/3] Fix aml_name_string() to recognize block name modifiers.

2012-05-20 Thread Alon Levy
On Sun, May 20, 2012 at 12:03:38PM +0300, Gleb Natapov wrote: Signed-off-by: Gleb Natapov g...@redhat.com --- tools/acpi_extract.py |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py index 5f613e4..8038269 100755

Re: [SeaBIOS] [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 12:03 PM, Gleb Natapov wrote: QEMU may want to disable guest's S3/S4 support and it wants to distinguish between regular powerdown and S4 powerdown. To support that new fw_cfg option was added that passes supported system states and what value should guest use to enter each

Re: [SeaBIOS] [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 03:15 PM, Gleb Natapov wrote: On Sun, May 20, 2012 at 02:44:51PM +0300, Avi Kivity wrote: On 05/20/2012 12:03 PM, Gleb Natapov wrote: QEMU may want to disable guest's S3/S4 support and it wants to distinguish between regular powerdown and S4 powerdown. To support that new

Re: [SeaBIOS] [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 03:36 PM, Gleb Natapov wrote: On Sun, May 20, 2012 at 03:30:50PM +0300, Avi Kivity wrote: On 05/20/2012 03:15 PM, Gleb Natapov wrote: On Sun, May 20, 2012 at 02:44:51PM +0300, Avi Kivity wrote: On 05/20/2012 12:03 PM, Gleb Natapov wrote: QEMU may want to disable

Re: [SeaBIOS] [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 03:47:02PM +0300, Avi Kivity wrote: On 05/20/2012 03:36 PM, Gleb Natapov wrote: On Sun, May 20, 2012 at 03:30:50PM +0300, Avi Kivity wrote: On 05/20/2012 03:15 PM, Gleb Natapov wrote: On Sun, May 20, 2012 at 02:44:51PM +0300, Avi Kivity wrote: On 05/20/2012

Re: [SeaBIOS] [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 03:59 PM, Gleb Natapov wrote: Do we actually have to patch the DSDT? Or can _S3 etc be made into functions instead? (and talk to the bios, or even to fwcfg directly?) We better not talk to fwcfg after OSPM is started since this is firmware

Re: [SeaBIOS] [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 05:43 PM, Gleb Natapov wrote: Or it can be a fixed address in low memory, or a scratch register in hardware. Both will work (fixed addresses are better be avoided and who needs another PV device), but I do not see how either of them is better then patching. What is your

Re: [SeaBIOS] [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 05:46:46PM +0300, Avi Kivity wrote: On 05/20/2012 05:43 PM, Gleb Natapov wrote: Or it can be a fixed address in low memory, or a scratch register in hardware. Both will work (fixed addresses are better be avoided and who needs another PV device), but I do

Re: [SeaBIOS] [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Kevin O'Connor
On Sun, May 20, 2012 at 06:15:44PM +0300, Gleb Natapov wrote: On Sun, May 20, 2012 at 05:46:46PM +0300, Avi Kivity wrote: On 05/20/2012 05:43 PM, Gleb Natapov wrote: Or it can be a fixed address in low memory, or a scratch register in hardware. Both will work (fixed

Re: [SeaBIOS] [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Kevin O'Connor
On Sun, May 20, 2012 at 07:25:40PM +0300, Avi Kivity wrote: On 05/20/2012 07:16 PM, Kevin O'Connor wrote: Here we in agreement, and I was against patching till it was unavoidable, but than pci hotplug started using it, and afterwards processor definitions, so no point in avoiding it now

Re: [SeaBIOS] [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 12:39:13PM -0400, Kevin O'Connor wrote: On Sun, May 20, 2012 at 07:25:40PM +0300, Avi Kivity wrote: On 05/20/2012 07:16 PM, Kevin O'Connor wrote: Here we in agreement, and I was against patching till it was unavoidable, but than pci hotplug started using it,

[SeaBIOS] [PATCH 1/9] Use the e-segment instead of the 9-segment for bios low mem.

2012-05-20 Thread Kevin O'Connor
Use the e-segment for ZoneLow allocations. There is plenty of e-segment space (there has been since SeaBIOS supported code relocation), while using the 9-segment space can impact old real-mode applications. Signed-off-by: Kevin O'Connor ke...@koconnor.net --- src/config.h |1 +

[SeaBIOS] [PATCH 2/9] Add mechanism to declare variables as low mem and use for extra stack.

2012-05-20 Thread Kevin O'Connor
Add a mechanism (VARLOW declaration) to make a variable reside in the low memory (e-segment) area. This is useful for runtime variables that need to be accessed from 16bit code and need to be modifiable during runtime. Move the 16bit extra stack from the EBDA to the low memory area using this

[SeaBIOS] [PATCH 3/9] Convert timer code EBDA variables to VARLOW variables.

2012-05-20 Thread Kevin O'Connor
Signed-off-by: Kevin O'Connor ke...@koconnor.net --- src/biosvar.h |6 -- src/clock.c | 32 +--- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/biosvar.h b/src/biosvar.h index 88b3257..45561d9 100644 --- a/src/biosvar.h +++

[SeaBIOS] [PATCH 4/9] Convert boot code EBDA variables to VARLOW variables.

2012-05-20 Thread Kevin O'Connor
Signed-off-by: Kevin O'Connor ke...@koconnor.net --- src/biosvar.h |2 -- src/boot.c| 13 ++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/biosvar.h b/src/biosvar.h index 45561d9..2458308 100644 --- a/src/biosvar.h +++ b/src/biosvar.h @@ -234,8 +234,6 @@

[SeaBIOS] [PATCH 6/9] Convert USB keyboard code EBDA variables to VARLOW variables.

2012-05-20 Thread Kevin O'Connor
Signed-off-by: Kevin O'Connor ke...@koconnor.net --- src/biosvar.h | 12 src/usb-hid.c | 17 ++--- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/biosvar.h b/src/biosvar.h index c19bc85..6521acf 100644 --- a/src/biosvar.h +++ b/src/biosvar.h @@

[SeaBIOS] [PATCH 9/9] Convert GET/SET_FLATPTR() accesses to low mem to GET/SET_LOWFLAT().

2012-05-20 Thread Kevin O'Connor
Add new GET/SET_LOWFLAT() macros and convert appropriate users to them. The new macros make for slightly better code generation. Signed-off-by: Kevin O'Connor ke...@koconnor.net --- src/biosvar.h |6 +- src/usb-ehci.c | 40 +++- src/usb-ohci.c |

[SeaBIOS] [PATCH 7/9] Convert disk code EBDA variables to VARLOW variables.

2012-05-20 Thread Kevin O'Connor
Signed-off-by: Kevin O'Connor ke...@koconnor.net --- src/biosvar.h | 43 + src/block.c|1 + src/blockcmd.h |2 + src/boot.c |6 +-- src/cdrom.c| 84 src/coreboot.c |3 +-

[SeaBIOS] [PATCH] Allow optionroms and low mem to share space.

2012-05-20 Thread Kevin O'Connor
Allow both optionroms and low mem allocations to use the e-segment. (Space is allocated on a first come, first serve basis). This allows more flexibility in resource assignment. Also, allow the low mem area to use a full 64K. Signed-off-by: Kevin O'Connor ke...@koconnor.net --- src/config.h