1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6) 1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol. 1.3) Add Smbios 2.5, 2.6 supports. Incompatible changes hilighted: 1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed. 2) EFI_IP4_IPCONFIG_DATA changed. 2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4624 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -87,10 +87,15 @@ DEPEX_TYPE = EFI_SECTION_PEI_DEPEX
|
||||
DEPEX_TYPE = EFI_SECTION_DXE_DEPEX
|
||||
!ENDIF
|
||||
|
||||
!IF "$(COMPONENT_TYPE)" != "LIBRARY" && EXIST($(BUILD_DIR)\$(PROCESSOR)\CompilerStub.lib)
|
||||
LIBS = $(LIBS) $(BUILD_DIR)\$(PROCESSOR)\CompilerStub.lib
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Command flags for MAKEDEPS tool
|
||||
#
|
||||
DEP_FLAGS = -target $** -o $(DEP_FILE) $(INC) -ignorenotfound -q
|
||||
DEP_FLAGS2 = -target $@ -o $(DEP_FILE) -cl
|
||||
|
||||
[=============================================================================]
|
||||
#
|
||||
@@ -112,8 +117,15 @@ DEP_FLAGS = -target $** -o $(DEP_FILE) $(INC) -ignorenotfound -q
|
||||
[=============================================================================]
|
||||
[Compile.Ia32.asm,Compile.x64.asm]
|
||||
|
||||
#
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(FILE)Asm.dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEST_DIR)\$(FILE).obj)
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(FILE)Asm.dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
@@ -121,10 +133,6 @@ CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
@@ -140,67 +148,58 @@ $(DEST_DIR)\$(FILE).obj : $(SOURCE_FILE_NAME) $(INF_FILENAME) $(ALL_DEPS)
|
||||
[=============================================================================]
|
||||
[Compile.Ipf.s]
|
||||
|
||||
#
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(FILE)S.dep
|
||||
|
||||
!IF EXIST($(DEST_DIR)\$(FILE).pro)
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
|
||||
!IF EXIST($(DEST_DIR)\$(FILE).obj)
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(FILE)S.dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
$(DEP_FILE) : $(DEST_DIR)\$(FILE).pro
|
||||
$(MAKEDEPS) -f $(SOURCE_FILE_NAME) $(DEP_FLAGS)
|
||||
|
||||
#
|
||||
# Compile the file
|
||||
#
|
||||
$(DEST_DIR)\$(FILE).pro : $(SOURCE_FILE_NAME) $(INF_FILENAME) $(ALL_DEPS)
|
||||
$(CC) $(C_FLAGS_PRO) $(SOURCE_FILE_NAME) > $@
|
||||
|
||||
$(DEST_DIR)\$(FILE).obj : $(DEST_DIR)\$(FILE).pro
|
||||
$(ASM) $(ASM_FLAGS) $(DEST_DIR)\$(FILE).pro
|
||||
|
||||
[=============================================================================]
|
||||
[Compile.Ia32.c,Compile.Ipf.c,Compile.x64.c]
|
||||
|
||||
DEP_FILE = $(DEST_DIR)\$(FILE).dep
|
||||
|
||||
!IF EXIST($(DEST_DIR)\$(FILE).obj)
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(FILE).dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
$(DEP_FILE) : $(DEST_DIR)\$(FILE).obj
|
||||
$(MAKEDEPS) -f $(SOURCE_FILE_NAME) $(DEP_FLAGS)
|
||||
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Compile the file
|
||||
#
|
||||
$(DEST_DIR)\$(FILE).obj : $(SOURCE_FILE_NAME) $(INF_FILENAME) $(ALL_DEPS)
|
||||
$(CC) $(C_FLAGS) $(SOURCE_FILE_NAME)
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
$(CC) $(C_FLAGS_PRO) $(SOURCE_FILE_NAME) > $(DEST_DIR)\$(FILE).pro
|
||||
!ELSE
|
||||
-$(CC) $(C_FLAGS_PRO) $(SOURCE_FILE_NAME) /showIncludes > $(DEST_DIR)\$(FILE).pro 2> $(DEST_DIR)\$(FILE)S.cl
|
||||
@$(MAKEDEPS) -f $(DEST_DIR)\$(FILE)S.cl $(DEP_FLAGS2)
|
||||
!ENDIF
|
||||
$(ASM) $(ASM_FLAGS) $(DEST_DIR)\$(FILE).pro
|
||||
|
||||
[=============================================================================]
|
||||
[Compile.Ebc.c]
|
||||
[Compile.Ia32.c,Compile.Ipf.c,Compile.x64.c]
|
||||
|
||||
#
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(FILE).dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
|
||||
!IF EXIST($(DEST_DIR)\$(FILE).obj)
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(FILE).dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
@@ -208,10 +207,44 @@ CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
$(DEP_FILE) : $(DEST_DIR)\$(FILE).obj
|
||||
$(MAKEDEPS) -f $(SOURCE_FILE_NAME) $(DEP_FLAGS)
|
||||
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Compile the file
|
||||
#
|
||||
$(DEST_DIR)\$(FILE).obj : $(SOURCE_FILE_NAME) $(INF_FILENAME) $(ALL_DEPS)
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
$(CC) $(C_FLAGS) $(SOURCE_FILE_NAME)
|
||||
!ELSE
|
||||
-$(CC) $(C_FLAGS) $(SOURCE_FILE_NAME) /showIncludes > $(DEST_DIR)\$(FILE).cl
|
||||
@$(MAKEDEPS) -f $(DEST_DIR)\$(FILE).cl $(DEP_FLAGS2)
|
||||
!ENDIF
|
||||
|
||||
[=============================================================================]
|
||||
[Compile.Ebc.c]
|
||||
|
||||
#
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(FILE).dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEST_DIR)\$(FILE).obj)
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(FILE).dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
@@ -351,8 +384,32 @@ clean :
|
||||
#
|
||||
LIB_NAME = $(LIB_DIR)\$(BASE_NAME).lib
|
||||
|
||||
#
|
||||
# $(DEP_TARGETS) are not needed for binary build.
|
||||
#
|
||||
!IF ("$(BINARY)" == "TRUE") || (("$(BINARY)" == "") && ("$(EFI_BINARY_LIBRARY)" == "YES"))
|
||||
DEP_TARGETS=
|
||||
CREATEDEPS=
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Module can be built from source code or binary files.
|
||||
#
|
||||
!IF ((("$(BINARY)" == "TRUE") || (("$(BINARY)" == "") && ("$(EFI_BINARY_LIBRARY)" == "YES"))) \
|
||||
&& EXIST($(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).lib))
|
||||
$(LIB_NAME) : $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).lib
|
||||
copy $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).lib $(LIB_NAME) /Y
|
||||
if exist $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME)Obj.pdb \
|
||||
copy $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME)Obj.pdb $(DEST_DIR)\$(BASE_NAME)Obj.pdb /Y
|
||||
!ELSE
|
||||
$(LIB_NAME) : $(OBJECTS) $(LIBS) $(INF_FILENAME) $(ENV_DEPS)
|
||||
$(LIB) $(LIB_FLAGS) $(OBJECTS) $(LIBS) /OUT:$@
|
||||
!IF ("$(EFI_BINARY_BUILD)" == "YES")
|
||||
if not exist $(EFI_PLATFORM_BIN)\$(PROCESSOR) mkdir $(EFI_PLATFORM_BIN)\$(PROCESSOR)
|
||||
if exist $(LIB_NAME) copy $(LIB_NAME) $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).lib /Y
|
||||
if exist $(DEST_DIR)\$(BASE_NAME)Obj.pdb copy $(DEST_DIR)\$(BASE_NAME)Obj.pdb $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME)Obj.pdb /Y
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CREATEDEPS)"=="YES"
|
||||
all : $(DEP_TARGETS)
|
||||
@@ -558,10 +615,31 @@ $(TARGET_PE32) : $(TARGET_EFI)
|
||||
$(GENSECTION) -I $(TARGET_EFI) -O $(TARGET_PE32) -S EFI_SECTION_PE32
|
||||
|
||||
#
|
||||
# Run FWImage on the DLL to set it as an EFI image type.
|
||||
# $(DEP_TARGETS) are not needed for binary build.
|
||||
#
|
||||
!IF "$(BINARY)" == "TRUE"
|
||||
DEP_TARGETS=
|
||||
CREATEDEPS=
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Build module to generate *.efi file from source code or binary file.
|
||||
#
|
||||
!IF (("$(BINARY)" == "TRUE") && EXIST($(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).efi))
|
||||
LOCALIZE_TARGETS=
|
||||
$(TARGET_EFI) : $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).efi
|
||||
copy $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).efi $(TARGET_EFI) /Y
|
||||
if exist $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).pdb \
|
||||
copy $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).pdb $(TARGET_PDB) /Y
|
||||
!ELSE
|
||||
$(TARGET_EFI) : $(TARGET_DLL) $(INF_FILENAME)
|
||||
$(FWIMAGE) -t 0 $(COMPONENT_TYPE) $(TARGET_DLL) $(TARGET_EFI)
|
||||
!IF ("$(EFI_BINARY_BUILD)" == "YES")
|
||||
if not exist $(EFI_PLATFORM_BIN)\$(PROCESSOR) mkdir $(EFI_PLATFORM_BIN)\$(PROCESSOR)
|
||||
if exist $(TARGET_EFI) copy $(TARGET_EFI) $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).efi /Y
|
||||
if exist $(TARGET_PDB) copy $(TARGET_PDB) $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).pdb /Y
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -621,12 +699,18 @@ DPX_SOURCE_FILE = $(DPX_SOURCE_OVERRIDE)
|
||||
|
||||
!IF "$(DPX_SOURCE_FILE)" != ""
|
||||
!IF EXIST ($(DPX_SOURCE_FILE))
|
||||
|
||||
#
|
||||
# Add dependency check for dxs file, because dxs file depends on PPI or
|
||||
# PROTOCOL guid defintions.
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(BASE_NAME)dxs.dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
|
||||
!IF EXIST($(TARGET_DPX))
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(BASE_NAME)dxs.dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
@@ -634,17 +718,21 @@ CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
$(DEP_FILE) : $(TARGET_DPX)
|
||||
$(MAKEDEPS) -f $(DPX_SOURCE_FILE) $(DEP_FLAGS)
|
||||
|
||||
!ENDIF
|
||||
|
||||
$(TARGET_DPX) : $(DPX_SOURCE_FILE) $(INF_FILENAME)
|
||||
$(CC) /nologo $(INC) $(VERSION_FLAGS) /EP $(DPX_SOURCE_FILE) > $*.tmp1
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
$(CC) $(C_FLAGS_DPX) $(DPX_SOURCE_FILE) > $*.tmp1
|
||||
!ELSE
|
||||
-$(CC) $(C_FLAGS_DPX) $(DPX_SOURCE_FILE) /showIncludes > $*.tmp1 2> $(DEST_DIR)\$(BASE_NAME)dxs.cl
|
||||
@$(MAKEDEPS) -f $(DEST_DIR)\$(BASE_NAME)dxs.cl $(DEP_FLAGS2)
|
||||
!ENDIF
|
||||
$(GENDEPEX) -I $*.tmp1 -O $*.tmp2
|
||||
$(GENSECTION) -I $*.tmp2 -O $@ -S $(DEPEX_TYPE)
|
||||
del $*.tmp1 > NUL
|
||||
@@ -666,8 +754,40 @@ $(TARGET_DPX) :
|
||||
!IF "$(COMPONENT_TYPE)" == "COMBINED_PEIM_DRIVER"
|
||||
!IF "$(DXE_DPX_SOURCE)" != ""
|
||||
!IF EXIST ($(SOURCE_DIR)\$(DXE_DPX_SOURCE))
|
||||
|
||||
#
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(BASE_NAME)dxs2.dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
|
||||
!IF EXIST($(TARGET_DXE_DPX))
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(BASE_NAME)dxs2.dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
$(DEP_FILE) : $(TARGET_DXE_DPX)
|
||||
$(MAKEDEPS) -f $(SOURCE_DIR)\$(DXE_DPX_SOURCE) $(DEP_FLAGS)
|
||||
|
||||
!ENDIF
|
||||
|
||||
$(TARGET_DXE_DPX) : $(SOURCE_DIR)\$(DXE_DPX_SOURCE) $(INF_FILENAME)
|
||||
$(CC) /nologo $(INC) $(VERSION_FLAGS) /EP $(SOURCE_DIR)\$(DXE_DPX_SOURCE) > $*.tmp1
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
$(CC) $(C_FLAGS_DPX) $(SOURCE_DIR)\$(DXE_DPX_SOURCE) > $*.tmp1
|
||||
!ELSE
|
||||
-$(CC) $(C_FLAGS_DPX) $(SOURCE_DIR)\$(DXE_DPX_SOURCE) /showIncludes > $*.tmp1 2> $(DEST_DIR)\$(BASE_NAME)dxs2.cl
|
||||
@$(MAKEDEPS) -f $(DEST_DIR)\$(BASE_NAME)dxs2.cl $(DEP_FLAGS2)
|
||||
!ENDIF
|
||||
$(GENDEPEX) -I $*.tmp1 -O $*.tmp2
|
||||
$(GENSECTION) -I $*.tmp2 -O $@ -S EFI_SECTION_DXE_DEPEX
|
||||
del $*.tmp1 > NUL
|
||||
@@ -778,10 +898,30 @@ $(TARGET_TES) : $(TARGET_TE)
|
||||
$(GENSECTION) -I $(TARGET_TE) -O $(TARGET_TES) -S EFI_SECTION_TE
|
||||
|
||||
#
|
||||
# Run FWImage on the DLL to set it as an EFI image type.
|
||||
# $(DEP_TARGETS) are not needed for binary build.
|
||||
#
|
||||
!IF "$(BINARY)" == "TRUE"
|
||||
DEP_TARGETS=
|
||||
CREATEDEPS=
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Build module to generate *.efi file from source code or binary file.
|
||||
#
|
||||
!IF (("$(BINARY)" == "TRUE") && EXIST($(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).efi))
|
||||
$(TARGET_EFI) : $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).efi
|
||||
copy $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).efi $(TARGET_EFI) /Y
|
||||
if exist $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).pdb \
|
||||
copy $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).pdb $(TARGET_PDB) /Y
|
||||
!ELSE
|
||||
$(TARGET_EFI) : $(TARGET_DLL) $(INF_FILENAME)
|
||||
$(FWIMAGE) $(COMPONENT_TYPE) $(TARGET_DLL) $(TARGET_EFI)
|
||||
!IF ("$(EFI_BINARY_BUILD)" == "YES")
|
||||
if not exist $(EFI_PLATFORM_BIN)\$(PROCESSOR) mkdir $(EFI_PLATFORM_BIN)\$(PROCESSOR)
|
||||
if exist $(TARGET_EFI) copy $(TARGET_EFI) $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).efi /Y
|
||||
if exist $(TARGET_PDB) copy $(TARGET_PDB) $(EFI_PLATFORM_BIN)\$(PROCESSOR)\$(BASE_NAME).pdb /Y
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Run GenTEImage on the built .efi file to create our TE file.
|
||||
@@ -845,12 +985,18 @@ DPX_SOURCE_FILE = $(DPX_SOURCE_OVERRIDE)
|
||||
|
||||
!IF "$(DPX_SOURCE_FILE)" != ""
|
||||
!IF EXIST ($(DPX_SOURCE_FILE))
|
||||
|
||||
#
|
||||
# Add dependency check for dxs file, because dxs file depends on PPI or
|
||||
# PROTOCOL guid defintions.
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(BASE_NAME)dxs.dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
|
||||
!IF EXIST($(TARGET_DPX))
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(BASE_NAME)dxs.dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
@@ -858,17 +1004,21 @@ CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
$(DEP_FILE) : $(TARGET_DPX)
|
||||
$(MAKEDEPS) -f $(DPX_SOURCE_FILE) $(DEP_FLAGS)
|
||||
|
||||
!ENDIF
|
||||
|
||||
$(TARGET_DPX) : $(DPX_SOURCE_FILE) $(INF_FILENAME)
|
||||
$(CC) /nologo $(INC) $(VERSION_FLAGS) /EP $(DPX_SOURCE_FILE) > $*.tmp1
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
$(CC) $(C_FLAGS_DPX) $(DPX_SOURCE_FILE) > $*.tmp1
|
||||
!ELSE
|
||||
-$(CC) $(C_FLAGS_DPX) $(DPX_SOURCE_FILE) /showIncludes > $*.tmp1 2> $(DEST_DIR)\$(BASE_NAME)dxs.cl
|
||||
@$(MAKEDEPS) -f $(DEST_DIR)\$(BASE_NAME)dxs.cl $(DEP_FLAGS2)
|
||||
!ENDIF
|
||||
$(GENDEPEX) -I $*.tmp1 -O $*.tmp2
|
||||
$(GENSECTION) -I $*.tmp2 -O $@ -S $(DEPEX_TYPE)
|
||||
del $*.tmp1 > NUL
|
||||
@@ -1042,12 +1192,18 @@ DPX_SOURCE_FILE = $(DPX_SOURCE_OVERRIDE)
|
||||
|
||||
!IF "$(DPX_SOURCE_FILE)" != ""
|
||||
!IF EXIST ($(DPX_SOURCE_FILE))
|
||||
|
||||
#
|
||||
# Add dependency check for dxs file, because dxs file depends on PPI or
|
||||
# PROTOCOL guid defintions.
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(BASE_NAME)dxs.dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
|
||||
!IF EXIST($(TARGET_DPX))
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(BASE_NAME)dxs.dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
@@ -1055,17 +1211,21 @@ CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
$(DEP_FILE) : $(TARGET_DPX)
|
||||
$(MAKEDEPS) -f $(DPX_SOURCE_FILE) $(DEP_FLAGS)
|
||||
|
||||
!ENDIF
|
||||
|
||||
$(TARGET_DPX) : $(DPX_SOURCE_FILE) $(INF_FILENAME)
|
||||
$(CC) /nologo $(INC) $(VERSION_FLAGS) /EP $(DPX_SOURCE_FILE) > $*.tmp1
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
$(CC) $(C_FLAGS_DPX) $(DPX_SOURCE_FILE) > $*.tmp1
|
||||
!ELSE
|
||||
-$(CC) $(C_FLAGS_DPX) $(DPX_SOURCE_FILE) /showIncludes > $*.tmp1 2> $(DEST_DIR)\$(BASE_NAME)dxs.cl
|
||||
@$(MAKEDEPS) -f $(DEST_DIR)\$(BASE_NAME)dxs.cl $(DEP_FLAGS2)
|
||||
!ENDIF
|
||||
$(GENDEPEX) -I $*.tmp1 -O $*.tmp2
|
||||
$(GENSECTION) -I $*.tmp2 -O $@ -S $(DEPEX_TYPE)
|
||||
del $*.tmp1 > NUL
|
||||
@@ -1210,12 +1370,18 @@ DPX_SOURCE_FILE = $(DPX_SOURCE_OVERRIDE)
|
||||
|
||||
!IF "$(DPX_SOURCE_FILE)" != ""
|
||||
!IF EXIST ($(DPX_SOURCE_FILE))
|
||||
|
||||
#
|
||||
# Add dependency check for dxs file, because dxs file depends on PPI or
|
||||
# PROTOCOL guid defintions.
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(BASE_NAME)dxs.dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
|
||||
!IF EXIST($(TARGET_DPX))
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(BASE_NAME)dxs.dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
@@ -1223,17 +1389,21 @@ CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
$(DEP_FILE) : $(TARGET_DPX)
|
||||
$(MAKEDEPS) -f $(DPX_SOURCE_FILE) $(DEP_FLAGS)
|
||||
|
||||
!ENDIF
|
||||
|
||||
$(TARGET_DPX) : $(DPX_SOURCE_FILE) $(INF_FILENAME)
|
||||
$(CC) /nologo $(INC) $(VERSION_FLAGS) /EP $(DPX_SOURCE_FILE) > $*.tmp1
|
||||
!IF "$(EFI_USE_CL_FOR_DEP)" != "YES"
|
||||
$(CC) $(C_FLAGS_DPX) $(DPX_SOURCE_FILE) > $*.tmp1
|
||||
!ELSE
|
||||
-$(CC) $(C_FLAGS_DPX) $(DPX_SOURCE_FILE) /showIncludes > $*.tmp1 2> $(DEST_DIR)\$(BASE_NAME)dxs.cl
|
||||
@$(MAKEDEPS) -f $(DEST_DIR)\$(BASE_NAME)dxs.cl $(DEP_FLAGS2)
|
||||
!ENDIF
|
||||
$(GENDEPEX) -I $*.tmp1 -O $*.tmp2
|
||||
$(GENSECTION) -I $*.tmp2 -O $@ -S $(DEPEX_TYPE)
|
||||
del $*.tmp1 > NUL
|
||||
@@ -1348,8 +1518,15 @@ LOCALIZE = YES
|
||||
[=============================================================================]
|
||||
[Compile.Ia32.Vfr,Compile.Ipf.Vfr,Compile.x64.Vfr]
|
||||
|
||||
#
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(FILE)Vfr.dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEST_DIR)\$(FILE).obj)
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(FILE)Vfr.dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
@@ -1357,10 +1534,6 @@ CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
@@ -1425,8 +1598,15 @@ $(DEST_DIR)\$(FILE).obj : $(SOURCE_FILE_NAME) $(INF_FILENAME) $(ALL_DEPS)
|
||||
[=============================================================================]
|
||||
[Compile.Ia32.Ifr_Bin,Compile.Ipf.Ifr_Bin,Compile.x64.Ifr_Bin]
|
||||
|
||||
#
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(FILE)Vfr.dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEST_DIR)\$(FILE).obj)
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(FILE)Vfr.dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
@@ -1434,10 +1614,6 @@ CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
@@ -1472,8 +1648,15 @@ HII_IFR_PACK_FILES = $(HII_IFR_PACK_FILES) $(DEST_DIR)\$(FILE).hpk
|
||||
[=============================================================================]
|
||||
[Compile.Ebc.Ifr_Bin]
|
||||
|
||||
#
|
||||
# Add build dependency check
|
||||
#
|
||||
DEP_FILE = $(DEST_DIR)\$(FILE)Vfr.dep
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEST_DIR)\$(FILE).obj)
|
||||
DEP_TARGETS = $(DEP_TARGETS) $(DEST_DIR)\$(FILE)Vfr.dep
|
||||
!IF !EXIST($(DEP_FILE))
|
||||
@@ -1481,10 +1664,6 @@ CREATEDEPS = YES
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
!IF EXIST($(DEP_FILE))
|
||||
!INCLUDE $(DEP_FILE)
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Update dep file for next round incremental build
|
||||
#
|
||||
|
@@ -275,7 +275,6 @@ IMAGE_SCRIPT =
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[=============================================================================]
|
||||
[Package.BS_DRIVER.Default,Package.RT_DRIVER.Default]
|
||||
PACKAGE.INF
|
||||
@@ -359,6 +358,7 @@ IMAGE_SCRIPT =
|
||||
$(SOURCE_FV)Fv.sec
|
||||
}
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
#
|
||||
# Stripped package descriptions for size reduction.
|
||||
@@ -422,6 +422,7 @@ IMAGE_SCRIPT =
|
||||
{
|
||||
$(BASE_NAME).tes
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
[Package.PE32_PEIM.DefaultStripped]
|
||||
PACKAGE.INF
|
||||
@@ -504,7 +505,6 @@ IMAGE_SCRIPT =
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[=============================================================================]
|
||||
[Package.BS_DRIVER.DefaultStripped,Package.RT_DRIVER.DefaultStripped]
|
||||
PACKAGE.INF
|
||||
@@ -522,7 +522,6 @@ IMAGE_SCRIPT =
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[=============================================================================]
|
||||
[Package.FvImageFile.DefaultStripped]
|
||||
PACKAGE.INF
|
||||
@@ -556,3 +555,41 @@ IMAGE_SCRIPT =
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
[Package.AcpiTable.Default]
|
||||
PACKAGE.INF
|
||||
\[.]
|
||||
BASE_NAME = $(BASE_NAME)
|
||||
FFS_FILEGUID = $(FILE_GUID)
|
||||
FFS_FILETYPE = EFI_FV_FILETYPE_FREEFORM
|
||||
FFS_ATTRIB_CHECKSUM = TRUE
|
||||
|
||||
IMAGE_SCRIPT =
|
||||
{
|
||||
Compress ($(COMPRESS_METHOD)) {
|
||||
Tool (
|
||||
$(OEMTOOLPATH)\GenCRC32Section
|
||||
ARGS= -i $(SECTION_TARGETS)
|
||||
$(DEST_DIR)\$(BASE_NAME).ui
|
||||
-o $(DEST_DIR)\$(BASE_NAME).crc32
|
||||
OUTPUT = $(DEST_DIR)\$(BASE_NAME).crc32
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
[Package.AcpiTable.DefaultStripped]
|
||||
PACKAGE.INF
|
||||
\[.]
|
||||
BASE_NAME = $(BASE_NAME)
|
||||
FFS_FILEGUID = $(FILE_GUID)
|
||||
FFS_FILETYPE = EFI_FV_FILETYPE_FREEFORM
|
||||
FFS_ATTRIB_CHECKSUM = TRUE
|
||||
|
||||
IMAGE_SCRIPT =
|
||||
{
|
||||
Compress ($(COMPRESS_METHOD)) {
|
||||
$(SECTION_TARGETS)
|
||||
}
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
|
@@ -269,7 +269,6 @@ IMAGE_SCRIPT =
|
||||
$(BASE_NAME).ver \
|
||||
}
|
||||
|
||||
|
||||
[=============================================================================]
|
||||
[Package.DxeIplPad.Default]
|
||||
PACKAGE.INF
|
||||
@@ -285,7 +284,6 @@ IMAGE_SCRIPT =
|
||||
$(BASE_NAME).pad \
|
||||
}
|
||||
|
||||
|
||||
[=============================================================================]
|
||||
[Package.BS_DRIVER.DxeMain]
|
||||
PACKAGE.INF
|
||||
@@ -304,7 +302,6 @@ IMAGE_SCRIPT =
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[=============================================================================]
|
||||
[Package.BS_DRIVER.Default,Package.RT_DRIVER.Default,Package.SAL_RT_DRIVER.Default]
|
||||
PACKAGE.INF
|
||||
@@ -388,4 +385,27 @@ IMAGE_SCRIPT =
|
||||
$(SOURCE_FV)Fv.sec
|
||||
}
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
[Package.AcpiTable.Default]
|
||||
PACKAGE.INF
|
||||
\[.]
|
||||
BASE_NAME = $(BASE_NAME)
|
||||
FFS_FILEGUID = $(FILE_GUID)
|
||||
FFS_FILETYPE = EFI_FV_FILETYPE_FREEFORM
|
||||
FFS_ATTRIB_CHECKSUM = TRUE
|
||||
|
||||
IMAGE_SCRIPT =
|
||||
{
|
||||
Compress ($(COMPRESS_METHOD)) {
|
||||
Tool (
|
||||
$(OEMTOOLPATH)\GenCRC32Section
|
||||
ARGS= -i $(SECTION_TARGETS)
|
||||
$(DEST_DIR)\$(BASE_NAME).ui
|
||||
-o $(DEST_DIR)\$(BASE_NAME).crc32
|
||||
OUTPUT = $(DEST_DIR)\$(BASE_NAME).crc32
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
|
@@ -275,7 +275,6 @@ IMAGE_SCRIPT =
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[=============================================================================]
|
||||
[Package.BS_DRIVER.Default,Package.RT_DRIVER.Default,Package.SAL_RT_DRIVER.Default]
|
||||
PACKAGE.INF
|
||||
@@ -406,6 +405,7 @@ IMAGE_SCRIPT =
|
||||
{
|
||||
$(BASE_NAME).tes
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
[Package.PE32_PEIM.DefaultStripped]
|
||||
PACKAGE.INF
|
||||
@@ -488,7 +488,6 @@ IMAGE_SCRIPT =
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[=============================================================================]
|
||||
[Package.BS_DRIVER.DefaultStripped,Package.RT_DRIVER.DefaultStripped,Package.SAL_RT_DRIVER.DefaultStripped]
|
||||
PACKAGE.INF
|
||||
@@ -506,7 +505,6 @@ IMAGE_SCRIPT =
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[=============================================================================]
|
||||
[Package.FvImageFile.DefaultStripped]
|
||||
PACKAGE.INF
|
||||
@@ -539,6 +537,7 @@ IMAGE_SCRIPT =
|
||||
$(SOURCE_FV)Fv.sec
|
||||
}
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
[Package.SECURITY_CORE.Default|DefaultStripped]
|
||||
PACKAGE.INF
|
||||
@@ -556,3 +555,41 @@ IMAGE_SCRIPT =
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
[Package.AcpiTable.Default]
|
||||
PACKAGE.INF
|
||||
\[.]
|
||||
BASE_NAME = $(BASE_NAME)
|
||||
FFS_FILEGUID = $(FILE_GUID)
|
||||
FFS_FILETYPE = EFI_FV_FILETYPE_FREEFORM
|
||||
FFS_ATTRIB_CHECKSUM = TRUE
|
||||
|
||||
IMAGE_SCRIPT =
|
||||
{
|
||||
Compress ($(COMPRESS_METHOD)) {
|
||||
Tool (
|
||||
$(OEMTOOLPATH)\GenCRC32Section
|
||||
ARGS= -i $(SECTION_TARGETS)
|
||||
$(DEST_DIR)\$(BASE_NAME).ui
|
||||
-o $(DEST_DIR)\$(BASE_NAME).crc32
|
||||
OUTPUT = $(DEST_DIR)\$(BASE_NAME).crc32
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
[Package.AcpiTable.DefaultStripped]
|
||||
PACKAGE.INF
|
||||
\[.]
|
||||
BASE_NAME = $(BASE_NAME)
|
||||
FFS_FILEGUID = $(FILE_GUID)
|
||||
FFS_FILETYPE = EFI_FV_FILETYPE_FREEFORM
|
||||
FFS_ATTRIB_CHECKSUM = TRUE
|
||||
|
||||
IMAGE_SCRIPT =
|
||||
{
|
||||
Compress ($(COMPRESS_METHOD)) {
|
||||
$(SECTION_TARGETS)
|
||||
}
|
||||
}
|
||||
|
||||
[=============================================================================]
|
||||
|
@@ -37,3 +37,4 @@ $(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\PeiHobLib\PeiHobLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\PeiReportStatusCodeLib\PeiReportStatusCodeLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\PeiResourcePublicationLib\PeiResourcePublicationLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\PeiSmbusLib\PeiSmbusLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\PeiPerformanceLib\PeiPerformanceLib.inf
|
||||
|
@@ -51,4 +51,6 @@ $(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\DxeServicesTableLib\DxeServ
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\EdkDxeSalLib\EdkDxeSalLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\EdkDxeRuntimeDriverLib\EdkDxeRuntimeDriverLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\DxeSmbusLib\DxeSmbusLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\PeiSmbusLib\PeiSmbusLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\PeiSmbusLib\PeiSmbusLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\DxePerformanceLib\DxePerformanceLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\EdkIIGlueLib\Library\PeiPerformanceLib\PeiPerformanceLib.inf
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#/*++
|
||||
#
|
||||
# Copyright (c) 2004 - 2006, Intel Corporation
|
||||
# Copyright (c) 2004 - 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
|
||||
@@ -25,7 +25,6 @@ $(EDK_PREFIX)Foundation\Cpu\Pentium\CpuIA32Lib\CpuIA32Lib.inf
|
||||
$(EDK_PREFIX)Foundation\Cpu\Itanium\CpuIA64Lib\CpuIA64Lib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\CustomizedDecompress\CustomizedDecompress.inf
|
||||
$(EDK_PREFIX)Foundation\Library\CompilerStub\CompilerStubLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\Hob\HobLib.inf
|
||||
|
||||
#
|
||||
# PEI libraries
|
||||
|
@@ -25,7 +25,6 @@ $(EDK_PREFIX)Foundation\Cpu\Pentium\CpuIA32Lib\CpuIA32Lib.inf
|
||||
$(EDK_PREFIX)Foundation\Cpu\Itanium\CpuIA64Lib\CpuIA64Lib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\CustomizedDecompress\CustomizedDecompress.inf
|
||||
$(EDK_PREFIX)Foundation\Library\CompilerStub\CompilerStubLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\Hob\HobLib.inf
|
||||
|
||||
#
|
||||
# PEI libraries
|
||||
@@ -42,10 +41,12 @@ $(EDK_PREFIX)Foundation\Core\Dxe\ArchProtocol\ArchProtocolLib.inf
|
||||
$(EDK_PREFIX)Foundation\Efi\Protocol\EfiProtocolLib.inf
|
||||
$(EDK_PREFIX)Foundation\Framework\Protocol\EdkFrameworkProtocolLib.inf
|
||||
$(EDK_PREFIX)Foundation\Protocol\EdkProtocolLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\Hob\HobLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\EfiDriverLib\EfiDriverLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\RuntimeDxe\EfiRuntimeLib\EfiRuntimeLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\Graphics\Graphics.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\EfiIfrSupportLib\EfiIfrSupportLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\UefiEfiIfrSupportLib\UefiEfiIfrSupportLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\Print\PrintLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\EfiScriptLib\EfiScriptLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\EfiUiLib\EfiUiLib.inf
|
||||
@@ -55,9 +56,3 @@ $(EDK_PREFIX)Foundation\Library\Dxe\EfiUiLib\EfiUiLib.inf
|
||||
#
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\PrintLite\PrintLib.inf
|
||||
$(EDK_PREFIX)Foundation\Library\Dxe\GraphicsLite\Graphics.inf
|
||||
|
||||
#
|
||||
# Module Libraries
|
||||
#
|
||||
#$(EDK_PREFIX)Sample\Platform\Generic\Dxe\GenericBds\GenericBds.inf
|
||||
#$(EDK_PREFIX)Sample\Bus\Usb\UsbLib\Dxe\UsbDxeLib.inf
|
||||
|
@@ -0,0 +1,138 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2005, 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:
|
||||
|
||||
MonoStatusCode.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Monolithic single PEIM to provide the status code functionality.
|
||||
The PEIM is a blend of libraries that correspond to the different status code
|
||||
listeners that a platform installs.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _MONO_STATUS_CODE_H_
|
||||
#define _MONO_STATUS_CODE_H_
|
||||
|
||||
//
|
||||
// Statements that include other files.
|
||||
//
|
||||
#include "Tiano.h"
|
||||
#include "Pei.h"
|
||||
#include "PeiLib.h"
|
||||
#include "EfiCommonLib.h"
|
||||
|
||||
//
|
||||
// Driver Produced DXE Protocol Prototypes
|
||||
//
|
||||
#include EFI_PPI_PRODUCER (StatusCode)
|
||||
|
||||
//
|
||||
// Driver Consumed DXE Protocol Prototypes
|
||||
//
|
||||
#include EFI_ARCH_PROTOCOL_CONSUMER (StatusCode)
|
||||
|
||||
//
|
||||
// Driver GUID includes
|
||||
//
|
||||
#include EFI_GUID_DEFINITION (StatusCode)
|
||||
#include EFI_GUID_DEFINITION (StatusCodeCallerId)
|
||||
#include EFI_GUID_DEFINITION (GlobalVariable)
|
||||
|
||||
extern EFI_GUID mStatusCodeRuntimeGuid;
|
||||
|
||||
//
|
||||
// Platform specific function Declarations. These must be implemented in a
|
||||
// subdirectory named PlatformName in a file named PlatformStatusCode.c.
|
||||
// See D845GRG\PlatformStatusCode.c for an example of a simple status code
|
||||
// implementation.
|
||||
// See Nt32\PlatformStatusCode.c for an example of a status code implementation
|
||||
// that relocates itself into memory.
|
||||
//
|
||||
//
|
||||
// This is the driver entry point and must be defined.
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InstallMonoStatusCode (
|
||||
IN EFI_FFS_FILE_HEADER *FfsHeader,
|
||||
IN EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// This is the platform function to initialize the listeners desired by the
|
||||
// platform.
|
||||
//
|
||||
VOID
|
||||
PlatformInitializeStatusCode (
|
||||
IN EFI_FFS_FILE_HEADER *FfsHeader,
|
||||
IN EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// This is the platform function that calls all of the listeners desired by the
|
||||
// platform.
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PlatformReportStatusCode (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
IN UINT32 Instance,
|
||||
IN EFI_GUID * CallerId,
|
||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Platform independent function Declarations
|
||||
//
|
||||
//
|
||||
// Initialize the status code listeners and publish the status code PPI.
|
||||
//
|
||||
VOID
|
||||
EFIAPI
|
||||
InitializeMonoStatusCode (
|
||||
IN EFI_FFS_FILE_HEADER *FfsHeader,
|
||||
IN EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Convert a DXE status code call into a PEI status code call.
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
TranslateDxeStatusCodeToPeiStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
IN UINT32 Instance,
|
||||
IN EFI_GUID * CallerId,
|
||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
//
|
||||
// Publish a HOB that contains the listener to be used by DXE.
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeDxeReportStatusCode (
|
||||
IN EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
;
|
||||
|
||||
#endif
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2006, Intel Corporation
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -26,27 +26,29 @@ Abstract:
|
||||
#include "BsDataHubStatusCode.h"
|
||||
|
||||
//
|
||||
// Globals only work at BootService Time. NOT at Runtime!
|
||||
// Initialize FIFO to cache records.
|
||||
//
|
||||
static EFI_DATA_HUB_PROTOCOL *mDataHub;
|
||||
static EFI_LIST_ENTRY *mRecordHead;
|
||||
static EFI_LIST_ENTRY *mRecordTail;
|
||||
static INTN mRecordNum = 0;
|
||||
static EFI_EVENT mLogDataHubEvent;
|
||||
static EFI_LOCK mStatusCodeReportLock = EFI_INITIALIZE_LOCK_VARIABLE(EFI_TPL_HIGH_LEVEL);
|
||||
static BOOLEAN mEventHandlerActive = FALSE;
|
||||
STATIC EFI_LIST_ENTRY mRecordsFifo = INITIALIZE_LIST_HEAD_VARIABLE (mRecordsFifo);
|
||||
STATIC EFI_LIST_ENTRY mRecordsBuffer = INITIALIZE_LIST_HEAD_VARIABLE (mRecordsBuffer);
|
||||
STATIC EFI_EVENT mLogDataHubEvent;
|
||||
STATIC BOOLEAN mEventHandlerActive = FALSE;
|
||||
|
||||
//
|
||||
// Cache data hub protocol.
|
||||
//
|
||||
STATIC EFI_DATA_HUB_PROTOCOL *mDataHubProtocol;
|
||||
|
||||
STATUS_CODE_RECORD_LIST *
|
||||
AllocateRecordBuffer (
|
||||
STATIC
|
||||
DATA_HUB_STATUS_CODE_DATA_RECORD *
|
||||
AcquireRecordBuffer (
|
||||
VOID
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Allocate a new record list node and initialize it.
|
||||
Inserting the node into the list isn't the task of this function.
|
||||
Return one DATAHUB_STATUSCODE_RECORD space.
|
||||
The size of free record pool would be extend, if the pool is empty.
|
||||
|
||||
Arguments:
|
||||
|
||||
@@ -58,32 +60,59 @@ Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
STATUS_CODE_RECORD_LIST *DataBuffer;
|
||||
DATAHUB_STATUSCODE_RECORD *Record;
|
||||
EFI_TPL CurrentTpl;
|
||||
EFI_LIST_ENTRY *Node;
|
||||
UINT32 Index;
|
||||
|
||||
DataBuffer = NULL;
|
||||
Record = NULL;
|
||||
CurrentTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
||||
|
||||
gBS->AllocatePool (EfiBootServicesData, sizeof (STATUS_CODE_RECORD_LIST), &DataBuffer);
|
||||
if (DataBuffer == NULL) {
|
||||
return NULL;
|
||||
if (!IsListEmpty (&mRecordsBuffer)) {
|
||||
Node = GetFirstNode (&mRecordsBuffer);
|
||||
RemoveEntryList (Node);
|
||||
|
||||
Record = _CR (Node, DATAHUB_STATUSCODE_RECORD, Node);
|
||||
} else {
|
||||
if (CurrentTpl > EFI_TPL_NOTIFY) {
|
||||
gBS->RestoreTPL (CurrentTpl);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gBS->RestoreTPL (CurrentTpl);
|
||||
|
||||
gBS->AllocatePool (EfiBootServicesData, sizeof (DATAHUB_STATUSCODE_RECORD) * 16, &Record);
|
||||
if (Record == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
EfiCommonLibZeroMem (Record, sizeof (DATAHUB_STATUSCODE_RECORD) * 16);
|
||||
|
||||
|
||||
CurrentTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
||||
for (Index = 1; Index < 16; Index++) {
|
||||
InsertTailList (&mRecordsBuffer, &Record[Index].Node);
|
||||
}
|
||||
}
|
||||
|
||||
EfiCommonLibZeroMem (DataBuffer, sizeof (STATUS_CODE_RECORD_LIST));
|
||||
DataBuffer->Signature = BS_DATA_HUB_STATUS_CODE_SIGNATURE;
|
||||
Record->Signature = BS_DATA_HUB_STATUS_CODE_SIGNATURE;
|
||||
InsertTailList (&mRecordsFifo, &Record->Node);
|
||||
|
||||
return DataBuffer;
|
||||
gBS->RestoreTPL (CurrentTpl);
|
||||
|
||||
return (DATA_HUB_STATUS_CODE_DATA_RECORD *) (Record->Data);
|
||||
}
|
||||
|
||||
STATIC
|
||||
DATA_HUB_STATUS_CODE_DATA_RECORD *
|
||||
AquireEmptyRecordBuffer (
|
||||
RetrieveRecord (
|
||||
VOID
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Acquire an empty record buffer from the record list if there's free node,
|
||||
or allocate one new node and insert it to the list if the list is full and
|
||||
the function isn't run in EFI_TPL_HIGH_LEVEL.
|
||||
Retrieve one record from Records FIFO. The record would be removed from FIFO and
|
||||
release to free record buffer.
|
||||
|
||||
Arguments:
|
||||
|
||||
@@ -91,111 +120,34 @@ Arguments:
|
||||
|
||||
Returns:
|
||||
|
||||
Pointer to new record buffer. NULL if none available.
|
||||
Point to record which is ready to be logged, or NULL if the FIFO of record is empty.
|
||||
|
||||
--*/
|
||||
--*/
|
||||
{
|
||||
EFI_TPL OldTpl;
|
||||
STATUS_CODE_RECORD_LIST *DataBuffer;
|
||||
DATA_HUB_STATUS_CODE_DATA_RECORD *RecordData;
|
||||
DATAHUB_STATUSCODE_RECORD *Record;
|
||||
EFI_LIST_ENTRY *Node;
|
||||
EFI_TPL CurrentTpl;
|
||||
|
||||
RecordData = NULL;
|
||||
|
||||
CurrentTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
||||
|
||||
DataBuffer = NULL;
|
||||
if (!IsListEmpty (&mRecordsFifo)) {
|
||||
Node = GetFirstNode (&mRecordsFifo);
|
||||
Record = CR (Node, DATAHUB_STATUSCODE_RECORD, Node, BS_DATA_HUB_STATUS_CODE_SIGNATURE);
|
||||
|
||||
//
|
||||
// This function must be reentrant because an event with higher priority may interrupt it
|
||||
// and also report status code.
|
||||
//
|
||||
EfiAcquireLock (&mStatusCodeReportLock);
|
||||
if (mRecordTail != mRecordHead->ForwardLink) {
|
||||
if (mRecordNum != 0) {
|
||||
mRecordHead = mRecordHead->ForwardLink;
|
||||
}
|
||||
DataBuffer = CR (mRecordHead, STATUS_CODE_RECORD_LIST, Link, BS_DATA_HUB_STATUS_CODE_SIGNATURE);
|
||||
mRecordNum++;
|
||||
EfiReleaseLock (&mStatusCodeReportLock);
|
||||
|
||||
//
|
||||
// Initalize the record buffer is the responsibility of the producer,
|
||||
// because the consummer is in a lock so must keep it short.
|
||||
//
|
||||
EfiCommonLibZeroMem (&DataBuffer->RecordBuffer[0], BYTES_PER_BUFFER);
|
||||
} else if (mRecordNum < MAX_RECORD_NUM) {
|
||||
//
|
||||
// The condition of "mRecordNum < MAX_RECORD_NUM" is not promised,
|
||||
// because mRecodeNum may be increased out of this lock.
|
||||
//
|
||||
EfiReleaseLock (&mStatusCodeReportLock);
|
||||
|
||||
//
|
||||
// Can't allocate additional buffer in EFI_TPL_HIGH_LEVEL.
|
||||
// Reporting too many status code in EFI_TPL_HIGH_LEVEL may cause status code lost.
|
||||
//
|
||||
OldTpl = gBS->RaiseTPL (EFI_TPL_HIGH_LEVEL);
|
||||
if (OldTpl == EFI_TPL_HIGH_LEVEL) {
|
||||
return NULL;
|
||||
}
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
DataBuffer = AllocateRecordBuffer ();
|
||||
if (DataBuffer == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
EfiAcquireLock (&mStatusCodeReportLock);
|
||||
InsertHeadList (mRecordHead, &DataBuffer->Link);
|
||||
mRecordHead = mRecordHead->ForwardLink;
|
||||
mRecordNum++;
|
||||
EfiReleaseLock (&mStatusCodeReportLock);
|
||||
} else {
|
||||
EfiReleaseLock (&mStatusCodeReportLock);
|
||||
return NULL;
|
||||
RemoveEntryList (&Record->Node);
|
||||
InsertTailList (&mRecordsBuffer, &Record->Node);
|
||||
Record->Signature = 0;
|
||||
RecordData = (DATA_HUB_STATUS_CODE_DATA_RECORD *) Record->Data;
|
||||
}
|
||||
|
||||
return (DATA_HUB_STATUS_CODE_DATA_RECORD *) DataBuffer->RecordBuffer;
|
||||
gBS->RestoreTPL (CurrentTpl);
|
||||
|
||||
return RecordData;
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
ReleaseRecordBuffer (
|
||||
IN STATUS_CODE_RECORD_LIST *RecordBuffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Release a buffer in the list, remove some nodes to keep the list inital length.
|
||||
|
||||
Arguments:
|
||||
|
||||
RecordBuffer - Buffer to release
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - If DataRecord is valid
|
||||
EFI_UNSUPPORTED - The record list has empty
|
||||
|
||||
--*/
|
||||
{
|
||||
ASSERT (RecordBuffer != NULL);
|
||||
|
||||
//
|
||||
// The consummer needn't to be reentrient and the producer won't do any meaningful thing
|
||||
// when consummer is logging records.
|
||||
//
|
||||
if (mRecordNum <= 0) {
|
||||
return EFI_UNSUPPORTED;
|
||||
} else if (mRecordNum > INITIAL_RECORD_NUM) {
|
||||
mRecordTail = mRecordTail->ForwardLink;
|
||||
RemoveEntryList (&RecordBuffer->Link);
|
||||
mRecordNum--;
|
||||
gBS->FreePool (RecordBuffer);
|
||||
} else {
|
||||
if (mRecordNum != 1) {
|
||||
mRecordTail = mRecordTail->ForwardLink;
|
||||
}
|
||||
mRecordNum--;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
EFI_BOOTSERVICE
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BsDataHubReportStatusCode (
|
||||
@@ -222,31 +174,32 @@ Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
DATA_HUB_STATUS_CODE_DATA_RECORD *DataHub;
|
||||
UINT32 ErrorLevel;
|
||||
VA_LIST Marker;
|
||||
CHAR8 *Format;
|
||||
UINTN Index;
|
||||
CHAR16 FormatBuffer[BYTES_PER_RECORD];
|
||||
|
||||
DataHub = NULL;
|
||||
DATA_HUB_STATUS_CODE_DATA_RECORD *Record;
|
||||
UINT32 ErrorLevel;
|
||||
VA_LIST Marker;
|
||||
CHAR8 *Format;
|
||||
CHAR16 FormatBuffer[BYTES_PER_RECORD];
|
||||
UINTN Index;
|
||||
|
||||
//
|
||||
// See whether in runtime phase or not.
|
||||
//
|
||||
if (EfiAtRuntime ()) {
|
||||
//
|
||||
// For now all we do is post code at runtime
|
||||
//
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
//
|
||||
// If we had an error while in our event handler, then do nothing so
|
||||
// that we don't get in an endless loop.
|
||||
// Discard new DataHubRecord caused by DataHub->LogData()
|
||||
//
|
||||
if (mEventHandlerActive) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
DataHub = (DATA_HUB_STATUS_CODE_DATA_RECORD *) AquireEmptyRecordBuffer ();
|
||||
if (DataHub == NULL) {
|
||||
Record = AcquireRecordBuffer ();
|
||||
if (Record == NULL) {
|
||||
//
|
||||
// There are no empty record buffer in private buffers
|
||||
//
|
||||
@@ -255,24 +208,15 @@ Returns:
|
||||
//
|
||||
// Construct Data Hub Extended Data
|
||||
//
|
||||
DataHub->CodeType = CodeType;
|
||||
DataHub->Value = Value;
|
||||
DataHub->Instance = Instance;
|
||||
Record->CodeType = CodeType;
|
||||
Record->Value = Value;
|
||||
Record->Instance = Instance;
|
||||
|
||||
if (CallerId != NULL) {
|
||||
EfiCopyMem (&DataHub->CallerId, CallerId, sizeof (EFI_GUID));
|
||||
} else {
|
||||
EfiZeroMem (&DataHub->CallerId, sizeof (EFI_GUID));
|
||||
EfiCopyMem (&Record->CallerId, CallerId, sizeof (EFI_GUID));
|
||||
}
|
||||
|
||||
if (Data == NULL) {
|
||||
EfiZeroMem (&DataHub->Data, sizeof (EFI_STATUS_CODE_DATA));
|
||||
} else {
|
||||
//
|
||||
// Copy generic Header
|
||||
//
|
||||
EfiCopyMem (&DataHub->Data, Data, sizeof (EFI_STATUS_CODE_DATA));
|
||||
|
||||
if (Data != NULL) {
|
||||
if (ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {
|
||||
//
|
||||
// Convert Ascii Format string to Unicode.
|
||||
@@ -287,26 +231,25 @@ Returns:
|
||||
// Put processed string into the buffer
|
||||
//
|
||||
Index = VSPrint (
|
||||
(UINT16 *) (DataHub + 1),
|
||||
(CHAR16 *) (Record + 1),
|
||||
BYTES_PER_RECORD - (sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD)),
|
||||
FormatBuffer,
|
||||
Marker
|
||||
);
|
||||
|
||||
//
|
||||
// DATA_HUB_STATUS_CODE_DATA_RECORD followed by VSPrint String Buffer
|
||||
//
|
||||
DataHub->Data.Size = (UINT16) (Index * sizeof (CHAR16));
|
||||
|
||||
|
||||
EfiCopyMem (&Record->Data.Type, &gEfiStatusCodeDataTypeDebugGuid, sizeof (EFI_GUID));
|
||||
Record->Data.HeaderSize = Data->HeaderSize;
|
||||
Record->Data.Size = (UINT16) (Index * sizeof (CHAR16));
|
||||
} else {
|
||||
//
|
||||
// Default behavior is to copy optional data
|
||||
// Copy status code data header
|
||||
//
|
||||
if (Data->Size > (BYTES_PER_RECORD - sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD))) {
|
||||
DataHub->Data.Size = (UINT16) (BYTES_PER_RECORD - sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD));
|
||||
}
|
||||
EfiCopyMem (&Record->Data, Data, sizeof (EFI_STATUS_CODE_DATA));
|
||||
|
||||
EfiCopyMem (DataHub + 1, Data + 1, DataHub->Data.Size);
|
||||
if (Data->Size > BYTES_PER_RECORD - sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD)) {
|
||||
Record->Data.Size = (UINT16) (BYTES_PER_RECORD - sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD));
|
||||
}
|
||||
EfiCopyMem ((VOID *) (Record + 1), Data + 1, Record->Data.Size);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,39 +282,34 @@ Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
DATA_HUB_STATUS_CODE_DATA_RECORD *DataRecord;
|
||||
UINTN Size;
|
||||
DATA_HUB_STATUS_CODE_DATA_RECORD *Record;
|
||||
UINT32 Size;
|
||||
UINT64 DataRecordClass;
|
||||
EFI_LIST_ENTRY *Link;
|
||||
STATUS_CODE_RECORD_LIST *BufferEntry;
|
||||
|
||||
//
|
||||
// Set our global flag so we don't recurse if we get an error here.
|
||||
// Set global flag so we don't recurse if DataHub->LogData eventually causes new DataHubRecord
|
||||
//
|
||||
mEventHandlerActive = TRUE;
|
||||
|
||||
//
|
||||
// Log DataRecord in Data Hub.
|
||||
// If there are multiple DataRecords, Log all of them.
|
||||
// Journal records fifo to find all record entry.
|
||||
//
|
||||
Link = mRecordTail;
|
||||
|
||||
while (mRecordNum != 0) {
|
||||
BufferEntry = CR (Link, STATUS_CODE_RECORD_LIST, Link, BS_DATA_HUB_STATUS_CODE_SIGNATURE);
|
||||
DataRecord = (DATA_HUB_STATUS_CODE_DATA_RECORD *) (BufferEntry->RecordBuffer);
|
||||
Link = Link->ForwardLink;
|
||||
|
||||
while (1) {
|
||||
Record = RetrieveRecord ();
|
||||
if (Record == NULL) {
|
||||
break;
|
||||
}
|
||||
//
|
||||
// Add in the size of the header we added.
|
||||
//
|
||||
Size = sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD) + DataRecord->Data.Size;
|
||||
Size = sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD) + (UINT32) Record->Data.Size;
|
||||
|
||||
if ((DataRecord->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
|
||||
if ((Record->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
|
||||
DataRecordClass = EFI_DATA_RECORD_CLASS_PROGRESS_CODE;
|
||||
} else if ((DataRecord->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {
|
||||
} else if ((Record->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {
|
||||
DataRecordClass = EFI_DATA_RECORD_CLASS_ERROR;
|
||||
} else if ((DataRecord->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) {
|
||||
} else if ((Record->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) {
|
||||
DataRecordClass = EFI_DATA_RECORD_CLASS_DEBUG;
|
||||
} else {
|
||||
//
|
||||
@@ -383,45 +321,27 @@ Returns:
|
||||
EFI_DATA_RECORD_CLASS_PROGRESS_CODE;
|
||||
}
|
||||
|
||||
if (((DataRecord->Instance & EFI_D_ERROR) != 0) &&
|
||||
(((DataRecord->Instance & EFI_D_POOL) != 0) || ((DataRecord->Instance & EFI_D_PAGE) != 0))
|
||||
) {
|
||||
//
|
||||
// If memory error, do not call LogData ().
|
||||
//
|
||||
ErrorPrint (L"ERROR", "Memory Error\n");
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
} else {
|
||||
//
|
||||
// We don't log EFI_D_POOL and EFI_D_PAGE debug info to datahub
|
||||
// to avoid recursive logging due to the memory allocation in datahub
|
||||
//
|
||||
if (DataRecordClass != EFI_DATA_RECORD_CLASS_DEBUG ||
|
||||
((DataRecord->Instance & EFI_D_POOL) == 0 && (DataRecord->Instance & EFI_D_PAGE) == 0)) {
|
||||
//
|
||||
// Log DataRecord in Data Hub
|
||||
//
|
||||
Status = mDataHub->LogData (
|
||||
mDataHub,
|
||||
&gEfiStatusCodeGuid,
|
||||
&gEfiStatusCodeRuntimeProtocolGuid,
|
||||
DataRecordClass,
|
||||
DataRecord,
|
||||
(UINT32) Size
|
||||
);
|
||||
}
|
||||
}
|
||||
//
|
||||
// Log DataRecord in Data Hub
|
||||
//
|
||||
|
||||
mDataHubProtocol->LogData (
|
||||
mDataHubProtocol,
|
||||
&gEfiStatusCodeGuid,
|
||||
&gEfiStatusCodeRuntimeProtocolGuid,
|
||||
DataRecordClass,
|
||||
Record,
|
||||
Size
|
||||
);
|
||||
|
||||
ReleaseRecordBuffer (BufferEntry);
|
||||
}
|
||||
|
||||
mEventHandlerActive = FALSE;
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
EFI_BOOTSERVICE
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BsDataHubInitializeStatusCode (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
@@ -444,38 +364,14 @@ Returns:
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
STATUS_CODE_RECORD_LIST *DataBuffer;
|
||||
UINTN Index1;
|
||||
|
||||
DataBuffer = NULL;
|
||||
|
||||
Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &mDataHub);
|
||||
//
|
||||
// Should never fail due to dependency grammer
|
||||
//
|
||||
Status = gBS->LocateProtocol (
|
||||
&gEfiDataHubProtocolGuid,
|
||||
NULL,
|
||||
(VOID **) &mDataHubProtocol
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
//
|
||||
// Initialize a record list with length not greater than INITIAL_RECORD_NUM.
|
||||
// If no buffer can be allocated, return EFI_OUT_OF_RESOURCES.
|
||||
//
|
||||
DataBuffer = AllocateRecordBuffer ();
|
||||
if (DataBuffer == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
mRecordHead = &DataBuffer->Link;
|
||||
mRecordTail = mRecordHead;
|
||||
InitializeListHead (mRecordHead);
|
||||
|
||||
for (Index1 = 1; Index1 < INITIAL_RECORD_NUM; Index1++) {
|
||||
DataBuffer = AllocateRecordBuffer ();
|
||||
if (DataBuffer == NULL) {
|
||||
break;
|
||||
}
|
||||
InsertHeadList (mRecordHead, &DataBuffer->Link);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Create a Notify Event to log data in Data Hub
|
||||
//
|
||||
@@ -487,5 +383,9 @@ Returns:
|
||||
&mLogDataHubEvent
|
||||
);
|
||||
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2006, Intel Corporation
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -52,7 +52,6 @@ Abstract:
|
||||
// Private data declarations
|
||||
//
|
||||
#define MAX_RECORD_NUM 1000
|
||||
#define INITIAL_RECORD_NUM 20
|
||||
#define BYTES_PER_RECORD EFI_STATUS_CODE_DATA_MAX_SIZE
|
||||
#define BYTES_PER_BUFFER (BYTES_PER_RECORD * sizeof (UINT8))
|
||||
|
||||
@@ -60,77 +59,63 @@ Abstract:
|
||||
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
EFI_LIST_ENTRY Link;
|
||||
UINT8 RecordBuffer[BYTES_PER_RECORD];
|
||||
} STATUS_CODE_RECORD_LIST;
|
||||
EFI_LIST_ENTRY Node;
|
||||
UINT8 Data[BYTES_PER_RECORD];
|
||||
} DATAHUB_STATUSCODE_RECORD;
|
||||
|
||||
//
|
||||
// Function prototypes
|
||||
//
|
||||
STATUS_CODE_RECORD_LIST *
|
||||
AllocateRecordBuffer (
|
||||
VOID
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BsDataHubInitializeStatusCode (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
);
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Allocate a new record list node and initialize it.
|
||||
Inserting the node into the list isn't the task of this function.
|
||||
Install a data hub listener.
|
||||
|
||||
Arguments:
|
||||
|
||||
None
|
||||
(Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
|
||||
|
||||
Returns:
|
||||
|
||||
A pointer to the new allocated node or NULL if non available
|
||||
|
||||
--*/
|
||||
|
||||
DATA_HUB_STATUS_CODE_DATA_RECORD *
|
||||
AquireEmptyRecordBuffer (
|
||||
VOID
|
||||
);
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Acquire an empty record buffer from the record list if there's free node,
|
||||
or allocate one new node and insert it to the list if the list is full and
|
||||
the function isn't run in EFI_TPL_HIGH_LEVEL.
|
||||
|
||||
Arguments:
|
||||
|
||||
None
|
||||
|
||||
Returns:
|
||||
|
||||
Pointer to new record buffer. NULL if none available.
|
||||
EFI_SUCCESS - Logging Hub protocol installed
|
||||
Other - No protocol installed, unload driver.
|
||||
|
||||
--*/
|
||||
|
||||
EFI_STATUS
|
||||
ReleaseRecordBuffer (
|
||||
IN STATUS_CODE_RECORD_LIST *RecordBuffer
|
||||
EFIAPI
|
||||
BsDataHubReportStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
IN UINT32 Instance,
|
||||
IN EFI_GUID * CallerId,
|
||||
IN EFI_STATUS_CODE_DATA * Data OPTIONAL
|
||||
);
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Release a buffer in the list, remove some nodes to keep the list inital length.
|
||||
Boot service report status code listener. This function logs the status code
|
||||
into the data hub.
|
||||
|
||||
Arguments:
|
||||
|
||||
RecordBuffer - Buffer to release
|
||||
Same as gRT->ReportStatusCode (See Tiano Runtime Specification)
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - If DataRecord is valid
|
||||
EFI_UNSUPPORTED - The record list has empty
|
||||
None
|
||||
|
||||
--*/
|
||||
|
||||
void
|
||||
VOID
|
||||
EFIAPI
|
||||
LogDataHubEventHandler (
|
||||
IN EFI_EVENT Event,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2005, Intel Corporation
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -2095,6 +2095,7 @@ Returns:
|
||||
#endif
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
BsSerialInitializeStatusCode (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
@@ -2189,6 +2190,9 @@ Returns:
|
||||
} while ((Data & LSR_TXRDY) == 0);
|
||||
|
||||
IoWrite8 (gComBase, Character);
|
||||
#ifdef SERIAL_OUTPUT_STALL
|
||||
EfiStall (SERIAL_OUTPUT_STALL);
|
||||
#endif
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2005, Intel Corporation
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -31,6 +31,7 @@ Abstract:
|
||||
// Initialization function
|
||||
//
|
||||
VOID
|
||||
EFIAPI
|
||||
BsDataHubInitializeStatusCode (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
@@ -41,6 +42,7 @@ BsDataHubInitializeStatusCode (
|
||||
// Status code reporting function
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BsDataHubReportStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2005, Intel Corporation
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -31,6 +31,7 @@ Abstract:
|
||||
// Initialization function
|
||||
//
|
||||
VOID
|
||||
EFIAPI
|
||||
BsSerialInitializeStatusCode (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
@@ -41,6 +42,7 @@ BsSerialInitializeStatusCode (
|
||||
// Status code reporting function
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
BsSerialReportStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2005, Intel Corporation
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -31,6 +31,7 @@ Abstract:
|
||||
// Initialization function
|
||||
//
|
||||
VOID
|
||||
EFIAPI
|
||||
RtMemoryInitializeStatusCode (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
@@ -41,6 +42,7 @@ RtMemoryInitializeStatusCode (
|
||||
// Status code reporting function
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RtMemoryReportStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
@@ -55,7 +57,7 @@ RtMemoryReportStatusCode (
|
||||
//
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(*PLATFORM_REPORT_STATUS_CODE) (
|
||||
(EFIAPI *PLATFORM_REPORT_STATUS_CODE) (
|
||||
IN EFI_STATUS_CODE_TYPE Type,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
IN UINT32 Instance,
|
||||
@@ -64,6 +66,7 @@ EFI_STATUS
|
||||
);
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
PlaybackStatusCodes (
|
||||
IN PLATFORM_REPORT_STATUS_CODE ReportStatusCode
|
||||
)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2005, Intel Corporation
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -32,6 +32,7 @@ Abstract:
|
||||
// Initialization function
|
||||
//
|
||||
VOID
|
||||
EFIAPI
|
||||
RtPlatformInitializeStatusCode (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
@@ -42,6 +43,7 @@ RtPlatformInitializeStatusCode (
|
||||
// Status code reporting function
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RtPlatformReportStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2005, Intel Corporation
|
||||
Copyright (c) 2004 - 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
|
||||
@@ -31,6 +31,7 @@ Abstract:
|
||||
// Status code reporting function
|
||||
//
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RtPort80ReportStatusCode (
|
||||
IN EFI_STATUS_CODE_TYPE CodeType,
|
||||
IN EFI_STATUS_CODE_VALUE Value,
|
||||
|
@@ -0,0 +1,53 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
EdkNt32PpiLib.inf
|
||||
|
||||
Abstract:
|
||||
|
||||
Component description file for the Edk Nt32 PPI library.
|
||||
|
||||
--*/
|
||||
|
||||
[defines]
|
||||
BASE_NAME= EdkNt32PpiLib
|
||||
COMPONENT_TYPE= LIBRARY
|
||||
|
||||
[includes.common]
|
||||
$(EDK_SOURCE)\Sample\Platform\Nt32
|
||||
$(EDK_SOURCE)\Foundation\Efi
|
||||
$(EDK_SOURCE)\Foundation\Include
|
||||
$(EDK_SOURCE)\Foundation\Efi\Include
|
||||
$(EDK_SOURCE)\Foundation\Framework\Include
|
||||
$(EDK_SOURCE)\Foundation\Include\IndustryStandard
|
||||
$(EDK_SOURCE)\Foundation\Include\Pei
|
||||
$(EDK_SOURCE)\Foundation\Library\Pei\Include
|
||||
$(EDK_SOURCE)\Foundation\Core\Dxe
|
||||
$(EDK_SOURCE)\Foundation\Library\Dxe\Include
|
||||
$(EDK_SOURCE)\Foundation\Framework
|
||||
|
||||
[nmake.common]
|
||||
C_STD_INCLUDE=
|
||||
|
||||
[sources.common]
|
||||
NtAutoscan\NtAutoscan.h
|
||||
NtAutoscan\NtAutoscan.c
|
||||
NtFwh\NtFwh.h
|
||||
NtFwh\NtFwh.c
|
||||
NtLoadAsDll\NtLoadAsDll.h
|
||||
NtLoadAsDll\NtLoadAsDll.c
|
||||
NtPeiLoadFile\NtPeiLoadFile.h
|
||||
NtPeiLoadFile\NtPeiLoadFile.c
|
||||
NtThunk\NtThunk.h
|
||||
NtThunk\NtThunk.c
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
NtAutoscan.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Abstraction for the NT Load Image PPI GUID as defined in Tiano
|
||||
|
||||
--*/
|
||||
|
||||
#include "Tiano.h"
|
||||
#include "PeiBind.h"
|
||||
#include "PeiApi.h"
|
||||
#include EFI_PPI_DEFINITION (NtAutoScan)
|
||||
|
||||
EFI_GUID gPeiNtAutoScanPpiGuid = PEI_NT_AUTOSCAN_PPI_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gPeiNtAutoScanPpiGuid, "NtAutoScan", "NT PEI AUTOSCAN PPI");
|
@@ -0,0 +1,67 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
NtAutoscan.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Nt Autoscan PPI
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _NT_PEI_AUTOSCAN_H_
|
||||
#define _NT_PEI_AUTOSCAN_H_
|
||||
|
||||
#include "Tiano.h"
|
||||
#include "PeiHob.h"
|
||||
|
||||
#define PEI_NT_AUTOSCAN_PPI_GUID \
|
||||
{ \
|
||||
0xdce384d, 0x7c, 0x4ba5, 0x94, 0xbd, 0xf, 0x6e, 0xb6, 0x4d, 0x2a, 0xa9 \
|
||||
}
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *PEI_NT_AUTOSCAN) (
|
||||
IN UINTN Index,
|
||||
OUT EFI_PHYSICAL_ADDRESS * MemoryBase,
|
||||
OUT UINT64 *MemorySize
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
This service is called from Index == 0 until it returns EFI_UNSUPPORTED.
|
||||
It allows discontiguous memory regions to be supported by the emulator.
|
||||
It uses gSystemMemory[] and gSystemMemoryCount that were created by
|
||||
parsing the Windows environment variable EFI_MEMORY_SIZE.
|
||||
The size comes from the varaible and the address comes from the call to
|
||||
WinNtOpenFile.
|
||||
|
||||
Arguments:
|
||||
Index - Which memory region to use
|
||||
MemoryBase - Return Base address of memory region
|
||||
MemorySize - Return size in bytes of the memory region
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - If memory region was mapped
|
||||
EFI_UNSUPPORTED - If Index is not supported
|
||||
|
||||
--*/
|
||||
typedef struct {
|
||||
PEI_NT_AUTOSCAN NtAutoScan;
|
||||
} PEI_NT_AUTOSCAN_PPI;
|
||||
|
||||
extern EFI_GUID gPeiNtAutoScanPpiGuid;
|
||||
|
||||
#endif
|
29
EdkCompatibilityPkg/Sample/Platform/Nt32/Ppi/NtFwh/NtFwh.c
Normal file
29
EdkCompatibilityPkg/Sample/Platform/Nt32/Ppi/NtFwh/NtFwh.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
NtFwh.c
|
||||
|
||||
Abstract:
|
||||
|
||||
NT FWH Information PPI GUID as defined in Tiano
|
||||
|
||||
--*/
|
||||
|
||||
#include "Tiano.h"
|
||||
#include "PeiBind.h"
|
||||
#include "PeiApi.h"
|
||||
#include EFI_PPI_DEFINITION (NtFwh)
|
||||
|
||||
EFI_GUID gNtFwhPpiGuid = NT_FWH_PPI_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gNtFwhPpiGuid, "NtFwh", "NT PEI FWH INFO PPI");
|
63
EdkCompatibilityPkg/Sample/Platform/Nt32/Ppi/NtFwh/NtFwh.h
Normal file
63
EdkCompatibilityPkg/Sample/Platform/Nt32/Ppi/NtFwh/NtFwh.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
NtFwh.h
|
||||
|
||||
Abstract:
|
||||
|
||||
WinNt FWH PPI as defined in Tiano
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _NT_PEI_FWH_H_
|
||||
#define _NT_PEI_FWH_H_
|
||||
|
||||
#include "Tiano.h"
|
||||
#include "PeiHob.h"
|
||||
|
||||
#define NT_FWH_PPI_GUID \
|
||||
{ \
|
||||
0x4e76928f, 0x50ad, 0x4334, 0xb0, 0x6b, 0xa8, 0x42, 0x13, 0x10, 0x8a, 0x57 \
|
||||
}
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *NT_FWH_INFORMATION) (
|
||||
IN UINTN Index,
|
||||
IN OUT EFI_PHYSICAL_ADDRESS * FdBase,
|
||||
IN OUT UINT64 *FdSize
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Return the FD Size and base address. Since the FD is loaded from a
|
||||
file into Windows memory only the SEC will know it's address.
|
||||
|
||||
Arguments:
|
||||
Index - Which FD, starts at zero.
|
||||
FdSize - Size of the FD in bytes
|
||||
FdBase - Start address of the FD. Assume it points to an FV Header
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Return the Base address and size of the FV
|
||||
EFI_UNSUPPORTED - Index does nto map to an FD in the system
|
||||
|
||||
--*/
|
||||
typedef struct {
|
||||
NT_FWH_INFORMATION NtFwh;
|
||||
} NT_FWH_PPI;
|
||||
|
||||
extern EFI_GUID gNtFwhPpiGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,28 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
NtLoadAsDll.c
|
||||
|
||||
Abstract:
|
||||
|
||||
DXE Initial Program Load PPI GUID as defined in Tiano
|
||||
|
||||
--*/
|
||||
|
||||
#include "Tiano.h"
|
||||
#include "Pei.h"
|
||||
#include EFI_PPI_DEFINITION (NtLoadAsDll)
|
||||
|
||||
EFI_GUID gEfiNtLoadAsDllPpiGuid = EFI_NT_LOAD_AS_DLL_PPI_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiNtLoadAsDllPpiGuid, "NtLoadAsDll", "NT LOAD AS DLL PPI");
|
@@ -0,0 +1,84 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
NtLoadAsDll.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Nt service Ppi that is used to load PE32s in the NT emulation environment.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _NT_LOAD_AS_DLL_H_
|
||||
#define _NT_LOAD_AS_DLL_H_
|
||||
|
||||
#include "Tiano.h"
|
||||
|
||||
#define EFI_NT_LOAD_AS_DLL_PPI_GUID \
|
||||
{ \
|
||||
0xccc53f6b, 0xa03a, 0x4ed8, 0x83, 0x9a, 0x3, 0xd9, 0x9c, 0x2, 0xb4, 0xe3 \
|
||||
}
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_NT_LOAD_AS_DLL) (
|
||||
IN CHAR8 *PdbFileName,
|
||||
IN VOID **ImageEntryPoint,
|
||||
OUT VOID **ModHandle
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Loads the .DLL file is present when a PE/COFF file is loaded. This provides source level
|
||||
debugging for drivers that have cooresponding .DLL files on the local system.
|
||||
|
||||
Arguments:
|
||||
PdbFileName - The name of the .PDB file. This was found from the PE/COFF
|
||||
file's debug directory entry.
|
||||
ImageEntryPoint - A pointer to the DLL entry point of the .DLL file was loaded.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The .DLL file was loaded, and the DLL entry point is returned in ImageEntryPoint
|
||||
EFI_NOT_FOUND - The .DLL file could not be found
|
||||
EFI_UNSUPPORTED - The .DLL file was loaded, but the entry point to the .DLL file could not
|
||||
determined.
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_NT_FREE_LIBRARY) (
|
||||
IN VOID *ModHandle
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Free resources allocated by Entry (). ModHandle was returned by
|
||||
Entry ().
|
||||
|
||||
Arguments:
|
||||
MohHandle - Handle of the resources to free to undo the work.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS -
|
||||
|
||||
--*/
|
||||
typedef struct {
|
||||
EFI_NT_LOAD_AS_DLL Entry;
|
||||
EFI_NT_FREE_LIBRARY FreeLibrary;
|
||||
} EFI_NT_LOAD_AS_DLL_PPI;
|
||||
|
||||
extern EFI_GUID gEfiNtLoadAsDllPpiGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
NtPeiLoadFile.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Abstraction for the NT Load Image PPI GUID as defined in Tiano
|
||||
|
||||
--*/
|
||||
|
||||
#include "Tiano.h"
|
||||
#include "PeiBind.h"
|
||||
#include "PeiApi.h"
|
||||
#include EFI_PPI_DEFINITION (NtPeiLoadFile)
|
||||
|
||||
EFI_GUID gNtPeiLoadFileGuid = NT_PEI_LOAD_FILE_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gNtPeiLoadFileGuid, "NtPeiLoadFile", "NT PEI LOAD FILE PPI");
|
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
NtPeiLoadFile.h
|
||||
|
||||
Abstract:
|
||||
|
||||
WinNt Load File PPI.
|
||||
|
||||
When the PEI core is done it calls the DXE IPL via PPI
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _NT_PEI_LOAD_FILE_H_
|
||||
#define _NT_PEI_LOAD_FILE_H_
|
||||
|
||||
#include "Tiano.h"
|
||||
#include "PeiHob.h"
|
||||
|
||||
#define NT_PEI_LOAD_FILE_GUID \
|
||||
{ \
|
||||
0xfd0c65eb, 0x405, 0x4cd2, 0x8a, 0xee, 0xf4, 0x0, 0xef, 0x13, 0xba, 0xc2 \
|
||||
}
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *NT_PEI_LOAD_FILE) (
|
||||
VOID *Pe32Data,
|
||||
EFI_PHYSICAL_ADDRESS *ImageAddress,
|
||||
UINT64 *ImageSize,
|
||||
EFI_PHYSICAL_ADDRESS *EntryPoint
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Loads and relocates a PE/COFF image into memory.
|
||||
|
||||
Arguments:
|
||||
Pe32Data - The base address of the PE/COFF file that is to be loaded and relocated
|
||||
ImageAddress - The base address of the relocated PE/COFF image
|
||||
ImageSize - The size of the relocated PE/COFF image
|
||||
EntryPoint - The entry point of the relocated PE/COFF image
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The file was loaded and relocated
|
||||
EFI_OUT_OF_RESOURCES - There was not enough memory to load and relocate the PE/COFF file
|
||||
|
||||
--*/
|
||||
typedef struct {
|
||||
NT_PEI_LOAD_FILE PeiLoadFileService;
|
||||
} NT_PEI_LOAD_FILE_PPI;
|
||||
|
||||
extern EFI_GUID gNtPeiLoadFileGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
NtThunk.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Abstraction for the NT Thunk PPI
|
||||
|
||||
--*/
|
||||
|
||||
#include "Tiano.h"
|
||||
#include "PeiBind.h"
|
||||
#include "PeiApi.h"
|
||||
#include EFI_PPI_DEFINITION (NtThunk)
|
||||
|
||||
EFI_GUID gPeiNtThunkPpiGuid = PEI_NT_THUNK_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gPeiNtThunkPpiGuid, "NtThunk", "NT PEI WINNT THUNK PPI");
|
@@ -0,0 +1,59 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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:
|
||||
|
||||
NtThunk.h
|
||||
|
||||
Abstract:
|
||||
|
||||
WinNt Thunk interface PPI
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _NT_PEI_WIN_NT_THUNK_H_
|
||||
#define _NT_PEI_WIN_NT_THUNK_H_
|
||||
|
||||
#include "Tiano.h"
|
||||
#include "PeiHob.h"
|
||||
|
||||
#define PEI_NT_THUNK_GUID \
|
||||
{ \
|
||||
0x98c281e5, 0xf906, 0x43dd, 0xa9, 0x2b, 0xb0, 0x3, 0xbf, 0x27, 0x65, 0xda \
|
||||
}
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *PEI_NT_THUNK_INTERFACE) (
|
||||
IN OUT UINT64 *InterfaceSize,
|
||||
IN OUT EFI_PHYSICAL_ADDRESS * InterfaceBase
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Export of EFI_WIN_NT_THUNK_PROTOCOL from the Windows SEC.
|
||||
|
||||
Arguments:
|
||||
InterfaceSize - sizeof (EFI_WIN_NT_THUNK_PROTOCOL);
|
||||
InterfaceBase - Address of the EFI_WIN_NT_THUNK_PROTOCOL
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Data returned
|
||||
|
||||
--*/
|
||||
typedef struct {
|
||||
PEI_NT_THUNK_INTERFACE NtThunk;
|
||||
} PEI_NT_THUNK_PPI;
|
||||
|
||||
extern EFI_GUID gPeiNtThunkPpiGuid;
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user