On 11/06/13 23:29, Jordan Justen wrote:
> https://github.com/jljusten/edk2.git ovmf-nvvars-v2
>
> This series implements support for QEMU's emulated
> system flash.
>
> This allows for persistent UEFI non-volatile variables.
>
> Previously we attempted to emulate non-volatile
> variables in a few ways, but each of them would fail
> in particular situations.
>
> To support flash based variable storage, we:
>  * Reserve space in the firmware device image
>  * Add a new flash firmware volume block driver
>  * Disable EmuVariableFvbRuntimeDxe (at runtime) if QEMU
>    flash is available.
>
> To use:
>  * QEMU version 1.1 or newer is required without KVM
>  * KVM support requires Linux 3.7 and QEMU 1.6
>  * Run QEMU with -pflash OVMF.fd instead of -L or -bios
>    or use OvmfPkg/build.sh --enable-flash qemu ...
>  * If QEMU is 1.6 or newer, then OvmfPkg/build.sh will
>    automatically enable flash when running QEMU, so in
>    that case --enable-flash is not required.
>
> See also:
>  * http://wiki.qemu.org/Features/PC_System_Flash
>
> v2:
>  * Replace
>      "OvmfPkg/AcpiPlatformDxe/Qemu: Allow high runtime memory regions"
>    with
>      "OvmfPkg/AcpiPlatformDxe/Qemu: Decrease upper limit for PCI window 32"
>  * Separate portions of
>      "OvmfPkg/build.sh: Support --enable-flash switch"
>    out into a new patch
>      "OvmfPkg/build.sh: Enable flash for QEMU >= 1.6"
>  * Add "OvmfPkg/README: Add information about OVMF flash layout"
>  * Update "OvmfPkg: Add NV Variable storage within FD" to also change the
>    size of PcdVariableStoreSize
>  * Update commit messages on a couple patches for better clarity

Tested in the following configurations:

(1) RHEL-6 host (no KVM support, no qemu support -- that is, regression
test): RHEL-6, Fedora 19, Windows 2008 R2 (needs CSM), Windows 2012 R2
boot tests work OK.

(2) 3.10-based host kernel, qemu v1.7.0-rc0, Xeon W3550 host CPU:
Unfortunately qemu dies with the following KVM trace:

  KVM internal error. Suberror: 1
  emulation failure
  EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000623
  ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
  EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
  ES =0000 00000000 0000ffff 00009300
  CS =f000 ffff0000 0000ffff 00009b00
  SS =0000 00000000 0000ffff 00009300
  DS =0000 00000000 0000ffff 00009300
  FS =0000 00000000 0000ffff 00009300
  GS =0000 00000000 0000ffff 00009300
  LDT=0000 00000000 0000ffff 00008200
  TR =0000 00000000 0000ffff 00008b00
  GDT=     00000000 0000ffff
  IDT=     00000000 0000ffff
  CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
  DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 
DR3=0000000000000000
  DR6=00000000ffff0ff0 DR7=0000000000000400
  EFER=0000000000000000
  Code=ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff <ff> ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

I'm quite unsure, but the CS:IP value seems to point at the reset
vector, no? However, the Code=... log only shows 0xFF bytes.

(3) 3.10.17 host kernel, qemu v1.7.0-rc0, Athlon II X2 B22 host CPU:
almost identical KVM error, with the following difference:

  --- vmx 2013-11-07 17:23:45.612973935 +0100
  +++ svm 2013-11-07 17:24:17.237973059 +0100
  @@ -1,6 +1,6 @@
   KVM internal error. Suberror: 1
   emulation failure
  -EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000623
  +EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000663
   ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
   EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
   ES =0000 00000000 0000ffff 00009300

Any ideas?

Thanks!
Laszlo

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to