mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
OvmfPkg/Bhyve: Fix various style issues
Fix ordering of includes, sources, libraries etc. Remove leading/trailing underscores from include guards. Change INF and DSC version numbers to be decimal. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Message-Id: <20201130053412.2-6-rebecca@bsdio.com> Acked-by: Peter Grehan <grehan@freebsd.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Build-tested-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
3cdfedc20e
commit
9fb629edd7
@ -1,8 +1,9 @@
|
|||||||
/** @file
|
/** @file
|
||||||
OVMF ACPI Platform Driver
|
bhyve ACPI Platform Driver
|
||||||
|
|
||||||
Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
|
Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
|
||||||
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Sample ACPI Platform Driver
|
bhyve ACPI Platform Driver
|
||||||
|
|
||||||
Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
|
Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
|
||||||
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
@ -11,17 +11,14 @@
|
|||||||
#define _ACPI_PLATFORM_H_INCLUDED_
|
#define _ACPI_PLATFORM_H_INCLUDED_
|
||||||
|
|
||||||
#include <PiDxe.h>
|
#include <PiDxe.h>
|
||||||
|
|
||||||
#include <Protocol/AcpiTable.h>
|
#include <Protocol/AcpiTable.h>
|
||||||
#include <Protocol/FirmwareVolume2.h>
|
#include <Protocol/FirmwareVolume2.h>
|
||||||
#include <Protocol/PciIo.h>
|
#include <Protocol/PciIo.h>
|
||||||
|
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
#include <Library/XenPlatformLib.h>
|
#include <Library/XenPlatformLib.h>
|
||||||
|
|
||||||
#include <IndustryStandard/Acpi.h>
|
#include <IndustryStandard/Acpi.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -73,5 +70,4 @@ RestorePciDecoding (
|
|||||||
IN UINTN Count
|
IN UINTN Count
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif /* _ACPI_PLATFORM_H_INCLUDED_ */
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
##
|
##
|
||||||
|
|
||||||
[Defines]
|
[Defines]
|
||||||
INF_VERSION = 0x00010005
|
INF_VERSION = 1.29
|
||||||
BASE_NAME = AcpiPlatform
|
BASE_NAME = AcpiPlatform
|
||||||
FILE_GUID = D5F92408-BAB5-44CA-8A60-C212F01D7E9D
|
FILE_GUID = D5F92408-BAB5-44CA-8A60-C212F01D7E9D
|
||||||
MODULE_TYPE = DXE_DRIVER
|
MODULE_TYPE = DXE_DRIVER
|
||||||
@ -24,9 +24,9 @@
|
|||||||
[Sources]
|
[Sources]
|
||||||
AcpiPlatform.c
|
AcpiPlatform.c
|
||||||
AcpiPlatform.h
|
AcpiPlatform.h
|
||||||
|
Bhyve.c
|
||||||
EntryPoint.c
|
EntryPoint.c
|
||||||
PciDecoding.c
|
PciDecoding.c
|
||||||
Bhyve.c
|
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
@ -35,17 +35,17 @@
|
|||||||
UefiCpuPkg/UefiCpuPkg.dec
|
UefiCpuPkg/UefiCpuPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
UefiLib
|
BaseLib
|
||||||
PcdLib
|
|
||||||
BaseMemoryLib
|
BaseMemoryLib
|
||||||
|
BhyveFwCtlLib
|
||||||
DebugLib
|
DebugLib
|
||||||
|
DxeServicesTableLib
|
||||||
|
MemoryAllocationLib
|
||||||
|
OrderedCollectionLib
|
||||||
|
PcdLib
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
BhyveFwCtlLib
|
UefiLib
|
||||||
MemoryAllocationLib
|
|
||||||
BaseLib
|
|
||||||
DxeServicesTableLib
|
|
||||||
OrderedCollectionLib
|
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
#include "AcpiPlatform.h"
|
#include "AcpiPlatform.h"
|
||||||
|
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
|
||||||
#include <Library/BhyveFwCtlLib.h>
|
#include <Library/BhyveFwCtlLib.h>
|
||||||
|
#include <Library/MemoryAllocationLib.h>
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
##
|
##
|
||||||
|
|
||||||
[Defines]
|
[Defines]
|
||||||
INF_VERSION = 0x00010005
|
INF_VERSION = 1.29
|
||||||
BASE_NAME = PlatformAcpiTables
|
BASE_NAME = PlatformAcpiTables
|
||||||
FILE_GUID = B4BA6241-936C-4485-A483-9FA832C758CA
|
FILE_GUID = B4BA6241-936C-4485-A483-9FA832C758CA
|
||||||
MODULE_TYPE = USER_DEFINED
|
MODULE_TYPE = USER_DEFINED
|
||||||
@ -25,14 +25,14 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
Platform.h
|
Dsdt.asl
|
||||||
Madt.aslc
|
|
||||||
Facp.aslc
|
Facp.aslc
|
||||||
Facs.aslc
|
Facs.aslc
|
||||||
Dsdt.asl
|
|
||||||
Hpet.aslc
|
Hpet.aslc
|
||||||
Spcr.aslc
|
Madt.aslc
|
||||||
Mcfg.aslc
|
Mcfg.aslc
|
||||||
|
Platform.h
|
||||||
|
Spcr.aslc
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
#define _Platform_h_INCLUDED_
|
#define _Platform_h_INCLUDED_
|
||||||
|
|
||||||
#include <IndustryStandard/Acpi.h>
|
#include <IndustryStandard/Acpi.h>
|
||||||
#include <IndustryStandard/SerialPortConsoleRedirectionTable.h>
|
|
||||||
#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
|
#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
|
||||||
|
#include <IndustryStandard/SerialPortConsoleRedirectionTable.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
// ACPI table information used to initialize tables.
|
// ACPI table information used to initialize tables.
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
##
|
##
|
||||||
|
|
||||||
[Defines]
|
[Defines]
|
||||||
INF_VERSION = 0x00010005
|
INF_VERSION = 1.29
|
||||||
BASE_NAME = EmuGopDxe
|
BASE_NAME = EmuGopDxe
|
||||||
FILE_GUID = 1b290126-5760-424e-8aa2-3faf4d0d7978
|
FILE_GUID = 1b290126-5760-424e-8aa2-3faf4d0d7978
|
||||||
MODULE_TYPE = UEFI_DRIVER
|
MODULE_TYPE = UEFI_DRIVER
|
||||||
@ -29,12 +29,11 @@
|
|||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
ComponentName.c
|
ComponentName.c
|
||||||
GopScreen.c
|
|
||||||
GopDriver.c
|
|
||||||
Gop.h
|
Gop.h
|
||||||
|
GopDriver.c
|
||||||
|
GopScreen.c
|
||||||
VbeShim.c
|
VbeShim.c
|
||||||
|
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
OvmfPkg/OvmfPkg.dec
|
OvmfPkg/OvmfPkg.dec
|
||||||
@ -55,7 +54,6 @@
|
|||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
|
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiGraphicsOutputProtocolGuid # PROTOCOL BY_START
|
gEfiGraphicsOutputProtocolGuid # PROTOCOL BY_START
|
||||||
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
||||||
|
@ -8,8 +8,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __UGA_H_
|
#ifndef _GOP_H_
|
||||||
#define __UGA_H_
|
#define _GOP_H_
|
||||||
|
|
||||||
#include <Uefi.h>
|
#include <Uefi.h>
|
||||||
#include <Protocol/GraphicsOutput.h>
|
#include <Protocol/GraphicsOutput.h>
|
||||||
@ -146,4 +146,4 @@ InstallVbeShim (
|
|||||||
IN EFI_PHYSICAL_ADDRESS FrameBufferBase
|
IN EFI_PHYSICAL_ADDRESS FrameBufferBase
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif /* _GOP_H_ */
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
PLATFORM_NAME = Bhyve
|
PLATFORM_NAME = Bhyve
|
||||||
PLATFORM_GUID = 562b76ee-ceb2-4f4f-adfe-a4c8dc46e4ff
|
PLATFORM_GUID = 562b76ee-ceb2-4f4f-adfe-a4c8dc46e4ff
|
||||||
PLATFORM_VERSION = 0.1
|
PLATFORM_VERSION = 0.1
|
||||||
DSC_SPECIFICATION = 0x00010005
|
DSC_SPECIFICATION = 1.30
|
||||||
OUTPUT_DIRECTORY = Build/BhyveX64
|
OUTPUT_DIRECTORY = Build/BhyveX64
|
||||||
SUPPORTED_ARCHITECTURES = X64
|
SUPPORTED_ARCHITECTURES = X64
|
||||||
BUILD_TARGETS = NOOPT|DEBUG|RELEASE
|
BUILD_TARGETS = NOOPT|DEBUG|RELEASE
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef __CMOS_H__
|
#ifndef _CMOS_H_
|
||||||
#define __CMOS_H__
|
#define _CMOS_H_
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reads 8-bits of CMOS data.
|
Reads 8-bits of CMOS data.
|
||||||
@ -46,5 +46,5 @@ CmosWrite8 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif /* _CMOS_H_ */
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/HobLib.h>
|
#include <Library/HobLib.h>
|
||||||
#include <Library/PeiServicesLib.h>
|
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
|
#include <Library/PeiServicesLib.h>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/HobLib.h>
|
#include <Library/HobLib.h>
|
||||||
#include <Library/IoLib.h>
|
#include <Library/IoLib.h>
|
||||||
|
#include <Library/LocalApicLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/PciLib.h>
|
#include <Library/PciLib.h>
|
||||||
#include <Library/PeimEntryPoint.h>
|
#include <Library/PeimEntryPoint.h>
|
||||||
#include <Library/PeiServicesLib.h>
|
#include <Library/PeiServicesLib.h>
|
||||||
#include <Library/ResourcePublicationLib.h>
|
#include <Library/ResourcePublicationLib.h>
|
||||||
#include <Library/LocalApicLib.h>
|
|
||||||
#include <Guid/MemoryTypeInformation.h>
|
#include <Guid/MemoryTypeInformation.h>
|
||||||
#include <Ppi/MasterBootMode.h>
|
#include <Ppi/MasterBootMode.h>
|
||||||
#include <IndustryStandard/Pci22.h>
|
#include <IndustryStandard/Pci22.h>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
##
|
##
|
||||||
|
|
||||||
[Defines]
|
[Defines]
|
||||||
INF_VERSION = 0x00010005
|
INF_VERSION = 1.29
|
||||||
BASE_NAME = PlatformPei
|
BASE_NAME = PlatformPei
|
||||||
FILE_GUID = aa89d903-345b-4ab2-9abf-030b5efb5d50
|
FILE_GUID = aa89d903-345b-4ab2-9abf-030b5efb5d50
|
||||||
MODULE_TYPE = PEIM
|
MODULE_TYPE = PEIM
|
||||||
@ -51,15 +51,15 @@
|
|||||||
DebugLib
|
DebugLib
|
||||||
HobLib
|
HobLib
|
||||||
IoLib
|
IoLib
|
||||||
|
LocalApicLib
|
||||||
|
MemEncryptSevLib
|
||||||
|
MtrrLib
|
||||||
PciLib
|
PciLib
|
||||||
ResourcePublicationLib
|
PeimEntryPoint
|
||||||
PeiServicesLib
|
PeiServicesLib
|
||||||
PeiServicesTablePointerLib
|
PeiServicesTablePointerLib
|
||||||
PeimEntryPoint
|
|
||||||
MtrrLib
|
|
||||||
MemEncryptSevLib
|
|
||||||
PcdLib
|
PcdLib
|
||||||
LocalApicLib
|
ResourcePublicationLib
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase
|
||||||
|
@ -13,14 +13,13 @@
|
|||||||
#define _SMBIOS_PLATFORM_DXE_H_
|
#define _SMBIOS_PLATFORM_DXE_H_
|
||||||
|
|
||||||
#include <PiDxe.h>
|
#include <PiDxe.h>
|
||||||
|
|
||||||
#include <Protocol/Smbios.h>
|
#include <Protocol/Smbios.h>
|
||||||
#include <IndustryStandard/SmBios.h>
|
#include <IndustryStandard/SmBios.h>
|
||||||
#include <Library/DebugLib.h>
|
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,4 +48,4 @@ IsEntryPointStructureValid (
|
|||||||
IN SMBIOS_TABLE_ENTRY_POINT *EntryPointStructure
|
IN SMBIOS_TABLE_ENTRY_POINT *EntryPointStructure
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif /* _SMBIOS_PLATFORM_DXE_H_ */
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
##
|
##
|
||||||
|
|
||||||
[Defines]
|
[Defines]
|
||||||
INF_VERSION = 0x00010005
|
INF_VERSION = 1.29
|
||||||
BASE_NAME = SmbiosPlatformDxe
|
BASE_NAME = SmbiosPlatformDxe
|
||||||
FILE_GUID = e2d8a63c-c239-484f-bb21-2917843cc382
|
FILE_GUID = e2d8a63c-c239-484f-bb21-2917843cc382
|
||||||
MODULE_TYPE = DXE_DRIVER
|
MODULE_TYPE = DXE_DRIVER
|
||||||
@ -25,9 +25,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
Bhyve.c
|
||||||
SmbiosPlatformDxe.h
|
SmbiosPlatformDxe.h
|
||||||
SmbiosPlatformDxe.c
|
SmbiosPlatformDxe.c
|
||||||
Bhyve.c
|
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
@ -35,14 +35,14 @@
|
|||||||
OvmfPkg/OvmfPkg.dec
|
OvmfPkg/OvmfPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
UefiBootServicesTableLib
|
|
||||||
BaseMemoryLib
|
|
||||||
BaseLib
|
BaseLib
|
||||||
UefiDriverEntryPoint
|
BaseMemoryLib
|
||||||
DebugLib
|
DebugLib
|
||||||
HobLib
|
HobLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
PcdLib
|
PcdLib
|
||||||
|
UefiBootServicesTableLib
|
||||||
|
UefiDriverEntryPoint
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated
|
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated
|
||||||
|
Loading…
x
Reference in New Issue
Block a user