]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/DxeIpl/DxeInit.c
1, Enable USB boot for R9's Duet.
[mirror_edk2.git] / DuetPkg / DxeIpl / DxeInit.c
index 6bc3170bc5bb2ba866c6ff53ed695d7eb7e07dc6..2f4e5b9f82026d833f93fed2ffa8d0f677f69532 100644 (file)
@@ -110,6 +110,19 @@ EnterDxeMain (
   IN VOID *PageTable\r
   );\r
 \r
+VOID\r
+WaitForKey ()\r
+{\r
+    PrintString("Press Enter to continue ...\n");\r
+    _asm {\r
+            mov  al,  20h\r
+            out  64h, al\r
+     AGAIN: in   al,  60h\r
+            cmp  al,  1ch\r
+            jnz  AGAIN\r
+    }\r
+}\r
+\r
 VOID\r
 DxeInit (\r
   IN EFILDRHANDOFF  *Handoff\r
@@ -139,6 +152,7 @@ Returns:
   \r
   ClearScreen();\r
   PrintString("Enter DxeIpl ...\n");\r
+  \r
 /*\r
   ClearScreen();\r
   PrintString("handoff:\n");\r
@@ -166,27 +180,31 @@ Returns:
   //   * Don't report FV as physical memory\r
   //   * MemoryAllocation Hob should only cover physical memory\r
   //   * Use ResourceDescriptor Hob to report physical memory or Firmware Device and they shouldn't be overlapped\r
-  \r
+  PrintString("Prepare Cpu HOB information ...\n");\r
   PrepareHobCpu ();\r
+\r
   //\r
   // 1. BFV\r
   //\r
+  PrintString("Prepare BFV HOB information ...\n");\r
   PrepareHobBfv (Handoff->BfvBase, Handoff->BfvSize);\r
 \r
   //\r
   // 2. Updates Memory information, and get the top free address under 4GB\r
   //\r
+  PrintString("Prepare Memory HOB information ...\n");\r
   MemoryTopOnDescriptor = PrepareHobMemory (Handoff->MemDescCount, Handoff->MemDesc);\r
-\r
+  \r
   //\r
   // 3. Put [NV], [Stack], [PageTable], [MemDesc], [HOB] just below the [top free address under 4GB]\r
   //\r
   \r
   //   3.1 NV data\r
+  PrintString("Prepare NV Storage information ...\n");\r
   NvStorageBase = PrepareHobNvStorage (MemoryTopOnDescriptor);\r
   AsciiSPrint (PrintBuffer, 256, "NV Storage Base=0x%x\n", (UINTN)NvStorageBase);\r
   PrintString (PrintBuffer);\r
-\r
+  \r
   //   3.2 Stack\r
   StackTop = NvStorageBase;\r
   StackBottom = PrepareHobStack (StackTop);\r
@@ -203,6 +221,7 @@ Returns:
   //\r
   // 4. Register the memory occupied by DxeCore and DxeIpl together as DxeCore\r
   //\r
+  PrintString("Prepare DxeCore memory Hob ...\n");\r
   PrepareHobDxeCore (\r
     Handoff->DxeCoreEntryPoint,\r
     (EFI_PHYSICAL_ADDRESS)(UINTN)Handoff->DxeCoreImageBase,\r
@@ -210,6 +229,7 @@ Returns:
     );\r
 \r
   PrepareHobLegacyTable (gHob);\r
+  \r
   PreparePpisNeededByDxeCore (gHob);\r
 \r
   CompleteHobGeneration ();\r
@@ -292,12 +312,14 @@ Returns:
   PrintString("\n");   \r
   EFI_DEADLOOP();\r
 */\r
+  WaitForKey ();\r
   ClearScreen();\r
   PrintString("\n\n\n\n\n\n\n\n\n\n");\r
   PrintString("                         WELCOME TO EFI WORLD!\n");\r
-\r
+  \r
   EnterDxeMain (StackTop, Handoff->DxeCoreEntryPoint, gHob, PageTableBase);\r
-\r
+  \r
+  PrintString("Fail to enter DXE main!\n");\r
   //\r
   // Should never get here\r
   //\r