summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2013-04-18 17:19:36 +0100
committerRyan Harkin <ryan.harkin@linaro.org>2013-04-18 17:19:36 +0100
commit09259ca7b67143923d74f521a4f9b115489083cc (patch)
treece2dc3fb377cd4c59b485a8a7c1d1660c63a2edb
parent5b5852f667ba046ead4fd5029b25bff08eac0a94 (diff)
parent4cbfd417d24602d2d9c05cc5693a6e6087d1c96d (diff)
Merge branch 'linaro-release' of git://git.linaro.org/arm/uefi/uefi-nextlinaro-uefi-2013.04
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rw-r--r--ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.c5
-rw-r--r--BaseTools/Source/Python/AutoGen/UniClassObject.py8
-rw-r--r--BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py7
-rw-r--r--BaseTools/Source/Python/UPT/Library/GlobalData.py5
-rw-r--r--BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py26
-rw-r--r--BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py143
-rw-r--r--BaseTools/Source/Python/UPT/Parser/InfLibrarySectionParser.py21
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py14
-rwxr-xr-xBaseTools/Source/Python/build/BuildReport.py3
-rw-r--r--EdkShellBinPkg/Bin/Ia32/Apps/Devices.efibin23840 -> 23968 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ia32/Apps/Devtree.efibin23712 -> 23840 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ia32/Apps/LoadPciRom.efibin21856 -> 21952 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/Dblk.efibin83552 -> 83552 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/Devices.efibin74240 -> 74720 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/Devtree.efibin76320 -> 76768 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/Guid.efibin64032 -> 64032 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/IfConfig.efibin86144 -> 86176 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/IpConfig.efibin71456 -> 71456 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/LoadPciRom.efibin71104 -> 71456 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/Mount.efibin65888 -> 65888 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/Openinfo.efibin70464 -> 70464 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/Ping.efibin76448 -> 76448 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/SmbiosView.efibin215264 -> 215264 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/TelnetMgmt.efibin63232 -> 63232 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/comp.efibin68320 -> 68320 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/dmem.efibin80704 -> 80704 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/dmpstore.efibin77440 -> 77440 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/edit.efibin124384 -> 124384 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/eficompress.efibin93344 -> 93344 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/efidecompress.efibin66976 -> 66976 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/err.efibin81504 -> 81536 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/hexedit.efibin139552 -> 139552 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/mem.efibin80768 -> 80768 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/memmap.efibin66272 -> 66272 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/mm.efibin87040 -> 87040 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/mode.efibin64704 -> 64704 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/pci.efibin141568 -> 141568 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/sermode.efibin70496 -> 70496 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/stall.efibin65696 -> 65696 bytes
-rw-r--r--EdkShellBinPkg/Bin/Ipf/Apps/timezone.efibin73216 -> 73216 bytes
-rw-r--r--EdkShellBinPkg/Bin/X64/Apps/Devices.efibin30240 -> 30368 bytes
-rw-r--r--EdkShellBinPkg/Bin/X64/Apps/Devtree.efibin30112 -> 30240 bytes
-rw-r--r--EdkShellBinPkg/Bin/X64/Apps/LoadPciRom.efibin27904 -> 28000 bytes
-rw-r--r--EdkShellBinPkg/ReadMe.txt4
-rw-r--r--FatPkg/FatPei/FatLiteAccess.c4
-rw-r--r--FatPkg/FatPei/FatLiteLib.c11
-rw-r--r--IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c9
-rw-r--r--IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h18
-rw-r--r--IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c16
-rw-r--r--IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h26
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c49
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c207
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h26
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c11
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c4
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c12
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c8
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h11
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c6
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c24
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c8
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c3
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h4
-rw-r--r--MdeModulePkg/Core/Dxe/Mem/Page.c30
-rw-r--r--MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c40
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Expression.c4
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c1
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c155
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Ui.c70
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Ui.h20
-rw-r--r--MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c9
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c5
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c30
-rw-r--r--MdePkg/Include/Guid/Cper.h3
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c4
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h4
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6ConfigNv.c13
-rw-r--r--OvmfPkg/README1
-rwxr-xr-xOvmfPkg/create-release.py1
-rw-r--r--SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c5
-rw-r--r--SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmmRuntimeDxe.c30
-rw-r--r--ShellPkg/Library/UefiDpLib/Dp.c2
-rw-r--r--ShellPkg/Library/UefiDpLib/PerformanceTokens.h28
-rw-r--r--ShellPkg/Library/UefiDpLib/UefiDpLib.inf2
-rw-r--r--SourceLevelDebugPkg/Readme.txt2
-rw-r--r--SourceLevelDebugPkg/SourceLevelDebugPkg.dsc8
86 files changed, 652 insertions, 508 deletions
diff --git a/ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.c b/ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.c
index 8d9530cee..2bf2d8107 100644
--- a/ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.c
+++ b/ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.c
@@ -48,9 +48,6 @@ ArmCpuSetup (
// If MPCore then Enable the SCU
if (ArmIsMpCore()) {
- // Signals the Cortex-A9 processor is taking part in coherency
- ArmSetAuxCrBit (A9_FEATURE_SMP);
-
ArmEnableScu ();
}
}
@@ -63,6 +60,8 @@ ArmCpuSetupSmpNonSecure (
{
INTN ScuBase;
+ ArmSetAuxCrBit (A9_FEATURE_SMP);
+
// Make the SCU accessible in Non Secure world
if (IS_PRIMARY_CORE(MpId)) {
ScuBase = ArmGetScuBaseAddress();
diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py
index 498168320..7b1ce72ea 100644
--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
+++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
@@ -38,6 +38,9 @@ LF = u'\u000A'
NULL = u'\u0000'
TAB = u'\t'
BACK_SPLASH = u'\\'
+DOBULE_QUOTED_SPLASH = u'\\"'
+SIGLE_QUOTED_SPLASH = u"\\'"
+TAB_BACK_SLASH = u"\\/"
gIncludePattern = re.compile("^#include +[\"<]+([^\"< >]+)[>\"]+$", re.MULTILINE | re.UNICODE)
@@ -346,7 +349,10 @@ class UniFileClassObject(object):
Line = Line.replace(u'''\"''', u'''"''')
Line = Line.replace(u'\t', u' ')
Line = Line.replace(u'\u0006', u'\\')
-
+ Line = Line.replace(DOBULE_QUOTED_SPLASH, u'"')
+ Line = Line.replace(SIGLE_QUOTED_SPLASH, u"'")
+ Line = Line.replace(TAB_BACK_SLASH, u"/")
+
# if Line.find(u'\\x'):
# hex = Line[Line.find(u'\\x') + 2 : Line.find(u'\\x') + 6]
# hex = "u'\\u" + hex + "'"
diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
index 2d32f0576..2fa4cb8c0 100644
--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
@@ -364,6 +364,7 @@ class GenFdsGlobalVariable:
for SecAlign in InputAlign:
Cmd += ["--sectionalign", SecAlign]
+ CommandFile = Output + '.txt'
if Ui not in [None, '']:
#Cmd += ["-n", '"' + Ui + '"']
SectionData = array.array('B', [0,0,0,0])
@@ -378,12 +379,16 @@ class GenFdsGlobalVariable:
if BuildNumber:
Cmd += ["-j", BuildNumber]
Cmd += ["-o", Output]
+
+ SaveFileOnChange(CommandFile, ' '.join(Cmd), False)
+ if not GenFdsGlobalVariable.NeedsUpdate(Output, list(Input) + [CommandFile]):
+ return
+
GenFdsGlobalVariable.CallExternalTool(Cmd, "Failed to generate section")
else:
Cmd += ["-o", Output]
Cmd += Input
- CommandFile = Output + '.txt'
SaveFileOnChange(CommandFile, ' '.join(Cmd), False)
if not GenFdsGlobalVariable.NeedsUpdate(Output, list(Input) + [CommandFile]):
return
diff --git a/BaseTools/Source/Python/UPT/Library/GlobalData.py b/BaseTools/Source/Python/UPT/Library/GlobalData.py
index fedd98152..3f72f2273 100644
--- a/BaseTools/Source/Python/UPT/Library/GlobalData.py
+++ b/BaseTools/Source/Python/UPT/Library/GlobalData.py
@@ -92,3 +92,8 @@ gUNPACK_DIR = None
# Flag used to mark whether the INF file is Binary INF or not.
#
gIS_BINARY_INF = False
+#
+# Used by Library instance parser
+# {FilePath: FileObj}
+#
+gLIBINSTANCEDICT = {} \ No newline at end of file
diff --git a/BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py b/BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py
index d576cffbd..27a1c6ad2 100644
--- a/BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py
+++ b/BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py
@@ -89,19 +89,19 @@ class InfUserExtensionObject():
InfUserExtensionItemObj.SetContent(UserExtensionCont)
InfUserExtensionItemObj.SetSupArchList(IdContentItem[2])
- for CheckItem in self.UserExtension:
- if IdContentItem[0] == CheckItem[0] and IdContentItem[1] == CheckItem[1]:
- if IdContentItem[2].upper() == 'COMMON' or CheckItem[2].upper() == 'COMMON':
- #
- # For COMMON ARCH type, do special check.
- #
- Logger.Error('InfParser',
- ToolError.FORMAT_INVALID,
- ST.ERR_INF_PARSER_UE_SECTION_DUPLICATE_ERROR%\
- (IdContentItem[0] + '.' + IdContentItem[1] + '.' + IdContentItem[2]),
- File=GlobalData.gINF_MODULE_NAME,
- Line=LineNo,
- ExtraData=None)
+# for CheckItem in self.UserExtension:
+# if IdContentItem[0] == CheckItem[0] and IdContentItem[1] == CheckItem[1]:
+# if IdContentItem[2].upper() == 'COMMON' or CheckItem[2].upper() == 'COMMON':
+# #
+# # For COMMON ARCH type, do special check.
+# #
+# Logger.Error('InfParser',
+# ToolError.FORMAT_INVALID,
+# ST.ERR_INF_PARSER_UE_SECTION_DUPLICATE_ERROR%\
+# (IdContentItem[0] + '.' + IdContentItem[1] + '.' + IdContentItem[2]),
+# File=GlobalData.gINF_MODULE_NAME,
+# Line=LineNo,
+# ExtraData=None)
if self.UserExtension.has_key(IdContentItem):
#
diff --git a/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py b/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py
index 12c46f195..6bf070be4 100644
--- a/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py
+++ b/BaseTools/Source/Python/UPT/Parser/InfAsBuiltProcess.py
@@ -42,12 +42,12 @@ from Library import DataType as DT
# @param WorkSpace. The WorkSpace directory used to combined with INF file path.
#
# @return GUID, Version
-def GetLibInstanceInfo(String, WorkSpace, LineNo):
-
+def GetLibInstanceInfo(String, WorkSpace, LineNo, CurrentInfFileName):
+
FileGuidString = ""
VerString = ""
-
- OrignalString = String
+
+ OrignalString = String
String = String.strip()
if not String:
return None, None
@@ -56,28 +56,48 @@ def GetLibInstanceInfo(String, WorkSpace, LineNo):
#
String = GetHelpStringByRemoveHashKey(String)
String = String.strip()
-
+
+ #
+ # To deal with library instance specified by GUID and version
+ #
+ RegFormatGuidPattern = re.compile("\s*([0-9a-fA-F]){8}-"
+ "([0-9a-fA-F]){4}-"
+ "([0-9a-fA-F]){4}-"
+ "([0-9a-fA-F]){4}-"
+ "([0-9a-fA-F]){12}\s*")
+ VersionPattern = re.compile('[\t\s]*\d+(\.\d+)?[\t\s]*')
+ GuidMatchedObj = RegFormatGuidPattern.search(String)
+
+ if String.upper().startswith('GUID') and GuidMatchedObj and 'Version' in String:
+ VersionStr = String[String.upper().find('VERSION') + 8:]
+ VersionMatchedObj = VersionPattern.search(VersionStr)
+ if VersionMatchedObj:
+ Guid = GuidMatchedObj.group().strip()
+ Version = VersionMatchedObj.group().strip()
+ return GetGuidVerFormLibInstance(Guid, Version, WorkSpace, CurrentInfFileName)
+
+ #
+ # To deal with library instance specified by file name
+ #
FileLinesList = GetFileLineContent(String, WorkSpace, LineNo, OrignalString)
-
+
ReFindFileGuidPattern = re.compile("^\s*FILE_GUID\s*=.*$")
ReFindVerStringPattern = re.compile("^\s*VERSION_STRING\s*=.*$")
-
- FileLinesList = ProcessLineExtender(FileLinesList)
for Line in FileLinesList:
if ReFindFileGuidPattern.match(Line):
FileGuidString = Line
if ReFindVerStringPattern.match(Line):
VerString = Line
-
+
if FileGuidString:
FileGuidString = GetSplitValueList(FileGuidString, '=', 1)[1]
if VerString:
VerString = GetSplitValueList(VerString, '=', 1)[1]
-
+
return FileGuidString, VerString
-
+
## GetPackageListInfo
#
# Get the package information from INF file.
@@ -184,36 +204,97 @@ def GetFileLineContent(FileName, WorkSpace, LineNo, OriginalString):
#
# Validate file exist/format.
#
- if IsValidPath(FileName, WorkSpace):
- IsValidFileFlag = True
- else:
+ if not IsValidPath(FileName, WorkSpace):
Logger.Error("InfParser",
ToolError.FORMAT_INVALID,
ST.ERR_INF_PARSER_FILE_NOT_EXIST_OR_NAME_INVALID%(FileName),
File=GlobalData.gINF_MODULE_NAME,
Line=LineNo,
ExtraData=OriginalString)
- return False
FileLinesList = []
- if IsValidFileFlag:
+ try:
+ FullFileName = FullFileName.replace('\\', '/')
+ Inputfile = open(FullFileName, "rb", 0)
try:
- FullFileName = FullFileName.replace('\\', '/')
- Inputfile = open(FullFileName, "rb", 0)
- try:
- FileLinesList = Inputfile.readlines()
- except BaseException:
- Logger.Error("InfParser", ToolError.FILE_READ_FAILURE, ST.ERR_FILE_OPEN_FAILURE, File=FullFileName)
- finally:
- Inputfile.close()
+ FileLinesList = Inputfile.readlines()
except BaseException:
- Logger.Error("InfParser",
- ToolError.FILE_READ_FAILURE,
- ST.ERR_FILE_OPEN_FAILURE,
- File=FullFileName)
-
- FileLinesList = ProcessLineExtender(FileLinesList)
+ Logger.Error("InfParser", ToolError.FILE_READ_FAILURE, ST.ERR_FILE_OPEN_FAILURE, File=FullFileName)
+ finally:
+ Inputfile.close()
+ except BaseException:
+ Logger.Error("InfParser",
+ ToolError.FILE_READ_FAILURE,
+ ST.ERR_FILE_OPEN_FAILURE,
+ File=FullFileName)
+
+ FileLinesList = ProcessLineExtender(FileLinesList)
return FileLinesList
- \ No newline at end of file
+
+##
+# Get all INF files from current workspace
+#
+#
+def GetInfsFromWorkSpace(WorkSpace):
+ InfFiles = []
+ for top, dirs, files in os.walk(WorkSpace):
+ dirs = dirs # just for pylint
+ for File in files:
+ if File.upper().endswith(".INF"):
+ InfFiles.append(os.path.join(top, File))
+
+ return InfFiles
+
+##
+# Get GUID and version from library instance file
+#
+#
+def GetGuidVerFormLibInstance(Guid, Version, WorkSpace, CurrentInfFileName):
+ for InfFile in GetInfsFromWorkSpace(WorkSpace):
+ try:
+ if InfFile.strip().upper() == CurrentInfFileName.strip().upper():
+ continue
+ InfFile = InfFile.replace('\\', '/')
+ if InfFile not in GlobalData.gLIBINSTANCEDICT:
+ InfFileObj = open(InfFile, "rb", 0)
+ GlobalData.gLIBINSTANCEDICT[InfFile] = InfFileObj
+ else:
+ InfFileObj = GlobalData.gLIBINSTANCEDICT[InfFile]
+
+ except BaseException:
+ Logger.Error("InfParser",
+ ToolError.FILE_READ_FAILURE,
+ ST.ERR_FILE_OPEN_FAILURE,
+ File=InfFile)
+ try:
+ FileLinesList = InfFileObj.readlines()
+ FileLinesList = ProcessLineExtender(FileLinesList)
+
+ ReFindFileGuidPattern = re.compile("^\s*FILE_GUID\s*=.*$")
+ ReFindVerStringPattern = re.compile("^\s*VERSION_STRING\s*=.*$")
+
+ for Line in FileLinesList:
+ if ReFindFileGuidPattern.match(Line):
+ FileGuidString = Line
+ if ReFindVerStringPattern.match(Line):
+ VerString = Line
+
+ if FileGuidString:
+ FileGuidString = GetSplitValueList(FileGuidString, '=', 1)[1]
+ if VerString:
+ VerString = GetSplitValueList(VerString, '=', 1)[1]
+
+ if FileGuidString.strip().upper() == Guid.upper() and \
+ VerString.strip().upper() == Version.upper():
+ return Guid, Version
+
+ except BaseException:
+ Logger.Error("InfParser", ToolError.FILE_READ_FAILURE, ST.ERR_FILE_OPEN_FAILURE, File=InfFile)
+ finally:
+ InfFileObj.close()
+
+ return '', ''
+
+
diff --git a/BaseTools/Source/Python/UPT/Parser/InfLibrarySectionParser.py b/BaseTools/Source/Python/UPT/Parser/InfLibrarySectionParser.py
index 8f9427cf4..4540fe275 100644
--- a/BaseTools/Source/Python/UPT/Parser/InfLibrarySectionParser.py
+++ b/BaseTools/Source/Python/UPT/Parser/InfLibrarySectionParser.py
@@ -170,28 +170,29 @@ class InfLibrarySectionParser(InfParserSectionRoot):
File=FileName,
Line=LineNo,
ExtraData=LineContent)
-
+
if IsLibInstanceInfo(LineContent):
LibInsFlag = True
continue
-
+
if LibInsFlag:
- LibGuid, LibVer = GetLibInstanceInfo(LineContent, GlobalData.gWORKSPACE, LineNo)
+ LibGuid, LibVer = GetLibInstanceInfo(LineContent, GlobalData.gWORKSPACE, LineNo, FileName)
#
# If the VERSION_STRING is missing from the INF file, tool should default to "0".
#
if LibVer == '':
LibVer = '0'
if LibGuid != '':
- LibraryList.append((LibGuid, LibVer))
+ if (LibGuid, LibVer) not in LibraryList:
+ LibraryList.append((LibGuid, LibVer))
else:
- Logger.Error('InfParser',
+ Logger.Error('InfParser',
FORMAT_INVALID,
- ST.ERR_LIB_INSTANCE_MISS_GUID,
- File=FileName,
- Line=LineNo,
- ExtraData=LineContent)
-
+ ST.ERR_LIB_INSTANCE_MISS_GUID,
+ File=FileName,
+ Line=LineNo,
+ ExtraData=LineContent)
+
#
# Current section archs
#
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 92cf3614a..b2e98633a 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -286,15 +286,15 @@ class MetaFileParser(object):
self._SectionName = ItemList[0].upper()
if self._SectionName in self.DataType:
self._SectionType = self.DataType[self._SectionName]
- else:
- self._SectionType = MODEL_UNKNOWN
- EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR, "%s is not a valid section name" % Item,
- self.MetaFile, self._LineIndex + 1, self._CurrentLine)
-
- # Check if the section name is valid
- if self._SectionName not in SECTIONS_HAVE_ITEM_AFTER_ARCH and len(ItemList) > 2:
+ # Check if the section name is valid
+ if self._SectionName not in SECTIONS_HAVE_ITEM_AFTER_ARCH and len(ItemList) > 2:
+ EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR, "%s is not a valid section name" % Item,
+ self.MetaFile, self._LineIndex + 1, self._CurrentLine)
+ elif self._Version >= 0x00010005:
EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR, "%s is not a valid section name" % Item,
self.MetaFile, self._LineIndex + 1, self._CurrentLine)
+ else:
+ self._SectionType = MODEL_UNKNOWN
# S1 is always Arch
if len(ItemList) > 1:
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index 343935157..f35b7699d 100755
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -699,7 +699,8 @@ class PcdReport(object):
# Collect PCDs defined in DSC common section
#
self.DscPcdDefault = {}
- for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:
+ for Arch in Wa.ArchList:
+ Platform = Wa.BuildDatabase[Wa.MetaFile, Arch, Wa.BuildTarget, Wa.ToolChain]
for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
if DscDefaultValue:
diff --git a/EdkShellBinPkg/Bin/Ia32/Apps/Devices.efi b/EdkShellBinPkg/Bin/Ia32/Apps/Devices.efi
index 9af9ca54b..312cebdea 100644
--- a/EdkShellBinPkg/Bin/Ia32/Apps/Devices.efi
+++ b/EdkShellBinPkg/Bin/Ia32/Apps/Devices.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ia32/Apps/Devtree.efi b/EdkShellBinPkg/Bin/Ia32/Apps/Devtree.efi
index d01ab9622..577d2d6c9 100644
--- a/EdkShellBinPkg/Bin/Ia32/Apps/Devtree.efi
+++ b/EdkShellBinPkg/Bin/Ia32/Apps/Devtree.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ia32/Apps/LoadPciRom.efi b/EdkShellBinPkg/Bin/Ia32/Apps/LoadPciRom.efi
index 14209d181..ede448e42 100644
--- a/EdkShellBinPkg/Bin/Ia32/Apps/LoadPciRom.efi
+++ b/EdkShellBinPkg/Bin/Ia32/Apps/LoadPciRom.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/Dblk.efi b/EdkShellBinPkg/Bin/Ipf/Apps/Dblk.efi
index 130671541..59ccd648c 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/Dblk.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/Dblk.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/Devices.efi b/EdkShellBinPkg/Bin/Ipf/Apps/Devices.efi
index 0c2e397e0..c1691a380 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/Devices.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/Devices.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/Devtree.efi b/EdkShellBinPkg/Bin/Ipf/Apps/Devtree.efi
index 7daf57c8a..6a93793ae 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/Devtree.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/Devtree.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/Guid.efi b/EdkShellBinPkg/Bin/Ipf/Apps/Guid.efi
index 67113d9cb..d04b7d61e 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/Guid.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/Guid.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/IfConfig.efi b/EdkShellBinPkg/Bin/Ipf/Apps/IfConfig.efi
index f5620ea96..c30d18906 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/IfConfig.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/IfConfig.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/IpConfig.efi b/EdkShellBinPkg/Bin/Ipf/Apps/IpConfig.efi
index 99f6607fc..95bfd72ba 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/IpConfig.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/IpConfig.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/LoadPciRom.efi b/EdkShellBinPkg/Bin/Ipf/Apps/LoadPciRom.efi
index 3e7382565..dc4f652a3 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/LoadPciRom.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/LoadPciRom.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/Mount.efi b/EdkShellBinPkg/Bin/Ipf/Apps/Mount.efi
index 697ba6907..e86fe15ec 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/Mount.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/Mount.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/Openinfo.efi b/EdkShellBinPkg/Bin/Ipf/Apps/Openinfo.efi
index 1a5e68a53..8f7e1c198 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/Openinfo.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/Openinfo.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/Ping.efi b/EdkShellBinPkg/Bin/Ipf/Apps/Ping.efi
index 7ae0c2176..9dc09c39b 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/Ping.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/Ping.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/SmbiosView.efi b/EdkShellBinPkg/Bin/Ipf/Apps/SmbiosView.efi
index 1568bec78..85795dd64 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/SmbiosView.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/SmbiosView.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/TelnetMgmt.efi b/EdkShellBinPkg/Bin/Ipf/Apps/TelnetMgmt.efi
index 618c66812..3f1ac5d5b 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/TelnetMgmt.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/TelnetMgmt.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/comp.efi b/EdkShellBinPkg/Bin/Ipf/Apps/comp.efi
index 4b76559fb..5bc0775ef 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/comp.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/comp.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/dmem.efi b/EdkShellBinPkg/Bin/Ipf/Apps/dmem.efi
index 3f93e7d39..45176045d 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/dmem.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/dmem.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/dmpstore.efi b/EdkShellBinPkg/Bin/Ipf/Apps/dmpstore.efi
index 30a234307..ea657c894 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/dmpstore.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/dmpstore.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/edit.efi b/EdkShellBinPkg/Bin/Ipf/Apps/edit.efi
index 9f836a559..48af2a207 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/edit.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/edit.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/eficompress.efi b/EdkShellBinPkg/Bin/Ipf/Apps/eficompress.efi
index 87ffe3b12..b4845aa19 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/eficompress.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/eficompress.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/efidecompress.efi b/EdkShellBinPkg/Bin/Ipf/Apps/efidecompress.efi
index d0866911f..66587b49f 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/efidecompress.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/efidecompress.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/err.efi b/EdkShellBinPkg/Bin/Ipf/Apps/err.efi
index 18bdcf54e..15b852412 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/err.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/err.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/hexedit.efi b/EdkShellBinPkg/Bin/Ipf/Apps/hexedit.efi
index e52aa025b..f3b270a93 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/hexedit.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/hexedit.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/mem.efi b/EdkShellBinPkg/Bin/Ipf/Apps/mem.efi
index 8c50cbb88..347cd380a 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/mem.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/mem.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/memmap.efi b/EdkShellBinPkg/Bin/Ipf/Apps/memmap.efi
index 0c0242b9d..268e5485e 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/memmap.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/memmap.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/mm.efi b/EdkShellBinPkg/Bin/Ipf/Apps/mm.efi
index 8342350bd..f5a504b96 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/mm.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/mm.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/mode.efi b/EdkShellBinPkg/Bin/Ipf/Apps/mode.efi
index 21743d7e5..c8b083f60 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/mode.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/mode.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/pci.efi b/EdkShellBinPkg/Bin/Ipf/Apps/pci.efi
index 27191b9d3..78661de6c 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/pci.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/pci.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/sermode.efi b/EdkShellBinPkg/Bin/Ipf/Apps/sermode.efi
index abf374ad4..04034ce0c 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/sermode.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/sermode.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/stall.efi b/EdkShellBinPkg/Bin/Ipf/Apps/stall.efi
index 935814fc2..693d67fa1 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/stall.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/stall.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/Ipf/Apps/timezone.efi b/EdkShellBinPkg/Bin/Ipf/Apps/timezone.efi
index 5af35cbb5..7dc4cd8a8 100644
--- a/EdkShellBinPkg/Bin/Ipf/Apps/timezone.efi
+++ b/EdkShellBinPkg/Bin/Ipf/Apps/timezone.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/X64/Apps/Devices.efi b/EdkShellBinPkg/Bin/X64/Apps/Devices.efi
index 317f2fa54..7e8650d70 100644
--- a/EdkShellBinPkg/Bin/X64/Apps/Devices.efi
+++ b/EdkShellBinPkg/Bin/X64/Apps/Devices.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/X64/Apps/Devtree.efi b/EdkShellBinPkg/Bin/X64/Apps/Devtree.efi
index 34a137444..d477c8e19 100644
--- a/EdkShellBinPkg/Bin/X64/Apps/Devtree.efi
+++ b/EdkShellBinPkg/Bin/X64/Apps/Devtree.efi
Binary files differ
diff --git a/EdkShellBinPkg/Bin/X64/Apps/LoadPciRom.efi b/EdkShellBinPkg/Bin/X64/Apps/LoadPciRom.efi
index f6d26363f..778417fe4 100644
--- a/EdkShellBinPkg/Bin/X64/Apps/LoadPciRom.efi
+++ b/EdkShellBinPkg/Bin/X64/Apps/LoadPciRom.efi
Binary files differ
diff --git a/EdkShellBinPkg/ReadMe.txt b/EdkShellBinPkg/ReadMe.txt
index fd18e181b..3ff506782 100644
--- a/EdkShellBinPkg/ReadMe.txt
+++ b/EdkShellBinPkg/ReadMe.txt
@@ -1,9 +1,9 @@
-The Ia32/Ipf/X64 binaries of EdkShellBinPkg are generated with EFI shell project (svn r59) and build with Edk Compatibility & BaseTools Package (r12898). The binaries are built with no debug information by building with "RELEASE" target.
+The Ia32/Ipf/X64 binaries of EdkShellBinPkg are generated with EFI shell project (svn r62) and build with Edk Compatibility & BaseTools Package (r12898). The binaries are built with no debug information by building with "RELEASE" target.
The following steps can help to re-generate these binaries for customization:
1. Check out EdkCompatibilityPkg (r12898) to $(WORKSPACE)\EdkCompatibilityPkg (svn https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkCompatibilityPkg).
2. Check out EdkShellPkg (r12898) to $(WORKSPACE)\EdkShellPkg (svn https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellPkg).
-3. Check out Edk Shell project source (r59) to $(WORKSPACE)\Shell (svn https://efi-shell.svn.sourceforge.net/svnroot/efi-shell/trunk/Shell).
+3. Check out Edk Shell project source (r62) to $(WORKSPACE)\Shell (svn https://efi-shell.svn.sourceforge.net/svnroot/efi-shell/trunk/Shell).
4. Check out BaseTools (r12898) to $(WORKSPACE)\BaseTools (svn https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/BaseTools).
5. Under $(WORKSPACE) directory (i.e. c:\EdkII),
To generate Minimum Shell, execute: "build -a IA32 -a X64 -a IPF -p EdkShellPkg\EdkShellPkg.dsc -m Shell\Shell.inf -b RELEASE".
diff --git a/FatPkg/FatPei/FatLiteAccess.c b/FatPkg/FatPei/FatLiteAccess.c
index 20537c0f2..a409eacb8 100644
--- a/FatPkg/FatPei/FatLiteAccess.c
+++ b/FatPkg/FatPei/FatLiteAccess.c
@@ -1,7 +1,7 @@
/** @file
FAT file system access routines for FAT recovery PEIM
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the Software
@@ -471,7 +471,7 @@ FatReadNextDirectoryEntry (
// We only search for *FILE* in root directory
// Long file name entry is *NOT* supported
//
- if ((DirEntry.Attributes == FAT_ATTR_DIRECTORY) || (DirEntry.Attributes == FAT_ATTR_LFN)) {
+ if (((DirEntry.Attributes & FAT_ATTR_DIRECTORY) == FAT_ATTR_DIRECTORY) || (DirEntry.Attributes == FAT_ATTR_LFN)) {
continue;
}
//
diff --git a/FatPkg/FatPei/FatLiteLib.c b/FatPkg/FatPei/FatLiteLib.c
index 9c93900fd..4789e1036 100644
--- a/FatPkg/FatPei/FatLiteLib.c
+++ b/FatPkg/FatPei/FatLiteLib.c
@@ -1,7 +1,7 @@
/** @file
General purpose supporting routines for FAT recovery PEIM
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the Software
@@ -313,15 +313,16 @@ EngFatToStr (
// No DBCS issues, just expand and add null terminate to end of string
//
while (*Fat != 0 && FatSize != 0) {
+ if (*Fat == ' ') {
+ break;
+ }
*String = *Fat;
String += 1;
Fat += 1;
FatSize -= 1;
- if (*Fat == ' ') {
- *String = 0;
- return ;
- }
}
+
+ *String = 0;
}
diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c b/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
index fc9672651..7c718ba42 100644
--- a/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
+++ b/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
@@ -1590,7 +1590,16 @@ BiosVideoCheckForVbe (
Timing.HorizontalResolution = BiosVideoPrivate->VbeModeInformationBlock->XResolution;
Timing.VerticalResolution = BiosVideoPrivate->VbeModeInformationBlock->YResolution;
if (!SearchEdidTiming (&ValidEdidTiming, &Timing)) {
+ //
+ // When EDID comes from INT10 call, EDID does not include 800x600, 640x480 and 1024x768,
+ // but INT10 can support these modes, we add them into GOP mode.
+ //
+ if ((BiosVideoPrivate->EdidDiscovered.SizeOfEdid != 0) &&
+ !((Timing.HorizontalResolution) == 1024 && (Timing.VerticalResolution == 768)) &&
+ !((Timing.HorizontalResolution) == 800 && (Timing.VerticalResolution == 600)) &&
+ !((Timing.HorizontalResolution) == 640 && (Timing.VerticalResolution == 480))) {
continue;
+ }
}
}
diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
index a63a7257d..d60851a42 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -1520,4 +1520,20 @@ InternalLegacyBiosFarCall (
IN UINTN StackSize
);
+/**
+ Load a legacy PC-AT OpROM for VGA controller.
+
+ @param Private Driver private data.
+
+ @retval EFI_SUCCESS Legacy ROM successfully installed for this device.
+ @retval EFI_DEVICE_ERROR No VGA device handle found, or native EFI video
+ driver cannot be successfully disconnected, or VGA
+ thunk driver cannot be successfully connected.
+
+**/
+EFI_STATUS
+LegacyBiosInstallVgaRom (
+ IN LEGACY_BIOS_INSTANCE *Private
+ );
+
#endif
diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
index 910ed41b3..5b1117eb1 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -1715,6 +1715,20 @@ PciShadowRoms (
if (!EFI_ERROR (Status)) {
continue;
}
+
+ //
+ // If legacy VBIOS Oprom has not been dispatched before, install legacy VBIOS here.
+ //
+ if (IS_PCI_DISPLAY (&Pci) && Index == 0) {
+ Status = LegacyBiosInstallVgaRom (Private);
+ //
+ // A return status of EFI_NOT_FOUND is considered valid (No EFI
+ // driver is controlling video).
+ //
+ ASSERT ((Status == EFI_SUCCESS) || (Status == EFI_NOT_FOUND));
+ continue;
+ }
+
//
// Install legacy ROM
//
diff --git a/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h b/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h
index b1887b60c..ecd68a003 100644
--- a/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h
+++ b/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h
@@ -4,7 +4,7 @@
2) BDS boot device connect interface.
3) BDS Misc interfaces for mainting boot variable, ouput string.
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -531,30 +531,6 @@ BdsLibConnectConsoleVariable (
IN CHAR16 *ConVarName
);
-/**
- Connect the console device base on the variable ConVarName, if
- device path of the ConVarName is multi-instance device path and
- anyone of the instances is connected success, then this function
- will return success.
- Dispatch service is not called when the handle associate with one
- device path node can not be created successfully. Here no driver
- dependency is assumed exist, so need not to call this service.
-
- @param ConVarName Console related variable name, ConIn, ConOut,
- ErrOut.
-
- @retval EFI_NOT_FOUND There is not any console devices connected
- success
- @retval EFI_SUCCESS Success connect any one instance of the console
- device path base on the variable ConVarName.
-
-**/
-EFI_STATUS
-EFIAPI
-BdsLibConnectConsoleVariableWithOutDispatch (
- IN CHAR16 *ConVarName
- );
-
//
// Bds device path related lib functions
//
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c
index 0e456dd51..f487aa611 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c
@@ -1,7 +1,7 @@
/** @file
BDS Lib functions which relate with connect the device
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -65,17 +65,14 @@ BdsLibGenericConnectAll (
BdsLibConnectAllConsoles ();
}
-
/**
This function will create all handles associate with every device
path node. If the handle associate with one device path node can not
- be created successfully, Dispatch service which load the missing drivers
- is called according to input parameter, since in some cases no driver
- dependency is assumed exist, so may need not to call this service.
+ be created successfully, then still give chance to do the dispatch,
+ which load the missing drivers if possible.
@param DevicePathToConnect The device path which will be connected, it can be
a multi-instance device path
- @param NeedDispatch Whether requires dispatch service during connection
@retval EFI_SUCCESS All handles associate with every device path node
have been created
@@ -85,9 +82,9 @@ BdsLibGenericConnectAll (
**/
EFI_STATUS
-ConnectDevicePathInternal (
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePathToConnect,
- IN BOOLEAN NeedDispatch
+EFIAPI
+BdsLibConnectDevicePath (
+ IN EFI_DEVICE_PATH_PROTOCOL *DevicePathToConnect
)
{
EFI_STATUS Status;
@@ -99,11 +96,14 @@ ConnectDevicePathInternal (
EFI_HANDLE Handle;
EFI_HANDLE PreviousHandle;
UINTN Size;
+ EFI_TPL CurrentTpl;
if (DevicePathToConnect == NULL) {
return EFI_SUCCESS;
}
+ CurrentTpl = EfiGetCurrentTpl ();
+
DevicePath = DuplicateDevicePath (DevicePathToConnect);
if (DevicePath == NULL) {
return EFI_OUT_OF_RESOURCES;
@@ -152,7 +152,10 @@ ConnectDevicePathInternal (
// Status == EFI_SUCCESS means a driver was dispatched
// Status == EFI_NOT_FOUND means no new drivers were dispatched
//
- if (NeedDispatch) {
+ if (CurrentTpl == TPL_APPLICATION) {
+ //
+ // Dispatch calls LoadImage/StartImage which cannot run at TPL > TPL_APPLICATION
+ //
Status = gDS->Dispatch ();
} else {
//
@@ -199,32 +202,6 @@ ConnectDevicePathInternal (
return Status;
}
-
-/**
- This function will create all handles associate with every device
- path node. If the handle associate with one device path node can not
- be created successfully, then still give chance to do the dispatch,
- which load the missing drivers if possible.
-
- @param DevicePathToConnect The device path which will be connected, it can be
- a multi-instance device path
-
- @retval EFI_SUCCESS All handles associate with every device path node
- have been created
- @retval EFI_OUT_OF_RESOURCES There is no resource to create new handles
- @retval EFI_NOT_FOUND Create the handle associate with one device path
- node failed
-
-**/
-EFI_STATUS
-EFIAPI
-BdsLibConnectDevicePath (
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePathToConnect
- )
-{
- return ConnectDevicePathInternal(DevicePathToConnect, TRUE);
-}
-
/**
This function will connect all current system handles recursively.
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
index 02ad3a2bb..84e4a0e6b 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
@@ -182,114 +182,6 @@ UpdateSystemTableConsole (
}
/**
- Connect the console device base on the variable ConVarName, if
- device path of the ConVarName is multi-instance device path and
- anyone of the instances is connected success, this function will
- return success.
- Dispatch service is called basing on input when the handle associate
- with one device path node can not be created successfully. Since in
- some cases we assume driver dependency does not exist and do not
- need to call this service.
-
- @param ConVarName Console related variable name, ConIn, ConOut,
- ErrOut.
- @param NeedDispatch Whether requires dispatch service during connection
-
- @retval EFI_NOT_FOUND There is not any console devices connected
- success
- @retval EFI_SUCCESS Success connect any one instance of the console
- device path base on the variable ConVarName.
-
-**/
-EFI_STATUS
-ConnectConsoleVariableInternal (
- IN CHAR16 *ConVarName,
- IN BOOLEAN NeedDispatch
- )
-{
- EFI_STATUS Status;
- EFI_DEVICE_PATH_PROTOCOL *StartDevicePath;
- UINTN VariableSize;
- EFI_DEVICE_PATH_PROTOCOL *Instance;
- EFI_DEVICE_PATH_PROTOCOL *Next;
- EFI_DEVICE_PATH_PROTOCOL *CopyOfDevicePath;
- UINTN Size;
- BOOLEAN DeviceExist;
-
- Status = EFI_SUCCESS;
- DeviceExist = FALSE;
-
- //
- // Check if the console variable exist
- //
- StartDevicePath = BdsLibGetVariableAndSize (
- ConVarName,
- &gEfiGlobalVariableGuid,
- &VariableSize
- );
- if (StartDevicePath == NULL) {
- return EFI_UNSUPPORTED;
- }
-
- CopyOfDevicePath = StartDevicePath;
- do {
- //
- // Check every instance of the console variable
- //
- Instance = GetNextDevicePathInstance (&CopyOfDevicePath, &Size);
- if (Instance == NULL) {
- FreePool (StartDevicePath);
- return EFI_UNSUPPORTED;
- }
-
- Next = Instance;
- while (!IsDevicePathEndType (Next)) {
- Next = NextDevicePathNode (Next);
- }
-
- SetDevicePathEndNode (Next);
- //
- // Connect the USB console
- // USB console device path is a short-form device path that
- // starts with the first element being a USB WWID
- // or a USB Class device path
- //
- if ((DevicePathType (Instance) == MESSAGING_DEVICE_PATH) &&
- ((DevicePathSubType (Instance) == MSG_USB_CLASS_DP)
- || (DevicePathSubType (Instance) == MSG_USB_WWID_DP)
- )) {
- Status = BdsLibConnectUsbDevByShortFormDP (0xFF, Instance);
- if (!EFI_ERROR (Status)) {
- DeviceExist = TRUE;
- }
- } else {
- //
- // Connect the instance device path
- //
- Status = ConnectDevicePathInternal (Instance, NeedDispatch);
-
- if (EFI_ERROR (Status)) {
- //
- // Delete the instance from the console varialbe
- //
- BdsLibUpdateConsoleVariable (ConVarName, NULL, Instance);
- } else {
- DeviceExist = TRUE;
- }
- }
- FreePool(Instance);
- } while (CopyOfDevicePath != NULL);
-
- FreePool (StartDevicePath);
-
- if (!DeviceExist) {
- return EFI_NOT_FOUND;
- }
-
- return EFI_SUCCESS;
-}
-
-/**
This function update console variable based on ConVarName, it can
add or remove one specific console device path from the variable
@@ -447,35 +339,86 @@ BdsLibConnectConsoleVariable (
IN CHAR16 *ConVarName
)
{
- return ConnectConsoleVariableInternal(ConVarName, TRUE);
-}
+ EFI_STATUS Status;
+ EFI_DEVICE_PATH_PROTOCOL *StartDevicePath;
+ UINTN VariableSize;
+ EFI_DEVICE_PATH_PROTOCOL *Instance;
+ EFI_DEVICE_PATH_PROTOCOL *Next;
+ EFI_DEVICE_PATH_PROTOCOL *CopyOfDevicePath;
+ UINTN Size;
+ BOOLEAN DeviceExist;
-/**
- Connect the console device base on the variable ConVarName, if
- device path of the ConVarName is multi-instance device path and
- anyone of the instances is connected success, then this function
- will return success.
- Dispatch service is not called when the handle associate with one
- device path node can not be created successfully. Here no driver
- dependency is assumed exist, so need not to call this service.
+ Status = EFI_SUCCESS;
+ DeviceExist = FALSE;
+ //
+ // Check if the console variable exist
+ //
+ StartDevicePath = BdsLibGetVariableAndSize (
+ ConVarName,
+ &gEfiGlobalVariableGuid,
+ &VariableSize
+ );
+ if (StartDevicePath == NULL) {
+ return EFI_UNSUPPORTED;
+ }
- @param ConVarName Console related variable name, ConIn, ConOut,
- ErrOut.
+ CopyOfDevicePath = StartDevicePath;
+ do {
+ //
+ // Check every instance of the console variable
+ //
+ Instance = GetNextDevicePathInstance (&CopyOfDevicePath, &Size);
+ if (Instance == NULL) {
+ FreePool (StartDevicePath);
+ return EFI_UNSUPPORTED;
+ }
+
+ Next = Instance;
+ while (!IsDevicePathEndType (Next)) {
+ Next = NextDevicePathNode (Next);
+ }
- @retval EFI_NOT_FOUND There is not any console devices connected
- success
- @retval EFI_SUCCESS Success connect any one instance of the console
- device path base on the variable ConVarName.
+ SetDevicePathEndNode (Next);
+ //
+ // Connect the USB console
+ // USB console device path is a short-form device path that
+ // starts with the first element being a USB WWID
+ // or a USB Class device path
+ //
+ if ((DevicePathType (Instance) == MESSAGING_DEVICE_PATH) &&
+ ((DevicePathSubType (Instance) == MSG_USB_CLASS_DP)
+ || (DevicePathSubType (Instance) == MSG_USB_WWID_DP)
+ )) {
+ Status = BdsLibConnectUsbDevByShortFormDP (0xFF, Instance);
+ if (!EFI_ERROR (Status)) {
+ DeviceExist = TRUE;
+ }
+ } else {
+ //
+ // Connect the instance device path
+ //
+ Status = BdsLibConnectDevicePath (Instance);
-**/
-EFI_STATUS
-EFIAPI
-BdsLibConnectConsoleVariableWithOutDispatch (
- IN CHAR16 *ConVarName
- )
-{
- return ConnectConsoleVariableInternal(ConVarName, FALSE);
+ if (EFI_ERROR (Status)) {
+ //
+ // Delete the instance from the console varialbe
+ //
+ BdsLibUpdateConsoleVariable (ConVarName, NULL, Instance);
+ } else {
+ DeviceExist = TRUE;
+ }
+ }
+ FreePool(Instance);
+ } while (CopyOfDevicePath != NULL);
+
+ FreePool (StartDevicePath);
+
+ if (!DeviceExist) {
+ return EFI_NOT_FOUND;
+ }
+
+ return EFI_SUCCESS;
}
/**
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h b/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
index d5b5b3bd0..5d51635bf 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
@@ -1,7 +1,7 @@
/** @file
BDS library definition, include the file and data structure
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -158,28 +158,4 @@ ValidateOption (
UINTN VariableSize
);
-/**
- This function will create all handles associate with every device
- path node. If the handle associate with one device path node can not
- be created successfully, Dispatch service which load the missing drivers
- is called basing on input parameter, since in some cases no driver
- dependency is assumed exist, so may need not to call this service.
-
- @param DevicePathToConnect The device path which will be connected, it can be
- a multi-instance device path
- @param NeedDispatch Whether requires dispatch service during connection
-
- @retval EFI_SUCCESS All handles associate with every device path node
- have been created
- @retval EFI_OUT_OF_RESOURCES There is no resource to create new handles
- @retval EFI_NOT_FOUND Create the handle associate with one device path
- node failed
-
-**/
-EFI_STATUS
-ConnectDevicePathInternal (
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePathToConnect,
- IN BOOLEAN NeedDispatch
- );
-
#endif // _BDS_LIB_H_
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
index da0e17b38..432b22469 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
@@ -399,10 +399,10 @@ InitializeFrontPage (
CurrentLang = GetEfiGlobalVariable (L"PlatformLang");
- if (gFrontPagePrivate.LanguageToken == NULL) {
- //
- // Get Support language list from variable.
- //
+ //
+ // Get Support language list from variable.
+ //
+ if (mLanguageString == NULL){
mLanguageString = GetEfiGlobalVariable (L"PlatformLangCodes");
if (mLanguageString == NULL) {
mLanguageString = AllocateCopyPool (
@@ -411,7 +411,9 @@ InitializeFrontPage (
);
ASSERT (mLanguageString != NULL);
}
+ }
+ if (gFrontPagePrivate.LanguageToken == NULL) {
//
// Count the language list number.
//
@@ -1223,6 +1225,7 @@ PlatformBdsEnterFrontPage (
if (mLanguageString != NULL) {
FreePool (mLanguageString);
+ mLanguageString = NULL;
}
//
//Will leave browser, check any reset required change is applied? if yes, reset system
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
index b8a1d78a7..5809a0f91 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
@@ -1,7 +1,7 @@
/** @file
The XHCI controller driver.
-Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -916,7 +916,7 @@ XhcControlTransfer (
((Request->RequestType == USB_REQUEST_TYPE (EfiUsbDataIn, USB_REQ_TYPE_STANDARD, USB_TARGET_DEVICE)) ||
((Request->RequestType == USB_REQUEST_TYPE (EfiUsbDataIn, USB_REQ_TYPE_CLASS, USB_TARGET_DEVICE))))) {
DescriptorType = (UINT8)(Request->Value >> 8);
- if ((DescriptorType == USB_DESC_TYPE_DEVICE) && (*DataLength == sizeof (EFI_USB_DEVICE_DESCRIPTOR))) {
+ if ((DescriptorType == USB_DESC_TYPE_DEVICE) && ((*DataLength == sizeof (EFI_USB_DEVICE_DESCRIPTOR)) || ((DeviceSpeed == EFI_USB_SPEED_FULL) && (*DataLength == 8)))) {
ASSERT (Data != NULL);
//
// Store a copy of device scriptor as hub device need this info to configure endpoint.
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
index b91bdff29..e6c0d1564 100644
--- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
+++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
@@ -1238,7 +1238,6 @@ XhcMonitorAsyncRequests (
UINT8 *ProcBuf;
URB *Urb;
UINT8 SlotId;
- // EFI_STATUS Status;
EFI_TPL OldTpl;
OldTpl = gBS->RaiseTPL (XHC_TPL);
@@ -1260,8 +1259,7 @@ XhcMonitorAsyncRequests (
// Check the result of URB execution. If it is still
// active, check the next one.
//
- XhcCheckUrbResult (Xhc, Urb);
- // Status = XhcCheckUrbResult (Xhc, Urb);
+ XhcCheckUrbResult (Xhc, Urb);
if (!Urb->Finished) {
continue;
@@ -1626,20 +1624,14 @@ XhcCheckNewEvent (
OUT TRB_TEMPLATE **NewEvtTrb
)
{
- EFI_STATUS Status;
- // TRB_TEMPLATE *EvtTrb;
-
ASSERT (EvtRing != NULL);
- // EvtTrb = EvtRing->EventRingDequeue;
*NewEvtTrb = EvtRing->EventRingDequeue;
if (EvtRing->EventRingDequeue == EvtRing->EventRingEnqueue) {
return EFI_NOT_READY;
}
- Status = EFI_SUCCESS;
-
EvtRing->EventRingDequeue++;
//
// If the dequeue pointer is beyond the ring, then roll-back it to the begining of the ring.
@@ -1648,7 +1640,7 @@ XhcCheckNewEvent (
EvtRing->EventRingDequeue = EvtRing->EventRingSeg0;
}
- return Status;
+ return EFI_SUCCESS;
}
/**
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
index 742cdc193..ff6b99c87 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
@@ -813,6 +813,7 @@ UsbIoPortReset (
USB_DEVICE *Dev;
EFI_TPL OldTpl;
EFI_STATUS Status;
+ UINT8 DevAddress;
OldTpl = gBS->RaiseTPL (USB_BUS_TPL);
@@ -834,12 +835,17 @@ UsbIoPortReset (
goto ON_EXIT;
}
+ HubIf->HubApi->ClearPortChange (HubIf, Dev->ParentPort);
+
//
// Reset the device to its current address. The device now has an address
// of ZERO after port reset, so need to set Dev->Address to the device again for
// host to communicate with it.
//
- Status = UsbSetAddress (Dev, Dev->Address);
+ DevAddress = Dev->Address;
+ Dev->Address = 0;
+ Status = UsbSetAddress (Dev, DevAddress);
+ Dev->Address = DevAddress;
gBS->Stall (USB_SET_DEVICE_ADDRESS_STALL);
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
index 094aea21c..d503a278a 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
@@ -99,10 +99,19 @@ typedef struct _USB_HUB_API USB_HUB_API;
// [USB20-7.1.7.5, it says 10ms for hub and 50ms for
// root hub]
//
-#define USB_SET_PORT_RESET_STALL (10 * USB_BUS_1_MILLISECOND)
+// According to USB2.0, Chapter 11.5.1.5 Resetting,
+// the worst case for TDRST is 20ms
+//
+#define USB_SET_PORT_RESET_STALL (20 * USB_BUS_1_MILLISECOND)
#define USB_SET_ROOT_PORT_RESET_STALL (50 * USB_BUS_1_MILLISECOND)
//
+// Wait for port recovery to accept SetAddress, refers to specification
+// [USB20-7.1.7.5, it says 10 ms for TRSTRCY]
+//
+#define USB_SET_PORT_RECOVERY_STALL (10 * USB_BUS_1_MILLISECOND)
+
+//
// Wait for clear roothub port reset, set by experience
//
#define USB_CLR_ROOT_PORT_RESET_STALL (20 * USB_BUS_1_MILLISECOND)
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
index 529b13618..35cdaf552 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
@@ -2,7 +2,7 @@
Manage Usb Descriptor List
-Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -360,8 +360,8 @@ UsbParseConfigDesc (
Setting = UsbParseInterfaceDesc (DescBuf, Len, &Consumed);
if (Setting == NULL) {
- DEBUG (( EFI_D_ERROR, "UsbParseConfigDesc: failed to parse interface setting\n"));
- goto ON_ERROR;
+ DEBUG (( EFI_D_ERROR, "UsbParseConfigDesc: warning: failed to get interface setting, stop parsing now.\n"));
+ break;
} else if (Setting->Desc.InterfaceNumber >= NumIf) {
DEBUG (( EFI_D_ERROR, "UsbParseConfigDesc: mal-formated interface descriptor\n"));
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
index 74de7d5d5..0aa896173 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
@@ -2,7 +2,7 @@
Usb bus enumeration support.
-Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -814,14 +814,20 @@ UsbEnumerateNewDev (
return EFI_SUCCESS;
ON_ERROR:
- if (Address != Bus->MaxDevices) {
- Bus->Devices[Address] = NULL;
- }
-
- if (Child != NULL) {
- UsbFreeDevice (Child);
- }
-
+ //
+ // If reach here, it means the enumeration process on a given port is interrupted due to error.
+ // The s/w resources, including the assigned address(Address) and the allocated usb device data
+ // structure(Bus->Devices[Address]), will NOT be freed here. These resources will be freed when
+ // the device is unplugged from the port or DriverBindingStop() is invoked.
+ //
+ // This way is used to co-work with the lower layer EDKII UHCI/EHCI/XHCI host controller driver.
+ // It's mainly because to keep UEFI spec unchanged EDKII XHCI driver have to maintain a state machine
+ // to keep track of the mapping between actual address and request address. If the request address
+ // (Address) is freed here, the Address value will be used by next enumerated device. Then EDKII XHCI
+ // host controller driver will have wrong information, which will cause further transaction error.
+ //
+ // EDKII UHCI/EHCI doesn't get impacted as it's make sense to reserve s/w resource till it gets unplugged.
+ //
return Status;
}
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
index 2d24bb4b8..9e5299c0e 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
@@ -975,13 +975,13 @@ UsbHubResetPort (
}
//
- // Drive the reset signal for at least 10ms. Check USB 2.0 Spec
+ // Drive the reset signal for worst 20ms. Check USB 2.0 Spec
// section 7.1.7.5 for timing requirements.
//
gBS->Stall (USB_SET_PORT_RESET_STALL);
//
- // USB hub will clear RESET bit if reset is actually finished.
+ // Check USB_PORT_STAT_C_RESET bit to see if the resetting state is done.
//
ZeroMem (&PortState, sizeof (EFI_USB_PORT_STATUS));
@@ -989,8 +989,8 @@ UsbHubResetPort (
Status = UsbHubGetPortStatus (HubIf, Port, &PortState);
if (!EFI_ERROR (Status) &&
- !USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_RESET)) {
-
+ USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_RESET)) {
+ gBS->Stall (USB_SET_PORT_RECOVERY_STALL);
return EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
index beff3431c..86dd99d25 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
@@ -1,7 +1,7 @@
/** @file
Helper functions for USB Keyboard Driver.
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -79,6 +79,7 @@ USB_KEYBOARD_LAYOUT_PACK_BIN mUsbKeyboardLayoutBin = {
{EfiKeyD11, '[', '{', 0, 0, EFI_NULL_MODIFIER, EFI_AFFECTED_BY_STANDARD_SHIFT},
{EfiKeyD12, ']', '}', 0, 0, EFI_NULL_MODIFIER, EFI_AFFECTED_BY_STANDARD_SHIFT},
{EfiKeyD13, '\\', '|', 0, 0, EFI_NULL_MODIFIER, EFI_AFFECTED_BY_STANDARD_SHIFT},
+ {EfiKeyC12, '\\', '|', 0, 0, EFI_NULL_MODIFIER, EFI_AFFECTED_BY_STANDARD_SHIFT},
{EfiKeyC10, ';', ':', 0, 0, EFI_NULL_MODIFIER, EFI_AFFECTED_BY_STANDARD_SHIFT},
{EfiKeyC11, '\'', '"', 0, 0, EFI_NULL_MODIFIER, EFI_AFFECTED_BY_STANDARD_SHIFT},
{EfiKeyE0, '`', '~', 0, 0, EFI_NULL_MODIFIER, EFI_AFFECTED_BY_STANDARD_SHIFT},
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h
index c41a0727f..b3eb3e462 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h
@@ -1,7 +1,7 @@
/** @file
Function prototype for USB Keyboard Driver.
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "EfiKey.h"
-#define USB_KEYBOARD_KEY_COUNT 104
+#define USB_KEYBOARD_KEY_COUNT 105
#define USB_KEYBOARD_LANGUAGE_STR_LEN 5 // RFC4646 Language Code: "en-US"
#define USB_KEYBOARD_DESCRIPTION_STR_LEN (16 + 1) // Description: "English Keyboard"
diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c
index 6d5a259eb..90976a1f0 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Page.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
@@ -1,7 +1,7 @@
/** @file
UEFI Memory page management functions.
-Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -177,7 +177,20 @@ CoreAddRange (
ASSERT_LOCKED (&gMemoryLock);
DEBUG ((DEBUG_PAGE, "AddRange: %lx-%lx to %d\n", Start, End, Type));
-
+
+ //
+ // If memory of type EfiConventionalMemory is being added that includes the page
+ // starting at address 0, then zero the page starting at address 0. This has
+ // two benifits. It helps find NULL pointer bugs and it also maximizes
+ // compatibility with operating systems that may evaluate memory in this page
+ // for legacy data structures. If memory of any other type is added starting
+ // at address 0, then do not zero the page at address 0 because the page is being
+ // used for other purposes.
+ //
+ if (Type == EfiConventionalMemory && Start == 0 && (End >= EFI_PAGE_SIZE - 1)) {
+ SetMem ((VOID *)(UINTN)Start, EFI_PAGE_SIZE, 0);
+ }
+
//
// Memory map being altered so updated key
//
@@ -834,7 +847,18 @@ CoreConvertPages (
//
CoreAddRange (NewType, Start, RangeEnd, Attribute);
if (NewType == EfiConventionalMemory) {
- DEBUG_CLEAR_MEMORY ((VOID *)(UINTN) Start, (UINTN) (RangeEnd - Start + 1));
+ //
+ // Avoid calling DEBUG_CLEAR_MEMORY() for an address of 0 because this
+ // macro will ASSERT() if address is 0. Instead, CoreAddRange() guarantees
+ // that the page starting at address 0 is always filled with zeros.
+ //
+ if (Start == 0) {
+ if (RangeEnd > EFI_PAGE_SIZE) {
+ DEBUG_CLEAR_MEMORY ((VOID *)(UINTN) EFI_PAGE_SIZE, (UINTN) (RangeEnd - EFI_PAGE_SIZE + 1));
+ }
+ } else {
+ DEBUG_CLEAR_MEMORY ((VOID *)(UINTN) Start, (UINTN) (RangeEnd - Start + 1));
+ }
}
//
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index 09e82b091..01610f7c5 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -57,7 +57,7 @@ GRAPHICS_CONSOLE_MODE_DATA mGraphicsConsoleModeData[] = {
EFI_HII_DATABASE_PROTOCOL *mHiiDatabase;
EFI_HII_FONT_PROTOCOL *mHiiFont;
EFI_HII_HANDLE mHiiHandle;
-EFI_EVENT mHiiRegistration;
+VOID *mHiiRegistration;
EFI_GUID mFontPackageListGuid = {0xf5f219d3, 0x7006, 0x4648, {0xac, 0x8d, 0xd6, 0x1d, 0xfb, 0x7b, 0xc6, 0xad}};
@@ -549,6 +549,8 @@ GraphicsConsoleControllerDriverStart (
}
}
+ DEBUG ((EFI_D_INFO, "GraphicsConsole video resolution %d x %d\n", HorizontalResolution, VerticalResolution));
+
//
// Initialize the mode which GraphicsConsole supports.
//
@@ -804,42 +806,14 @@ EfiLocateHiiProtocol (
VOID
)
{
- EFI_HANDLE Handle;
- UINTN Size;
EFI_STATUS Status;
- //
- // There should only be one - so buffer size is this
- //
- Size = sizeof (EFI_HANDLE);
-
- Status = gBS->LocateHandle (
- ByProtocol,
- &gEfiHiiDatabaseProtocolGuid,
- NULL,
- &Size,
- (VOID **) &Handle
- );
-
+ Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &mHiiDatabase);
if (EFI_ERROR (Status)) {
return Status;
}
- Status = gBS->HandleProtocol (
- Handle,
- &gEfiHiiDatabaseProtocolGuid,
- (VOID **) &mHiiDatabase
- );
-
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- Status = gBS->HandleProtocol (
- Handle,
- &gEfiHiiFontProtocolGuid,
- (VOID **) &mHiiFont
- );
+ Status = gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) &mHiiFont);
return Status;
}
@@ -2055,7 +2029,9 @@ RegisterFontPackage (
NULL,
(VOID **) &HiiDatabase
);
- ASSERT_EFI_ERROR (Status);
+ if (EFI_ERROR (Status)) {
+ return;
+ }
//
// Add 4 bytes to the header for entire length for HiiAddPackages use only.
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
index a8010671b..29de50341 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
@@ -1446,7 +1446,6 @@ IfrMid (
UINTN Base;
UINTN Length;
CHAR16 *SubString;
- UINT8 *Buffer;
UINT16 BufferLen;
ZeroMem (Value, sizeof (Value));
@@ -1502,7 +1501,6 @@ IfrMid (
FreePool (String);
} else {
- Buffer = Value[2].Buffer;
BufferLen = Value[2].BufferLen;
Result->Type = EFI_IFR_TYPE_BUFFER;
@@ -1513,7 +1511,7 @@ IfrMid (
Result->BufferLen = (UINT16)((BufferLen - Base) < Length ? (BufferLen - Base) : Length);
Result->Buffer = AllocateZeroPool (Result->BufferLen);
ASSERT (Result->Buffer != NULL);
- CopyMem (Result->Buffer, &Buffer[Base], Result->BufferLen);
+ CopyMem (Result->Buffer, &Buffer[Base], Result->BufferLen);
}
FreePool (Value[2].Buffer);
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index ee8ab75a2..c3854aac2 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -1254,6 +1254,7 @@ ProcessCallBackFunction (
break;
case EFI_BROWSER_ACTION_REQUEST_EXIT:
+ DiscardFormIsRequired = TRUE;
Selection->Action = UI_ACTION_EXIT;
break;
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index 15b943ffe..6c019f045 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -245,6 +245,11 @@ SendForm (
gFooterHeight = FOOTER_HEIGHT + (Index / 3);
//
+ // Clean the history menu list.
+ //
+ InitializeListHead (&gMenuList);
+
+ //
// Save globals used by SendForm()
//
SaveBrowserContext ();
@@ -305,8 +310,6 @@ SendForm (
//
InitializeBrowserStrings ();
- gFunctionKeySetting = ENABLE_FUNCTION_KEY_SETTING;
-
//
// Ensure we are in Text mode
//
@@ -380,6 +383,7 @@ SendForm (
}
FreeBrowserStrings ();
+ UiFreeMenuList(&gMenuList);
gST->ConOut->SetAttribute (gST->ConOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
gST->ConOut->ClearScreen (gST->ConOut);
@@ -559,66 +563,6 @@ BrowserCallback (
}
/**
- Notify function will remove the formset in the maintain list
- once this formset is removed.
-
- Functions which are registered to receive notification of
- database events have this prototype. The actual event is encoded
- in NotifyType. The following table describes how PackageType,
- PackageGuid, Handle, and Package are used for each of the
- notification types.
-
- @param PackageType Package type of the notification.
-
- @param PackageGuid If PackageType is
- EFI_HII_PACKAGE_TYPE_GUID, then this is
- the pointer to the GUID from the Guid
- field of EFI_HII_PACKAGE_GUID_HEADER.
- Otherwise, it must be NULL.
-
- @param Package Points to the package referred to by the
- notification Handle The handle of the package
- list which contains the specified package.
-
- @param Handle The HII handle.
-
- @param NotifyType The type of change concerning the
- database. See
- EFI_HII_DATABASE_NOTIFY_TYPE.
-
-**/
-EFI_STATUS
-EFIAPI
-FormsetRemoveNotify (
- IN UINT8 PackageType,
- IN CONST EFI_GUID *PackageGuid,
- IN CONST EFI_HII_PACKAGE_HEADER *Package,
- IN EFI_HII_HANDLE Handle,
- IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
- )
-{
- FORM_BROWSER_FORMSET *FormSet;
-
- //
- // Ignore the update for current using formset, which is handled by another notify function.
- //
- if (IsHiiHandleInBrowserContext (Handle)) {
- return EFI_SUCCESS;
- }
-
- //
- // Remove the backup FormSet data when the Form Package is removed.
- //
- FormSet = GetFormSetFromHiiHandle (Handle);
- if (FormSet != NULL) {
- RemoveEntryList (&FormSet->Link);
- DestroyFormSet (FormSet);
- }
-
- return EFI_SUCCESS;
-}
-
-/**
Initialize Setup Browser driver.
@param ImageHandle The image handle.
@@ -636,7 +580,6 @@ InitializeSetup (
)
{
EFI_STATUS Status;
- EFI_HANDLE NotifyHandle;
EFI_INPUT_KEY DefaultHotKey;
EFI_STRING HelpString;
@@ -734,19 +677,6 @@ InitializeSetup (
);
ASSERT_EFI_ERROR (Status);
- //
- // Register notify for Form package remove
- //
- Status = mHiiDatabase->RegisterPackageNotify (
- mHiiDatabase,
- EFI_HII_PACKAGE_FORMS,
- NULL,
- FormsetRemoveNotify,
- EFI_HII_DATABASE_NOTIFY_REMOVE_PACK,
- &NotifyHandle
- );
- ASSERT_EFI_ERROR (Status);
-
return Status;
}
@@ -2259,6 +2189,52 @@ SendDiscardInfoToDriver (
}
/**
+ Validate the FormSet. If the formset is not validate, remove it from the list.
+
+ @param FormSet The input FormSet which need to validate.
+
+ @retval TRUE The handle is validate.
+ @retval FALSE The handle is invalidate.
+
+**/
+BOOLEAN
+ValidateFormSet (
+ FORM_BROWSER_FORMSET *FormSet
+ )
+{
+ EFI_HII_HANDLE *HiiHandles;
+ UINTN Index;
+ BOOLEAN Find;
+
+ ASSERT (FormSet != NULL);
+ Find = FALSE;
+ //
+ // Get all the Hii handles
+ //
+ HiiHandles = HiiGetHiiHandles (NULL);
+ ASSERT (HiiHandles != NULL);
+
+ //
+ // Search for formset of each class type
+ //
+ for (Index = 0; HiiHandles[Index] != NULL; Index++) {
+ if (HiiHandles[Index] == FormSet->HiiHandle) {
+ Find = TRUE;
+ break;
+ }
+ }
+
+ if (!Find) {
+ RemoveEntryList (&FormSet->Link);
+ DestroyFormSet (FormSet);
+ }
+
+ FreePool (HiiHandles);
+
+ return Find;
+}
+
+/**
Discard data based on the input setting scope (Form, FormSet or System).
@param FormSet FormSet data structure.
@@ -2365,8 +2341,11 @@ DiscardForm (
Link = GetFirstNode (&gBrowserFormSetList);
while (!IsNull (&gBrowserFormSetList, Link)) {
LocalFormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
- DiscardForm (LocalFormSet, NULL, FormSetLevel);
Link = GetNextNode (&gBrowserFormSetList, Link);
+ if (!ValidateFormSet(LocalFormSet)) {
+ continue;
+ }
+ DiscardForm (LocalFormSet, NULL, FormSetLevel);
if (!IsHiiHandleInBrowserContext (LocalFormSet->HiiHandle)) {
//
// Remove maintain backup list after discard except for the current using FormSet.
@@ -2646,8 +2625,11 @@ SubmitForm (
Link = GetFirstNode (&gBrowserFormSetList);
while (!IsNull (&gBrowserFormSetList, Link)) {
LocalFormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
- SubmitForm (LocalFormSet, NULL, FormSetLevel);
Link = GetNextNode (&gBrowserFormSetList, Link);
+ if (!ValidateFormSet(LocalFormSet)) {
+ continue;
+ }
+ SubmitForm (LocalFormSet, NULL, FormSetLevel);
if (!IsHiiHandleInBrowserContext (LocalFormSet->HiiHandle)) {
//
// Remove maintain backup list after save except for the current using FormSet.
@@ -3332,8 +3314,11 @@ ExtractDefault (
Link = GetFirstNode (&gBrowserFormSetList);
while (!IsNull (&gBrowserFormSetList, Link)) {
LocalFormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
- ExtractDefault (LocalFormSet, NULL, DefaultId, FormSetLevel, GetDefaultValueScope, Storage, RetrieveValueFirst);
Link = GetNextNode (&gBrowserFormSetList, Link);
+ if (!ValidateFormSet(LocalFormSet)) {
+ continue;
+ }
+ ExtractDefault (LocalFormSet, NULL, DefaultId, FormSetLevel, GetDefaultValueScope, Storage, RetrieveValueFirst);
}
}
@@ -4028,6 +4013,8 @@ InitializeFormSet (
}
}
+ gFunctionKeySetting = ENABLE_FUNCTION_KEY_SETTING;
+
if ((gClassOfVfr & FORMSET_CLASS_FRONT_PAGE) == FORMSET_CLASS_FRONT_PAGE) {
gFrontPageHandle = FormSet->HiiHandle;
gFunctionKeySetting = NONE_FUNCTION_KEY_SETTING;
@@ -4224,10 +4211,13 @@ GetFormSetFromHiiHandle (
Link = GetFirstNode (&gBrowserFormSetList);
while (!IsNull (&gBrowserFormSetList, Link)) {
FormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
+ Link = GetNextNode (&gBrowserFormSetList, Link);
+ if (!ValidateFormSet(FormSet)) {
+ continue;
+ }
if (FormSet->HiiHandle == Handle) {
return FormSet;
}
- Link = GetNextNode (&gBrowserFormSetList, Link);
}
return NULL;
@@ -4480,11 +4470,14 @@ SaveReminder (
Link = GetFirstNode (&gBrowserFormSetList);
while (!IsNull (&gBrowserFormSetList, Link)) {
FormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
+ Link = GetNextNode (&gBrowserFormSetList, Link);
+ if (!ValidateFormSet(FormSet)) {
+ continue;
+ }
if (IsNvUpdateRequired (FormSet)) {
IsDataChanged = TRUE;
break;
}
- Link = GetNextNode (&gBrowserFormSetList, Link);
}
//
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
index e9f9f70ed..7c246b60e 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "Setup.h"
LIST_ENTRY gMenuOption;
-LIST_ENTRY gMenuList = INITIALIZE_LIST_HEAD_VARIABLE (gMenuList);
+LIST_ENTRY gMenuList;
MENU_REFRESH_ENTRY *gMenuRefreshHead; // Menu list used for refresh timer opcode.
MENU_REFRESH_ENTRY *gMenuEventGuidRefreshHead; // Menu list used for refresh event guid opcode.
@@ -219,9 +219,10 @@ UiAddMenuList (
/**
- Search Menu with given FormId and FormSetGuid in all cached menu list.
+ Search Menu with given FormId, FormSetGuid and Handle in all cached menu list.
@param Parent The parent of menu to search.
+ @param Handle Hii handle related to this formset.
@param FormSetGuid The Formset GUID of the menu to search.
@param FormId The Form ID of menu to search.
@@ -231,6 +232,7 @@ UiAddMenuList (
UI_MENU_LIST *
UiFindChildMenuList (
IN UI_MENU_LIST *Parent,
+ IN EFI_HII_HANDLE Handle,
IN EFI_GUID *FormSetGuid,
IN UINT16 FormId
)
@@ -241,7 +243,7 @@ UiFindChildMenuList (
ASSERT (Parent != NULL);
- if (Parent->FormId == FormId && CompareGuid (FormSetGuid, &Parent->FormSetGuid)) {
+ if (Parent->FormId == FormId && CompareGuid (FormSetGuid, &Parent->FormSetGuid) && Parent->HiiHandle == Handle) {
return Parent;
}
@@ -249,7 +251,7 @@ UiFindChildMenuList (
while (!IsNull (&Parent->ChildListHead, Link)) {
Child = UI_MENU_LIST_FROM_LINK (Link);
- MenuList = UiFindChildMenuList (Child, FormSetGuid, FormId);
+ MenuList = UiFindChildMenuList (Child, Handle, FormSetGuid, FormId);
if (MenuList != NULL) {
return MenuList;
}
@@ -262,8 +264,9 @@ UiFindChildMenuList (
/**
- Search Menu with given FormSetGuid and FormId in all cached menu list.
+ Search Menu with given Handle, FormSetGuid and FormId in all cached menu list.
+ @param Handle Hii handle related to this formset.
@param FormSetGuid The Formset GUID of the menu to search.
@param FormId The Form ID of menu to search.
@@ -272,6 +275,7 @@ UiFindChildMenuList (
**/
UI_MENU_LIST *
UiFindMenuList (
+ IN EFI_HII_HANDLE Handle,
IN EFI_GUID *FormSetGuid,
IN UINT16 FormId
)
@@ -284,8 +288,14 @@ UiFindMenuList (
while (!IsNull (&gMenuList, Link)) {
MenuList = UI_MENU_LIST_FROM_LINK (Link);
- Child = UiFindChildMenuList(MenuList, FormSetGuid, FormId);
+ Child = UiFindChildMenuList(MenuList, Handle, FormSetGuid, FormId);
if (Child != NULL) {
+
+ //
+ // If this form already in the menu history list,
+ // just free the list between old this form.
+ //
+ UiFreeMenuList(&Child->ChildListHead);
return Child;
}
@@ -295,6 +305,28 @@ UiFindMenuList (
return NULL;
}
+/**
+ Free Menu list linked list.
+
+ @param MenuListHead One Menu list point in the menu list.
+
+**/
+VOID
+UiFreeMenuList (
+ LIST_ENTRY *MenuListHead
+ )
+{
+ UI_MENU_LIST *MenuList;
+
+ while (!IsListEmpty (MenuListHead)) {
+ MenuList = UI_MENU_LIST_FROM_LINK (MenuListHead->ForwardLink);
+ RemoveEntryList (&MenuList->Link);
+
+ UiFreeMenuList(&MenuList->ChildListHead);
+ FreePool (MenuList);
+ }
+
+}
/**
Free Menu option linked list.
@@ -1997,11 +2029,8 @@ ProcessGotoOpCode (
FORM_BROWSER_FORM *RefForm;
EFI_INPUT_KEY Key;
EFI_STATUS Status;
- UI_MENU_LIST *MenuList;
- BOOLEAN UpdateFormInfo;
-
- Status = EFI_SUCCESS;
- UpdateFormInfo = TRUE;
+
+ Status = EFI_SUCCESS;
StringPtr = NULL;
//
@@ -2122,22 +2151,10 @@ ProcessGotoOpCode (
*NewLine = TRUE;
}
}
- UpdateFormInfo = FALSE;
} else {
if ((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != 0) {
Selection->Action = UI_ACTION_REFRESH_FORM;
}
- UpdateFormInfo = FALSE;
- }
-
- if (UpdateFormInfo) {
- //
- // Link current form so that we can always go back when someone hits the ESC
- //
- MenuList = UiFindMenuList (&Selection->FormSetGuid, Selection->FormId);
- if (MenuList == NULL && Selection->CurrentMenu != NULL) {
- MenuList = UiAddMenuList (Selection->CurrentMenu, Selection->Handle, &Selection->FormSetGuid, Selection->FormId);
- }
}
return Status;
@@ -2279,12 +2296,12 @@ UiDisplayMenu (
//
// Find current Menu
//
- CurrentMenu = UiFindMenuList (&Selection->FormSetGuid, Selection->FormId);
+ CurrentMenu = UiFindMenuList (Selection->Handle, &Selection->FormSetGuid, Selection->FormId);
if (CurrentMenu == NULL) {
//
// Current menu not found, add it to the menu tree
//
- CurrentMenu = UiAddMenuList (NULL, Selection->Handle, &Selection->FormSetGuid, Selection->FormId);
+ CurrentMenu = UiAddMenuList (Selection->CurrentMenu, Selection->Handle, &Selection->FormSetGuid, Selection->FormId);
}
ASSERT (CurrentMenu != NULL);
Selection->CurrentMenu = CurrentMenu;
@@ -3285,7 +3302,8 @@ UiDisplayMenu (
// Check whether Key matches the registered hot key.
//
HotKey = NULL;
- if ((gBrowserSettingScope == SystemLevel) || (gFunctionKeySetting != NONE_FUNCTION_KEY_SETTING)) {
+ if ((gBrowserSettingScope == SystemLevel) ||
+ (Selection->FormEditable && gFunctionKeySetting != NONE_FUNCTION_KEY_SETTING)) {
HotKey = GetHotKeyFromRegisterList (&Key);
}
if (HotKey != NULL) {
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.h b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.h
index 4c3b314f0..03cb0cd75 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.h
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.h
@@ -195,6 +195,7 @@ typedef struct {
extern LIST_ENTRY gMenuOption;
+extern LIST_ENTRY gMenuList;
extern MENU_REFRESH_ENTRY *gMenuRefreshHead;
extern UI_MENU_SELECTION *gCurrentSelection;
extern BOOLEAN mHiiPackageListUpdated;
@@ -250,9 +251,10 @@ UiAddMenuList (
);
/**
- Search Menu with given FormId in the parent menu and all its child menus.
+ Search Menu with given FormId, FormSetGuid and Handle in all cached menu list.
@param Parent The parent of menu to search.
+ @param Handle Hii handle related to this formset.
@param FormSetGuid The Formset GUID of the menu to search.
@param FormId The Form ID of menu to search.
@@ -262,13 +264,15 @@ UiAddMenuList (
UI_MENU_LIST *
UiFindChildMenuList (
IN UI_MENU_LIST *Parent,
+ IN EFI_HII_HANDLE Handle,
IN EFI_GUID *FormSetGuid,
IN UINT16 FormId
);
/**
- Search Menu with given FormSetGuid and FormId in all cached menu list.
+ Search Menu with given Handle, FormSetGuid and FormId in all cached menu list.
+ @param Handle Hii handle related to this formset.
@param FormSetGuid The Formset GUID of the menu to search.
@param FormId The Form ID of menu to search.
@@ -277,11 +281,23 @@ UiFindChildMenuList (
**/
UI_MENU_LIST *
UiFindMenuList (
+ IN EFI_HII_HANDLE Handle,
IN EFI_GUID *FormSetGuid,
IN UINT16 FormId
);
/**
+ Free Menu list linked list.
+
+ @param MenuListHead One Menu list point in the menu list.
+
+**/
+VOID
+UiFreeMenuList (
+ LIST_ENTRY *MenuListHead
+ );
+
+/**
Free Menu option linked list.
**/
diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
index 861e35eb9..8bf5d443a 100644
--- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
+++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
@@ -2,7 +2,7 @@
This code produces the Smbios protocol. It also responsible for constructing
SMBIOS table into system table.
-Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
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
@@ -87,11 +87,11 @@ SMBIOS_TABLE_ENTRY_POINT EntryPointStructureData = {
//
0,
//
- // StructureTableLength, TO BE FILLED
+ // TableLength, TO BE FILLED
//
0,
//
- // StructureTableAddress, TO BE FILLED
+ // TableAddress, TO BE FILLED
//
0,
//
@@ -101,7 +101,8 @@ SMBIOS_TABLE_ENTRY_POINT EntryPointStructureData = {
//
// SmbiosBcdRevision
//
- 0
+ (UINT8) ((FixedPcdGet16 (PcdSmbiosVersion) >> 4) & 0xf0)
+ | (UINT8) (FixedPcdGet16 (PcdSmbiosVersion) & 0x0f)
};
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 8f10425eb..956c1f2ae 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -2756,6 +2756,11 @@ VariableCommonInitialize (
ASSERT(VariableStoreHeader->Size == VariableStoreLength);
//
+ // The max variable or hardware error variable size should be < variable store size.
+ //
+ ASSERT(MAX (PcdGet32 (PcdMaxVariableSize), PcdGet32 (PcdMaxHardwareErrorVariableSize)) < VariableStoreLength);
+
+ //
// Parse non-volatile variable data and get last variable offset.
//
NextVariable = GetStartPointer ((VARIABLE_STORE_HEADER *)(UINTN)VariableStoreBase);
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
index 2a59ac16f..2fca25981 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
@@ -198,6 +198,16 @@ RuntimeServiceGetVariable (
return EFI_INVALID_PARAMETER;
}
+ if (*DataSize >= mVariableBufferSize) {
+ //
+ // DataSize may be near MAX_ADDRESS incorrectly, this can cause the computed PayLoadSize to
+ // overflow to a small value and pass the check in InitCommunicateBuffer().
+ // To protect against this vulnerability, return EFI_INVALID_PARAMETER if DataSize is >= mVariableBufferSize.
+ // And there will be further check to ensure the total size is also not > mVariableBufferSize.
+ //
+ return EFI_INVALID_PARAMETER;
+ }
+
AcquireLockOnlyAtBootTime(&mVariableServicesLock);
//
@@ -275,6 +285,16 @@ RuntimeServiceGetNextVariableName (
return EFI_INVALID_PARAMETER;
}
+ if (*VariableNameSize >= mVariableBufferSize) {
+ //
+ // VariableNameSize may be near MAX_ADDRESS incorrectly, this can cause the computed PayLoadSize to
+ // overflow to a small value and pass the check in InitCommunicateBuffer().
+ // To protect against this vulnerability, return EFI_INVALID_PARAMETER if VariableNameSize is >= mVariableBufferSize.
+ // And there will be further check to ensure the total size is also not > mVariableBufferSize.
+ //
+ return EFI_INVALID_PARAMETER;
+ }
+
AcquireLockOnlyAtBootTime(&mVariableServicesLock);
//
@@ -355,6 +375,16 @@ RuntimeServiceSetVariable (
return EFI_INVALID_PARAMETER;
}
+ if (DataSize >= mVariableBufferSize) {
+ //
+ // DataSize may be near MAX_ADDRESS incorrectly, this can cause the computed PayLoadSize to
+ // overflow to a small value and pass the check in InitCommunicateBuffer().
+ // To protect against this vulnerability, return EFI_INVALID_PARAMETER if DataSize is >= mVariableBufferSize.
+ // And there will be further check to ensure the total size is also not > mVariableBufferSize.
+ //
+ return EFI_INVALID_PARAMETER;
+ }
+
AcquireLockOnlyAtBootTime(&mVariableServicesLock);
//
diff --git a/MdePkg/Include/Guid/Cper.h b/MdePkg/Include/Guid/Cper.h
index ca9a9284f..a5d91ff03 100644
--- a/MdePkg/Include/Guid/Cper.h
+++ b/MdePkg/Include/Guid/Cper.h
@@ -11,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
- GUIDs introduced from UEFI 2.1 Specification.
+ GUIDs introduced from UEFI 2.3.1 Specification.
**/
@@ -209,7 +209,6 @@ typedef struct {
UINT8 SecValidMask;
UINT8 Resv1;
UINT32 SectionFlags;
- UINT8 Resv2[3];
EFI_GUID SectionType;
EFI_GUID FruId;
UINT32 Severity;
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
index b9840444b..ddb8dcd37 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
@@ -1,7 +1,7 @@
/** @file
The implementation of EFI IPv6 Configuration Protocol.
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -473,7 +473,7 @@ Ip6ConfigWriteConfigData (
DataRecord = &Variable->DataRecord[Variable->DataRecordCount];
DataRecord->DataType = (EFI_IP6_CONFIG_DATA_TYPE) Index;
- DataRecord->DataSize = DataItem->DataSize;
+ DataRecord->DataSize = (UINT32) DataItem->DataSize;
DataRecord->Offset = (UINT16) (Heap - (CHAR8 *) Variable);
Variable->DataRecordCount++;
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
index ccb09ccc7..581978bd5 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.h
@@ -1,7 +1,7 @@
/** @file
Definitions for EFI IPv6 Configuartion Protocol implementation.
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -129,7 +129,7 @@ typedef struct {
typedef struct {
UINT16 Offset;
- UINTN DataSize;
+ UINT32 DataSize;
EFI_IP6_CONFIG_DATA_TYPE DataType;
} IP6_CONFIG_DATA_RECORD;
diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c b/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c
index 546cd8680..eaeb44b2a 100644
--- a/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c
+++ b/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c
@@ -695,7 +695,6 @@ Ip6ConvertInterfaceInfoToString (
CHAR16 PortString[ADDRESS_STR_MAX_SIZE];
CHAR16 FormatString[8];
EFI_STRING_ID StringId;
- EFI_STATUS Status;
if ((IfInfo == NULL) || (HiiHandle == NULL) || (IfrNvData == NULL)) {
return EFI_INVALID_PARAMETER;
@@ -780,17 +779,7 @@ Ip6ConvertInterfaceInfoToString (
return EFI_OUT_OF_RESOURCES;
}
- //
- // Print the route table information.
- //
- Status = Ip6ConvertAddressListToString (
- PortString,
- HiiHandle,
- Ip6ConfigNvRouteTable,
- IfInfo->RouteTable,
- IfInfo->RouteCount
- );
- return Status;
+ return EFI_SUCCESS;
}
/**
diff --git a/OvmfPkg/README b/OvmfPkg/README
index 8db4cac0d..0c0a81a67 100644
--- a/OvmfPkg/README
+++ b/OvmfPkg/README
@@ -52,6 +52,7 @@ these binary outputs:
* OVMF.FD
- Please note! This filename has changed. Older releases used OVMF.Fv.
* OvmfVideo.rom
+ - This file is not built separately any longer, starting with svn r13520.
More information on building OVMF can be found at:
diff --git a/OvmfPkg/create-release.py b/OvmfPkg/create-release.py
index 508c09193..6a6017a9f 100755
--- a/OvmfPkg/create-release.py
+++ b/OvmfPkg/create-release.py
@@ -227,7 +227,6 @@ def create_zip(arch):
'FV'
)
zipf.write(os.path.join(FV_DIR, 'OVMF.fd'), 'OVMF.fd')
- zipf.write(os.path.join(FV_DIR, 'OvmfVideo.rom'), 'OvmfVideo.rom')
zipf.close()
print '[done]'
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
index 10915e45b..1595c8c20 100644
--- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
+++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
@@ -3224,6 +3224,11 @@ VariableCommonInitialize (
ASSERT(VariableStoreHeader->Size == VariableStoreLength);
//
+ // The max variable or hardware error variable size should be < variable store size.
+ //
+ ASSERT(MAX (PcdGet32 (PcdMaxVariableSize), PcdGet32 (PcdMaxHardwareErrorVariableSize)) < VariableStoreLength);
+
+ //
// Parse non-volatile variable data and get last variable offset.
//
NextVariable = GetStartPointer ((VARIABLE_STORE_HEADER *)(UINTN)VariableStoreBase);
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmmRuntimeDxe.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmmRuntimeDxe.c
index a785476ff..103a12914 100644
--- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmmRuntimeDxe.c
+++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmmRuntimeDxe.c
@@ -214,6 +214,16 @@ RuntimeServiceGetVariable (
return EFI_INVALID_PARAMETER;
}
+ if (*DataSize >= mVariableBufferSize) {
+ //
+ // DataSize may be near MAX_ADDRESS incorrectly, this can cause the computed PayLoadSize to
+ // overflow to a small value and pass the check in InitCommunicateBuffer().
+ // To protect against this vulnerability, return EFI_INVALID_PARAMETER if DataSize is >= mVariableBufferSize.
+ // And there will be further check to ensure the total size is also not > mVariableBufferSize.
+ //
+ return EFI_INVALID_PARAMETER;
+ }
+
AcquireLockOnlyAtBootTime(&mVariableServicesLock);
//
@@ -291,6 +301,16 @@ RuntimeServiceGetNextVariableName (
return EFI_INVALID_PARAMETER;
}
+ if (*VariableNameSize >= mVariableBufferSize) {
+ //
+ // VariableNameSize may be near MAX_ADDRESS incorrectly, this can cause the computed PayLoadSize to
+ // overflow to a small value and pass the check in InitCommunicateBuffer().
+ // To protect against this vulnerability, return EFI_INVALID_PARAMETER if VariableNameSize is >= mVariableBufferSize.
+ // And there will be further check to ensure the total size is also not > mVariableBufferSize.
+ //
+ return EFI_INVALID_PARAMETER;
+ }
+
AcquireLockOnlyAtBootTime(&mVariableServicesLock);
//
@@ -374,6 +394,16 @@ RuntimeServiceSetVariable (
return EFI_INVALID_PARAMETER;
}
+ if (DataSize >= mVariableBufferSize) {
+ //
+ // DataSize may be near MAX_ADDRESS incorrectly, this can cause the computed PayLoadSize to
+ // overflow to a small value and pass the check in InitCommunicateBuffer().
+ // To protect against this vulnerability, return EFI_INVALID_PARAMETER if DataSize is >= mVariableBufferSize.
+ // And there will be further check to ensure the total size is also not > mVariableBufferSize.
+ //
+ return EFI_INVALID_PARAMETER;
+ }
+
AcquireLockOnlyAtBootTime(&mVariableServicesLock);
//
diff --git a/ShellPkg/Library/UefiDpLib/Dp.c b/ShellPkg/Library/UefiDpLib/Dp.c
index 4fe9083b0..82701723c 100644
--- a/ShellPkg/Library/UefiDpLib/Dp.c
+++ b/ShellPkg/Library/UefiDpLib/Dp.c
@@ -38,7 +38,7 @@
#include <Guid/Performance.h>
-#include <PerformanceTokens.h>
+#include "PerformanceTokens.h"
#include "Dp.h"
#include "Literals.h"
#include "DpInternal.h"
diff --git a/ShellPkg/Library/UefiDpLib/PerformanceTokens.h b/ShellPkg/Library/UefiDpLib/PerformanceTokens.h
new file mode 100644
index 000000000..bbbc48d77
--- /dev/null
+++ b/ShellPkg/Library/UefiDpLib/PerformanceTokens.h
@@ -0,0 +1,28 @@
+/** @file
+ ASCII String Literals with special meaning to Performance measurement and the Dp utility.
+
+Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+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.
+
+**/
+
+#ifndef __PERFORMANCE_TOKENS_H__
+#define __PERFORMANCE_TOKENS_H__
+
+#define SEC_TOK "SEC" ///< SEC Phase
+#define DXE_TOK "DXE" ///< DEC Phase
+#define SHELL_TOK "SHELL" ///< Shell Phase
+#define PEI_TOK "PEI" ///< PEI Phase
+#define BDS_TOK "BDS" ///< BDS Phase
+#define DRIVERBINDING_START_TOK "DB:Start:" ///< Driver Binding Start() function call
+#define DRIVERBINDING_SUPPORT_TOK "DB:Support:" ///< Driver Binding Support() function call
+#define LOAD_IMAGE_TOK "LoadImage:" ///< Load a dispatched module
+#define START_IMAGE_TOK "StartImage:" ///< Dispatched Modules Entry Point execution
+
+#endif // __PERFORMANCE_TOKENS_H__
diff --git a/ShellPkg/Library/UefiDpLib/UefiDpLib.inf b/ShellPkg/Library/UefiDpLib/UefiDpLib.inf
index 43de57dcf..cb53a5949 100644
--- a/ShellPkg/Library/UefiDpLib/UefiDpLib.inf
+++ b/ShellPkg/Library/UefiDpLib/UefiDpLib.inf
@@ -29,6 +29,7 @@
#
[Sources.common]
+ PerformanceTokens.h
UefiDpLib.c
UefiDpLib.h
UefiDpLib.uni
@@ -45,7 +46,6 @@
MdePkg/MdePkg.dec
ShellPkg/ShellPkg.dec
MdeModulePkg/MdeModulePkg.dec
- PerformancePkg/PerformancePkg.dec
[LibraryClasses]
TimerLib
diff --git a/SourceLevelDebugPkg/Readme.txt b/SourceLevelDebugPkg/Readme.txt
index 70ab31d08..cb5d976d7 100644
--- a/SourceLevelDebugPkg/Readme.txt
+++ b/SourceLevelDebugPkg/Readme.txt
@@ -3,4 +3,4 @@ SourceLevelDebugPkg in conjunction with Intel(R) UEFI Development Kit Debugger
Tool (Intel (R) UDK Debugger Tool).
The Intel(R) UDK Debugger Tool and its detailed user manual can be obtained
-from: http://www.intel.com/technology/efi.
+from: http://www.uefidk.com/develop.
diff --git a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
index f4fc2d718..c029c439f 100644
--- a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
+++ b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
@@ -44,11 +44,15 @@
PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
TimerLib|UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/SecPeiDxeTimerLibUefiCpu.inf
ResetSystemLib|MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf
-
+ PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
+ PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
+!ifdef $(SOURCE_DEBUG_USE_USB)
+ DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.inf
+!else
DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
- #DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.inf
+!endif
[LibraryClasses.common.PEIM]
PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf