summaryrefslogtreecommitdiff
path: root/OvmfPkg/AcpiPlatformDxe/Xen.c
AgeCommit message (Collapse)Author
2019-10-04OvmfPkg: strip trailing whitespaceLeif Lindholm
Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Julien Grall <julien.grall@arm.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
2019-08-21OvmfPkg/AcpiPlatformDxe: Use Xen PVH RSDP if it existAnthony PERARD
If the firmware have been started via the Xen PVH entry point, a RSDP pointer would have been provided. Use it. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190813113119.14804-16-anthony.perard@citrix.com>
2019-08-21OvmfPkg/AcpiPlatformDxe: Use XenPlatformLibAnthony PERARD
This patch replace the XenDetected() function by the one in XenPlatformLib. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190813113119.14804-15-anthony.perard@citrix.com>
2019-04-18OvmfPkg/AcpiPlatformDxe: catch theoretical nullptr deref in Xen codeLaszlo Ersek
RH covscan justifiedly reports a path through InstallXenTables() where DsdtTable can technically remain NULL. If this occurs in practice, then the guest and the VMM are out of sync on the interface contract. Catch the situation with a code snippet that halts in RELEASE builds, and in DEBUG builds lets the platform DSC control the assert disposition first (i.e. CPU exception, deadloop, or nothing). > Error: CLANG_WARNING: > edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:309:14: warning: Access > to field 'Length' results in a dereference of a null pointer (loaded > from variable 'DsdtTable') > # DsdtTable->Length, > # ^~~~~~~~~ > edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:154:3: note: Null > pointer value stored to 'DsdtTable' > # DsdtTable = NULL; > # ^~~~~~~~~~~~~~~~~~ > edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:162:3: note: Taking > false branch > # if (EFI_ERROR (Status)) { > # ^ > edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:170:7: note: Assuming > the condition is false > # if (XenAcpiRsdpStructurePtr->XsdtAddress) { > # ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:170:3: note: Taking > false branch > # if (XenAcpiRsdpStructurePtr->XsdtAddress) { > # ^ > edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:220:12: note: Assuming > the condition is false > # else if (XenAcpiRsdpStructurePtr->RsdtAddress) { > # ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:220:8: note: Taking > false branch > # else if (XenAcpiRsdpStructurePtr->RsdtAddress) { > # ^ > edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:274:3: note: Taking > false branch > # if (Fadt2Table) { > # ^ > edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:288:8: note: Taking > false branch > # else if (Fadt1Table) { > # ^ > edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:309:14: note: Access to > field 'Length' results in a dereference of a null pointer (loaded from > variable 'DsdtTable') > # DsdtTable->Length, > # ^~~~~~~~~ > # 307| AcpiProtocol, > # 308| DsdtTable, > # 309|-> DsdtTable->Length, > # 310| &TableHandle > # 311| ); Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Julien Grall <julien.grall@arm.com> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710 Issue: scan-0993.txt Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-04-09OvmfPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-09OvmfPkg/AcpiPlatformDxe: Fix Visual Studio build issuesjljusten
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13602 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-18OvmfPkg/AcpiPlatformDxe/Xen.c: reuse CalculateSum8jljusten
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13542 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-18OvmfPkg/AcpiPlatformDxe: Add Xen ACPI tables supportjljusten
This patch adds Xen ACPI tables support to OVMF. Use EFI_ACPI_TABLE_PROTOCOL to publish all Xen ACPI tables in OVMF, while keeping the Qemu and KVM support. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bei Guan <gbtju85@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13541 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-30OvmfPkg/AcpiPlatformDxe: Detect QEMU & Xenjljusten
Detect QEMU & Xen, and allow each to choose how to publish the individual ACPI tables. Currently both paths simply publish the tables unmodified. 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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13385 6f19259b-4bc3-4df7-8a09-765794883524