From 7af45bf1f0b989e932cd36d6ab729d9878bbc982 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Fri, 16 Mar 2007 05:36:52 +0000 Subject: [PATCH 1/1] 1. Added PcdNtEmulator and Removed MACRO EFI_NT_EMULATOR 2. Updated *.fpd of all Package. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2481 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/EdkModulePkg.fpd | 56 +++++++++ EdkModulePkg/EdkModulePkg.spd | 13 +- .../DebugSupport/Dxe/DebugSupport.msa | 30 +++-- .../DebugSupport/Dxe/Ia32/plDebugSupport.c | 63 +++++----- .../DebugSupport/Dxe/x64/plDebugSupport.c | 20 +-- .../Debugger/Debugport/Dxe/DebugPort.msa | 21 ++-- .../Library/EdkGenericBdsLib/DevicePath.c | 35 +++--- EdkNt32Pkg/Nt32.fpd | 16 +++ EdkUnixPkg/Unix.fpd | 16 +++ MdePkg/MdePkg.fpd | 114 ------------------ 10 files changed, 186 insertions(+), 198 deletions(-) diff --git a/EdkModulePkg/EdkModulePkg.fpd b/EdkModulePkg/EdkModulePkg.fpd index e4ce17c6f9..fe8fcd8d1c 100644 --- a/EdkModulePkg/EdkModulePkg.fpd +++ b/EdkModulePkg/EdkModulePkg.fpd @@ -2075,6 +2075,14 @@ 4 320 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL @@ -8022,6 +8030,14 @@ 4 320 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL @@ -12571,6 +12587,14 @@ 4 320 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL @@ -16942,6 +16966,14 @@ 4 320 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL @@ -20987,6 +21019,14 @@ 1 0x06 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL @@ -21076,6 +21116,14 @@ 1 0x06 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL @@ -21165,6 +21213,14 @@ 4 10000000 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL diff --git a/EdkModulePkg/EdkModulePkg.spd b/EdkModulePkg/EdkModulePkg.spd index 0cbca6d063..2e362adc8f 100644 --- a/EdkModulePkg/EdkModulePkg.spd +++ b/EdkModulePkg/EdkModulePkg.spd @@ -1,4 +1,4 @@ - + EdkModulePkg @@ -1288,5 +1288,14 @@ TRUE If TRUE, the PCI bus driver will support hot plug device. If not hot plug device is supported, this feature flag can be set to FALSE to save size. + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + FEATURE_FLAG + FALSE + If this PCD is set as TRUE, NT emulator will be endabled. + - + \ No newline at end of file diff --git a/EdkModulePkg/Universal/DebugSupport/Dxe/DebugSupport.msa b/EdkModulePkg/Universal/DebugSupport/Dxe/DebugSupport.msa index 5c14254a0c..6d1be7594a 100644 --- a/EdkModulePkg/Universal/DebugSupport/Dxe/DebugSupport.msa +++ b/EdkModulePkg/Universal/DebugSupport/Dxe/DebugSupport.msa @@ -8,11 +8,11 @@ Component description file for DebugSupport module. This driver installs DebugSupport protocol for the selected processor. Copyright (c) 2006 - 2007, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052 @@ -43,6 +43,9 @@ BaseLib + + PcdLib + DebugSupport.c @@ -63,14 +66,14 @@ + gEfiDebugSupportProtocolGuid - If the debug support protocol for this processor type is not - already installed, this protocol will be installed. Otherwise, it will - be not installed again. - + If the debug support protocol for this processor type is not + already installed, this protocol will be installed. Otherwise, it will + be not installed again. gEfiLoadedImageProtocolGuid @@ -83,4 +86,11 @@ InitializeDebugSupportDriver - + + + PcdNtEmulatorEnable + gEfiEdkModulePkgTokenSpaceGuid + If this PCD is set as TRUE, NT emulator will be endabled. + + + \ No newline at end of file diff --git a/EdkModulePkg/Universal/DebugSupport/Dxe/Ia32/plDebugSupport.c b/EdkModulePkg/Universal/DebugSupport/Dxe/Ia32/plDebugSupport.c index 270a158b79..88b8c5a14a 100644 --- a/EdkModulePkg/Universal/DebugSupport/Dxe/Ia32/plDebugSupport.c +++ b/EdkModulePkg/Universal/DebugSupport/Dxe/Ia32/plDebugSupport.c @@ -1,14 +1,14 @@ /**@file IA32 specific debug support functions - -Copyright (c) 2006 Intel Corporation -All rights reserved. This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2006 - 2007, Intel Corporation +All rights reserved. This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -23,7 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. IDT_ENTRY *IdtEntryTable = NULL; DESCRIPTOR NullDesc = 0; -#ifndef EFI_NT_EMULATOR STATIC EFI_STATUS CreateEntryStub ( @@ -77,7 +76,7 @@ Returns: // fixup the jump target to point to the common entry // *(UINT32 *) &StubCopy[0x0e] = (UINT32) CommonIdtEntry - (UINT32) &StubCopy[StubSize]; - + return EFI_SUCCESS; } @@ -158,7 +157,6 @@ Returns: return EFI_SUCCESS; } -#endif EFI_STATUS ManageIdtEntryTable ( @@ -193,33 +191,34 @@ Returns: Status = EFI_SUCCESS; -#ifndef EFI_NT_EMULATOR - if (CompareDescriptor (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc)) { - // - // we've already installed to this vector - // - if (NewCallback != NULL) { + if (FeaturePcdGet (PcdNtEmulatorEnable)) { + if (CompareDescriptor (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc)) { // - // if the input handler is non-null, error + // we've already installed to this vector // - Status = EFI_ALREADY_STARTED; + if (NewCallback != NULL) { + // + // if the input handler is non-null, error + // + Status = EFI_ALREADY_STARTED; + } else { + Status = UnhookEntry (ExceptionType); + } } else { - Status = UnhookEntry (ExceptionType); - } - } else { - // - // no user handler installed on this vector - // - if (NewCallback == NULL) { // - // if the input handler is null, error + // no user handler installed on this vector // - Status = EFI_INVALID_PARAMETER; - } else { - Status = HookEntry (ExceptionType, NewCallback); + if (NewCallback == NULL) { + // + // if the input handler is null, error + // + Status = EFI_INVALID_PARAMETER; + } else { + Status = HookEntry (ExceptionType, NewCallback); + } } } -#endif + return Status; } diff --git a/EdkModulePkg/Universal/DebugSupport/Dxe/x64/plDebugSupport.c b/EdkModulePkg/Universal/DebugSupport/Dxe/x64/plDebugSupport.c index 6fb4cdb542..3f12a76d6c 100644 --- a/EdkModulePkg/Universal/DebugSupport/Dxe/x64/plDebugSupport.c +++ b/EdkModulePkg/Universal/DebugSupport/Dxe/x64/plDebugSupport.c @@ -1,14 +1,14 @@ /**@file X64 specific debug support functions -Copyright (c) 2006 Intel Corporation -All rights reserved. This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2007, Intel Corporation +All rights reserved. This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -74,7 +74,7 @@ Returns: // fixup the jump target to point to the common entry // *(UINT32 *) &StubCopy[0x3] = (UINT32)((UINTN) CommonIdtEntry - (UINTN) &StubCopy[StubSize]); - + return EFI_SUCCESS; } @@ -147,7 +147,7 @@ Returns: --*/ { BOOLEAN OldIntFlagState; - + OldIntFlagState = WriteInterruptFlag (0); WriteIdt (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc)); FreePool ((VOID *) (UINTN) IdtEntryTable[ExceptionType].StubEntry); diff --git a/EdkModulePkg/Universal/Debugger/Debugport/Dxe/DebugPort.msa b/EdkModulePkg/Universal/Debugger/Debugport/Dxe/DebugPort.msa index 3e4ef3ceeb..1aaeb648e5 100644 --- a/EdkModulePkg/Universal/Debugger/Debugport/Dxe/DebugPort.msa +++ b/EdkModulePkg/Universal/Debugger/Debugport/Dxe/DebugPort.msa @@ -6,14 +6,14 @@ 73E9457A-CEA1-4917-9A9C-9F1F0F0FD322 1.0 Component description file for DebugPort module. - This driver binds exclusively to serial io on the controller handle, + This driver binds exclusively to serial io on the controller handle, and initializes serial Io interface, publishs DebugPort and device path Protocol. Copyright (c) 2006 - 2007, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + All rights reserved. This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052 @@ -60,12 +60,13 @@ + gEfiDebugPortProtocolGuid - gEfiDebugPortVariableGuid, gEfiDebugPortDevicePathGuid are - both the alias of gEfiDebugPortProtocolGuid. They are not separate guid variables, + gEfiDebugPortVariableGuid, gEfiDebugPortDevicePathGuid are + both the alias of gEfiDebugPortProtocolGuid. They are not separate guid variables, which are not required to be described in the followin Guids section. @@ -85,8 +86,8 @@ 0x0044 0x0045 0x0042 0x0055 0x0047 0x0050 0x004F 0x0052 0x0054 gEfiDebugPortProtocolGuid - L"DEBUGPORT" variable is specified. gEfiDebugPortVariableGuid is - one virtual guid, which can't be described in this section. + L"DEBUGPORT" variable is specified. gEfiDebugPortVariableGuid is + one virtual guid, which can't be described in this section. So gEfiDebugPortProtocolGuid name is instead of it. diff --git a/EdkNt32Pkg/Library/EdkGenericBdsLib/DevicePath.c b/EdkNt32Pkg/Library/EdkGenericBdsLib/DevicePath.c index 094140f14d..56b21a3ac3 100644 --- a/EdkNt32Pkg/Library/EdkGenericBdsLib/DevicePath.c +++ b/EdkNt32Pkg/Library/EdkGenericBdsLib/DevicePath.c @@ -1,13 +1,13 @@ /*++ -Copyright (c) 2006, Intel Corporation -All rights reserved. This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2007, Intel Corporation +All rights reserved. This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: @@ -20,11 +20,6 @@ Abstract: --*/ - -#ifdef TIANO_EXTENSION_FLAG -EFI_GUID UnknownDeviceGuid = UNKNOWN_DEVICE_GUID; -#endif - EFI_GUID mEfiWinNtThunkProtocolGuid = EFI_WIN_NT_THUNK_PROTOCOL_GUID; EFI_GUID mEfiWinNtUgaGuid = EFI_WIN_NT_UGA_GUID; EFI_GUID mEfiWinNtGopGuid = EFI_WIN_NT_GOP_GUID; @@ -92,19 +87,19 @@ CatPrint ( Routine Description: - Concatenates a formatted unicode string to allocated pool. + Concatenates a formatted unicode string to allocated pool. The caller must free the resulting buffer. Arguments: - Str - Tracks the allocated pool, size in use, and + Str - Tracks the allocated pool, size in use, and amount of pool allocated. fmt - The format string Returns: - Allocated buffer with the formatted string printed in it. + Allocated buffer with the formatted string printed in it. The caller must free the allocated buffer. The buffer allocation is not packed. @@ -163,7 +158,7 @@ Arguments: Returns: - If the memory for the device path is successfully allocated, then a + If the memory for the device path is successfully allocated, then a pointer to the new device path is returned. Otherwise, NULL is returned. --*/ @@ -434,7 +429,7 @@ DevPathExtendedAcpi ( if (Index > Anchor) { CIDSTRIdx = Anchor; } - + if (HIDSTRIdx == 0 && CIDSTRIdx == 0 && ExtendedAcpi->UID == 0) { CatPrint (Str, L"AcpiExp("); if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { @@ -1089,7 +1084,7 @@ LibDuplicateDevicePathInstance ( Routine Description: - Function creates a device path data structure that identically matches the + Function creates a device path data structure that identically matches the device path passed in. Arguments: @@ -1098,7 +1093,7 @@ Arguments: Returns: - The new copy of DevPath is created to identically match the input. + The new copy of DevPath is created to identically match the input. Otherwise, NULL is returned. --*/ diff --git a/EdkNt32Pkg/Nt32.fpd b/EdkNt32Pkg/Nt32.fpd index 269a92d557..1fac2da6e6 100644 --- a/EdkNt32Pkg/Nt32.fpd +++ b/EdkNt32Pkg/Nt32.fpd @@ -3224,6 +3224,14 @@ 4 320 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL @@ -3305,6 +3313,14 @@ 4 0x80000000 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL diff --git a/EdkUnixPkg/Unix.fpd b/EdkUnixPkg/Unix.fpd index 1d88be05f5..c5ffd9c603 100644 --- a/EdkUnixPkg/Unix.fpd +++ b/EdkUnixPkg/Unix.fpd @@ -3216,6 +3216,14 @@ 4 320 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL @@ -3297,6 +3305,14 @@ 4 0x80000000 + + PcdNtEmulatorEnable + 0x0001003e + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + NULL diff --git a/MdePkg/MdePkg.fpd b/MdePkg/MdePkg.fpd index 4a40a95526..a77ad4639e 100644 --- a/MdePkg/MdePkg.fpd +++ b/MdePkg/MdePkg.fpd @@ -140,32 +140,6 @@ - - - PcdDebugPropertyMask - 0x00000005 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0x0f - - - PcdDebugPrintErrorLevel - 0x00000006 - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 0x80000000 - - - PcdDebugClearMemoryValue - 0x00000008 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0xAF - - NULL LIBRARY @@ -670,16 +644,6 @@ - - - PcdFSBClock - 0x0000000c - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 200000000 - - NULL LIBRARY @@ -704,32 +668,6 @@ - - - PcdDebugPropertyMask - 0x00000005 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0x0f - - - PcdDebugPrintErrorLevel - 0x00000006 - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 0x80000000 - - - PcdDebugClearMemoryValue - 0x00000008 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0xAF - - NULL LIBRARY @@ -1280,32 +1218,6 @@ - - - PcdDebugPropertyMask - 0x00000005 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0x0f - - - PcdDebugPrintErrorLevel - 0x00000006 - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 0x80000000 - - - PcdDebugClearMemoryValue - 0x00000008 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0xAF - - NULL LIBRARY @@ -1828,32 +1740,6 @@ - - - PcdDebugPropertyMask - 0x00000005 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0x0f - - - PcdDebugPrintErrorLevel - 0x00000006 - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 0x80000000 - - - PcdDebugClearMemoryValue - 0x00000008 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0xAF - - NULL LIBRARY -- 2.39.2