summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
Commit message (Collapse)AuthorAgeFilesLines
* OvmfPkg: set video resolution of text setup to 640x480Laszlo Ersek2014-11-063-0/+12
| | | | | | | | | | | | | On a physical screen such a low graphics resolution would lead to huge glyphs (the text resolution is 80x25, centered, with 8x19 pixel glyphs). But in a virtual machine it just saves screen real estate on the client, by removing the black bands. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16311 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: BDS: drop custom boot timeout, revert to IntelFrameworkModulePkg'sLaszlo Ersek2014-11-064-36/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PlatformBdsEnterFrontPage() already implements a keypress wait (for entering the setup utility at boot) with a nice progress bar, only OVMF has not been using it. Removing our custom code and utilizing PlatformBdsEnterFrontPage()'s builtin wait has the following benefits: - It simplifies OVMF's BDS code. - Because now we call PlatformBdsEnterFrontPage() unconditionally, it actually has a chance to look at the EFI_OS_INDICATIONS_BOOT_TO_FW_UI bit of the "OsIndications" variable, improving compliance with the UEFI specification. References: - https://bugzilla.redhat.com/show_bug.cgi?id=1153927 - http://thread.gmane.org/gmane.comp.bios.tianocore.devel/10487 - The progress bar looks nice. (And it keeps the earlier behavior intact, when the user presses a key on the TianoCore splash screen.) In any case, we set the timeout to 0 (which doesn't show the progress bar and proceeds to the boot options immediately) in order to keep the boot time down. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16310 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: BDS: drop superfluous "connect first boot option" logicLaszlo Ersek2014-11-061-23/+0
| | | | | | | | | | This is again obviated by our earlier BdsLibConnectAll() call. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16309 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: BDS: optimize second argument in PlatformBdsEnterFrontPage() callLaszlo Ersek2014-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The second parameter of said function is "ConnectAllHappened", and if set to TRUE, the function sets "gConnectAllHappened" to TRUE. This global variable in turn controls whether Intel BDS code *itself* calls BdsLibConnectAllDriversToAllControllers() in various places -- if the indicator is TRUE, then the "connect all" is assumed to have been performed, and Intel BDS doesn't do it itself. OVMF should pass TRUE as "ConnectAllHappened", because a few lines before our call to PlatformBdsEnterFrontPage(), we already connect everything with BdsLibConnectAll(), which includes the effects of BdsLibConnectAllDriversToAllControllers(): PlatformBdsPolicyBehavior() [OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c] BdsLibConnectAll() [IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c] BdsLibConnectAllDriversToAllControllers() PlatformBdsEnterFrontPage() [IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16308 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: BDS: don't overwrite the BDS Front Page timeoutLaszlo Ersek2014-11-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PlatformBdsEnterFrontPage() function's first parameter, "TimeoutDefault", determines the behavior of the setup utility: - If (TimeoutDefault == 0), then the usual boot order is to be acted upon immediately. - If (TimeoutDefault == 0xFFFF), then the setup utility is entered unconditionally. - If (0 < TimeoutDefault && TimeoutDefault < 0xFFFF), then the PlatformBdsEnterFrontPage() function displays a progress bar, waiting for TimeoutDefault seconds. If the user presses a key, then the setup utility is entered, otherwise the normal boot option processing takes place. The TimeoutDefault parameter is supposed to be set from gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut which has the following (matching) documentation in "IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec": The number of seconds that the firmware will wait before initiating the original default boot selection. A value of 0 indicates that the default boot selection is to be initiated immediately on boot. The value of 0xFFFF then firmware will wait for user input before booting. OVMF does this actually -- see the Timeout variable in PlatformBdsPolicyBehavior() -- but right before calling PlatformBdsEnterFrontPage(), OVMF hardwires TimeoutDefault to 0xFFFF. This has been acceptable until now, because OVMF implements its own "wait for keypress at the splash screen" logic in PlatformBdsPolicyBehavior(), completely avoiding the progress bar mentioned above. OVMF only calls PlatformBdsEnterFrontPage() when the user presses a key during its own "splash screen wait", and *then* it indeed makes sense to enter the setup utility unconditionally. However, even that way, the Timeout = 0xffff; assignment is superfluous, because 0xFFFF is already the default value of PcdPlatformBootTimeOut in "IntelFrameworkModulePkg.dec", and OvmfPkg doesn't override it in its DSC files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16307 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: BDS: drop useless return statementLaszlo Ersek2014-11-061-2/+0
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16306 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: BDS: remove dead call to PlatformBdsEnterFrontPage()Laszlo Ersek2014-11-061-8/+0
| | | | | | | | | | | This call has been dead since the conception of OvmfPkg (git commit 49ba9447 / SVN r8398), and only confuses readers -- let's remove it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16305 6f19259b-4bc3-4df7-8a09-765794883524
* EDK II Contributions.txt: Update patch format informationJordan Justen2014-10-311-13/+29
| | | | | | | | | | | | | Update to show what the patch looks like in email form. NOTE: This does not modify the wording of the "TianoCore Contribution Agreement 1.0" section Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16297 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Fix initialisation of gXenBusDevicePathTemplateAnthony PERARD2014-10-311-7/+13
| | | | | | | | | | .. to avoid the use .member = value syntax as VS does not support it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16296 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Fix initialisation of gXenBusPrivateDataAnthony PERARD2014-10-311-24/+29
| | | | | | | | | | .. to avoid the use .member = value syntax as VS does not support it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16295 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/Xen*: Pass struct XENSTORE_TRANSACTION argument as a pointerAnthony PERARD2014-10-315-46/+50
| | | | | | | | | | As EDK II does not allow calls with a struct. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16294 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/Include/...Xen: Convert __i386__/__x86_64__ to MDE_CPU_IA32/MDE_CPU_X64.Anthony PERARD2014-10-316-11/+14
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16293 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg Sec: Convert X64/SecEntry.asm to NASMJordan Justen2014-10-313-69/+9
| | | | | | | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/SecEntry.asm to X64/SecEntry.nasm Note: Manually collapsed .inf sources Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16292 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg Sec: Convert Ia32/SecEntry.asm to NASMJordan Justen2014-10-313-73/+7
| | | | | | | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/SecEntry.asm to Ia32/SecEntry.nasm Note: Manually collapsed .inf sources Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16291 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg QemuFwCfgLib: Convert X64/IoLibExAsm.asm to NASMJordan Justen2014-10-314-61/+8
| | | | | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/IoLibExAsm.asm to X64/IoLibExAsm.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16290 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg QemuFwCfgLib: Convert Ia32/IoLibExAsm.asm to NASMJordan Justen2014-10-314-68/+7
| | | | | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/IoLibExAsm.asm to Ia32/IoLibExAsm.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16289 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg LoadLinuxLib: Convert X64/JumpToKernel.asm to NASMJordan Justen2014-10-313-127/+33
| | | | | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/JumpToKernel.asm to X64/JumpToKernel.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16288 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg LoadLinuxLib: Convert Ia32/JumpToKernel.asm to NASMJordan Justen2014-10-313-60/+8
| | | | | | | | | | | The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/JumpToKernel.asm to Ia32/JumpToKernel.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16287 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenPvBlkDxe: Add BlockIo.Anthony PERARD2014-10-295-0/+450
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the BlockIo protocol. Change in V4: - Replace the license by the commonly used file header text. Change in V3: - assert(Media->BlockSize % 512 == 0) - Use Sector instead of Offset to issue IOs. Change in V2: - Remove blockIo2 headers. - Fix few comment. - file header, copyright - Rewrite few comment and error messages - No more callback - Improving block read/write, increase to the max size in one request (instead of only 8pages) - Fix lastblock when it's a cdrom - Do uninitialisation when fail to install fail - few comment - Licenses Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16274 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenPvBlkDxe: Add BlockFront client.Samuel Thibault2014-10-295-0/+1382
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the code that will do the actual communication between OVMF and a PV block backend, where the block device lives. The protocol used is describe in the blkif.h header. This implementation originally comes from Mini-OS, a part of the Xen Project. Change in V4: - add file header to BlockFront.h (license, copyright, brief desc) Change in V3: - Improve comment of XenBusReadUint64. - Moving blkif.h to this patch with the necessary #pragma pack(4) applied for Ia32. - Add a note about the license in the commit message - Add "The protocol used is describe in the blkif.h header." in the commit message - Have a mandatory sector-size multiple of 512 or fail to initialize. - use Sector instead of Offset for IO request. with Sector been 512-byte unit. - print something if EventChannelNotify return an error. Change in V2: - trigger CoW is probably not needed on OVMF (as opposed to Mini-OS), removed the test. - comments - renamed XenbusReadInteger to XenBusReadUint64 - remove callback from IoData, use simple status instead - return a status from the synchronus io - Close protocol if blockfront init fail. - fix few debug print - Rename XenbusIo to XenBusIo - XenPvBlkWaitForBackendState will return an error if the new backend states is not the expected state. - Add the license License: This patch adds some files which are under the MIT license. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16273 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenPvBlkDxe: Xen PV Block device, initial skeletonAnthony PERARD2014-10-2912-0/+876
| | | | | | | | | | | | | | | | | | | | | | | | | A ParaVirtualize block driver. Change in V4: - Replace the license by the commonly used file header text. - Add brief description for the driver. Change in V3: - enable compilation for Ia32 and Ia32X64 - fix version (driver binding) Change in V2: - Add minimal support for controller name - Remove stuff about BlockIo2 - Little cleanup - Licenses and file headers - Rename XenbusIo into XenBusIo Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16272 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Add Event Channel into XenBus protocol.Anthony PERARD2014-10-294-0/+163
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds three event channel related functions: - EventChannelAllocate: Allocate an event channel port that can be bind from a specified domain. - EventChannelNotify: Send an event to the remote end of a channel. - EventChannelClose: Close a local event channel port. Change in V3: - eventchannel, update protocol to return error code. - expand patch description - Add comments in the XenBus Protocol header. Change in V2: - coding style - adding comment to functions - Rename Xenbus to XenBus. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16271 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Introduce XenBus support itself.Anthony PERARD2014-10-296-0/+523
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a bus-like on top of XenStore. It will look for advertised ParaVirtualized devices and initialize them by producing XenBus protocol. Change in V4: - Replace the license by the commonly used file header text. - Clean XenBus.h header (remove copyright that does not belong to the file anymore; and rewrite the brief description of the file) - Fix description on the function Change in V3: - Insert to ChildList later, once populated. - Remove XENBUS_XENSTORE_NODE macro. - add comment to XenBusAddDevice and XenBusEnumerateBus about concurrency calls. - Add a description to the introduced member to the protocol. Change in V2: - comment, file header - Fix comment style - Error handling in the main init function - coding style - Fix error path in add device. Origin: FreeBSD 10.0 License: This patch adds XenBus.c which is under the MIT licence. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16270 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Add XenStore function into the XenBus protocolAnthony PERARD2014-10-293-0/+474
| | | | | | | | | | | | | | Change in V3: - Have XenStoreWaitWatch/XenBusWaitForWatch return a XENSTORE_STATUS instead of VOID. - Add description of the introducted member of the protocol. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16269 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Add an helper AsciiStrDup.Anthony PERARD2014-10-292-0/+14
| | | | | | | | | | | | .. because we need it in the patch titled: "OvmfPkg/XenBusDxe: Introduce XenBus support itself." Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16268 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Add XenStore client implementationAnthony PERARD2014-10-296-0/+1863
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XenStore is a key/value database, which is running on another virtual machine. It can be accessed through shared memory. This is a client implementation. Change in V3: - moving xs_wire.h from patch #1 to this patch - fix return value of XenStoreListDirectory - Use a timeout to print a debug message if the other side of the xenstore ring does not notify through the event channel. This is done with the new XenStoreWaitForEvent function. - Have XenStoreReadReply check status of XenStoreProcessMessage and return an error if needed. - Have XenStoreTalkv return the status of XenStoreReadReply. - Have a loop to check for the quiescent of the response ring in the XenStoreInitComms function. (with a timeout of 5 seconds) - use the recently introduced XenStore 'closing' feature. Change in V2: - Change comment style, from freebsd to ovmf - Fix type of EventChannel - Fix debug print, no more cast - Implement XenStoreDeinit. - Clean up comments - Fix few codding style issue - Add FAIL xenstore status value. Origin: FreeBSD 10.0 License: This patch adds several files under the MIT licence. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16267 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Add TestAndClearBit.Anthony PERARD2014-10-296-0/+81
| | | | | | | | | | | | | | | | | | | This atomically test's and clear's a bit. Change in V3: - adding IA32 support. (not yet reviewed) both XenBusDxe/Ia32/TestAndClearBit.{S,asm} are new Change in V2: - Adding .asm version - Comment the function Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16266 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Add Event Channel Notify.Anthony PERARD2014-10-294-0/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | This first function is used to notify the other side that there is something to do. The other side is another Xen domain. Change in V4: - Replace the license by the commonly used file header text. Change in V3: - Return error code from hypercall instead of ASSERT for XenEventChannelNotify - moving event_channel.h to this patch. Change in V2: - file header - coding style - adding comment to functions - Licenses License: This patch adds event_channel.h which is under MIT licence. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16265 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Add Grant Table functions.Steven Smith2014-10-294-0/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are used to grant access of pages to other Xen domains. This code originaly comes from the Xen Project, and more precisely from MiniOS. Change in V4: - Add license to GrantTable.h Change in V3: - Add a comment about the use of the BAR of the device. Change in V2: - Adding locks - Redo the file header - Add functions comment - Add license Signed-off-by: Steven Smith <sos22@cam.ac.uk> Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16264 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Add InterlockedCompareExchange16.Anthony PERARD2014-10-297-0/+191
| | | | | | | | | | | | | | | | | | | | | | This patch is inspired by InterlockedCompareExchange32 from the BaseSynchronizationLib. The function will be used in the "OvmfPkg/XenBusDxe: Add Grant Table functions" patch. Change in V3: - Implement both .S and .asm, to get rid of GCC specific asm. - Implement 32bit part of the assembly Change in V2: - Add intel compilation code MSFT code is not compied over because I don't know how it works. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16263 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: Introduce XenBus Protocol.Anthony PERARD2014-10-294-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | This protocol will be used for communication between a PV driver (like a PV block driver) and the XenBus/XenStore. Change in V5: - Replace the license by the commonly used file header text. Change in V3: - Add disclaimer about the volatile nature of the protocol. - Add a description on the two introduced members to the protocol. Change in V2: - Comment, file header - Protocol License - Declare xen interface version earlier - Rename protocol from Xenbus to XenBus Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16262 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Open PciIo protocol.Anthony PERARD2014-10-292-0/+20
| | | | | | | | | | | | | | | | | | | The PciIo interface will be used in "OvmfPkg/XenBusDxe: Add Grant Table functions" to get the memory address of the BAR 1 and use the space to map shared memory. Change in V3: - add a commit description. Change in V2: - Coding style - Error handler Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16261 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Add support to make Xen Hypercalls.Anthony PERARD2014-10-299-0/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change in V4: - Replace the license by the commonly used file header text. - add file header to XenHypercall.h (license, copyright, brief desc) Change in V3: - adding IA32 support. (not reviewed yet) both XenBusDxe/Ia32/hypercall.{S,asm} file are new Change in V2: - file header, copyright - Add License - Add push/pop instruction. - fix types - Comment of exported functions - Improve coding style - Add error handling in the main init function (of the drivers) - Comment assembly Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16260 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/XenBusDxe: Add device state struct and create an ExitBoot services ↵Anthony PERARD2014-10-292-2/+65
| | | | | | | | | | | | | | | | | | event. The ExitBoot event is used to disconnect from the device before the next operating system start using them. Change in V3: - use the variable mMyDevice to prevent the driver from starting twice (if there is two different PCI devices). - free(dev) on exit Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16259 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: Add basic skeleton for the XenBus bus driver.Anthony PERARD2014-10-2912-0/+839
| | | | | | | | | | | | | | | | | | | | | | | | | This includes Component Name and Driver Binding. Change in V4: - Replace the license by the commonly used file header text. - Add brief description for the driver. Change in V3: - enable compilation for Ia32 and Ia32X64 - fix version (driver binding) Change in V2: - Simple support of controller name. - Cleaning up comments, files header. - Add Licenses - Rename XenbusDxe to XenBusDxe. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16258 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: Add public headers from Xen Project.Anthony PERARD2014-10-2913-0/+1806
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch imports publics headers in order to use features from Xen like XenStore, PV Block... There is only the necessary header files and there are only a few modifications in order to facilitate future merge of more recent header (that would be necessary to access new features). There is little modification compared to the original files: - Removed most of the unused part of the headers - Use of ZeroMem() instead of memset() - using #pragma pack(4) for IA32 compilation. - Replace types to be more UEFI compliant using a script. OVMF, when built for IA32 arch, uses the gcc switch -malign-double. This change the alignment of fields in some struct compare to what is espected by Xen and any backends. To fix the alignment, the #pragma pack(4) directive is used around the struct that need it. Command to run to change types: find OvmfPkg/Include/IndustryStandard/Xen -type f -name '*.h' -exec sed --regexp-extended --file=fix_type_in_xen_includes.sed --in-place {} \; Avoid changing the 'long' that is not a type (with the first line). $ cat fix_type_in_xen_includes.sed /as long as/b s/([^a-zA-Z0-9_]|^)uint8_t([^a-zA-Z0-9_]|$)/\1UINT8\2/g s/([^a-zA-Z0-9_]|^)uint16_t([^a-zA-Z0-9_]|$)/\1UINT16\2/g s/([^a-zA-Z0-9_]|^)uint32_t([^a-zA-Z0-9_]|$)/\1UINT32\2/g s/([^a-zA-Z0-9_]|^)uint64_t([^a-zA-Z0-9_]|$)/\1UINT64\2/g s/([^a-zA-Z0-9_]|^)int8_t([^a-zA-Z0-9_]|$)/\1INT8\2/g s/([^a-zA-Z0-9_]|^)int16_t([^a-zA-Z0-9_]|$)/\1INT16\2/g s/([^a-zA-Z0-9_]|^)int32_t([^a-zA-Z0-9_]|$)/\1INT32\2/g s/([^a-zA-Z0-9_]|^)int64_t([^a-zA-Z0-9_]|$)/\1INT64\2/g s/([^a-zA-Z0-9_]|^)void([^a-zA-Z0-9_]|$)/\1VOID\2/g s/([^a-zA-Z0-9_]|^)unsigned int([^a-zA-Z0-9_]|$)/\1UINT32\2/g s/([^a-zA-Z0-9_]|^)int([^a-zA-Z0-9_]|$)/\1INT32\2/g s/([^a-zA-Z0-9_]|^)unsigned char([^a-zA-Z0-9_]|$)/\1UINT8\2/g s/([^a-zA-Z0-9_]|^)char([^a-zA-Z0-9_]|$)/\1CHAR8\2/g s/([^a-zA-Z0-9_]|^)unsigned long([^a-zA-Z0-9_]|$)/\1UINTN\2/g s/([^a-zA-Z0-9_]|^)long([^a-zA-Z0-9_]|$)/\1INTN\2/g Change in V4: - Add a README in Xen headers directory to explain what have been done to it. It is mostly a copy/past from the commit description with some rewording. - replace unsigned char by UINT8 as there is no unsigned char in UEFI types. Change in V3: - Remove unused header sched.h - moving xs_wire.h in a later patch, where it's first needed - moving io/blkif.h in a later patch (XenPvBlkDxe: Add BlockFront client) - moving event_channel.h in a later patch (XenBusDxe: Add Event Channel Notify) - using #pragma pack(4) for IA32 - headers trimed down, removed most of the unused struct/define/... License: This patch adds many files under the MIT licence. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16257 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: Add the MIT license to License.txt.Anthony PERARD2014-10-291-0/+25
| | | | | | | | | | | | | | | | The MIT license will be used for several source files that are necessary for the Xen PV drivers. So this patch makes it explicit by adding the license with a note about which directory will have source files under this license. Change in V3: New patch Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16256 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: SecureBootConfigDxe: remove stale forkLaszlo Ersek2014-10-0210-5867/+0
| | | | | | | | | | | In the previous patch we disabled its use; there are no more clients. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Gary Lin <glin@suse.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16192 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: disable stale fork of SecureBootConfigDxeLaszlo Ersek2014-10-027-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OvmfPkg forked SecureBootConfigDxe from SecurityPkg in SVN r13635 (git commit 8c71ec8f). Since then, the original (in "SecurityPkg/VariableAuthenticated/SecureBootConfigDxe") has diverged significantly. The initial diff between the original and the fork, when the fork was made (ie. at SVN r13635), reads as follows: > diff -ur SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig.vfr OvmfPkg/SecureBootConfigDxe/SecureBootConfig.vfr > --- SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig.vfr 2014-09-30 23:35:28.598067147 +0200 > +++ OvmfPkg/SecureBootConfigDxe/SecureBootConfig.vfr 2014-08-09 02:40:35.824851626 +0200 > @@ -51,7 +51,7 @@ > questionid = KEY_SECURE_BOOT_ENABLE, > prompt = STRING_TOKEN(STR_SECURE_BOOT_PROMPT), > help = STRING_TOKEN(STR_SECURE_BOOT_HELP), > - flags = INTERACTIVE | RESET_REQUIRED, > + flags = INTERACTIVE, > endcheckbox; > endif; > > @@ -158,7 +158,7 @@ > questionid = KEY_SECURE_BOOT_DELETE_PK, > prompt = STRING_TOKEN(STR_DELETE_PK), > help = STRING_TOKEN(STR_DELETE_PK_HELP), > - flags = INTERACTIVE | RESET_REQUIRED, > + flags = INTERACTIVE, > endcheckbox; > endif; > endform; > diff -ur SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf OvmfPkg/SecureBootConfigDxe/SecureBootConfigDxe.inf > --- SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf 2014-09-30 23:35:28.598067147 +0200 > +++ OvmfPkg/SecureBootConfigDxe/SecureBootConfigDxe.inf 2014-09-30 23:35:28.577067027 +0200 > @@ -1,5 +1,8 @@ > ## @file > -# Component name for SecureBoot configuration module. > +# Component name for SecureBoot configuration module for OVMF. > +# > +# Need custom SecureBootConfigDxe for OVMF that does not force > +# resets after PK changes since OVMF doesn't have persistent variables > # > # Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR> > # This program and the accompanying materials > diff -ur SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c OvmfPkg/SecureBootConfigDxe/SecureBootConfigImpl.c > --- SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c 2014-09-30 23:35:28.599067153 +0200 > +++ OvmfPkg/SecureBootConfigDxe/SecureBootConfigImpl.c 2014-09-30 23:35:28.578067033 +0200 > @@ -2559,7 +2559,7 @@ > NULL > ); > } else { > - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_RESET; > + *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT; > } > break; The commit message is not overly verbose: OvmfPkg: Add custom SecureBootConfigDxe that doesn't reset We don't force a platform reset for OVMF when PK is changed in custom mode setup. But the INF file hunk is telling: Need custom SecureBootConfigDxe for OVMF that does not force resets after PK changes since OVMF doesn't have persistent variables We do have persistent variables now. Let's disable the (now obsolete) OvmfPkg fork, and revert to the (well maintained) SecurityPkg-provided config driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Gary Lin <glin@suse.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16191 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: Fix VS2005 build warningsJordan Justen2014-09-257-15/+17
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16171 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/AcpiPlatformDxe: Fix VS2012 IA32 build warningJordan Justen2014-09-251-2/+2
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16170 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: AcpiPlatformDxe: implement QEMU's full ACPI table loader interfaceLaszlo Ersek2014-09-222-4/+636
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes in the QEMU ACPI table generator have shown that our limited client for that interface is insufficient and/or brittle. Implement the full interface utilizing OrderedCollectionLib for addressing fw_cfg blobs by name. In order to stay compatible with EFI_ACPI_TABLE_PROTOCOL, we don't try to identify QEMU's RSD PTR and link it into the UEFI system configuration table. Instead, once all linker/loader commands have been processed, we process the AddPointer commands for a second time. In the second pass, we look at the targets of these pointer commands. The key idea (by Michael Tsirkin) is that any ACPI interpreter will only be able to locate ACPI tables by following absolute pointers, hence QEMU's set of AddPointer commands will cover all of the ACPI tables (and more, see below). Some of QEMU's AddPointer commands (ie. some fields in ACPI tables) may point to areas in fw_cfg blobs that are not ACPI tables themselves. Examples are the BGRT.ImageAddress field, and the TCPA.LASA field. We tell these apart from ACPI tables by performing the following checks on pointer target "candidates": - length check against minimum ACPI table size, and remaining blob size - checksum verification. If a target area looks like an ACPI table, and is different from RSDT and DSDT (which EFI_ACPI_TABLE_PROTOCOL handles internally), we install the table (at which point EFI_ACPI_TABLE_PROTOCOL creates a deep copy of the relevant segment of the pointed-to fw_cfg blob). Simultaneously, we keep account if each fw_cfg blob has ever been referenced as the target of an AddPointer command without that AddPointer command actually identifying an ACPI table. In this case the containing fw_cfg file (of AcpiNVS memory type) must remain around forever, because we never install that area with EFI_ACPI_TABLE_PROTOCOL, but some field in some ACPI table that we *do* install still references it, by the absolute address that we've established during the first pass. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16158 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: AcpiPlatformDxe: remove current ACPI table loaderLaszlo Ersek2014-09-221-337/+1
| | | | | | | | | | | | | | | | | | | | | | In the next patch we rewrite the client code for QEMU's fw_cfg ACPI table loader interface. In order to avoid randomly intermixed hunks in that patch, first remove the old code cleanly. We remove the InstallQemuLinkedTables() function and empty the InstallAllQemuLinkedTables() function. We also remove CheckRsdp(). InstallAllQemuLinkedTables() will return constant EFI_NOT_FOUND to AcpiPlatformEntryPoint(), causing the latter to proceed to OVMF's builtin tables. This way the history remains bisectable and the new client gets a clean start in the next patch. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16157 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: AcpiPlatformDxe: actualize QemuLoader.h commentsLaszlo Ersek2014-09-221-5/+1
| | | | | | | | | | | We used to state in this header file that we only cared about the Allocate command. This is no longer the case; update the comments accordingly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16156 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: resolve OrderedCollectionLib with base red-black tree instanceLaszlo Ersek2014-09-223-0/+3
| | | | | | | | | | | | | | | The "complete" QEMU fw_cfg ACPI loader will need to look up downloaded blobs by name, in order to implement the AddPointer and AddChecksum commands. Introduce OrderedCollectionLib to support such indexing. BaseOrderedCollectionRedBlackTreeLib is a BASE module, hence add the OrderedCollectionLib resolution to the main [LibraryClasses] section. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16155 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: resolve BcfgCommandLib class for ShellPkg/.../Shell.infLaszlo Ersek2014-09-113-0/+3
| | | | | | | | | | | | | | | | | | | | SVN r16092 ('ShellPkg: Add a new library for "bcfg" command') introduced a new library class (and an instance for it) called BcfgCommandLib. SVN r16093 ('ShellPkg: Use the new library for "bcfg" command') rebased ShellPkg to the new library, introducing a new [LibraryClasses] dependency. Library classes must be resolved to library instances in client platform descriptions (DSC's). Since OVMF is a client platform, import the same library resolution as seen in "ShellPkg/ShellPkg.dsc" (added in SVN r16092). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16095 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: AcpiTimerLib: Access power mgmt regs based on host bridge typeGabriel Somlo2014-09-091-8/+63
| | | | | | | | | | | | | | | Pick the appropriate bus:dev.fn for accessing ACPI power management registers (00:01.3 on PIIX4 vs. 00:1f.0 on Q35) based on the device ID of the host bridge (assumed always present at 00:00.0). With this patch, OVMF can boot QEMU's "-machine q35" x86 machine type. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16066 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuVideoDxe: work around misreported QXL framebuffer sizeLaszlo Ersek2014-08-293-6/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting up the list of GOP modes offered on QEMU's stdvga ("VGA") and QXL ("qxl-vga") video devices, QemuVideoBochsModeSetup() filters those modes against the available framebuffer size. (Refer to SVN r15288 / git commit ec88061e.) The VBE_DISPI_INDEX_VIDEO_MEMORY_64K register of both stdvga and QXL is supposed to report the size of the drawable, VGA-compatibility framebuffer. Instead, up to and including qemu-2.1, this register actually reports the full video RAM (PCI BAR 0) size. In case of stdvga, this happens to be correct, because on that card the full PCI BAR 0 is usable for drawing; there is no difference between "drawable framebuffer size" and "video RAM (PCI BAR 0) size". However, on the QXL card, only an initial portion of the video RAM is suitable for drawing, as compatibility framebuffer; and the value currently reported by VBE_DISPI_INDEX_VIDEO_MEMORY_64K overshoots the valid size. Beyond the drawable range, the video RAM contains buffers and structures for the QXL guest-host protocol. Luckily, the size of the drawable QXL framebuffer can also be read from a register in the QXL ROM BAR (PCI BAR 2), so let's retrieve it from there. Without this fix, OVMF offers too large resolutions on the QXL card (up to the full size of the video RAM). If a GOP client selects such a resolution and draws into the video RAM past the compatibility segment, then the guest corrupts its communication structures (which is invalid guest behavior). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15978 6f19259b-4bc3-4df7-8a09-765794883524
* EDK II Contributions.txt: Note acceptable contribution licensesJordan Justen2014-08-251-0/+14
| | | | | | | | | | | | | | | | | | We strongly prefer that contribtions be offered using the same license as the project/module. But, we should document other acceptable licenses for contributions. This will allow package owners to more easily know if they can accept a contribution under a different source license. NOTE: This does not modify the wording of the "TianoCore Contribution Agreement 1.0" section Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Mark Doran <mark.doran@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15892 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/ResetVector: Remove pre-built binariesJordan Justen2014-08-184-113/+0
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15825 6f19259b-4bc3-4df7-8a09-765794883524