summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Cran <rebecca@bsdio.com>2020-11-29 22:34:12 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-11-30 17:49:39 +0000
commit9fb629edd75e1ae1e7f4e85b0876107a7180899b (patch)
treefd9228653b2c3f287583093908c757a606ee1f1e
parent3cdfedc20e45fd6848ee691bcdb301ea7e6f157f (diff)
downloadedk2-9fb629edd75e1ae1e7f4e85b0876107a7180899b.zip
edk2-9fb629edd75e1ae1e7f4e85b0876107a7180899b.tar.gz
edk2-9fb629edd75e1ae1e7f4e85b0876107a7180899b.tar.bz2
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>
-rw-r--r--OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c3
-rw-r--r--OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h10
-rw-r--r--OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf18
-rw-r--r--OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c2
-rw-r--r--OvmfPkg/Bhyve/AcpiTables/AcpiTables.inf10
-rw-r--r--OvmfPkg/Bhyve/AcpiTables/Platform.h2
-rw-r--r--OvmfPkg/Bhyve/BhyveRfbDxe/BhyveRfbDxe.inf8
-rw-r--r--OvmfPkg/Bhyve/BhyveRfbDxe/Gop.h6
-rw-r--r--OvmfPkg/Bhyve/BhyveX64.dsc2
-rw-r--r--OvmfPkg/Bhyve/PlatformPei/Cmos.h6
-rw-r--r--OvmfPkg/Bhyve/PlatformPei/Fv.c2
-rw-r--r--OvmfPkg/Bhyve/PlatformPei/Platform.c2
-rw-r--r--OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf12
-rw-r--r--OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.h7
-rw-r--r--OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.inf10
15 files changed, 47 insertions, 53 deletions
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
index 31bbf6c..d5c78c6 100644
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
@@ -1,8 +1,9 @@
/** @file
- OVMF ACPI Platform Driver
+ bhyve ACPI Platform Driver
Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
+
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h
index d30cd11..994ee2c 100644
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h
@@ -1,5 +1,5 @@
/** @file
- Sample ACPI Platform Driver
+ bhyve ACPI Platform Driver
Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
@@ -11,17 +11,14 @@
#define _ACPI_PLATFORM_H_INCLUDED_
#include <PiDxe.h>
-
#include <Protocol/AcpiTable.h>
#include <Protocol/FirmwareVolume2.h>
#include <Protocol/PciIo.h>
-
#include <Library/BaseLib.h>
-#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
#include <Library/PcdLib.h>
+#include <Library/UefiBootServicesTableLib.h>
#include <Library/XenPlatformLib.h>
-
#include <IndustryStandard/Acpi.h>
typedef struct {
@@ -73,5 +70,4 @@ RestorePciDecoding (
IN UINTN Count
);
-#endif
-
+#endif /* _ACPI_PLATFORM_H_INCLUDED_ */
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf
index eec5a42..595fd05 100644
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -8,7 +8,7 @@
##
[Defines]
- INF_VERSION = 0x00010005
+ INF_VERSION = 1.29
BASE_NAME = AcpiPlatform
FILE_GUID = D5F92408-BAB5-44CA-8A60-C212F01D7E9D
MODULE_TYPE = DXE_DRIVER
@@ -24,9 +24,9 @@
[Sources]
AcpiPlatform.c
AcpiPlatform.h
+ Bhyve.c
EntryPoint.c
PciDecoding.c
- Bhyve.c
[Packages]
MdePkg/MdePkg.dec
@@ -35,17 +35,17 @@
UefiCpuPkg/UefiCpuPkg.dec
[LibraryClasses]
- UefiLib
- PcdLib
+ BaseLib
BaseMemoryLib
- DebugLib
- UefiBootServicesTableLib
- UefiDriverEntryPoint
BhyveFwCtlLib
- MemoryAllocationLib
- BaseLib
+ DebugLib
DxeServicesTableLib
+ MemoryAllocationLib
OrderedCollectionLib
+ PcdLib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
+ UefiLib
[Protocols]
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c b/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c
index 6d42264..01ee894 100644
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c
@@ -9,8 +9,8 @@
#include "AcpiPlatform.h"
#include <Library/BaseMemoryLib.h>
-#include <Library/MemoryAllocationLib.h>
#include <Library/BhyveFwCtlLib.h>
+#include <Library/MemoryAllocationLib.h>
STATIC
EFI_STATUS
diff --git a/OvmfPkg/Bhyve/AcpiTables/AcpiTables.inf b/OvmfPkg/Bhyve/AcpiTables/AcpiTables.inf
index 3aab424..f422793 100644
--- a/OvmfPkg/Bhyve/AcpiTables/AcpiTables.inf
+++ b/OvmfPkg/Bhyve/AcpiTables/AcpiTables.inf
@@ -12,7 +12,7 @@
##
[Defines]
- INF_VERSION = 0x00010005
+ INF_VERSION = 1.29
BASE_NAME = PlatformAcpiTables
FILE_GUID = B4BA6241-936C-4485-A483-9FA832C758CA
MODULE_TYPE = USER_DEFINED
@@ -25,14 +25,14 @@
#
[Sources]
- Platform.h
- Madt.aslc
+ Dsdt.asl
Facp.aslc
Facs.aslc
- Dsdt.asl
Hpet.aslc
- Spcr.aslc
+ Madt.aslc
Mcfg.aslc
+ Platform.h
+ Spcr.aslc
[Packages]
MdePkg/MdePkg.dec
diff --git a/OvmfPkg/Bhyve/AcpiTables/Platform.h b/OvmfPkg/Bhyve/AcpiTables/Platform.h
index fc43ab4..c6d4304 100644
--- a/OvmfPkg/Bhyve/AcpiTables/Platform.h
+++ b/OvmfPkg/Bhyve/AcpiTables/Platform.h
@@ -14,8 +14,8 @@
#define _Platform_h_INCLUDED_
#include <IndustryStandard/Acpi.h>
-#include <IndustryStandard/SerialPortConsoleRedirectionTable.h>
#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
+#include <IndustryStandard/SerialPortConsoleRedirectionTable.h>
//
// ACPI table information used to initialize tables.
diff --git a/OvmfPkg/Bhyve/BhyveRfbDxe/BhyveRfbDxe.inf b/OvmfPkg/Bhyve/BhyveRfbDxe/BhyveRfbDxe.inf
index 5d6e41f..d401660 100644
--- a/OvmfPkg/Bhyve/BhyveRfbDxe/BhyveRfbDxe.inf
+++ b/OvmfPkg/Bhyve/BhyveRfbDxe/BhyveRfbDxe.inf
@@ -10,7 +10,7 @@
##
[Defines]
- INF_VERSION = 0x00010005
+ INF_VERSION = 1.29
BASE_NAME = EmuGopDxe
FILE_GUID = 1b290126-5760-424e-8aa2-3faf4d0d7978
MODULE_TYPE = UEFI_DRIVER
@@ -29,12 +29,11 @@
[Sources]
ComponentName.c
- GopScreen.c
- GopDriver.c
Gop.h
+ GopDriver.c
+ GopScreen.c
VbeShim.c
-
[Packages]
MdePkg/MdePkg.dec
OvmfPkg/OvmfPkg.dec
@@ -55,7 +54,6 @@
UefiBootServicesTableLib
UefiDriverEntryPoint
-
[Protocols]
gEfiGraphicsOutputProtocolGuid # PROTOCOL BY_START
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
diff --git a/OvmfPkg/Bhyve/BhyveRfbDxe/Gop.h b/OvmfPkg/Bhyve/BhyveRfbDxe/Gop.h
index d196a8e..13cf397 100644
--- a/OvmfPkg/Bhyve/BhyveRfbDxe/Gop.h
+++ b/OvmfPkg/Bhyve/BhyveRfbDxe/Gop.h
@@ -8,8 +8,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
-#ifndef __UGA_H_
-#define __UGA_H_
+#ifndef _GOP_H_
+#define _GOP_H_
#include <Uefi.h>
#include <Protocol/GraphicsOutput.h>
@@ -146,4 +146,4 @@ InstallVbeShim (
IN EFI_PHYSICAL_ADDRESS FrameBufferBase
);
-#endif
+#endif /* _GOP_H_ */
diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
index c981309..b93fe30 100644
--- a/OvmfPkg/Bhyve/BhyveX64.dsc
+++ b/OvmfPkg/Bhyve/BhyveX64.dsc
@@ -17,7 +17,7 @@
PLATFORM_NAME = Bhyve
PLATFORM_GUID = 562b76ee-ceb2-4f4f-adfe-a4c8dc46e4ff
PLATFORM_VERSION = 0.1
- DSC_SPECIFICATION = 0x00010005
+ DSC_SPECIFICATION = 1.30
OUTPUT_DIRECTORY = Build/BhyveX64
SUPPORTED_ARCHITECTURES = X64
BUILD_TARGETS = NOOPT|DEBUG|RELEASE
diff --git a/OvmfPkg/Bhyve/PlatformPei/Cmos.h b/OvmfPkg/Bhyve/PlatformPei/Cmos.h
index 3cd9879..ef7901f 100644
--- a/OvmfPkg/Bhyve/PlatformPei/Cmos.h
+++ b/OvmfPkg/Bhyve/PlatformPei/Cmos.h
@@ -6,8 +6,8 @@
**/
-#ifndef __CMOS_H__
-#define __CMOS_H__
+#ifndef _CMOS_H_
+#define _CMOS_H_
/**
Reads 8-bits of CMOS data.
@@ -46,5 +46,5 @@ CmosWrite8 (
);
-#endif
+#endif /* _CMOS_H_ */
diff --git a/OvmfPkg/Bhyve/PlatformPei/Fv.c b/OvmfPkg/Bhyve/PlatformPei/Fv.c
index ee4ecab..94b7e21 100644
--- a/OvmfPkg/Bhyve/PlatformPei/Fv.c
+++ b/OvmfPkg/Bhyve/PlatformPei/Fv.c
@@ -10,8 +10,8 @@
#include "Platform.h"
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
-#include <Library/PeiServicesLib.h>
#include <Library/PcdLib.h>
+#include <Library/PeiServicesLib.h>
/**
diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c b/OvmfPkg/Bhyve/PlatformPei/Platform.c
index 9f19006..3a414ff 100644
--- a/OvmfPkg/Bhyve/PlatformPei/Platform.c
+++ b/OvmfPkg/Bhyve/PlatformPei/Platform.c
@@ -21,13 +21,13 @@
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
#include <Library/IoLib.h>
+#include <Library/LocalApicLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#include <Library/PciLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/PeiServicesLib.h>
#include <Library/ResourcePublicationLib.h>
-#include <Library/LocalApicLib.h>
#include <Guid/MemoryTypeInformation.h>
#include <Ppi/MasterBootMode.h>
#include <IndustryStandard/Pci22.h>
diff --git a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
index 7288cff..12203e9 100644
--- a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
+++ b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
@@ -11,7 +11,7 @@
##
[Defines]
- INF_VERSION = 0x00010005
+ INF_VERSION = 1.29
BASE_NAME = PlatformPei
FILE_GUID = aa89d903-345b-4ab2-9abf-030b5efb5d50
MODULE_TYPE = PEIM
@@ -51,15 +51,15 @@
DebugLib
HobLib
IoLib
+ LocalApicLib
+ MemEncryptSevLib
+ MtrrLib
PciLib
- ResourcePublicationLib
+ PeimEntryPoint
PeiServicesLib
PeiServicesTablePointerLib
- PeimEntryPoint
- MtrrLib
- MemEncryptSevLib
PcdLib
- LocalApicLib
+ ResourcePublicationLib
[Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase
diff --git a/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.h b/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.h
index 1971827..12d7be7 100644
--- a/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.h
+++ b/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.h
@@ -13,14 +13,13 @@
#define _SMBIOS_PLATFORM_DXE_H_
#include <PiDxe.h>
-
#include <Protocol/Smbios.h>
#include <IndustryStandard/SmBios.h>
-#include <Library/DebugLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
-#include <Library/UefiBootServicesTableLib.h>
+#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiBootServicesTableLib.h>
/**
@@ -49,4 +48,4 @@ IsEntryPointStructureValid (
IN SMBIOS_TABLE_ENTRY_POINT *EntryPointStructure
);
-#endif
+#endif /* _SMBIOS_PLATFORM_DXE_H_ */
diff --git a/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
index a4cc6e7..12deae7 100644
--- a/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+++ b/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
@@ -10,7 +10,7 @@
##
[Defines]
- INF_VERSION = 0x00010005
+ INF_VERSION = 1.29
BASE_NAME = SmbiosPlatformDxe
FILE_GUID = e2d8a63c-c239-484f-bb21-2917843cc382
MODULE_TYPE = DXE_DRIVER
@@ -25,9 +25,9 @@
#
[Sources]
+ Bhyve.c
SmbiosPlatformDxe.h
SmbiosPlatformDxe.c
- Bhyve.c
[Packages]
MdePkg/MdePkg.dec
@@ -35,14 +35,14 @@
OvmfPkg/OvmfPkg.dec
[LibraryClasses]
- UefiBootServicesTableLib
- BaseMemoryLib
BaseLib
- UefiDriverEntryPoint
+ BaseMemoryLib
DebugLib
HobLib
MemoryAllocationLib
PcdLib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
[Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated