]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix many bugs in DUET package and now DUET package is enabled for floppy successful.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 5 May 2008 06:50:12 +0000 (06:50 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 5 May 2008 06:50:12 +0000 (06:50 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5158 6f19259b-4bc3-4df7-8a09-765794883524

DuetPkg/CpuDxe/CpuDxe.h
DuetPkg/DuetPkg.dsc
DuetPkg/DuetPkg.fdf
DuetPkg/FSVariable/FSVariable.c
DuetPkg/FSVariable/FileStorage.c
DuetPkg/FvbRuntimeService/FWBlockService.c
DuetPkg/Include/FlashLayout.h
DuetPkg/Library/DuetBdsLib/BdsPlatform.c

index 5bca0ca10ca8dd2d4eab0566c85cb95ea9861e60..017f49ec5c8e3577682363f21631589b806a746a 100644 (file)
@@ -32,7 +32,7 @@ Abstract:
 #include <Library/UefiBootServicesTableLib.h>\r
 \r
 #define CPU_EXCEPTION_DEBUG_OUTPUT   1\r
-#define CPU_EXCEPTION_VGA_SWITCH     1\r
+#define CPU_EXCEPTION_VGA_SWITCH     0\r
 \r
 #define INTERRUPT_VECTOR_NUMBER 0x100\r
 \r
index 71766c01ebf433df51c01e20022d3e5de4d41c3b..6b7916fc2d041671e3bf6764eab0e90174904ce2 100644 (file)
 \r
 [LibraryClasses.common]\r
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf\r
-  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
-  TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
+  DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf\r
   BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf\r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf\r
-  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/BaseReportStatusCodeLib/BaseReportStatusCodeLib.inf\r
+  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf\r
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
@@ -49,6 +48,7 @@
   OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
+  TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf\r
 \r
 [LibraryClasses.common.DXE_DRIVER]\r
   MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
   ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf\r
   SerialPortLib|DuetPkg/Library/DuetSerialIoLib/DuetSerialIoLib.inf\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
-  TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
+  #TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
+  DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf\r
 \r
 [LibraryClasses.common.UEFI_DRIVER]\r
   MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
   SerialPortLib|DuetPkg/Library/DuetSerialIoLib/DuetSerialIoLib.inf\r
+  DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf\r
+  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf\r
 \r
 [LibraryClasses.common.UEFI_APPLICATION]\r
   MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf\r
   SerialPortLib|DuetPkg/Library/DuetSerialIoLib/DuetSerialIoLib.inf\r
+  DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf\r
+  ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf\r
 \r
 [PcdsPatchableInModule]\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042\r
   \r
   \r
   DuetPkg/DataHubGenDxe/DataHubGen.inf\r
-  DuetPkg/FvbRuntimeService/DUETFwh.inf\r
+  #DuetPkg/FvbRuntimeService/DUETFwh.inf\r
   DuetPkg/EfiLdr/EfiLdr.inf\r
   MdeModulePkg/Universal/BdsDxe/BdsDxe.inf\r
   DuetPkg/CpuIoDxe/CpuIo.inf\r
   IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf\r
   IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf\r
   IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf\r
+  IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf\r
 \r
   MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf\r
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf\r
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf\r
 \r
   DuetPkg/BootSector/BootSector.inf\r
+  FatPkg/EnhancedFatDxe/Fat.inf\r
 \r
 [BuildOptions.common]\r
-  MSFT:*_*_*_CC_FLAGS = /Fa$* /FAsc /FR$(@R).SBR
\ No newline at end of file
+  MSFT:*_*_*_CC_FLAGS = /Fa$* /FAsc /FR$(@R).SBR\r
+  MSFT:*_*_IA32_CC_FLAGS = /D EFI32\r
+  MSFT:*_*_X64_CC_FLAGS = /D EFI64
\ No newline at end of file
index 52de06a3442395ead04373f9adf9e2a988498991..5402493ad3bf7ac758d01edb3b757e0bc85a876a 100644 (file)
@@ -85,7 +85,7 @@ INF  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
 INF  MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf\r
 \r
 INF  DuetPkg/DataHubGenDxe/DataHubGen.inf\r
-INF  DuetPkg/FvbRuntimeService/DUETFwh.inf\r
+#INF  DuetPkg/FvbRuntimeService/DUETFwh.inf\r
 INF  MdeModulePkg/Universal/BdsDxe/BdsDxe.inf\r
 INF  DuetPkg/CpuIoDxe/CpuIo.inf\r
 INF  DuetPkg/CpuDxe/Cpu.inf\r
@@ -115,18 +115,20 @@ INF  DuetPkg/IsaAcpiDxe/IsaAcpi.inf
 INF  IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf\r
 INF  IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf\r
 INF  IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf\r
+INF  IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf\r
 \r
 INF  MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf\r
 INF  MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf\r
 INF  MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf\r
+INF  FatPkg/EnhancedFatDxe/Fat.inf\r
 \r
-FILE DRIVER = 961578FE-B6B7-44c3-AF35-6BC705CD2B1F {\r
-  SECTION PE32 = FatBinPkg/EnhancedFatDxe/Ia32/Fat.efi\r
-  }\r
+#FILE DRIVER = 961578FE-B6B7-44c3-AF35-6BC705CD2B1F {\r
+#  SECTION PE32 = FatBinPkg/EnhancedFatDxe/Ia32/Fat.efi\r
+#  }\r
 \r
-FILE FREEFORM = 7BB28B99-61BB-11D5-9A5D-0090273FC14D {\r
-  SECTION RAW = MdeModulePkg/Logo/Logo.bmp\r
-  }\r
+#FILE APPLICATION = c57ad6b7-0515-40a8-9d21-551652854e37 {\r
+#  SECTION PE32 = EdkShellBinPkg/FullShell/ia32/Shell_Full.efi\r
+#  }\r
 \r
 [Rule.Common.PEI_CORE]\r
   FILE PEI_CORE = $(NAMED_GUID) {\r
index 0977887818e51756459a5f9071729db48dd509e4..085a4929524d231c0f7254821b12294935133015 100644 (file)
@@ -1164,7 +1164,7 @@ Returns:
     Status = EFI_NOT_FOUND;\r
     return Status;\r
   }\r
-\r
+  \r
   VariableStoreEntry = FlashMapEntryData->Entries[0];\r
 \r
   //\r
index 4e366de0a43a7ea4aa746efbb64af44530a5a09f..c4c239a4fc6242e45f54195a8ca073f36c193d71 100644 (file)
@@ -229,7 +229,9 @@ OnSimpleFileSystemInstall (
   NumBytes = Dev->Size;\r
   Status = File->Write (File, &NumBytes, VAR_DATA_PTR (Dev));\r
   ASSERT_EFI_ERROR (Status);\r
-  FileClose (File);\r
+  // KEN: bugbug here if closing file, volume handle will be free,\r
+  // and system will be hang when accessing volume handle in future.\r
+  //FileClose (File);\r
   DEBUG ((EFI_D_ERROR, "FileStorage: Mapped to file!\n"));\r
 }\r
 \r
@@ -407,7 +409,7 @@ OpenStore (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   //\r
   // Open the root directory of the volume\r
   //\r
index e4dab6339e9a7ccf90f78237357719bba53151e4..6f46bfc0f41473bf9fe14f7a71c39a7d7992d778 100644 (file)
@@ -1380,13 +1380,13 @@ GetFvbHeader (
   TRY_ASSIGN (Offset,      FlashMapEntry->Offset);\r
 \r
   DEBUG ((\r
-    EFI_D_ERROR\r
+    EFI_D_INFO\r
     "FlashMap HOB: BaseAddress = 0x%x, Length = 0x%x, ActuralLength = 0x%x, Offset = 0x%x\n", \r
     (UINTN) FlashMapSubEntry->Base, (UINTN) FlashMapSubEntry->Length, \r
     (UINTN) FlashMapEntry->ActuralSize, (UINTN) FlashMapEntry->Offset\r
   ));\r
   DEBUG ((\r
-    EFI_D_ERROR,\r
+    EFI_D_INFO,\r
     "FlashMap HOB: VolumeId = 0x%lx, MappedFile = %s\n",\r
     (UINTN) FlashMapEntry->VolumeId, (UINTN) FlashMapEntry->FilePath\r
   ));\r
@@ -1548,7 +1548,6 @@ Returns:
   EFI_STATUS                          Status;\r
   EFI_FW_VOL_INSTANCE                 *FwhInstance;\r
   EFI_FIRMWARE_VOLUME_HEADER          *FwVolHeader;\r
-  VOID                                *HobList;\r
   EFI_PEI_HOB_POINTERS                FirmwareVolumeHobList;\r
   UINT32                              BufferSize;\r
   EFI_FV_BLOCK_MAP_ENTRY              *PtrBlockMapEntry;\r
@@ -1569,12 +1568,6 @@ Returns:
   UINTN                               HeaderLength;\r
   BOOLEAN                             InstallSfsNotify;\r
 \r
-  Status = EfiGetSystemConfigurationTable (&gEfiHobListGuid, &HobList);\r
-  //\r
-  // No FV HOBs found\r
-  //\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
   HeaderLength     = 0;\r
   InstallSfsNotify = FALSE;\r
 \r
@@ -1644,7 +1637,7 @@ Returns:
     if (!FwVolHeader) {\r
       continue;\r
     }\r
-\r
+    \r
     CopyMem ((UINTN *) &(FwhInstance->VolumeHeader), (UINTN *) FwVolHeader, FwVolHeader->HeaderLength);\r
     FwVolHeader                       = &(FwhInstance->VolumeHeader);\r
 \r
@@ -1665,11 +1658,12 @@ Returns:
       FwhInstance->MappedFile[0]        = L'\0';\r
     }\r
     \r
-\r
+    DEBUG ((EFI_D_INFO, "FirmVolume Found! BaseAddress=0x%lx, VolumeId=0x%x, MappedFile=%s, Size=0x%x\n",\r
+           (UINTN) BaseAddress, VolumeId, MappedFile, ActuralSize));\r
     //\r
     // We may expose readonly FVB in future.\r
     //\r
-    FwhInstance->WriteEnabled         = TRUE;\r
+    FwhInstance->WriteEnabled         = TRUE; // Ken: Why enable write?\r
     EfiInitializeLock (&(FwhInstance->FvbDevLock), TPL_HIGH_LEVEL);\r
 \r
     LbaAddress  = (UINTN) FwhInstance->FvBase[0];\r
index be40e5bd4055494b83d84111112c7b1bcf810918..94ae326a81a4b870d1d8379b0be70bd112fc05ce 100644 (file)
@@ -40,5 +40,5 @@ Abstract:
 #define NV_FTW_FVB_SIZE             ((NV_FTW_WORKING_SIZE + NV_FTW_SPARE_SIZE + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH + FV_BLOCK_MASK) & ~FV_BLOCK_MASK)\r
 #define NV_FTW_FVB_BLOCK_NUM        (NV_FTW_FVB_SIZE / FV_BLOCK_SIZE)\r
 \r
-#define NV_STORAGE_FILE_PATH        L"\\Efivar.bin"\r
+#define NV_STORAGE_FILE_PATH        L".\\Efivar.bin"\r
 #endif // _EFI_FLASH_LAYOUT\r
index f73f824f2d7ce4c65b9d0675316ee0bdd0de87cd..c927d13eec7a056c7fb702dedbab2c58e9549222 100644 (file)
@@ -755,7 +755,7 @@ Returns:
 {\r
   EFI_STATUS                Status;\r
   EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
-\r
+  \r
   DevicePath = NULL;\r
   Status = gBS->HandleProtocol (\r
                   DeviceHandle,\r
@@ -932,6 +932,7 @@ Returns:
                &gEfiGlobalVariableGuid,\r
                &DevicePathSize\r
                );\r
+  \r
   if (VarConout == NULL || VarConin == NULL) {\r
     //\r
     // Do platform specific PCI Device check and add them to ConOut, ConIn, ErrOut\r