Issue cache flush before FWU reset in Shell

Since the commit below was reverted
24f5aa59b5. The cache flush
need to be moved into the place where data consistency
across warm reset is required. The patch added the WBINVD
to flush the cache before "fwupdate" command issues warm
reset.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This commit is contained in:
Maurice Ma 2021-10-13 14:42:34 -07:00
parent 50e5c23594
commit 9aa774f635
6 changed files with 6 additions and 0 deletions

View File

@ -178,6 +178,7 @@ ShellCommandFwUpdateFunc (
//
PlatformService = (PLATFORM_SERVICE *) GetServiceBySignature (PLATFORM_SERVICE_SIGNATURE);
if (PlatformService != NULL && PlatformService->ResetSystem != NULL) {
AsmWbinvd ();
PlatformService->ResetSystem(EfiResetWarm);
}

View File

@ -78,6 +78,7 @@ ShellCommandFwUpdateFunc (
//
PlatformService = (PLATFORM_SERVICE *) GetServiceBySignature (PLATFORM_SERVICE_SIGNATURE);
if (PlatformService != NULL && PlatformService->ResetSystem != NULL) {
AsmWbinvd ();
PlatformService->ResetSystem(EfiResetWarm);
}

View File

@ -78,6 +78,7 @@ ShellCommandFwUpdateFunc (
//
PlatformService = (PLATFORM_SERVICE *) GetServiceBySignature (PLATFORM_SERVICE_SIGNATURE);
if (PlatformService != NULL && PlatformService->ResetSystem != NULL) {
AsmWbinvd ();
PlatformService->ResetSystem(EfiResetWarm);
}

View File

@ -78,6 +78,7 @@ ShellCommandFwUpdateFunc (
//
PlatformService = (PLATFORM_SERVICE *) GetServiceBySignature (PLATFORM_SERVICE_SIGNATURE);
if (PlatformService != NULL && PlatformService->ResetSystem != NULL) {
AsmWbinvd ();
PlatformService->ResetSystem(EfiResetWarm);
}

View File

@ -75,6 +75,7 @@ ShellCommandFwUpdateFunc (
//
PlatformService = (PLATFORM_SERVICE *) GetServiceBySignature (PLATFORM_SERVICE_SIGNATURE);
if (PlatformService != NULL && PlatformService->ResetSystem != NULL) {
AsmWbinvd ();
PlatformService->ResetSystem(EfiResetWarm);
}

View File

@ -78,6 +78,7 @@ ShellCommandFwUpdateFunc (
//
PlatformService = (PLATFORM_SERVICE *) GetServiceBySignature (PLATFORM_SERVICE_SIGNATURE);
if (PlatformService != NULL && PlatformService->ResetSystem != NULL) {
AsmWbinvd ();
PlatformService->ResetSystem(EfiResetWarm);
}