Add HiiIsConfigHdrMatch check in RouteConfig, or the test case in
UEFI SCT will fail for Configuration with invalid GUID, because it
expects the return value to be NOT FOUND but actually INVALID
PARAMETER returned.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi....@linaro.org>
---
 OvmfPkg/PlatformDxe/Platform.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c
index 35fabf8..48a24fd 100644
--- a/OvmfPkg/PlatformDxe/Platform.c
+++ b/OvmfPkg/PlatformDxe/Platform.c
@@ -340,6 +340,11 @@ RouteConfig (
   DEBUG ((EFI_D_VERBOSE, "%a: Configuration=\"%s\"\n", __FUNCTION__,
     Configuration));
 
+  if (!HiiIsConfigHdrMatch (Configuration, &gOvmfPlatformConfigGuid, NULL)) {
+    *Progress = Configuration;
+    return EFI_NOT_FOUND;
+  }
+
   //
   // the "read" step in RMW
   //
-- 
2.1.4


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to