Fix the bug that using hardcode driver name to judge whether current driver is PCD driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1281 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d208e1e260
commit
5f907e4a5b
|
@ -88,6 +88,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
|
||||||
</GuidCNames>
|
</GuidCNames>
|
||||||
</Guids>
|
</Guids>
|
||||||
<Externs>
|
<Externs>
|
||||||
|
<PcdIsDriver>DXE_PCD_DRIVER</PcdIsDriver>
|
||||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
||||||
<Extern>
|
<Extern>
|
||||||
|
|
|
@ -85,6 +85,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->
|
||||||
</GuidCNames>
|
</GuidCNames>
|
||||||
</Guids>
|
</Guids>
|
||||||
<Externs>
|
<Externs>
|
||||||
|
<PcdIsDriver>PEI_PCD_DRIVER</PcdIsDriver>
|
||||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
||||||
<Extern>
|
<Extern>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -36,12 +36,12 @@ public class CommonDefinition {
|
||||||
public final static String autoGenCLine1 = "\r\n";
|
public final static String autoGenCLine1 = "\r\n";
|
||||||
|
|
||||||
public final static String autoGenCLine2 = "const UINT8 _gDebugPropertyMask "
|
public final static String autoGenCLine2 = "const UINT8 _gDebugPropertyMask "
|
||||||
+ "= DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED"
|
+ "= DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED"
|
||||||
+ " | DEBUG_PROPERTY_DEBUG_PRINT_ENABLED"
|
+ " | DEBUG_PROPERTY_DEBUG_PRINT_ENABLED"
|
||||||
+ " | DEBUG_PROPERTY_DEBUG_CODE_ENABLED;\r\n";
|
+ " | DEBUG_PROPERTY_DEBUG_CODE_ENABLED;\r\n";
|
||||||
|
|
||||||
public final static String autoGenCLine3 = "const UINTN _gModuleDefaultErrorLevel"
|
public final static String autoGenCLine3 = "const UINTN _gModuleDefaultErrorLevel"
|
||||||
+ " = EFI_D_ERROR | EFI_D_LOAD;\r\n";
|
+ " = EFI_D_ERROR | EFI_D_LOAD;\r\n";
|
||||||
|
|
||||||
public final static String autoGenHLine1 = "#define EFI_SPECIFICATION_VERSION 0x00020000\r\n";
|
public final static String autoGenHLine1 = "#define EFI_SPECIFICATION_VERSION 0x00020000\r\n";
|
||||||
public final static String autoGenHVersionDefault = "#define EFI_SPECIFICATION_VERSION 0x00000000\r\n";
|
public final static String autoGenHVersionDefault = "#define EFI_SPECIFICATION_VERSION 0x00000000\r\n";
|
||||||
|
@ -56,31 +56,40 @@ public class CommonDefinition {
|
||||||
public final static String ppiGuid = "PpiGuid";
|
public final static String ppiGuid = "PpiGuid";
|
||||||
public final static String guidGuid = "Guid";
|
public final static String guidGuid = "Guid";
|
||||||
|
|
||||||
public final static String tianoR8FlashMapH = "TianoR8FlashMap.h";
|
public final static String tianoR8FlashMapH = "TianoR8FlashMap.h";
|
||||||
public final static String flashMapH = "FlashMap.h";
|
public final static String flashMapH = "FlashMap.h";
|
||||||
|
|
||||||
|
//
|
||||||
|
// The defintions for identifying current module
|
||||||
|
// is PEI Pcd driver or Dxe Pcd driver.
|
||||||
|
//
|
||||||
|
public static enum PCD_DRIVER_TYPE { NOT_PCD_DRIVER,
|
||||||
|
PEI_PCD_DRIVER,
|
||||||
|
DXE_PCD_DRIVER,
|
||||||
|
UNKNOWN_PCD_DRIVER};
|
||||||
|
|
||||||
//
|
//
|
||||||
// AutoGen.h and AutoGen.c file's header
|
// AutoGen.h and AutoGen.c file's header
|
||||||
//
|
//
|
||||||
public final static String autogenHNotation =
|
public final static String autogenHNotation =
|
||||||
"/**\r\n" +
|
"/**\r\n" +
|
||||||
" DO NOT EDIT\r\n" +
|
" DO NOT EDIT\r\n" +
|
||||||
" FILE auto-generated by GenBuild tasks\r\n" +
|
" FILE auto-generated by GenBuild tasks\r\n" +
|
||||||
" Module name:\r\n" +
|
" Module name:\r\n" +
|
||||||
" AutoGen.h\r\n" +
|
" AutoGen.h\r\n" +
|
||||||
" Abstract:" +
|
" Abstract:" +
|
||||||
" Auto-generated AutoGen.h for building module or library.\r\n" +
|
" Auto-generated AutoGen.h for building module or library.\r\n" +
|
||||||
"**/\r\n\r\n";
|
"**/\r\n\r\n";
|
||||||
|
|
||||||
public final static String autogenCNotation =
|
public final static String autogenCNotation =
|
||||||
"/**\r\n" +
|
"/**\r\n" +
|
||||||
" DO NOT EDIT\r\n" +
|
" DO NOT EDIT\r\n" +
|
||||||
" FILE auto-generated by GenBuild tasks\r\n" +
|
" FILE auto-generated by GenBuild tasks\r\n" +
|
||||||
" Module name:\r\n" +
|
" Module name:\r\n" +
|
||||||
" AutoGen.c\r\n" +
|
" AutoGen.c\r\n" +
|
||||||
" Abstract:" +
|
" Abstract:" +
|
||||||
" Auto-generated AutoGen.c for building module or library.\r\n" +
|
" Auto-generated AutoGen.c for building module or library.\r\n" +
|
||||||
"**/\r\n\r\n";
|
"**/\r\n\r\n";
|
||||||
|
|
||||||
//
|
//
|
||||||
// module type
|
// module type
|
||||||
|
@ -152,41 +161,41 @@ public class CommonDefinition {
|
||||||
// Module type
|
// Module type
|
||||||
//
|
//
|
||||||
public static final MyEnum[] moduleEnum = new MyEnum[] {
|
public static final MyEnum[] moduleEnum = new MyEnum[] {
|
||||||
new MyEnum("BASE", ModuleTypeBase),
|
new MyEnum("BASE", ModuleTypeBase),
|
||||||
new MyEnum("SEC", ModuleTypeSec),
|
new MyEnum("SEC", ModuleTypeSec),
|
||||||
new MyEnum("PEI_CORE", ModuleTypePeiCore),
|
new MyEnum("PEI_CORE", ModuleTypePeiCore),
|
||||||
new MyEnum("PEIM", ModuleTypePeim),
|
new MyEnum("PEIM", ModuleTypePeim),
|
||||||
new MyEnum("DXE_CORE", ModuleTypeDxeCore),
|
new MyEnum("DXE_CORE", ModuleTypeDxeCore),
|
||||||
new MyEnum("DXE_DRIVER", ModuleTypeDxeDriver),
|
new MyEnum("DXE_DRIVER", ModuleTypeDxeDriver),
|
||||||
new MyEnum("DXE_RUNTIME_DRIVER", ModuleTypeDxeRuntimeDriver),
|
new MyEnum("DXE_RUNTIME_DRIVER", ModuleTypeDxeRuntimeDriver),
|
||||||
new MyEnum("DXE_SAL_DRIVER", ModuleTypeDxeSalDriver),
|
new MyEnum("DXE_SAL_DRIVER", ModuleTypeDxeSalDriver),
|
||||||
new MyEnum("DXE_SMM_DRIVER", ModuleTypeDxeSmmDriver),
|
new MyEnum("DXE_SMM_DRIVER", ModuleTypeDxeSmmDriver),
|
||||||
new MyEnum("UEFI_DRIVER", ModuleTypeUefiDriver),
|
new MyEnum("UEFI_DRIVER", ModuleTypeUefiDriver),
|
||||||
new MyEnum("UEFI_APPLICATION", ModuleTypeUefiApplication) };
|
new MyEnum("UEFI_APPLICATION", ModuleTypeUefiApplication)};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Component type
|
// Component type
|
||||||
//
|
//
|
||||||
public static final MyEnum[] componentEnum = new MyEnum[]{
|
public static final MyEnum[] componentEnum = new MyEnum[]{
|
||||||
new MyEnum("APRIORI", ComponentTypeApriori),
|
new MyEnum("APRIORI", ComponentTypeApriori),
|
||||||
new MyEnum("SEC", ComponentTypeSec),
|
new MyEnum("SEC", ComponentTypeSec),
|
||||||
new MyEnum("LIBRARY", ComponentTypeLibrary),
|
new MyEnum("LIBRARY", ComponentTypeLibrary),
|
||||||
new MyEnum("FV_IMAGE_FILE", ComponentTypeFvImageFile),
|
new MyEnum("FV_IMAGE_FILE", ComponentTypeFvImageFile),
|
||||||
new MyEnum("BS_DRIVER", ComponentTypeBsDriver),
|
new MyEnum("BS_DRIVER", ComponentTypeBsDriver),
|
||||||
new MyEnum("RT_DRIVER", ComponentTypeRtDriver),
|
new MyEnum("RT_DRIVER", ComponentTypeRtDriver),
|
||||||
new MyEnum("SAL_RT_DRIVER", ComponentTypeSalRtDriver),
|
new MyEnum("SAL_RT_DRIVER", ComponentTypeSalRtDriver),
|
||||||
new MyEnum("PE32_PEIM", ComponentTypePe32Peim),
|
new MyEnum("PE32_PEIM", ComponentTypePe32Peim),
|
||||||
new MyEnum("PIC_PEIM", ComponentTypePicPeim),
|
new MyEnum("PIC_PEIM", ComponentTypePicPeim),
|
||||||
new MyEnum("COMBINED_PEIM_DRIVER", ComponentTypeCombinedPeimDriver),
|
new MyEnum("COMBINED_PEIM_DRIVER", ComponentTypeCombinedPeimDriver),
|
||||||
new MyEnum("PEI_CORE", ComponentTypePeiCore),
|
new MyEnum("PEI_CORE", ComponentTypePeiCore),
|
||||||
new MyEnum("DXE_CORE", ComponentTypeDxeCore),
|
new MyEnum("DXE_CORE", ComponentTypeDxeCore),
|
||||||
new MyEnum("APPLICATION", ComponentTypeApplication),
|
new MyEnum("APPLICATION", ComponentTypeApplication),
|
||||||
new MyEnum("BS_DRIVER_EFI", ComponentTypeBsDriverEfi),
|
new MyEnum("BS_DRIVER_EFI", ComponentTypeBsDriverEfi),
|
||||||
new MyEnum("SHELLAPP", ComponentTypeShellApp),
|
new MyEnum("SHELLAPP", ComponentTypeShellApp),
|
||||||
new MyEnum("BINARY", ComponentTypeBinary),
|
new MyEnum("BINARY", ComponentTypeBinary),
|
||||||
new MyEnum("LOGO", ComponentTypeLogo),
|
new MyEnum("LOGO", ComponentTypeLogo),
|
||||||
new MyEnum("CUSTOM_BUILD", ComponentTypeCustomBuild)
|
new MyEnum("CUSTOM_BUILD", ComponentTypeCustomBuild)
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
getModuleType
|
getModuleType
|
||||||
|
@ -234,18 +243,18 @@ public class CommonDefinition {
|
||||||
|
|
||||||
@param componentType Integer value of component type.
|
@param componentType Integer value of component type.
|
||||||
@return
|
@return
|
||||||
**/
|
**/
|
||||||
static public String getComponentTypeString (int componentType) {
|
static public String getComponentTypeString (int componentType) {
|
||||||
if ((componentType > CommonDefinition.ComponentTypeUnknown) ||
|
if ((componentType > CommonDefinition.ComponentTypeUnknown) ||
|
||||||
(componentType < CommonDefinition.ComponentTypeNull)) {
|
(componentType < CommonDefinition.ComponentTypeNull)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
|
||||||
for (int index = 0; index < CommonDefinition.componentEnum.length; index ++) {
|
|
||||||
if (componentType == CommonDefinition.componentEnum[index].type) {
|
|
||||||
return CommonDefinition.componentEnum[index].moduleTypeStr;
|
|
||||||
}
|
}
|
||||||
}
|
for (int index = 0; index < CommonDefinition.componentEnum.length; index ++) {
|
||||||
return null;
|
if (componentType == CommonDefinition.componentEnum[index].type) {
|
||||||
|
return CommonDefinition.componentEnum[index].moduleTypeStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -258,10 +267,10 @@ public class CommonDefinition {
|
||||||
@return
|
@return
|
||||||
**/
|
**/
|
||||||
static public boolean isLibraryComponent (int componentType) {
|
static public boolean isLibraryComponent (int componentType) {
|
||||||
if (ComponentTypeLibrary == componentType) {
|
if (ComponentTypeLibrary == componentType) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -278,7 +287,7 @@ public class CommonDefinition {
|
||||||
String guid = "";
|
String guid = "";
|
||||||
int index = 0;
|
int index = 0;
|
||||||
if (guidNameConv
|
if (guidNameConv
|
||||||
.matches("[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}")) {
|
.matches("[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}")) {
|
||||||
strList = guidNameConv.split("-");
|
strList = guidNameConv.split("-");
|
||||||
guid = "0x" + strList[0] + ", ";
|
guid = "0x" + strList[0] + ", ";
|
||||||
guid = guid + "0x" + strList[1] + ", ";
|
guid = guid + "0x" + strList[1] + ", ";
|
||||||
|
@ -295,7 +304,7 @@ public class CommonDefinition {
|
||||||
guid = guid + "}";
|
guid = guid + "}";
|
||||||
return guid;
|
return guid;
|
||||||
} else if (guidNameConv
|
} else if (guidNameConv
|
||||||
.matches("0x[a-fA-F0-9]{1,8},( )*0x[a-fA-F0-9]{1,4},( )*0x[a-fA-F0-9]{1,4}(,( )*\\{)?(,?( )*0x[a-fA-F0-9]{1,2}){8}( )*(\\})?")) {
|
.matches("0x[a-fA-F0-9]{1,8},( )*0x[a-fA-F0-9]{1,4},( )*0x[a-fA-F0-9]{1,4}(,( )*\\{)?(,?( )*0x[a-fA-F0-9]{1,2}){8}( )*(\\})?")) {
|
||||||
strList = guidNameConv.split(",");
|
strList = guidNameConv.split(",");
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -317,7 +326,7 @@ public class CommonDefinition {
|
||||||
return guid;
|
return guid;
|
||||||
} else {
|
} else {
|
||||||
System.out
|
System.out
|
||||||
.println("Check GUID Value, It doesn't conform to the registry format specified in the schema!!!");
|
.println("Check GUID Value, It doesn't conform to the registry format specified in the schema!!!");
|
||||||
return "0";
|
return "0";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -335,16 +344,16 @@ public class CommonDefinition {
|
||||||
public static String[] remDupString (String[] orgList){
|
public static String[] remDupString (String[] orgList){
|
||||||
Set<String> strList = new LinkedHashSet<String>();
|
Set<String> strList = new LinkedHashSet<String>();
|
||||||
String[] desList ;
|
String[] desList ;
|
||||||
if (orgList == null){
|
if (orgList == null) {
|
||||||
return new String[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
for (int i = 0; i < orgList.length; i++){
|
for (int i = 0; i < orgList.length; i++) {
|
||||||
strList.add(orgList[i]);
|
strList.add(orgList[i]);
|
||||||
}
|
}
|
||||||
desList = new String[strList.size()];
|
desList = new String[strList.size()];
|
||||||
Iterator item = strList.iterator();
|
Iterator item = strList.iterator();
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while (item.hasNext()){
|
while (item.hasNext()) {
|
||||||
desList[index] = (String)item.next();
|
desList[index] = (String)item.next();
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ import org.tianocore.FilenameDocument.Filename;
|
||||||
import org.tianocore.MsaHeaderDocument.MsaHeader;
|
import org.tianocore.MsaHeaderDocument.MsaHeader;
|
||||||
import org.tianocore.ProtocolsDocument.Protocols.Protocol;
|
import org.tianocore.ProtocolsDocument.Protocols.Protocol;
|
||||||
import org.tianocore.ProtocolsDocument.Protocols.ProtocolNotify;
|
import org.tianocore.ProtocolsDocument.Protocols.ProtocolNotify;
|
||||||
|
import org.tianocore.PcdDriverTypes;
|
||||||
|
|
||||||
import org.tianocore.common.logger.EdkLog;
|
import org.tianocore.common.logger.EdkLog;
|
||||||
import org.tianocore.build.id.FpdModuleIdentification;
|
import org.tianocore.build.id.FpdModuleIdentification;
|
||||||
|
@ -67,6 +68,7 @@ import org.tianocore.build.id.ModuleIdentification;
|
||||||
import org.tianocore.build.id.PackageIdentification;
|
import org.tianocore.build.id.PackageIdentification;
|
||||||
import org.tianocore.build.id.PlatformIdentification;
|
import org.tianocore.build.id.PlatformIdentification;
|
||||||
import org.tianocore.build.toolchain.ToolChainInfo;
|
import org.tianocore.build.toolchain.ToolChainInfo;
|
||||||
|
import org.tianocore.build.autogen.CommonDefinition;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SurfaceAreaQuery class is used to query Surface Area information from msa,
|
* SurfaceAreaQuery class is used to query Surface Area information from msa,
|
||||||
|
@ -1275,6 +1277,30 @@ public class SurfaceAreaQuery {
|
||||||
return getCNames("Externs", xPath);
|
return getCNames("Externs", xPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Judge whether current driver is PEI_PCD_DRIVER or DXE_PCD_DRIVER or
|
||||||
|
NOT_PCD_DRIVER.
|
||||||
|
|
||||||
|
@return CommonDefinition.PCD_DRIVER_TYPE the type of current driver
|
||||||
|
**/
|
||||||
|
public static CommonDefinition.PCD_DRIVER_TYPE getPcdDriverType() {
|
||||||
|
String[] xPath = new String[] {"/PcdIsDriver"};
|
||||||
|
Object[] results = get ("Externs", xPath);
|
||||||
|
|
||||||
|
if (results != null && results.length != 0) {
|
||||||
|
PcdDriverTypes type = (PcdDriverTypes) results[0];
|
||||||
|
String typeStr = type.enumValue().toString();
|
||||||
|
if (typeStr.equals(CommonDefinition.PCD_DRIVER_TYPE.PEI_PCD_DRIVER.toString())) {
|
||||||
|
return CommonDefinition.PCD_DRIVER_TYPE.PEI_PCD_DRIVER;
|
||||||
|
} else if (typeStr.equals(CommonDefinition.PCD_DRIVER_TYPE.DXE_PCD_DRIVER.toString())) {
|
||||||
|
return CommonDefinition.PCD_DRIVER_TYPE.DXE_PCD_DRIVER;
|
||||||
|
}
|
||||||
|
return CommonDefinition.PCD_DRIVER_TYPE.UNKNOWN_PCD_DRIVER;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CommonDefinition.PCD_DRIVER_TYPE.NOT_PCD_DRIVER;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve module surface area file information
|
* Retrieve module surface area file information
|
||||||
*
|
*
|
||||||
|
|
|
@ -22,16 +22,17 @@ import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import org.tianocore.build.autogen.CommonDefinition;
|
||||||
|
import org.tianocore.build.exception.PcdAutogenException;
|
||||||
import org.tianocore.build.global.GlobalData;
|
import org.tianocore.build.global.GlobalData;
|
||||||
import org.tianocore.build.id.ModuleIdentification;
|
import org.tianocore.build.id.ModuleIdentification;
|
||||||
|
import org.tianocore.pcd.action.ActionMessage;
|
||||||
|
import org.tianocore.pcd.action.BuildAction;
|
||||||
import org.tianocore.pcd.entity.MemoryDatabaseManager;
|
import org.tianocore.pcd.entity.MemoryDatabaseManager;
|
||||||
import org.tianocore.pcd.entity.Token;
|
import org.tianocore.pcd.entity.Token;
|
||||||
|
import org.tianocore.pcd.entity.UsageIdentification;
|
||||||
import org.tianocore.pcd.entity.UsageInstance;
|
import org.tianocore.pcd.entity.UsageInstance;
|
||||||
import org.tianocore.pcd.exception.BuildActionException;
|
import org.tianocore.pcd.exception.BuildActionException;
|
||||||
import org.tianocore.pcd.entity.UsageIdentification;
|
|
||||||
import org.tianocore.pcd.action.BuildAction;
|
|
||||||
import org.tianocore.pcd.action.ActionMessage;
|
|
||||||
import org.tianocore.build.exception.PcdAutogenException;
|
|
||||||
|
|
||||||
/** This class is to manage how to generate the PCD information into Autogen.c and
|
/** This class is to manage how to generate the PCD information into Autogen.c and
|
||||||
Autogen.h.
|
Autogen.h.
|
||||||
|
@ -52,6 +53,11 @@ public class PCDAutoGenAction extends BuildAction {
|
||||||
///
|
///
|
||||||
private boolean isBuildUsedLibrary;
|
private boolean isBuildUsedLibrary;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// One of PEI_PCD_DRIVER, DXE_PCD_DRIVER, NOT_PCD_DRIVER
|
||||||
|
///
|
||||||
|
private CommonDefinition.PCD_DRIVER_TYPE pcdDriverType;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// The generated string for header file.
|
/// The generated string for header file.
|
||||||
///
|
///
|
||||||
|
@ -76,6 +82,14 @@ public class PCDAutoGenAction extends BuildAction {
|
||||||
this.usageId = usageId;
|
this.usageId = usageId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Set paramter pcdDriverType
|
||||||
|
|
||||||
|
@param pcdDriverType the driver type for PCD
|
||||||
|
**/
|
||||||
|
public void setPcdDriverType(CommonDefinition.PCD_DRIVER_TYPE pcdDriverType) {
|
||||||
|
this.pcdDriverType = pcdDriverType;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
set isBuildUsedLibrary parameter.
|
set isBuildUsedLibrary parameter.
|
||||||
|
|
||||||
|
@ -122,11 +136,14 @@ public class PCDAutoGenAction extends BuildAction {
|
||||||
@param arch the architecture for module
|
@param arch the architecture for module
|
||||||
@param isBuildUsedLibary Is the current module library.
|
@param isBuildUsedLibary Is the current module library.
|
||||||
@param pcdNameArrayInMsa the pcd name array got from MSA file.
|
@param pcdNameArrayInMsa the pcd name array got from MSA file.
|
||||||
|
@param pcdDriverType one of PEI_PCD_DRIVER, DXE_PCD_DRIVER,
|
||||||
|
NOT_PCD_DRIVER
|
||||||
**/
|
**/
|
||||||
public PCDAutoGenAction(ModuleIdentification moduleId,
|
public PCDAutoGenAction(ModuleIdentification moduleId,
|
||||||
String arch,
|
String arch,
|
||||||
boolean isBuildUsedLibrary,
|
boolean isBuildUsedLibrary,
|
||||||
String[] pcdNameArrayInMsa) {
|
String[] pcdNameArrayInMsa,
|
||||||
|
CommonDefinition.PCD_DRIVER_TYPE pcdDriverType) {
|
||||||
dbManager = null;
|
dbManager = null;
|
||||||
hAutoGenString = "";
|
hAutoGenString = "";
|
||||||
cAutoGenString = "";
|
cAutoGenString = "";
|
||||||
|
@ -140,6 +157,7 @@ public class PCDAutoGenAction extends BuildAction {
|
||||||
moduleId.getModuleType()));
|
moduleId.getModuleType()));
|
||||||
setIsBuildUsedLibrary(isBuildUsedLibrary);
|
setIsBuildUsedLibrary(isBuildUsedLibrary);
|
||||||
setPcdNameArrayInMsa(pcdNameArrayInMsa);
|
setPcdNameArrayInMsa(pcdNameArrayInMsa);
|
||||||
|
setPcdDriverType(pcdDriverType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -303,10 +321,10 @@ public class PCDAutoGenAction extends BuildAction {
|
||||||
// Work around code, In furture following code should be modified that get
|
// Work around code, In furture following code should be modified that get
|
||||||
// these information from Uplevel Autogen tools.
|
// these information from Uplevel Autogen tools.
|
||||||
//
|
//
|
||||||
if (moduleName.equalsIgnoreCase("PcdPeim")) {
|
if (pcdDriverType == CommonDefinition.PCD_DRIVER_TYPE.PEI_PCD_DRIVER) {
|
||||||
hAutoGenString += MemoryDatabaseManager.PcdPeimHString;
|
hAutoGenString += MemoryDatabaseManager.PcdPeimHString;
|
||||||
cAutoGenString += MemoryDatabaseManager.PcdPeimCString;
|
cAutoGenString += MemoryDatabaseManager.PcdPeimCString;
|
||||||
} else if (moduleName.equalsIgnoreCase("PcdDxe")) {
|
} else if (pcdDriverType == CommonDefinition.PCD_DRIVER_TYPE.DXE_PCD_DRIVER) {
|
||||||
hAutoGenString += MemoryDatabaseManager.PcdDxeHString;
|
hAutoGenString += MemoryDatabaseManager.PcdDxeHString;
|
||||||
cAutoGenString += MemoryDatabaseManager.PcdDxeCString;
|
cAutoGenString += MemoryDatabaseManager.PcdDxeCString;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue