#include <Protocol/DevicePath.h>\r
#include <Protocol/NonDiscoverableDevice.h>\r
\r
+/**\r
+ Get Guid form the type of non-discoverable device.\r
+\r
+ @param[in] Type The type of non-discoverable device.\r
+\r
+ @retval Return the Guid.\r
+\r
+**/\r
STATIC\r
CONST EFI_GUID *\r
GetGuidFromType (\r
#pragma pack ()\r
\r
/**\r
- Register a non-discoverable MMIO device\r
+ Register a non-discoverable MMIO device.\r
\r
- @param[in] DeviceType The type of non-discoverable device\r
+ @param[in] Type The type of non-discoverable device\r
@param[in] DmaType Whether the device is DMA coherent\r
@param[in] InitFunc Initialization routine to be invoked when\r
the device is enabled\r
@param[in] NumMmioResources The number of UINTN base/size pairs that\r
follow, each describing an MMIO region\r
owned by the device\r
+ @param[in] ... The variable argument list which contains the\r
+ info about MmioResources.\r
\r
@retval EFI_SUCCESS The registration succeeded.\r
@retval EFI_INVALID_PARAMETER An invalid argument was given\r
Desc->AddrLen = Size;\r
Desc->AddrRangeMax = Base + Size - 1;\r
Desc->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM;\r
- Desc->AddrSpaceGranularity = (Base + Size > SIZE_4GB) ? 64 : 32;\r
+ Desc->AddrSpaceGranularity = ((EFI_PHYSICAL_ADDRESS)Base + Size > SIZE_4GB) ? 64 : 32;\r
Desc->AddrTranslationOffset = 0;\r
}\r
VA_END (Args);\r