/* Populate IO resources from FDT that not added to GCD by its driver in the DXE phase. */
STATIC VOID PopulateIoResources(VOID *FdtBase, CONST CHAR8 *Compatible)
/* Populate IO resources from FDT that not added to GCD by its driver in the DXE phase. */
STATIC VOID PopulateIoResources(VOID *FdtBase, CONST CHAR8 *Compatible)
{
  UINT64  *Reg;
  INT32   Node, LenP;
  Node = fdt_node_offset_by_compatible (FdtBase, -1, Compatible);
  while (Node != -FDT_ERR_NOTFOUND) {
    Reg = (UINT64 *)fdt_getprop (FdtBase, Node, "reg", &LenP);
    if (Reg) {
      ASSERT (LenP == (2 * sizeof (UINT64)));
      AddIoMemoryBaseSizeHob (SwapBytes64 (Reg[0]), SwapBytes64 (Reg[1]));
    }
    Node = fdt_node_offset_by_compatible (FdtBase, Node, Compatible);
  }
}