\r
typedef enum {\r
PropertyTypeUnknown,\r
- PropertyTypeRtc,\r
PropertyTypeVirtio,\r
PropertyTypeUart,\r
PropertyTypeXen,\r
} PROPERTY;\r
\r
STATIC CONST PROPERTY CompatibleProperties[] = {\r
- { PropertyTypeRtc, "arm,pl031" },\r
{ PropertyTypeVirtio, "virtio,mmio" },\r
{ PropertyTypeUart, "arm,pl011" },\r
{ PropertyTypeXen, "xen,xen" },\r
VOID *Hob;\r
VOID *DeviceTreeBase;\r
INT32 Node, Prev;\r
- INT32 RtcNode;\r
EFI_STATUS Status;\r
CONST CHAR8 *Type;\r
INT32 Len;\r
\r
DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, DeviceTreeBase));\r
\r
- RtcNode = -1;\r
//\r
// Now enumerate the nodes and install peripherals that we are interested in,\r
// i.e., GIC, RTC and virtio MMIO nodes\r
}\r
break;\r
\r
- case PropertyTypeRtc:\r
- ASSERT (Len == 16);\r
-\r
- RegBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]);\r
- ASSERT (RegBase < MAX_UINT32);\r
-\r
- PcdSet32 (PcdPL031RtcBase, (UINT32)RegBase);\r
-\r
- DEBUG ((EFI_D_INFO, "Found PL031 RTC @ 0x%Lx\n", RegBase));\r
- RtcNode = Node;\r
- break;\r
-\r
case PropertyTypeXen:\r
ASSERT (Len == 16);\r
\r
//\r
Status = gBS->InstallConfigurationTable (&gFdtTableGuid, DeviceTreeBase);\r
ASSERT_EFI_ERROR (Status);\r
-\r
- //\r
- // UEFI takes ownership of the RTC hardware, and exposes its functionality\r
- // through the UEFI Runtime Services GetTime, SetTime, etc. This means we\r
- // need to disable it in the device tree to prevent the OS from attaching its\r
- // device driver as well.\r
- //\r
- if ((RtcNode != -1) &&\r
- fdt_setprop_string (DeviceTreeBase, RtcNode, "status",\r
- "disabled") != 0) {\r
- DEBUG ((EFI_D_WARN, "Failed to set PL031 status to 'disabled'\n"));\r
- }\r
}\r
+\r
return EFI_SUCCESS;\r
}\r