[SeaBIOS] [PATCH v5 1/5] QEMU DMA: Add DMA write capability

2017-02-17 Thread ben
From: Ben Warren This allows BIOS to write data back to QEMU using the DMA interface and provides a higher-level abstraction to write to a fw_cfg file Signed-off-by: Ben Warren --- src/fw/paravirt.c | 49

[SeaBIOS] [PATCH v5 4/5] QEMU fw_cfg: Add functions for accessing files by key

2017-02-17 Thread ben
From: Ben Warren When resuming from S3, only fw_cfg file keys are known. Signed-off-by: Ben Warren --- src/fw/paravirt.c | 23 +++ src/fw/paravirt.h | 2 ++ 2 files changed, 25 insertions(+) diff --git a/src/fw/paravirt.c

[SeaBIOS] [PATCH v5 0/5] QEMU: Add capability to write back fw_cfg address to QEMU

2017-02-17 Thread ben
From: Ben Warren This patch set adds the capability to write to QEMU across the fw_cfg DMA link. It adds a higher-level command to write the BIOS-allocated address of one fw_cfg file into an arbitrary point within another, writeable fw_cfg file across the

[SeaBIOS] [PATCH v5 5/5] QEMU fw_cfg: Write fw_cfg back on S3 resume

2017-02-17 Thread ben
From: Ben Warren Any pointers to BIOS-allocated memory that were written back to QEMU fw_cfg files are replayed when resuming from S3 sleep. Signed-off-by: Ben Warren --- src/fw/romfile_loader.c | 35 +++

[SeaBIOS] [PATCH v5 2/5] romfile-loader: Switch to using named structs

2017-02-17 Thread ben
From: Ben Warren This is a little cleaner and matches how the command structures are defined in QEMU. Signed-off-by: Ben Warren Reviewed-by: Laszlo Ersek --- src/fw/romfile_loader.c | 34 +-

[SeaBIOS] [PATCH v5 3/5] QEMU fw_cfg: Add command to write back address of file

2017-02-17 Thread ben
From: Ben Warren This command is similar to ADD_POINTER, but instead of patching memory, it writes the pointer back to QEMU over the DMA interface. Signed-off-by: Ben Warren --- src/fw/romfile_loader.c | 45

Re: [SeaBIOS] varlow/extrastack vs code

2017-02-17 Thread Kevin O'Connor
On Fri, Feb 17, 2017 at 02:12:57PM +0100, Paolo Bonzini wrote: > On 15/02/2017 18:35, Dr. David Alan Gilbert wrote: > > Yes it seems to. > > One worry is that if we ever fix the qemu triple-fault so it really > > does what you're describing and only resets the CPU, then I'm not > > sure your int3

Re: [SeaBIOS] [PATCH v3 2/2] QEMU fw_cfg: Add command to write back address of file

2017-02-17 Thread Ben Warren
> On Feb 17, 2017, at 2:06 AM, Laszlo Ersek wrote: > > CC Kevin > > On 02/17/17 07:10, Ben Warren wrote: >> Hi Laszlo >>> On Feb 9, 2017, at 12:24 AM, Laszlo Ersek >> > wrote: >>> >>> On 02/09/17 09:17, Laszlo Ersek wrote:

Re: [SeaBIOS] varlow/extrastack vs code

2017-02-17 Thread Laszlo Ersek
On 02/17/17 14:10, Paolo Bonzini wrote: > > > On 15/02/2017 16:52, Kevin O'Connor wrote: >> On Wed, Feb 15, 2017 at 11:01:03AM +0100, Laszlo Ersek wrote: >>> On 02/14/17 20:14, Kevin O'Connor wrote: On Tue, Feb 14, 2017 at 07:52:01PM +0100, Laszlo Ersek wrote: > If item (1) is fixed in

Re: [SeaBIOS] [PATCH v3 2/2] QEMU fw_cfg: Add command to write back address of file

2017-02-17 Thread Igor Mammedov
On Fri, 17 Feb 2017 11:06:54 +0100 Laszlo Ersek wrote: > CC Kevin > > On 02/17/17 07:10, Ben Warren wrote: > > Hi Laszlo > >> On Feb 9, 2017, at 12:24 AM, Laszlo Ersek >> > wrote: > >> > >> On 02/09/17 09:17, Laszlo Ersek

Re: [SeaBIOS] varlow/extrastack vs code

2017-02-17 Thread Paolo Bonzini
On 15/02/2017 18:35, Dr. David Alan Gilbert wrote: > Yes it seems to. > One worry is that if we ever fix the qemu triple-fault so it really > does what you're describing and only resets the CPU, then I'm not > sure your int3 is the right choice. > > The other question is whether that

Re: [SeaBIOS] varlow/extrastack vs code

2017-02-17 Thread Paolo Bonzini
On 14/02/2017 22:50, Gerd Hoffmann wrote: > Hi, > >> Just for historical perspective - the reason I think qemu didn't >> implement the pam "read from rom and write to memory" mode is that I >> don't think there's a good way to emulate that with page tables (and >> the range needs to be

Re: [SeaBIOS] varlow/extrastack vs code

2017-02-17 Thread Paolo Bonzini
On 15/02/2017 16:52, Kevin O'Connor wrote: > On Wed, Feb 15, 2017 at 11:01:03AM +0100, Laszlo Ersek wrote: >> On 02/14/17 20:14, Kevin O'Connor wrote: >>> On Tue, Feb 14, 2017 at 07:52:01PM +0100, Laszlo Ersek wrote: If item (1) is fixed in QEMU, then the above "root cause" goes away, and

Re: [SeaBIOS] [PATCH v4 3/3] QEMU fw_cfg: Add command to write back address of file

2017-02-17 Thread Laszlo Ersek
On 02/17/17 07:26, b...@skyportsystems.com wrote: > From: Ben Warren > > This command is similar to ADD_POINTER, but instead of patching > memory, it writes the pointer back to QEMU over the DMA interface. > > Signed-off-by: Ben Warren > --- >

Re: [SeaBIOS] [PATCH v4 2/3] romfile-loader: Switch to using named structs

2017-02-17 Thread Laszlo Ersek
On 02/17/17 07:26, b...@skyportsystems.com wrote: > From: Ben Warren > > This is a little cleaner and matches how the command structures are > defined in QEMU. > > Signed-off-by: Ben Warren > --- > src/fw/romfile_loader.c | 34

Re: [SeaBIOS] [PATCH v4 1/3] QEMU DMA: Add DMA write capability

2017-02-17 Thread Laszlo Ersek
On 02/17/17 07:26, b...@skyportsystems.com wrote: > From: Ben Warren > > This allows BIOS to write data back to QEMU using the DMA interface and > provides a higher-level abstraction to write to a fw_cfg file > > Signed-off-by: Ben Warren > ---

Re: [SeaBIOS] [PATCH v3 2/2] QEMU fw_cfg: Add command to write back address of file

2017-02-17 Thread Laszlo Ersek
On 02/17/17 11:06, Laszlo Ersek wrote: > About the "condensed" form, think something like: > - uint16_t dst_file_key > - uint32_t dst_file_offset > - uint64_t pointer_value > - uint8_t pointer_size This is likely not the best arrangement of the fields BTW, for saving static (reserved) memory.

Re: [SeaBIOS] [PATCH v3 2/2] QEMU fw_cfg: Add command to write back address of file

2017-02-17 Thread Laszlo Ersek
CC Kevin On 02/17/17 07:10, Ben Warren wrote: > Hi Laszlo >> On Feb 9, 2017, at 12:24 AM, Laszlo Ersek > > wrote: >> >> On 02/09/17 09:17, Laszlo Ersek wrote: >>> Ben, >>> >>> On 02/05/17 18:09, b...@skyportsystems.com >>>