summaryrefslogtreecommitdiffstats
path: root/DuetPkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-05 06:50:12 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-05-05 06:50:12 +0000
commitbe768885bfe481e6f0b89a5b0b6bccf357b2a8e5 (patch)
tree43a1092fc7576cc9a84385fe4e71b44ceb5b168d /DuetPkg
parent10590588cce553a3d8d304974982845682cbce5b (diff)
downloadedk2-be768885bfe481e6f0b89a5b0b6bccf357b2a8e5.tar.gz
edk2-be768885bfe481e6f0b89a5b0b6bccf357b2a8e5.tar.bz2
edk2-be768885bfe481e6f0b89a5b0b6bccf357b2a8e5.zip
Fix many bugs in DUET package and now DUET package is enabled for floppy successful.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5158 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg')
-rw-r--r--DuetPkg/CpuDxe/CpuDxe.h2
-rw-r--r--DuetPkg/DuetPkg.dsc21
-rw-r--r--DuetPkg/DuetPkg.fdf16
-rw-r--r--DuetPkg/FSVariable/FSVariable.c2
-rw-r--r--DuetPkg/FSVariable/FileStorage.c6
-rw-r--r--DuetPkg/FvbRuntimeService/FWBlockService.c18
-rw-r--r--DuetPkg/Include/FlashLayout.h2
-rw-r--r--DuetPkg/Library/DuetBdsLib/BdsPlatform.c3
8 files changed, 39 insertions, 31 deletions
diff --git a/DuetPkg/CpuDxe/CpuDxe.h b/DuetPkg/CpuDxe/CpuDxe.h
index 5bca0ca10c..017f49ec5c 100644
--- a/DuetPkg/CpuDxe/CpuDxe.h
+++ b/DuetPkg/CpuDxe/CpuDxe.h
@@ -32,7 +32,7 @@ Abstract:
#include <Library/UefiBootServicesTableLib.h>
#define CPU_EXCEPTION_DEBUG_OUTPUT 1
-#define CPU_EXCEPTION_VGA_SWITCH 1
+#define CPU_EXCEPTION_VGA_SWITCH 0
#define INTERRUPT_VECTOR_NUMBER 0x100
diff --git a/DuetPkg/DuetPkg.dsc b/DuetPkg/DuetPkg.dsc
index 71766c01eb..6b7916fc2d 100644
--- a/DuetPkg/DuetPkg.dsc
+++ b/DuetPkg/DuetPkg.dsc
@@ -13,13 +13,12 @@
[LibraryClasses.common]
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
+ DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
- ReportStatusCodeLib|IntelFrameworkModulePkg/Library/BaseReportStatusCodeLib/BaseReportStatusCodeLib.inf
+ ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
@@ -49,6 +48,7 @@
OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
+ TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf
[LibraryClasses.common.DXE_DRIVER]
MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
@@ -79,15 +79,20 @@
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
SerialPortLib|DuetPkg/Library/DuetSerialIoLib/DuetSerialIoLib.inf
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
- TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
+ #TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
+ DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
[LibraryClasses.common.UEFI_DRIVER]
MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
SerialPortLib|DuetPkg/Library/DuetSerialIoLib/DuetSerialIoLib.inf
+ DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
+ ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
[LibraryClasses.common.UEFI_APPLICATION]
MemoryAllocationLib|MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
SerialPortLib|DuetPkg/Library/DuetSerialIoLib/DuetSerialIoLib.inf
+ DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
+ ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
[PcdsPatchableInModule]
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042
@@ -125,7 +130,7 @@
DuetPkg/DataHubGenDxe/DataHubGen.inf
- DuetPkg/FvbRuntimeService/DUETFwh.inf
+ #DuetPkg/FvbRuntimeService/DUETFwh.inf
DuetPkg/EfiLdr/EfiLdr.inf
MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
DuetPkg/CpuIoDxe/CpuIo.inf
@@ -156,12 +161,16 @@
IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
+ IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf
MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
DuetPkg/BootSector/BootSector.inf
+ FatPkg/EnhancedFatDxe/Fat.inf
[BuildOptions.common]
- MSFT:*_*_*_CC_FLAGS = /Fa$* /FAsc /FR$(@R).SBR \ No newline at end of file
+ MSFT:*_*_*_CC_FLAGS = /Fa$* /FAsc /FR$(@R).SBR
+ MSFT:*_*_IA32_CC_FLAGS = /D EFI32
+ MSFT:*_*_X64_CC_FLAGS = /D EFI64 \ No newline at end of file
diff --git a/DuetPkg/DuetPkg.fdf b/DuetPkg/DuetPkg.fdf
index 52de06a344..5402493ad3 100644
--- a/DuetPkg/DuetPkg.fdf
+++ b/DuetPkg/DuetPkg.fdf
@@ -85,7 +85,7 @@ INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
INF DuetPkg/DataHubGenDxe/DataHubGen.inf
-INF DuetPkg/FvbRuntimeService/DUETFwh.inf
+#INF DuetPkg/FvbRuntimeService/DUETFwh.inf
INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
INF DuetPkg/CpuIoDxe/CpuIo.inf
INF DuetPkg/CpuDxe/Cpu.inf
@@ -115,18 +115,20 @@ INF DuetPkg/IsaAcpiDxe/IsaAcpi.inf
INF IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
INF IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
INF IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
+INF IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
+INF FatPkg/EnhancedFatDxe/Fat.inf
-FILE DRIVER = 961578FE-B6B7-44c3-AF35-6BC705CD2B1F {
- SECTION PE32 = FatBinPkg/EnhancedFatDxe/Ia32/Fat.efi
- }
+#FILE DRIVER = 961578FE-B6B7-44c3-AF35-6BC705CD2B1F {
+# SECTION PE32 = FatBinPkg/EnhancedFatDxe/Ia32/Fat.efi
+# }
-FILE FREEFORM = 7BB28B99-61BB-11D5-9A5D-0090273FC14D {
- SECTION RAW = MdeModulePkg/Logo/Logo.bmp
- }
+#FILE APPLICATION = c57ad6b7-0515-40a8-9d21-551652854e37 {
+# SECTION PE32 = EdkShellBinPkg/FullShell/ia32/Shell_Full.efi
+# }
[Rule.Common.PEI_CORE]
FILE PEI_CORE = $(NAMED_GUID) {
diff --git a/DuetPkg/FSVariable/FSVariable.c b/DuetPkg/FSVariable/FSVariable.c
index 0977887818..085a492952 100644
--- a/DuetPkg/FSVariable/FSVariable.c
+++ b/DuetPkg/FSVariable/FSVariable.c
@@ -1164,7 +1164,7 @@ Returns:
Status = EFI_NOT_FOUND;
return Status;
}
-
+
VariableStoreEntry = FlashMapEntryData->Entries[0];
//
diff --git a/DuetPkg/FSVariable/FileStorage.c b/DuetPkg/FSVariable/FileStorage.c
index 4e366de0a4..c4c239a4fc 100644
--- a/DuetPkg/FSVariable/FileStorage.c
+++ b/DuetPkg/FSVariable/FileStorage.c
@@ -229,7 +229,9 @@ OnSimpleFileSystemInstall (
NumBytes = Dev->Size;
Status = File->Write (File, &NumBytes, VAR_DATA_PTR (Dev));
ASSERT_EFI_ERROR (Status);
- FileClose (File);
+ // KEN: bugbug here if closing file, volume handle will be free,
+ // and system will be hang when accessing volume handle in future.
+ //FileClose (File);
DEBUG ((EFI_D_ERROR, "FileStorage: Mapped to file!\n"));
}
@@ -407,7 +409,7 @@ OpenStore (
if (EFI_ERROR (Status)) {
return Status;
}
-
+
//
// Open the root directory of the volume
//
diff --git a/DuetPkg/FvbRuntimeService/FWBlockService.c b/DuetPkg/FvbRuntimeService/FWBlockService.c
index e4dab6339e..6f46bfc0f4 100644
--- a/DuetPkg/FvbRuntimeService/FWBlockService.c
+++ b/DuetPkg/FvbRuntimeService/FWBlockService.c
@@ -1380,13 +1380,13 @@ GetFvbHeader (
TRY_ASSIGN (Offset, FlashMapEntry->Offset);
DEBUG ((
- EFI_D_ERROR,
+ EFI_D_INFO,
"FlashMap HOB: BaseAddress = 0x%x, Length = 0x%x, ActuralLength = 0x%x, Offset = 0x%x\n",
(UINTN) FlashMapSubEntry->Base, (UINTN) FlashMapSubEntry->Length,
(UINTN) FlashMapEntry->ActuralSize, (UINTN) FlashMapEntry->Offset
));
DEBUG ((
- EFI_D_ERROR,
+ EFI_D_INFO,
"FlashMap HOB: VolumeId = 0x%lx, MappedFile = %s\n",
(UINTN) FlashMapEntry->VolumeId, (UINTN) FlashMapEntry->FilePath
));
@@ -1548,7 +1548,6 @@ Returns:
EFI_STATUS Status;
EFI_FW_VOL_INSTANCE *FwhInstance;
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
- VOID *HobList;
EFI_PEI_HOB_POINTERS FirmwareVolumeHobList;
UINT32 BufferSize;
EFI_FV_BLOCK_MAP_ENTRY *PtrBlockMapEntry;
@@ -1569,12 +1568,6 @@ Returns:
UINTN HeaderLength;
BOOLEAN InstallSfsNotify;
- Status = EfiGetSystemConfigurationTable (&gEfiHobListGuid, &HobList);
- //
- // No FV HOBs found
- //
- ASSERT_EFI_ERROR (Status);
-
HeaderLength = 0;
InstallSfsNotify = FALSE;
@@ -1644,7 +1637,7 @@ Returns:
if (!FwVolHeader) {
continue;
}
-
+
CopyMem ((UINTN *) &(FwhInstance->VolumeHeader), (UINTN *) FwVolHeader, FwVolHeader->HeaderLength);
FwVolHeader = &(FwhInstance->VolumeHeader);
@@ -1665,11 +1658,12 @@ Returns:
FwhInstance->MappedFile[0] = L'\0';
}
-
+ DEBUG ((EFI_D_INFO, "FirmVolume Found! BaseAddress=0x%lx, VolumeId=0x%x, MappedFile=%s, Size=0x%x\n",
+ (UINTN) BaseAddress, VolumeId, MappedFile, ActuralSize));
//
// We may expose readonly FVB in future.
//
- FwhInstance->WriteEnabled = TRUE;
+ FwhInstance->WriteEnabled = TRUE; // Ken: Why enable write?
EfiInitializeLock (&(FwhInstance->FvbDevLock), TPL_HIGH_LEVEL);
LbaAddress = (UINTN) FwhInstance->FvBase[0];
diff --git a/DuetPkg/Include/FlashLayout.h b/DuetPkg/Include/FlashLayout.h
index be40e5bd40..94ae326a81 100644
--- a/DuetPkg/Include/FlashLayout.h
+++ b/DuetPkg/Include/FlashLayout.h
@@ -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)
#define NV_FTW_FVB_BLOCK_NUM (NV_FTW_FVB_SIZE / FV_BLOCK_SIZE)
-#define NV_STORAGE_FILE_PATH L"\\Efivar.bin"
+#define NV_STORAGE_FILE_PATH L".\\Efivar.bin"
#endif // _EFI_FLASH_LAYOUT
diff --git a/DuetPkg/Library/DuetBdsLib/BdsPlatform.c b/DuetPkg/Library/DuetBdsLib/BdsPlatform.c
index f73f824f2d..c927d13eec 100644
--- a/DuetPkg/Library/DuetBdsLib/BdsPlatform.c
+++ b/DuetPkg/Library/DuetBdsLib/BdsPlatform.c
@@ -755,7 +755,7 @@ Returns:
{
EFI_STATUS Status;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
-
+
DevicePath = NULL;
Status = gBS->HandleProtocol (
DeviceHandle,
@@ -932,6 +932,7 @@ Returns:
&gEfiGlobalVariableGuid,
&DevicePathSize
);
+
if (VarConout == NULL || VarConin == NULL) {
//
// Do platform specific PCI Device check and add them to ConOut, ConIn, ErrOut