diff options
Diffstat (limited to 'DuetPkg')
-rw-r--r-- | DuetPkg/Library/DuetBdsLib/BdsPlatform.c | 16 | ||||
-rw-r--r-- | DuetPkg/Library/DuetBdsLib/BdsPlatform.h | 48 | ||||
-rw-r--r-- | DuetPkg/Library/DuetBdsLib/PlatformData.c | 12 |
3 files changed, 49 insertions, 27 deletions
diff --git a/DuetPkg/Library/DuetBdsLib/BdsPlatform.c b/DuetPkg/Library/DuetBdsLib/BdsPlatform.c index 7a4f7e8af3..e39700ddb0 100644 --- a/DuetPkg/Library/DuetBdsLib/BdsPlatform.c +++ b/DuetPkg/Library/DuetBdsLib/BdsPlatform.c @@ -27,6 +27,11 @@ Abstract: CHAR16 mFirmwareVendor[] = L"TianoCore.org";
extern BOOLEAN gConnectAllHappened;
extern USB_CLASS_FORMAT_DEVICE_PATH gUsbClassKeyboardDevicePath;
+
+EFI_GUID *gTableGuidArray[] = {
+ &gEfiAcpi20TableGuid, &gEfiAcpiTableGuid, &gEfiSmbiosTableGuid, &gEfiMpsTableGuid
+ };
+
//
// BDS Platform Functions
//
@@ -52,9 +57,6 @@ Returns: EFI_PEI_HOB_POINTERS HobStart;
EFI_PHYSICAL_ADDRESS *Table;
UINTN Index;
- EFI_GUID *TableGuidArray[] = {
- &gEfiAcpi20TableGuid, &gEfiAcpiTableGuid, &gEfiSmbiosTableGuid, &gEfiMpsTableGuid
- };
//
// Get Hob List
@@ -63,8 +65,8 @@ Returns: //
// Iteratively add ACPI Table, SMBIOS Table, MPS Table to EFI System Table
//
- for (Index = 0; Index < sizeof (TableGuidArray) / sizeof (*TableGuidArray); ++Index) {
- GuidHob.Raw = GetNextGuidHob (TableGuidArray[Index], HobStart.Raw);
+ for (Index = 0; Index < sizeof (gTableGuidArray) / sizeof (*gTableGuidArray); ++Index) {
+ GuidHob.Raw = GetNextGuidHob (gTableGuidArray[Index], HobStart.Raw);
if (GuidHob.Raw != NULL) {
Table = GET_GUID_HOB_DATA (GuidHob.Guid);
if (Table != NULL) {
@@ -73,8 +75,8 @@ Returns: // According to UEFI Spec, we should make sure Smbios table,
// ACPI table and Mps tables kept in memory of specified type
//
- ConvertSystemTable(TableGuidArray[Index], (VOID**)&Table);
- gBS->InstallConfigurationTable (TableGuidArray[Index], (VOID *)Table);
+ ConvertSystemTable(gTableGuidArray[Index], (VOID**)&Table);
+ gBS->InstallConfigurationTable (gTableGuidArray[Index], (VOID *)Table);
}
}
}
diff --git a/DuetPkg/Library/DuetBdsLib/BdsPlatform.h b/DuetPkg/Library/DuetBdsLib/BdsPlatform.h index 9419607410..ed4bc1ef66 100644 --- a/DuetPkg/Library/DuetBdsLib/BdsPlatform.h +++ b/DuetPkg/Library/DuetBdsLib/BdsPlatform.h @@ -75,18 +75,24 @@ extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode; { \
HARDWARE_DEVICE_PATH, \
HW_PCI_DP, \
- (UINT8) (sizeof (PCI_DEVICE_PATH)), \
- (UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8), \
+ { \
+ (UINT8) (sizeof (PCI_DEVICE_PATH)), \
+ (UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) \
+ }, \
(Func), \
(Dev) \
}
#define PNPID_DEVICE_PATH_NODE(PnpId) \
{ \
- ACPI_DEVICE_PATH, \
- ACPI_DP, \
- (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), \
- (UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8), \
+ { \
+ ACPI_DEVICE_PATH, \
+ ACPI_DP, \
+ { \
+ (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), \
+ (UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) \
+ } \
+ }, \
EISA_PNP_ID((PnpId)), \
0 \
}
@@ -108,10 +114,14 @@ extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode; #define gUart \
{ \
- MESSAGING_DEVICE_PATH, \
- MSG_UART_DP, \
- (UINT8) (sizeof (UART_DEVICE_PATH)), \
- (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8), \
+ { \
+ MESSAGING_DEVICE_PATH, \
+ MSG_UART_DP, \
+ { \
+ (UINT8) (sizeof (UART_DEVICE_PATH)), \
+ (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8) \
+ } \
+ }, \
0, \
115200, \
8, \
@@ -121,10 +131,14 @@ extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode; #define gPcAnsiTerminal \
{ \
- MESSAGING_DEVICE_PATH, \
- MSG_VENDOR_DP, \
- (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \
- (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8), \
+ { \
+ MESSAGING_DEVICE_PATH, \
+ MSG_VENDOR_DP, \
+ { \
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \
+ } \
+ }, \
DEVICE_PATH_MESSAGING_PC_ANSI \
}
@@ -132,8 +146,10 @@ extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode; { \
END_DEVICE_PATH_TYPE, \
END_ENTIRE_DEVICE_PATH_SUBTYPE, \
- END_DEVICE_PATH_LENGTH, \
- 0 \
+ { \
+ END_DEVICE_PATH_LENGTH, \
+ 0 \
+ } \
}
#define PCI_CLASS_SCC 0x07
diff --git a/DuetPkg/Library/DuetBdsLib/PlatformData.c b/DuetPkg/Library/DuetBdsLib/PlatformData.c index e1a0cde3d4..8aafa16a06 100644 --- a/DuetPkg/Library/DuetBdsLib/PlatformData.c +++ b/DuetPkg/Library/DuetBdsLib/PlatformData.c @@ -50,8 +50,10 @@ USB_CLASS_FORMAT_DEVICE_PATH gUsbClassKeyboardDevicePath = { {
MESSAGING_DEVICE_PATH,
MSG_USB_CLASS_DP,
- (UINT8) (sizeof (USB_CLASS_DEVICE_PATH)),
- (UINT8) ((sizeof (USB_CLASS_DEVICE_PATH)) >> 8)
+ {
+ (UINT8) (sizeof (USB_CLASS_DEVICE_PATH)),
+ (UINT8) ((sizeof (USB_CLASS_DEVICE_PATH)) >> 8)
+ }
},
0xffff, // VendorId
0xffff, // ProductId
@@ -63,8 +65,10 @@ USB_CLASS_FORMAT_DEVICE_PATH gUsbClassKeyboardDevicePath = { {
END_DEVICE_PATH_TYPE,
END_ENTIRE_DEVICE_PATH_SUBTYPE,
- END_DEVICE_PATH_LENGTH,
- 0
+ {
+ END_DEVICE_PATH_LENGTH,
+ 0
+ }
}
};
|