Clean up DuetBdsLib:

Refine to pass CYGWIN GCC tool chain.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7410 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2009-02-03 00:56:15 +00:00
parent 6583c3582f
commit 9e65d5e975
3 changed files with 49 additions and 27 deletions

View File

@ -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);
}
}
}

View File

@ -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)) >> 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), \
(UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) \
} \
}, \
EISA_PNP_ID((PnpId)), \
0 \
}
@ -107,11 +113,15 @@ extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode;
PNPID_DEVICE_PATH_NODE(0x0501)
#define gUart \
{ \
{ \
MESSAGING_DEVICE_PATH, \
MSG_UART_DP, \
{ \
(UINT8) (sizeof (UART_DEVICE_PATH)), \
(UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8), \
(UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8) \
} \
}, \
0, \
115200, \
8, \
@ -120,11 +130,15 @@ extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode;
}
#define gPcAnsiTerminal \
{ \
{ \
MESSAGING_DEVICE_PATH, \
MSG_VENDOR_DP, \
{ \
(UINT8) (sizeof (VENDOR_DEVICE_PATH)), \
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8), \
(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 \
} \
}
#define PCI_CLASS_SCC 0x07

View File

@ -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)
}
},
0xffff, // VendorId
0xffff, // ProductId
@ -63,9 +65,11 @@ USB_CLASS_FORMAT_DEVICE_PATH gUsbClassKeyboardDevicePath = {
{
END_DEVICE_PATH_TYPE,
END_ENTIRE_DEVICE_PATH_SUBTYPE,
{
END_DEVICE_PATH_LENGTH,
0
}
}
};
/*