Changeset 77662 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/README
- Timestamp:
- Mar 12, 2019 12:40:12 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776 /vendor/edk2/current 103735-103757,103769-103776,129194-129237
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/README
r58459 r77662 6 6 code base. More information can be found at: 7 7 8 http:// sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF8 http://www.tianocore.org/ovmf/ 9 9 10 10 === STATUS === … … 56 56 More information on building OVMF can be found at: 57 57 58 http ://sourceforge.net/apps/mediawiki/tianocore/index.php?title=How_to_build_OVMF58 https://github.com/tianocore/tianocore.github.io/wiki/How%20to%20build%20OVMF 59 59 60 60 === RUNNING OVMF on QEMU === … … 67 67 * QEMU/OVMF will use emulated flash, and fully support UEFI variables 68 68 * Run qemu with: -pflash path/to/OVMF.fd 69 * Note that this option is required for running SecureBoot-enabled builds 70 (-D SECURE_BOOT_ENABLE). 69 71 - Option 2: Use QEMU -bios parameter 70 72 * Note that UEFI variables will be partially emulated, and non-volatile … … 117 119 $ OvmfPkg/build.sh -a IA32 -b RELEASE -t GCC45 118 120 121 === SMM support === 122 123 Requirements: 124 * SMM support requires QEMU 2.5. 125 * The minimum required QEMU machine type is "pc-q35-2.5". 126 * SMM with KVM requires Linux 4.4 (host). 127 128 OVMF is capable of utilizing SMM if the underlying QEMU or KVM hypervisor 129 emulates SMM. SMM is put to use in the S3 suspend and resume infrastructure, 130 and in the UEFI variable driver stack. The purpose is (virtual) hardware 131 separation between the runtime guest OS and the firmware (OVMF), with the 132 intent to make Secure Boot actually secure, by preventing the runtime guest OS 133 from tampering with the variable store and S3 areas. 134 135 For SMM support, OVMF must be built with the "-D SMM_REQUIRE" option. The 136 resultant firmware binary will check if QEMU actually provides SMM emulation; 137 if it doesn't, then OVMF will log an error and trigger an assertion failure 138 during boot (even in RELEASE builds). Both the naming of the flag (SMM_REQUIRE, 139 instead of SMM_ENABLE), and this behavior are consistent with the goal 140 described above: this is supposed to be a security feature, and fallbacks are 141 not allowed. Similarly, a pflash-backed variable store is a requirement. 142 143 QEMU should be started with the options listed below (in addition to any other 144 guest-specific flags). The command line should be gradually composed from the 145 hints below. '\' is used to extend the command line to multiple lines, and '^' 146 can be used on Windows. 147 148 * QEMU binary and options specific to 32-bit guests: 149 150 $ qemu-system-i386 -cpu coreduo,-nx \ 151 152 or 153 154 $ qemu-system-x86_64 -cpu <MODEL>,-lm,-nx \ 155 156 * QEMU binary for running 64-bit guests (no particular options): 157 158 $ qemu-system-x86_64 \ 159 160 * Flags common to all SMM scenarios (only the Q35 machine type is supported): 161 162 -machine q35,smm=on,accel=(tcg|kvm) \ 163 -m ... \ 164 -smp ... \ 165 -global driver=cfi.pflash01,property=secure,value=on \ 166 -drive if=pflash,format=raw,unit=0,file=OVMF_CODE.fd,readonly=on \ 167 -drive if=pflash,format=raw,unit=1,file=copy_of_OVMF_VARS.fd \ 168 169 * In order to disable S3, add: 170 171 -global ICH9-LPC.disable_s3=1 \ 172 119 173 === Network Support === 120 174 … … 171 225 172 226 * Also independently of the iPXE NIC drivers, Intel's proprietary E1000 NIC 173 driver (PROEFI) can be embedded in the OVMF image at build time: 174 175 - Download UEFI drivers for the e1000 NIC 176 - http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=17515&lang=eng 177 - Install the drivers into a directory called Intel3.5 in your WORKSPACE. 227 driver (from the BootUtil distribution) can be embedded in the OVMF image at 228 build time: 229 230 - Download BootUtil: 231 - Navigate to 232 https://downloadcenter.intel.com/download/19186/Ethernet-Intel-Ethernet-Connections-Boot-Utility-Preboot-Images-and-EFI-Drivers 233 - Click the download link for "PREBOOT.EXE". 234 - Accept the Intel Software License Agreement that appears. 235 - Unzip "PREBOOT.EXE" into a separate directory (this works with the 236 "unzip" utility on platforms different from Windows as well). 237 - Copy the "APPS/EFI/EFIx64/E3522X2.EFI" driver binary to 238 "Intel3.5/EFIX64/E3522X2.EFI" in your WORKSPACE. 239 - Intel have stopped distributing an IA32 driver binary (which used to 240 match the filename pattern "E35??E2.EFI"), thus this method will only 241 work for the IA32X64 and X64 builds of OVMF. 178 242 179 243 - Include the driver in OVMF during the build: 180 - Add "-D E1000_ENABLE -D FD_SIZE_2MB" to your build command, 181 - For example: "build -D E1000_ENABLE -D FD_SIZE_2MB". 244 - Add "-D E1000_ENABLE" to your build command (only when building 245 "OvmfPkg/OvmfPkgIa32X64.dsc" or "OvmfPkg/OvmfPkgX64.dsc"). 246 - For example: "build -D E1000_ENABLE". 182 247 183 248 * When a matching iPXE driver is configured for a NIC as described above, it 184 249 takes priority over other drivers that could possibly drive the card too: 185 250 186 | e1000 ne2k_pci pcnet rtl8139 virtio-net-pci187 ------------- +------------------------------------------------188 iPXE | x x x x x189 VirtioNetDxe | x190 Intel PROEFI| x251 | e1000 ne2k_pci pcnet rtl8139 virtio-net-pci 252 ---------------------+------------------------------------------------ 253 iPXE | x x x x x 254 VirtioNetDxe | x 255 Intel BootUtil (X64) | x 191 256 192 257 === OVMF Flash Layout === 193 258 194 Like all current IA32/X64 system designs, OVMF's firmware 195 device (rom/flash) appears in QEMU's physical address space 196 just below 4GB (0x100000000). 197 198 The layout of the firmware device in memory looks like: 259 Like all current IA32/X64 system designs, OVMF's firmware device (rom/flash) 260 appears in QEMU's physical address space just below 4GB (0x100000000). 261 262 OVMF supports building a 1MB, 2MB or 4MB flash image (see the DSC files for the 263 FD_SIZE_1MB, FD_SIZE_2MB, FD_SIZE_4MB build defines). The base address for the 264 1MB image in QEMU physical memory is 0xfff00000. The base address for the 2MB 265 image is 0xffe00000. The base address for the 4MB image is 0xffc00000. 266 267 Using the 1MB or 2MB image, the layout of the firmware device in memory looks 268 like: 199 269 200 270 +--------------------------------------- 4GB (0x100000000) 201 271 | VTF0 (16-bit reset code) and OVMF SEC 202 | (SECFV )272 | (SECFV, 208KB/0x34000) 203 273 +--------------------------------------- varies based on flash size 204 274 | … … 218 288 +--------------------------------------- base address 219 289 220 OVMF supports building a 1MB or a 2MB flash image. The base address for 221 a 1MB image in QEMU physical memory is 0xfff00000. The base address for 222 a 2MB image is 0xffe00000. 290 Using the 4MB image, the layout of the firmware device in memory looks like: 291 292 +--------------------------------------- base + 0x400000 (4GB/0x100000000) 293 | VTF0 (16-bit reset code) and OVMF SEC 294 | (SECFV, 208KB/0x34000) 295 +--------------------------------------- base + 0x3cc000 296 | 297 | Compressed main firmware image 298 | (FVMAIN_COMPACT, 3360KB/0x348000) 299 | 300 +--------------------------------------- base + 0x84000 301 | Fault-tolerant write (FTW) 302 | Spare blocks (264KB/0x42000) 303 +--------------------------------------- base + 0x42000 304 | FTW Work block (4KB/0x1000) 305 +--------------------------------------- base + 0x41000 306 | Event log area (4KB/0x1000) 307 +--------------------------------------- base + 0x40000 308 | Non-volatile variable storage 309 | area (256KB/0x40000) 310 +--------------------------------------- base address (0xffc00000) 223 311 224 312 The code in SECFV locates FVMAIN_COMPACT, and decompresses the … … 237 325 selectively. For example: 238 326 [Components] 239 OvmfPkg/Library/PlatformB dsLib/PlatformBdsLib.inf {327 OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf { 240 328 <BuildOptions> 241 329 GCC:*_*_*_CC_FLAGS = -UMDEPKG_NDEBUG 242 330 } 243 IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf {331 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf { 244 332 <BuildOptions> 245 333 GCC:*_*_*_CC_FLAGS = -UMDEPKG_NDEBUG
Note:
See TracChangeset
for help on using the changeset viewer.