X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=OvmfPkg%2FREADME;h=304e69fbe5456d57ae1e0d4bf95800b3a91b3793;hb=c1f6c62dcf021a8d9bcad9895bdc56abc3f18a7a;hp=ef49bf8eddde3adf1c57a84b448de03e0de6d312;hpb=8714a6314f7b95ec389533552aa2034238f0b602;p=mirror_edk2.git diff --git a/OvmfPkg/README b/OvmfPkg/README index ef49bf8edd..304e69fbe5 100644 --- a/OvmfPkg/README +++ b/OvmfPkg/README @@ -5,7 +5,7 @@ The Open Virtual Machine Firmware (OVMF) project aims to support firmware for Virtual Machines using the edk2 code base. More information can be found at: -http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF +http://www.tianocore.org/ovmf/ === STATUS === @@ -55,7 +55,7 @@ these binary outputs: More information on building OVMF can be found at: -http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=How_to_build_OVMF +https://github.com/tianocore/tianocore.github.io/wiki/How%20to%20build%20OVMF === RUNNING OVMF on QEMU === @@ -118,6 +118,58 @@ $ OvmfPkg/build.sh -a X64 qemu -cdrom /path/to/disk-image.iso To build a 32-bit OVMF without debug messages using GCC 4.5: $ OvmfPkg/build.sh -a IA32 -b RELEASE -t GCC45 +=== SMM support === + +Requirements: +* SMM support requires QEMU 2.5. +* The minimum required QEMU machine type is "pc-q35-2.5". +* SMM with KVM requires Linux 4.4 (host). + +OVMF is capable of utilizing SMM if the underlying QEMU or KVM hypervisor +emulates SMM. SMM is put to use in the S3 suspend and resume infrastructure, +and in the UEFI variable driver stack. The purpose is (virtual) hardware +separation between the runtime guest OS and the firmware (OVMF), with the +intent to make Secure Boot actually secure, by preventing the runtime guest OS +from tampering with the variable store and S3 areas. + +For SMM support, OVMF must be built with the "-D SMM_REQUIRE" option. The +resultant firmware binary will check if QEMU actually provides SMM emulation; +if it doesn't, then OVMF will log an error and trigger an assertion failure +during boot (even in RELEASE builds). Both the naming of the flag (SMM_REQUIRE, +instead of SMM_ENABLE), and this behavior are consistent with the goal +described above: this is supposed to be a security feature, and fallbacks are +not allowed. Similarly, a pflash-backed variable store is a requirement. + +QEMU should be started with the options listed below (in addition to any other +guest-specific flags). The command line should be gradually composed from the +hints below. '\' is used to extend the command line to multiple lines, and '^' +can be used on Windows. + +* QEMU binary and options specific to 32-bit guests: + + $ qemu-system-i386 -cpu coreduo,-nx \ + + or + + $ qemu-system-x86_64 -cpu ,-lm,-nx \ + +* QEMU binary for running 64-bit guests (no particular options): + + $ qemu-system-x86_64 \ + +* Flags common to all SMM scenarios (only the Q35 machine type is supported): + + -machine q35,smm=on,accel=(tcg|kvm) \ + -m ... \ + -smp ... \ + -global driver=cfi.pflash01,property=secure,value=on \ + -drive if=pflash,format=raw,unit=0,file=OVMF_CODE.fd,readonly=on \ + -drive if=pflash,format=raw,unit=1,file=copy_of_OVMF_VARS.fd \ + +* In order to disable S3, add: + + -global ICH9-LPC.disable_s3=1 \ + === Network Support === OVMF provides a UEFI network stack by default. Its lowest level driver is the @@ -179,8 +231,8 @@ longer.) - Install the drivers into a directory called Intel3.5 in your WORKSPACE. - Include the driver in OVMF during the build: - - Add "-D E1000_ENABLE -D FD_SIZE_2MB" to your build command, - - For example: "build -D E1000_ENABLE -D FD_SIZE_2MB". + - Add "-D E1000_ENABLE" to your build command, + - For example: "build -D E1000_ENABLE". * When a matching iPXE driver is configured for a NIC as described above, it takes priority over other drivers that could possibly drive the card too: @@ -238,11 +290,11 @@ If you must use UNIXGCC, then you can override the build options for particular libraries and modules in the .dsc to re-enable debugging selectively. For example: [Components] - OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf { + OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf { GCC:*_*_*_CC_FLAGS = -UMDEPKG_NDEBUG } - IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf { + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { GCC:*_*_*_CC_FLAGS = -UMDEPKG_NDEBUG }