mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 17:14:07 +02:00
Enable dynamic PCD for windowBusDriver
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3167 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
baad9ba2df
commit
cba9012a92
@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
#include <PiDxe.h>
|
#include <PiDxe.h>
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
#include <Library/PcdLib.h>
|
||||||
|
#include <Library/BaseMemoryLib.h>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,12 +75,11 @@
|
|||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
HobLib
|
HobLib
|
||||||
PcdLib
|
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
UefiLib
|
UefiLib
|
||||||
DebugLib
|
DebugLib
|
||||||
BaseLib
|
BaseLib
|
||||||
|
PcdLib
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
|
@ -106,22 +106,19 @@
|
|||||||
UefiBootServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
|
UefiBootServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
|
||||||
HobLib|$(WORKSPACE)/MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
HobLib|$(WORKSPACE)/MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
||||||
DevicePathLib|$(WORKSPACE)/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
DevicePathLib|$(WORKSPACE)/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
||||||
# After tools enable the dynamic PCD, please uncomment follows library instances mapping.
|
PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||||
#PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
|
||||||
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
||||||
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
|
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
|
||||||
ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
|
ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
|
||||||
UefiRuntimeServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
UefiRuntimeServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
||||||
WinNtLib|$(WORKSPACE)/Nt32Pkg/Library/DxeWinNtLib/DxeWinNtLib.inf
|
WinNtLib|$(WORKSPACE)/Nt32Pkg/Library/DxeWinNtLib/DxeWinNtLib.inf
|
||||||
OemHookStatusCodeLib|$(WORKSPACE)/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/DxeNt32OemHookStatusCodeLib.inf
|
OemHookStatusCodeLib|$(WORKSPACE)/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/DxeNt32OemHookStatusCodeLib.inf
|
||||||
# After tools enable the dynamic PCD, please uncomment follows library instances mapping.
|
PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||||
#PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
|
||||||
DebugLib|$(WORKSPACE)/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
|
DebugLib|$(WORKSPACE)/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
|
||||||
|
|
||||||
[LibraryClasses.common.PEIM]
|
[LibraryClasses.common.PEIM]
|
||||||
HobLib|$(WORKSPACE)/MdePkg/Library/PeiHobLib/PeiHobLib.inf
|
HobLib|$(WORKSPACE)/MdePkg/Library/PeiHobLib/PeiHobLib.inf
|
||||||
# After tools enable the dynamic PCD, please uncomment follows library instances mapping.
|
PcdLib|$(WORKSPACE)/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
|
||||||
#PcdLib|$(WORKSPACE)/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
|
|
||||||
IoLib|$(WORKSPACE)/MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf
|
IoLib|$(WORKSPACE)/MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf
|
||||||
PeimEntryPoint|$(WORKSPACE)/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
|
PeimEntryPoint|$(WORKSPACE)/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
|
||||||
PeiServicesLib|$(WORKSPACE)/MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
|
PeiServicesLib|$(WORKSPACE)/MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
|
||||||
@ -143,15 +140,13 @@
|
|||||||
OldPeiCoreEntryPoint|$(WORKSPACE)/MdePkg/Library/OldPeiCoreEntryPoint/OldPeiCoreEntryPoint.inf
|
OldPeiCoreEntryPoint|$(WORKSPACE)/MdePkg/Library/OldPeiCoreEntryPoint/OldPeiCoreEntryPoint.inf
|
||||||
ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
|
ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
|
||||||
PeCoffGetEntryPointLib|$(WORKSPACE)/Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/Nt32PeiPeCoffGetEntryPointLib.inf
|
PeCoffGetEntryPointLib|$(WORKSPACE)/Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/Nt32PeiPeCoffGetEntryPointLib.inf
|
||||||
# After tools enable the dynamic PCD, please uncomment follows library instances mapping.
|
PcdLib|$(WORKSPACE)/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
|
||||||
#PcdLib|$(WORKSPACE)/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
|
|
||||||
DebugLib|$(WORKSPACE)/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
|
DebugLib|$(WORKSPACE)/IntelFrameworkPkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
|
||||||
|
|
||||||
[LibraryClasses.common.DXE_RUNTIME_DRIVER]
|
[LibraryClasses.common.DXE_RUNTIME_DRIVER]
|
||||||
UefiRuntimeServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
UefiRuntimeServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
||||||
HobLib|$(WORKSPACE)/MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
HobLib|$(WORKSPACE)/MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
||||||
# After tools enable the dynamic PCD, please uncomment follows library instances mapping.
|
PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||||
#PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
|
||||||
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
||||||
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
|
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
|
||||||
UefiDriverEntryPoint|$(WORKSPACE)/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
|
UefiDriverEntryPoint|$(WORKSPACE)/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
|
||||||
@ -171,8 +166,7 @@
|
|||||||
[LibraryClasses.common.UEFI_DRIVER]
|
[LibraryClasses.common.UEFI_DRIVER]
|
||||||
UefiRuntimeServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
UefiRuntimeServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
||||||
HobLib|$(WORKSPACE)/MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
HobLib|$(WORKSPACE)/MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
||||||
# After tools enable the dynamic PCD, please uncomment follows library instances mapping.
|
PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||||
#PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
|
||||||
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
||||||
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
|
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
|
||||||
UefiDriverEntryPoint|$(WORKSPACE)/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
|
UefiDriverEntryPoint|$(WORKSPACE)/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
|
||||||
@ -191,8 +185,7 @@
|
|||||||
[LibraryClasses.common.DXE_DRIVER]
|
[LibraryClasses.common.DXE_DRIVER]
|
||||||
UefiRuntimeServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
UefiRuntimeServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
||||||
HobLib|$(WORKSPACE)/MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
HobLib|$(WORKSPACE)/MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
||||||
# After tools enable the dynamic PCD, please uncomment follows library instances mapping.
|
PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||||
#PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
|
||||||
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
||||||
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
|
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
|
||||||
UefiDriverEntryPoint|$(WORKSPACE)/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
|
UefiDriverEntryPoint|$(WORKSPACE)/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
|
||||||
@ -219,8 +212,7 @@
|
|||||||
HobLib|$(WORKSPACE)/MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
HobLib|$(WORKSPACE)/MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
||||||
DevicePathLib|$(WORKSPACE)/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
DevicePathLib|$(WORKSPACE)/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
||||||
EdkIfrSupportLib|$(WORKSPACE)/MdeModulePkg/Library/EdkIfrSupportLib/EdkIfrSupportLib.inf
|
EdkIfrSupportLib|$(WORKSPACE)/MdeModulePkg/Library/EdkIfrSupportLib/EdkIfrSupportLib.inf
|
||||||
# After tools enable the dynamic PCD, please uncomment follows library instances mapping.
|
PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||||
#PcdLib|$(WORKSPACE)/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
|
||||||
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
||||||
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
|
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
|
||||||
ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
|
ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
|
||||||
@ -376,7 +368,10 @@
|
|||||||
# DXE Phase modules
|
# DXE Phase modules
|
||||||
##
|
##
|
||||||
$(WORKSPACE)/MdeModulePkg/Core/Dxe/DxeMain.inf
|
$(WORKSPACE)/MdeModulePkg/Core/Dxe/DxeMain.inf
|
||||||
$(WORKSPACE)/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
$(WORKSPACE)/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
|
||||||
|
<LibraryClass>
|
||||||
|
PcdLib|$(WORKSPACE)/MdeModulePkg/Library/PcdDriverPcdLibNull/PcdLib.inf
|
||||||
|
}
|
||||||
$(WORKSPACE)/Nt32Pkg/MetronomeDxe/Metronome.inf
|
$(WORKSPACE)/Nt32Pkg/MetronomeDxe/Metronome.inf
|
||||||
$(WORKSPACE)/Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClock.inf
|
$(WORKSPACE)/Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClock.inf
|
||||||
$(WORKSPACE)/Nt32Pkg/ResetRuntimeDxe/Reset.inf
|
$(WORKSPACE)/Nt32Pkg/ResetRuntimeDxe/Reset.inf
|
||||||
|
@ -138,44 +138,22 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtBusDriverBinding = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NT_PCD_ARRAY_SIZE (sizeof(mPcdEnvironment)/sizeof(NT_ENVIRONMENT_VARIABLE_ENTRY))
|
#define NT_PCD_ARRAY_SIZE (sizeof(mPcdEnvironment)/sizeof(NT_PCD_ENTRY))
|
||||||
|
|
||||||
//
|
|
||||||
// BUGBUG: Because currently the new build tools does not support dynamic PCD
|
|
||||||
// following dynamic PCd will be hard code. After tools ready, we should
|
|
||||||
// use dynmanic PCD AQAP.
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Table to map NT Environment variable to the GUID that should be in
|
// Table to map NT Environment variable to the GUID that should be in
|
||||||
// device path.
|
// device path.
|
||||||
//
|
//
|
||||||
//static NT_PCD_ENTRY mPcdEnvironment[] = {
|
static NT_PCD_ENTRY mPcdEnvironment[] = {
|
||||||
// PcdToken(PcdWinNtConsole), &gEfiWinNtConsoleGuid,
|
PcdToken(PcdWinNtConsole), &gEfiWinNtConsoleGuid,
|
||||||
// PcdToken(PcdWinNtGop), &gEfiWinNtGopGuid,
|
PcdToken(PcdWinNtGop), &gEfiWinNtGopGuid,
|
||||||
// PcdToken(PcdWinNtSerialPort), &gEfiWinNtSerialPortGuid,
|
PcdToken(PcdWinNtSerialPort), &gEfiWinNtSerialPortGuid,
|
||||||
// PcdToken(PcdWinNtFileSystem), &gEfiWinNtFileSystemGuid,
|
PcdToken(PcdWinNtFileSystem), &gEfiWinNtFileSystemGuid,
|
||||||
// PcdToken(PcdWinNtVirtualDisk), &gEfiWinNtVirtualDisksGuid,
|
PcdToken(PcdWinNtVirtualDisk), &gEfiWinNtVirtualDisksGuid,
|
||||||
// PcdToken(PcdWinNtPhysicalDisk), &gEfiWinNtPhysicalDisksGuid,
|
PcdToken(PcdWinNtPhysicalDisk), &gEfiWinNtPhysicalDisksGuid,
|
||||||
// PcdToken(PcdWinNtCpuModel), &gEfiWinNtCPUModelGuid,
|
PcdToken(PcdWinNtCpuModel), &gEfiWinNtCPUModelGuid,
|
||||||
// PcdToken(PcdWinNtCpuSpeed), &gEfiWinNtCPUSpeedGuid,
|
PcdToken(PcdWinNtCpuSpeed), &gEfiWinNtCPUSpeedGuid,
|
||||||
// PcdToken(PcdWinNtMemorySize), &gEfiWinNtMemoryGuid
|
PcdToken(PcdWinNtMemorySize), &gEfiWinNtMemoryGuid
|
||||||
//};
|
|
||||||
typedef struct {
|
|
||||||
CHAR16 *Variable;
|
|
||||||
EFI_GUID *DevicePathGuid;
|
|
||||||
} NT_ENVIRONMENT_VARIABLE_ENTRY;
|
|
||||||
|
|
||||||
static NT_ENVIRONMENT_VARIABLE_ENTRY mPcdEnvironment[] = {
|
|
||||||
L"Bus Driver Console Window", &gEfiWinNtConsoleGuid,
|
|
||||||
L"UGA Window 1!UGA Window 2", &gEfiWinNtGopGuid,
|
|
||||||
L"COM1!COM2", &gEfiWinNtSerialPortGuid,
|
|
||||||
L".!..\\..\\..\\..\\EdkShellBinPkg\\bin\\ia32\\Apps", &gEfiWinNtFileSystemGuid,
|
|
||||||
L"FW;40960;512", &gEfiWinNtVirtualDisksGuid,
|
|
||||||
L"E:RW;245760;512", &gEfiWinNtPhysicalDisksGuid,
|
|
||||||
L"Intel(R) Processor Model", &gEfiWinNtCPUModelGuid,
|
|
||||||
L"3000", &gEfiWinNtCPUSpeedGuid,
|
|
||||||
L"64!64", &gEfiWinNtMemoryGuid
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -452,8 +430,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
InstallStatus = EFI_NOT_FOUND;
|
InstallStatus = EFI_NOT_FOUND;
|
||||||
for (Index = 0; Index < NT_PCD_ARRAY_SIZE; Index++) {
|
for (Index = 0; Index < NT_PCD_ARRAY_SIZE; Index++) {
|
||||||
//PcdTempStr = (VOID *)LibPcdGetPtr (mPcdEnvironment[Index].Token);
|
PcdTempStr = (VOID *)LibPcdGetPtr (mPcdEnvironment[Index].Token);
|
||||||
PcdTempStr = mPcdEnvironment[Index].Variable;
|
|
||||||
ASSERT (PcdTempStr != NULL);
|
ASSERT (PcdTempStr != NULL);
|
||||||
|
|
||||||
TempStrSize = StrLen (PcdTempStr);
|
TempStrSize = StrLen (PcdTempStr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user