]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/AcpiPlatformDxe/Xen.c
OvmfPkg/AcpiPlatformDxe: Detect QEMU & Xen
[mirror_edk2.git] / OvmfPkg / AcpiPlatformDxe / Xen.c
1 /** @file
2 OVMF ACPI QEMU support
3
4 Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include "AcpiPlatform.h"
16 #include <Library/HobLib.h>
17 #include <Guid/XenInfo.h>
18
19
20 BOOLEAN
21 XenDetected (
22 VOID
23 )
24 {
25 EFI_HOB_GUID_TYPE *GuidHob;
26
27 //
28 // See if a XenInfo HOB is available
29 //
30 GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid);
31 if (GuidHob == NULL) {
32 return FALSE;
33 }
34
35 return TRUE;
36 }
37
38
39 EFI_STATUS
40 EFIAPI
41 XenInstallAcpiTable (
42 IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
43 IN VOID *AcpiTableBuffer,
44 IN UINTN AcpiTableBufferSize,
45 OUT UINTN *TableKey
46 )
47 {
48 return InstallAcpiTable(
49 AcpiProtocol,
50 AcpiTableBuffer,
51 AcpiTableBufferSize,
52 TableKey
53 );
54 }
55