summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-18 09:12:59 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-18 09:12:59 +0000
commite6c560aad63b09e6aaee3ccc65be462651772fe5 (patch)
treeea8a7bd938ec2060e395df4b86f3f97beabfc500 /IntelFrameworkModulePkg/Library
parentd7f73f568f45c863b44fb2a0fecae8b8c36311d4 (diff)
downloadedk2-platforms-e6c560aad63b09e6aaee3ccc65be462651772fe5.tar.xz
Make GuidedSection library instance to follow the value of GuidedSectionExtraction protocol/PPI defined in PI spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4165 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Library')
-rw-r--r--IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c19
-rw-r--r--IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf1
-rw-r--r--IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h1
3 files changed, 19 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
index 14d549d4d6..a489288761 100644
--- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
+++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
@@ -796,6 +796,7 @@ Returns:
RETURN_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
RETURN_INVALID_PARAMETER - The source data is corrupted
+ The GUID in InputSection does not match this instance guid.
--*/
{
@@ -804,6 +805,12 @@ Returns:
if (InputSection == NULL) {
return RETURN_INVALID_PARAMETER;
}
+
+ if (!CompareGuid (
+ &gTianoCustomDecompressGuid,
+ &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
+ return RETURN_INVALID_PARAMETER;
+ }
//
// Get guid attribute of guid section.
//
@@ -846,7 +853,8 @@ Arguments:
Returns:
RETURN_SUCCESS - Decompression is successfull
- RETURN_INVALID_PARAMETER - The source data is corrupted
+ RETURN_INVALID_PARAMETER - The source data is corrupted, or
+ The GUID in InputSection does not match this instance guid.
--*/
{
@@ -854,7 +862,14 @@ Returns:
if (InputSection == NULL) {
return RETURN_INVALID_PARAMETER;
- }
+ }
+
+ if (!CompareGuid (
+ &gTianoCustomDecompressGuid,
+ &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
+ return RETURN_INVALID_PARAMETER;
+ }
+
//
// Set Authentication to Zero.
//
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
index 18e1f49a27..746d42c2ae 100644
--- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
+++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
@@ -42,6 +42,7 @@
[LibraryClasses]
DebugLib
+ BaseMemoryLib
ExtractGuidedSectionLib
[Guids]
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h
index 29995387b4..c83d79ef0f 100644
--- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h
+++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h
@@ -21,6 +21,7 @@
#include <Library/UefiDecompressLib.h>
#include <Library/DebugLib.h>
+#include <Library/BaseMemoryLib.h>
#include <Library/ExtractGuidedSectionLib.h>
//