+ //\r
+ // Kick the event; the protocol could be available already.\r
+ //\r
+ Status = gBS->SignalEvent (PlatformHasDeviceTreeEvent);\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((DEBUG_ERROR, "%a: SignalEvent(): %r\n", __FUNCTION__, Status));\r
+ goto CloseEvent;\r
+ }\r
+\r
+ Status = gBS->InstallProtocolInterface (\r
+ &ImageHandle,\r
+ &gFdtClientProtocolGuid,\r
+ EFI_NATIVE_INTERFACE,\r
+ &mFdtClientProtocol\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((\r
+ DEBUG_ERROR,\r
+ "%a: InstallProtocolInterface(): %r\n",\r
+ __FUNCTION__,\r
+ Status\r
+ ));\r
+ goto CloseEvent;\r
+ }\r
+\r
+ return Status;\r
+\r
+CloseEvent:\r
+ gBS->CloseEvent (PlatformHasDeviceTreeEvent);\r
+ return Status;\r