* [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot services functions
@ 2021-08-12 16:13 Jeff Brasen
2021-08-12 17:22 ` Samer El-Haj-Mahmoud
2021-08-20 7:18 ` G Edhaya Chandran
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Brasen @ 2021-08-12 16:13 UTC (permalink / raw)
To: devel
Cc: Edhaya.Chandran, gaojie, Samer.El-Haj-Mahmoud, eric.jin,
arvinx.chen, Jeff Brasen
SctAPrint uses boot services functions but is called after
ExitBootServices. Replace with call to Printf which is safe for use in
runtime.
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
---
.../SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c | 52 +++++++++----------
uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c | 52 +++++++++----------
.../SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c | 52 +++++++++----------
3 files changed, 78 insertions(+), 78 deletions(-)
diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c b/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
index cc8d9869..5688849c 100644
--- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
+++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
@@ -26,43 +26,43 @@ Module Name:
VOID
DumpRuntimeTable()
{
- SctAPrint ("\n================Dump Runtime Table===============\n");
- SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
+ Printf ("\n================Dump Runtime Table===============\n");
+ Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
- SctAPrint ("\n================GetTime Service==============\n");
- SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
+ Printf ("\n================GetTime Service==============\n");
+ Printf ("GetTime @ 0x%x\n", VRT->GetTime);
- SctAPrint ("\n================SetTime Service==============\n");
- SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
+ Printf ("\n================SetTime Service==============\n");
+ Printf ("SetTime @ 0x%x\n", VRT->SetTime);
- SctAPrint ("\n================GetWakeupTime Service==============\n");
- SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
+ Printf ("\n================GetWakeupTime Service==============\n");
+ Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
- SctAPrint ("\n================SetWakeupTime Service==============\n");
- SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
+ Printf ("\n================SetWakeupTime Service==============\n");
+ Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
- SctAPrint ("\n================GetVariable Service==============\n");
- SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
+ Printf ("\n================GetVariable Service==============\n");
+ Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
- SctAPrint ("\n================GetNextVariableName Service==============\n");
- SctAPrint ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
+ Printf ("\n================GetNextVariableName Service==============\n");
+ Printf ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
- SctAPrint ("\n================SetVariable Service==============\n");
- SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
+ Printf ("\n================SetVariable Service==============\n");
+ Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
- SctAPrint ("\n================GetNextHighMonotonicCount Service==============\n");
- SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT->GetNextHighMonotonicCount);
+ Printf ("\n================GetNextHighMonotonicCount Service==============\n");
+ Printf ("GetNextHighMonotonicCount @ 0x%x\n", VRT->GetNextHighMonotonicCount);
- SctAPrint ("\n================ResetSystem Service==============\n");
- SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
+ Printf ("\n================ResetSystem Service==============\n");
+ Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
#if 0
- SctAPrint ("\n================UpdateCapsule Service==============\n");
- SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
+ Printf ("\n================UpdateCapsule Service==============\n");
+ Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
- SctAPrint ("\n================QueryCapsuleCapabilities Service==============\n");
- SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT->QueryCapsuleCapabilities);
+ Printf ("\n================QueryCapsuleCapabilities Service==============\n");
+ Printf ("QueryCapsuleCapabilities @ 0x%x\n", VRT->QueryCapsuleCapabilities);
- SctAPrint ("\n================QueryVariableInfo Service==============\n");
- SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
+ Printf ("\n================QueryVariableInfo Service==============\n");
+ Printf ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
#endif
}
diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c b/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
index 89e03019..47173d45 100644
--- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
+++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
@@ -27,43 +27,43 @@ Module Name:
VOID
DumpRuntimeTable()
{
- SctAPrint ("\n================Dump Runtime Table===============\n");
- SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
+ Printf ("\n================Dump Runtime Table===============\n");
+ Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
- SctAPrint ("\n================GetTime Service==============\n");
- SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
+ Printf ("\n================GetTime Service==============\n");
+ Printf ("GetTime @ 0x%x\n", VRT->GetTime);
- SctAPrint ("\n================SetTime Service==============\n");
- SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
+ Printf ("\n================SetTime Service==============\n");
+ Printf ("SetTime @ 0x%x\n", VRT->SetTime);
- SctAPrint ("\n================GetWakeupTime Service==============\n");
- SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
+ Printf ("\n================GetWakeupTime Service==============\n");
+ Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
- SctAPrint ("\n================SetWakeupTime Service==============\n");
- SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
+ Printf ("\n================SetWakeupTime Service==============\n");
+ Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
- SctAPrint ("\n================GetVariable Service==============\n");
- SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
+ Printf ("\n================GetVariable Service==============\n");
+ Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
- SctAPrint ("\n================GetNextVariableName Service==============\n");
- SctAPrint ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
+ Printf ("\n================GetNextVariableName Service==============\n");
+ Printf ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
- SctAPrint ("\n================SetVariable Service==============\n");
- SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
+ Printf ("\n================SetVariable Service==============\n");
+ Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
- SctAPrint ("\n================GetNextHighMonotonicCount Service==============\n");
- SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT->GetNextHighMonotonicCount);
+ Printf ("\n================GetNextHighMonotonicCount Service==============\n");
+ Printf ("GetNextHighMonotonicCount @ 0x%x\n", VRT->GetNextHighMonotonicCount);
- SctAPrint ("\n================ResetSystem Service==============\n");
- SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
+ Printf ("\n================ResetSystem Service==============\n");
+ Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
#if 0
- SctAPrint ("\n================UpdateCapsule Service==============\n");
- SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
+ Printf ("\n================UpdateCapsule Service==============\n");
+ Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
- SctAPrint ("\n================QueryCapsuleCapabilities Service==============\n");
- SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT->QueryCapsuleCapabilities);
+ Printf ("\n================QueryCapsuleCapabilities Service==============\n");
+ Printf ("QueryCapsuleCapabilities @ 0x%x\n", VRT->QueryCapsuleCapabilities);
- SctAPrint ("\n================QueryVariableInfo Service==============\n");
- SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
+ Printf ("\n================QueryVariableInfo Service==============\n");
+ Printf ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
#endif
}
diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c b/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
index cc8d9869..5688849c 100644
--- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
+++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
@@ -26,43 +26,43 @@ Module Name:
VOID
DumpRuntimeTable()
{
- SctAPrint ("\n================Dump Runtime Table===============\n");
- SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
+ Printf ("\n================Dump Runtime Table===============\n");
+ Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
- SctAPrint ("\n================GetTime Service==============\n");
- SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
+ Printf ("\n================GetTime Service==============\n");
+ Printf ("GetTime @ 0x%x\n", VRT->GetTime);
- SctAPrint ("\n================SetTime Service==============\n");
- SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
+ Printf ("\n================SetTime Service==============\n");
+ Printf ("SetTime @ 0x%x\n", VRT->SetTime);
- SctAPrint ("\n================GetWakeupTime Service==============\n");
- SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
+ Printf ("\n================GetWakeupTime Service==============\n");
+ Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
- SctAPrint ("\n================SetWakeupTime Service==============\n");
- SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
+ Printf ("\n================SetWakeupTime Service==============\n");
+ Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
- SctAPrint ("\n================GetVariable Service==============\n");
- SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
+ Printf ("\n================GetVariable Service==============\n");
+ Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
- SctAPrint ("\n================GetNextVariableName Service==============\n");
- SctAPrint ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
+ Printf ("\n================GetNextVariableName Service==============\n");
+ Printf ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
- SctAPrint ("\n================SetVariable Service==============\n");
- SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
+ Printf ("\n================SetVariable Service==============\n");
+ Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
- SctAPrint ("\n================GetNextHighMonotonicCount Service==============\n");
- SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT->GetNextHighMonotonicCount);
+ Printf ("\n================GetNextHighMonotonicCount Service==============\n");
+ Printf ("GetNextHighMonotonicCount @ 0x%x\n", VRT->GetNextHighMonotonicCount);
- SctAPrint ("\n================ResetSystem Service==============\n");
- SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
+ Printf ("\n================ResetSystem Service==============\n");
+ Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
#if 0
- SctAPrint ("\n================UpdateCapsule Service==============\n");
- SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
+ Printf ("\n================UpdateCapsule Service==============\n");
+ Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
- SctAPrint ("\n================QueryCapsuleCapabilities Service==============\n");
- SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT->QueryCapsuleCapabilities);
+ Printf ("\n================QueryCapsuleCapabilities Service==============\n");
+ Printf ("QueryCapsuleCapabilities @ 0x%x\n", VRT->QueryCapsuleCapabilities);
- SctAPrint ("\n================QueryVariableInfo Service==============\n");
- SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
+ Printf ("\n================QueryVariableInfo Service==============\n");
+ Printf ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
#endif
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot services functions
2021-08-12 16:13 [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot services functions Jeff Brasen
@ 2021-08-12 17:22 ` Samer El-Haj-Mahmoud
2021-08-20 7:18 ` G Edhaya Chandran
1 sibling, 0 replies; 4+ messages in thread
From: Samer El-Haj-Mahmoud @ 2021-08-12 17:22 UTC (permalink / raw)
To: Jeff Brasen (jbrasen@nvidia.com), devel@edk2.groups.io
Cc: G Edhaya Chandran, gaojie@byosoft.com.cn, eric.jin@intel.com,
arvinx.chen@intel.com, Jeff Brasen (jbrasen@nvidia.com),
Samer El-Haj-Mahmoud, Heinrich Schuchardt
Thanks for the catch Jeff!!
Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
> -----Original Message-----
> From: Jeff Brasen <jbrasen@nvidia.com>
> Sent: Thursday, August 12, 2021 12:13 PM
> To: devel@edk2.groups.io
> Cc: G Edhaya Chandran <Edhaya.Chandran@arm.com>;
> gaojie@byosoft.com.cn; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>; eric.jin@intel.com; arvinx.chen@intel.com; Jeff
> Brasen (jbrasen@nvidia.com) <jbrasen@nvidia.com>
> Subject: [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot services
> functions
>
> SctAPrint uses boot services functions but is called after
> ExitBootServices. Replace with call to Printf which is safe for use in
> runtime.
>
> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
> ---
> .../SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c | 52 +++++++++----------
> uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c | 52 +++++++++----------
> .../SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c | 52 +++++++++----------
> 3 files changed, 78 insertions(+), 78 deletions(-)
>
> diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c b/uefi-
> sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
> index cc8d9869..5688849c 100644
> --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
> +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
> @@ -26,43 +26,43 @@ Module Name:
> VOID
> DumpRuntimeTable()
> {
> - SctAPrint ("\n================Dump Runtime
> Table===============\n");
> - SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> + Printf ("\n================Dump Runtime
> Table===============\n");
> + Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
>
> - SctAPrint ("\n================GetTime Service==============\n");
> - SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
> + Printf ("\n================GetTime Service==============\n");
> + Printf ("GetTime @ 0x%x\n", VRT->GetTime);
>
> - SctAPrint ("\n================SetTime Service==============\n");
> - SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
> + Printf ("\n================SetTime Service==============\n");
> + Printf ("SetTime @ 0x%x\n", VRT->SetTime);
>
> - SctAPrint ("\n================GetWakeupTime
> Service==============\n");
> - SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> + Printf ("\n================GetWakeupTime
> Service==============\n");
> + Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
>
> - SctAPrint ("\n================SetWakeupTime
> Service==============\n");
> - SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> + Printf ("\n================SetWakeupTime
> Service==============\n");
> + Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
>
> - SctAPrint ("\n================GetVariable
> Service==============\n");
> - SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
> + Printf ("\n================GetVariable Service==============\n");
> + Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
>
> - SctAPrint ("\n================GetNextVariableName
> Service==============\n");
> - SctAPrint ("GetNextVariableName @ 0x%x\n", VRT-
> >GetNextVariableName);
> + Printf ("\n================GetNextVariableName
> Service==============\n");
> + Printf ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
>
> - SctAPrint ("\n================SetVariable
> Service==============\n");
> - SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
> + Printf ("\n================SetVariable Service==============\n");
> + Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
>
> - SctAPrint ("\n================GetNextHighMonotonicCount
> Service==============\n");
> - SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> >GetNextHighMonotonicCount);
> + Printf ("\n================GetNextHighMonotonicCount
> Service==============\n");
> + Printf ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> >GetNextHighMonotonicCount);
>
> - SctAPrint ("\n================ResetSystem
> Service==============\n");
> - SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> + Printf ("\n================ResetSystem
> Service==============\n");
> + Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> #if 0
> - SctAPrint ("\n================UpdateCapsule
> Service==============\n");
> - SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> + Printf ("\n================UpdateCapsule
> Service==============\n");
> + Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
>
> - SctAPrint ("\n================QueryCapsuleCapabilities
> Service==============\n");
> - SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> >QueryCapsuleCapabilities);
> + Printf ("\n================QueryCapsuleCapabilities
> Service==============\n");
> + Printf ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> >QueryCapsuleCapabilities);
>
> - SctAPrint ("\n================QueryVariableInfo
> Service==============\n");
> - SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> + Printf ("\n================QueryVariableInfo
> Service==============\n");
> + Printf ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> #endif
> }
> diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c b/uefi-
> sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
> index 89e03019..47173d45 100644
> --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
> +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
> @@ -27,43 +27,43 @@ Module Name:
> VOID
> DumpRuntimeTable()
> {
> - SctAPrint ("\n================Dump Runtime
> Table===============\n");
> - SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> + Printf ("\n================Dump Runtime
> Table===============\n");
> + Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
>
> - SctAPrint ("\n================GetTime Service==============\n");
> - SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
> + Printf ("\n================GetTime Service==============\n");
> + Printf ("GetTime @ 0x%x\n", VRT->GetTime);
>
> - SctAPrint ("\n================SetTime Service==============\n");
> - SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
> + Printf ("\n================SetTime Service==============\n");
> + Printf ("SetTime @ 0x%x\n", VRT->SetTime);
>
> - SctAPrint ("\n================GetWakeupTime
> Service==============\n");
> - SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> + Printf ("\n================GetWakeupTime
> Service==============\n");
> + Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
>
> - SctAPrint ("\n================SetWakeupTime
> Service==============\n");
> - SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> + Printf ("\n================SetWakeupTime
> Service==============\n");
> + Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
>
> - SctAPrint ("\n================GetVariable
> Service==============\n");
> - SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
> + Printf ("\n================GetVariable Service==============\n");
> + Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
>
> - SctAPrint ("\n================GetNextVariableName
> Service==============\n");
> - SctAPrint ("GetNextVariableName @ 0x%x\n", VRT-
> >GetNextVariableName);
> + Printf ("\n================GetNextVariableName
> Service==============\n");
> + Printf ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
>
> - SctAPrint ("\n================SetVariable
> Service==============\n");
> - SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
> + Printf ("\n================SetVariable Service==============\n");
> + Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
>
> - SctAPrint ("\n================GetNextHighMonotonicCount
> Service==============\n");
> - SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> >GetNextHighMonotonicCount);
> + Printf ("\n================GetNextHighMonotonicCount
> Service==============\n");
> + Printf ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> >GetNextHighMonotonicCount);
>
> - SctAPrint ("\n================ResetSystem
> Service==============\n");
> - SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> + Printf ("\n================ResetSystem
> Service==============\n");
> + Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> #if 0
> - SctAPrint ("\n================UpdateCapsule
> Service==============\n");
> - SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> + Printf ("\n================UpdateCapsule
> Service==============\n");
> + Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
>
> - SctAPrint ("\n================QueryCapsuleCapabilities
> Service==============\n");
> - SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> >QueryCapsuleCapabilities);
> + Printf ("\n================QueryCapsuleCapabilities
> Service==============\n");
> + Printf ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> >QueryCapsuleCapabilities);
>
> - SctAPrint ("\n================QueryVariableInfo
> Service==============\n");
> - SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> + Printf ("\n================QueryVariableInfo
> Service==============\n");
> + Printf ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> #endif
> }
> diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c b/uefi-
> sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
> index cc8d9869..5688849c 100644
> --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
> +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
> @@ -26,43 +26,43 @@ Module Name:
> VOID
> DumpRuntimeTable()
> {
> - SctAPrint ("\n================Dump Runtime
> Table===============\n");
> - SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> + Printf ("\n================Dump Runtime
> Table===============\n");
> + Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
>
> - SctAPrint ("\n================GetTime Service==============\n");
> - SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
> + Printf ("\n================GetTime Service==============\n");
> + Printf ("GetTime @ 0x%x\n", VRT->GetTime);
>
> - SctAPrint ("\n================SetTime Service==============\n");
> - SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
> + Printf ("\n================SetTime Service==============\n");
> + Printf ("SetTime @ 0x%x\n", VRT->SetTime);
>
> - SctAPrint ("\n================GetWakeupTime
> Service==============\n");
> - SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> + Printf ("\n================GetWakeupTime
> Service==============\n");
> + Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
>
> - SctAPrint ("\n================SetWakeupTime
> Service==============\n");
> - SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> + Printf ("\n================SetWakeupTime
> Service==============\n");
> + Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
>
> - SctAPrint ("\n================GetVariable
> Service==============\n");
> - SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
> + Printf ("\n================GetVariable Service==============\n");
> + Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
>
> - SctAPrint ("\n================GetNextVariableName
> Service==============\n");
> - SctAPrint ("GetNextVariableName @ 0x%x\n", VRT-
> >GetNextVariableName);
> + Printf ("\n================GetNextVariableName
> Service==============\n");
> + Printf ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
>
> - SctAPrint ("\n================SetVariable
> Service==============\n");
> - SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
> + Printf ("\n================SetVariable Service==============\n");
> + Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
>
> - SctAPrint ("\n================GetNextHighMonotonicCount
> Service==============\n");
> - SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> >GetNextHighMonotonicCount);
> + Printf ("\n================GetNextHighMonotonicCount
> Service==============\n");
> + Printf ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> >GetNextHighMonotonicCount);
>
> - SctAPrint ("\n================ResetSystem
> Service==============\n");
> - SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> + Printf ("\n================ResetSystem
> Service==============\n");
> + Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> #if 0
> - SctAPrint ("\n================UpdateCapsule
> Service==============\n");
> - SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> + Printf ("\n================UpdateCapsule
> Service==============\n");
> + Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
>
> - SctAPrint ("\n================QueryCapsuleCapabilities
> Service==============\n");
> - SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> >QueryCapsuleCapabilities);
> + Printf ("\n================QueryCapsuleCapabilities
> Service==============\n");
> + Printf ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> >QueryCapsuleCapabilities);
>
> - SctAPrint ("\n================QueryVariableInfo
> Service==============\n");
> - SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> + Printf ("\n================QueryVariableInfo
> Service==============\n");
> + Printf ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> #endif
> }
> --
> 2.25.1
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot services functions
2021-08-12 16:13 [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot services functions Jeff Brasen
2021-08-12 17:22 ` Samer El-Haj-Mahmoud
@ 2021-08-20 7:18 ` G Edhaya Chandran
2021-08-23 14:41 ` G Edhaya Chandran
1 sibling, 1 reply; 4+ messages in thread
From: G Edhaya Chandran @ 2021-08-20 7:18 UTC (permalink / raw)
To: Jeff Brasen (jbrasen@nvidia.com), devel@edk2.groups.io
Cc: gaojie@byosoft.com.cn, Samer El-Haj-Mahmoud, eric.jin@intel.com,
arvinx.chen@intel.com, Jeff Brasen (jbrasen@nvidia.com)
Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
> -----Original Message-----
> From: Jeff Brasen <jbrasen@nvidia.com>
> Sent: 12 August 2021 21:43
> To: devel@edk2.groups.io
> Cc: G Edhaya Chandran <Edhaya.Chandran@arm.com>; gaojie@byosoft.com.cn;
> Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>;
> eric.jin@intel.com; arvinx.chen@intel.com; Jeff Brasen (jbrasen@nvidia.com)
> <jbrasen@nvidia.com>
> Subject: [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot services
> functions
>
> SctAPrint uses boot services functions but is called after ExitBootServices.
> Replace with call to Printf which is safe for use in runtime.
>
> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
> ---
> .../SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c | 52 +++++++++----------
> uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c | 52 +++++++++----------
> .../SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c | 52 +++++++++----------
> 3 files changed, 78 insertions(+), 78 deletions(-)
>
> diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c b/uefi-
> sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
> index cc8d9869..5688849c 100644
> --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
> +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
> @@ -26,43 +26,43 @@ Module Name:
> VOID
> DumpRuntimeTable()
> {
> - SctAPrint ("\n================Dump Runtime Table===============\n");
> - SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> + Printf ("\n================Dump Runtime Table===============\n");
> + Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
>
> - SctAPrint ("\n================GetTime Service==============\n");
> - SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
> + Printf ("\n================GetTime Service==============\n"); Printf
> + ("GetTime @ 0x%x\n", VRT->GetTime);
>
> - SctAPrint ("\n================SetTime Service==============\n");
> - SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
> + Printf ("\n================SetTime Service==============\n"); Printf
> + ("SetTime @ 0x%x\n", VRT->SetTime);
>
> - SctAPrint ("\n================GetWakeupTime
> Service==============\n");
> - SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> + Printf ("\n================GetWakeupTime Service==============\n");
> + Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
>
> - SctAPrint ("\n================SetWakeupTime
> Service==============\n");
> - SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> + Printf ("\n================SetWakeupTime Service==============\n");
> + Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
>
> - SctAPrint ("\n================GetVariable Service==============\n");
> - SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
> + Printf ("\n================GetVariable Service==============\n");
> + Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
>
> - SctAPrint ("\n================GetNextVariableName
> Service==============\n");
> - SctAPrint ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
> + Printf ("\n================GetNextVariableName
> + Service==============\n"); Printf ("GetNextVariableName @ 0x%x\n",
> + VRT->GetNextVariableName);
>
> - SctAPrint ("\n================SetVariable Service==============\n");
> - SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
> + Printf ("\n================SetVariable Service==============\n");
> + Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
>
> - SctAPrint ("\n================GetNextHighMonotonicCount
> Service==============\n");
> - SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> >GetNextHighMonotonicCount);
> + Printf ("\n================GetNextHighMonotonicCount
> + Service==============\n"); Printf ("GetNextHighMonotonicCount @
> + 0x%x\n", VRT->GetNextHighMonotonicCount);
>
> - SctAPrint ("\n================ResetSystem Service==============\n");
> - SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> + Printf ("\n================ResetSystem Service==============\n");
> + Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> #if 0
> - SctAPrint ("\n================UpdateCapsule Service==============\n");
> - SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> + Printf ("\n================UpdateCapsule Service==============\n");
> + Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
>
> - SctAPrint ("\n================QueryCapsuleCapabilities
> Service==============\n");
> - SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> >QueryCapsuleCapabilities);
> + Printf ("\n================QueryCapsuleCapabilities
> + Service==============\n"); Printf ("QueryCapsuleCapabilities @
> + 0x%x\n", VRT->QueryCapsuleCapabilities);
>
> - SctAPrint ("\n================QueryVariableInfo
> Service==============\n");
> - SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> + Printf ("\n================QueryVariableInfo
> + Service==============\n"); Printf ("QueryVariableInfo @ 0x%x\n",
> + VRT->QueryVariableInfo);
> #endif
> }
> diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c b/uefi-
> sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
> index 89e03019..47173d45 100644
> --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
> +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
> @@ -27,43 +27,43 @@ Module Name:
> VOID
> DumpRuntimeTable()
> {
> - SctAPrint ("\n================Dump Runtime Table===============\n");
> - SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> + Printf ("\n================Dump Runtime Table===============\n");
> + Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
>
> - SctAPrint ("\n================GetTime Service==============\n");
> - SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
> + Printf ("\n================GetTime Service==============\n"); Printf
> + ("GetTime @ 0x%x\n", VRT->GetTime);
>
> - SctAPrint ("\n================SetTime Service==============\n");
> - SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
> + Printf ("\n================SetTime Service==============\n"); Printf
> + ("SetTime @ 0x%x\n", VRT->SetTime);
>
> - SctAPrint ("\n================GetWakeupTime
> Service==============\n");
> - SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> + Printf ("\n================GetWakeupTime Service==============\n");
> + Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
>
> - SctAPrint ("\n================SetWakeupTime
> Service==============\n");
> - SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> + Printf ("\n================SetWakeupTime Service==============\n");
> + Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
>
> - SctAPrint ("\n================GetVariable Service==============\n");
> - SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
> + Printf ("\n================GetVariable Service==============\n");
> + Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
>
> - SctAPrint ("\n================GetNextVariableName
> Service==============\n");
> - SctAPrint ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
> + Printf ("\n================GetNextVariableName
> + Service==============\n"); Printf ("GetNextVariableName @ 0x%x\n",
> + VRT->GetNextVariableName);
>
> - SctAPrint ("\n================SetVariable Service==============\n");
> - SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
> + Printf ("\n================SetVariable Service==============\n");
> + Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
>
> - SctAPrint ("\n================GetNextHighMonotonicCount
> Service==============\n");
> - SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> >GetNextHighMonotonicCount);
> + Printf ("\n================GetNextHighMonotonicCount
> + Service==============\n"); Printf ("GetNextHighMonotonicCount @
> + 0x%x\n", VRT->GetNextHighMonotonicCount);
>
> - SctAPrint ("\n================ResetSystem Service==============\n");
> - SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> + Printf ("\n================ResetSystem Service==============\n");
> + Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> #if 0
> - SctAPrint ("\n================UpdateCapsule Service==============\n");
> - SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> + Printf ("\n================UpdateCapsule Service==============\n");
> + Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
>
> - SctAPrint ("\n================QueryCapsuleCapabilities
> Service==============\n");
> - SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> >QueryCapsuleCapabilities);
> + Printf ("\n================QueryCapsuleCapabilities
> + Service==============\n"); Printf ("QueryCapsuleCapabilities @
> + 0x%x\n", VRT->QueryCapsuleCapabilities);
>
> - SctAPrint ("\n================QueryVariableInfo
> Service==============\n");
> - SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> + Printf ("\n================QueryVariableInfo
> + Service==============\n"); Printf ("QueryVariableInfo @ 0x%x\n",
> + VRT->QueryVariableInfo);
> #endif
> }
> diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c b/uefi-
> sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
> index cc8d9869..5688849c 100644
> --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
> +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
> @@ -26,43 +26,43 @@ Module Name:
> VOID
> DumpRuntimeTable()
> {
> - SctAPrint ("\n================Dump Runtime Table===============\n");
> - SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> + Printf ("\n================Dump Runtime Table===============\n");
> + Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
>
> - SctAPrint ("\n================GetTime Service==============\n");
> - SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
> + Printf ("\n================GetTime Service==============\n"); Printf
> + ("GetTime @ 0x%x\n", VRT->GetTime);
>
> - SctAPrint ("\n================SetTime Service==============\n");
> - SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
> + Printf ("\n================SetTime Service==============\n"); Printf
> + ("SetTime @ 0x%x\n", VRT->SetTime);
>
> - SctAPrint ("\n================GetWakeupTime
> Service==============\n");
> - SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> + Printf ("\n================GetWakeupTime Service==============\n");
> + Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
>
> - SctAPrint ("\n================SetWakeupTime
> Service==============\n");
> - SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> + Printf ("\n================SetWakeupTime Service==============\n");
> + Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
>
> - SctAPrint ("\n================GetVariable Service==============\n");
> - SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
> + Printf ("\n================GetVariable Service==============\n");
> + Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
>
> - SctAPrint ("\n================GetNextVariableName
> Service==============\n");
> - SctAPrint ("GetNextVariableName @ 0x%x\n", VRT->GetNextVariableName);
> + Printf ("\n================GetNextVariableName
> + Service==============\n"); Printf ("GetNextVariableName @ 0x%x\n",
> + VRT->GetNextVariableName);
>
> - SctAPrint ("\n================SetVariable Service==============\n");
> - SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
> + Printf ("\n================SetVariable Service==============\n");
> + Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
>
> - SctAPrint ("\n================GetNextHighMonotonicCount
> Service==============\n");
> - SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> >GetNextHighMonotonicCount);
> + Printf ("\n================GetNextHighMonotonicCount
> + Service==============\n"); Printf ("GetNextHighMonotonicCount @
> + 0x%x\n", VRT->GetNextHighMonotonicCount);
>
> - SctAPrint ("\n================ResetSystem Service==============\n");
> - SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> + Printf ("\n================ResetSystem Service==============\n");
> + Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> #if 0
> - SctAPrint ("\n================UpdateCapsule Service==============\n");
> - SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> + Printf ("\n================UpdateCapsule Service==============\n");
> + Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
>
> - SctAPrint ("\n================QueryCapsuleCapabilities
> Service==============\n");
> - SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> >QueryCapsuleCapabilities);
> + Printf ("\n================QueryCapsuleCapabilities
> + Service==============\n"); Printf ("QueryCapsuleCapabilities @
> + 0x%x\n", VRT->QueryCapsuleCapabilities);
>
> - SctAPrint ("\n================QueryVariableInfo
> Service==============\n");
> - SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> + Printf ("\n================QueryVariableInfo
> + Service==============\n"); Printf ("QueryVariableInfo @ 0x%x\n",
> + VRT->QueryVariableInfo);
> #endif
> }
> --
> 2.25.1
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot services functions
2021-08-20 7:18 ` G Edhaya Chandran
@ 2021-08-23 14:41 ` G Edhaya Chandran
0 siblings, 0 replies; 4+ messages in thread
From: G Edhaya Chandran @ 2021-08-23 14:41 UTC (permalink / raw)
To: Jeff Brasen (jbrasen@nvidia.com), devel@edk2.groups.io
Cc: gaojie@byosoft.com.cn, Samer El-Haj-Mahmoud, eric.jin@intel.com,
arvinx.chen@intel.com, Jeff Brasen (jbrasen@nvidia.com)
This patch is upstreamed through the commit-id: https://github.com/tianocore/edk2-test/commit/f3b3456152dacf26ec0abaa0c21a9432cc176630
> -----Original Message-----
> From: G Edhaya Chandran
> Sent: 20 August 2021 12:48
> To: Jeff Brasen <jbrasen@nvidia.com>; devel@edk2.groups.io
> Cc: gaojie@byosoft.com.cn; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>; eric.jin@intel.com; arvinx.chen@intel.com; Jeff Brasen
> (jbrasen@nvidia.com) <jbrasen@nvidia.com>
> Subject: RE: [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot services
> functions
>
> Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>
>
> > -----Original Message-----
> > From: Jeff Brasen <jbrasen@nvidia.com>
> > Sent: 12 August 2021 21:43
> > To: devel@edk2.groups.io
> > Cc: G Edhaya Chandran <Edhaya.Chandran@arm.com>;
> > gaojie@byosoft.com.cn; Samer El-Haj-Mahmoud
> > <Samer.El-Haj-Mahmoud@arm.com>; eric.jin@intel.com;
> > arvinx.chen@intel.com; Jeff Brasen (jbrasen@nvidia.com)
> > <jbrasen@nvidia.com>
> > Subject: [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot
> > services functions
> >
> > SctAPrint uses boot services functions but is called after ExitBootServices.
> > Replace with call to Printf which is safe for use in runtime.
> >
> > Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
> > ---
> > .../SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c | 52 +++++++++----------
> > uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c | 52 +++++++++----------
> > .../SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c | 52 +++++++++----------
> > 3 files changed, 78 insertions(+), 78 deletions(-)
> >
> > diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c b/uefi-
> > sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
> > index cc8d9869..5688849c 100644
> > --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
> > +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Aarch64/Dump.c
> > @@ -26,43 +26,43 @@ Module Name:
> > VOID
> > DumpRuntimeTable()
> > {
> > - SctAPrint ("\n================Dump Runtime
> > Table===============\n");
> > - SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> > + Printf ("\n================Dump Runtime Table===============\n");
> > + Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> >
> > - SctAPrint ("\n================GetTime Service==============\n");
> > - SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
> > + Printf ("\n================GetTime Service==============\n");
> > + Printf ("GetTime @ 0x%x\n", VRT->GetTime);
> >
> > - SctAPrint ("\n================SetTime Service==============\n");
> > - SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
> > + Printf ("\n================SetTime Service==============\n");
> > + Printf ("SetTime @ 0x%x\n", VRT->SetTime);
> >
> > - SctAPrint ("\n================GetWakeupTime
> > Service==============\n");
> > - SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> > + Printf ("\n================GetWakeupTime Service==============\n");
> > + Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> >
> > - SctAPrint ("\n================SetWakeupTime
> > Service==============\n");
> > - SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> > + Printf ("\n================SetWakeupTime Service==============\n");
> > + Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> >
> > - SctAPrint ("\n================GetVariable
> > Service==============\n");
> > - SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
> > + Printf ("\n================GetVariable Service==============\n");
> > + Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
> >
> > - SctAPrint ("\n================GetNextVariableName
> > Service==============\n");
> > - SctAPrint ("GetNextVariableName @ 0x%x\n",
> > VRT->GetNextVariableName);
> > + Printf ("\n================GetNextVariableName
> > + Service==============\n"); Printf ("GetNextVariableName @ 0x%x\n",
> > + VRT->GetNextVariableName);
> >
> > - SctAPrint ("\n================SetVariable
> > Service==============\n");
> > - SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
> > + Printf ("\n================SetVariable Service==============\n");
> > + Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
> >
> > - SctAPrint ("\n================GetNextHighMonotonicCount
> > Service==============\n");
> > - SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> > >GetNextHighMonotonicCount);
> > + Printf ("\n================GetNextHighMonotonicCount
> > + Service==============\n"); Printf ("GetNextHighMonotonicCount @
> > + 0x%x\n", VRT->GetNextHighMonotonicCount);
> >
> > - SctAPrint ("\n================ResetSystem
> > Service==============\n");
> > - SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> > + Printf ("\n================ResetSystem Service==============\n");
> > + Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> > #if 0
> > - SctAPrint ("\n================UpdateCapsule
> > Service==============\n");
> > - SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> > + Printf ("\n================UpdateCapsule Service==============\n");
> > + Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> >
> > - SctAPrint ("\n================QueryCapsuleCapabilities
> > Service==============\n");
> > - SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> > >QueryCapsuleCapabilities);
> > + Printf ("\n================QueryCapsuleCapabilities
> > + Service==============\n"); Printf ("QueryCapsuleCapabilities @
> > + 0x%x\n", VRT->QueryCapsuleCapabilities);
> >
> > - SctAPrint ("\n================QueryVariableInfo
> > Service==============\n");
> > - SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> > + Printf ("\n================QueryVariableInfo
> > + Service==============\n"); Printf ("QueryVariableInfo @ 0x%x\n",
> > + VRT->QueryVariableInfo);
> > #endif
> > }
> > diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c b/uefi-
> > sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
> > index 89e03019..47173d45 100644
> > --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
> > +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Arm/Dump.c
> > @@ -27,43 +27,43 @@ Module Name:
> > VOID
> > DumpRuntimeTable()
> > {
> > - SctAPrint ("\n================Dump Runtime
> > Table===============\n");
> > - SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> > + Printf ("\n================Dump Runtime Table===============\n");
> > + Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> >
> > - SctAPrint ("\n================GetTime Service==============\n");
> > - SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
> > + Printf ("\n================GetTime Service==============\n");
> > + Printf ("GetTime @ 0x%x\n", VRT->GetTime);
> >
> > - SctAPrint ("\n================SetTime Service==============\n");
> > - SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
> > + Printf ("\n================SetTime Service==============\n");
> > + Printf ("SetTime @ 0x%x\n", VRT->SetTime);
> >
> > - SctAPrint ("\n================GetWakeupTime
> > Service==============\n");
> > - SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> > + Printf ("\n================GetWakeupTime Service==============\n");
> > + Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> >
> > - SctAPrint ("\n================SetWakeupTime
> > Service==============\n");
> > - SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> > + Printf ("\n================SetWakeupTime Service==============\n");
> > + Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> >
> > - SctAPrint ("\n================GetVariable
> > Service==============\n");
> > - SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
> > + Printf ("\n================GetVariable Service==============\n");
> > + Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
> >
> > - SctAPrint ("\n================GetNextVariableName
> > Service==============\n");
> > - SctAPrint ("GetNextVariableName @ 0x%x\n",
> > VRT->GetNextVariableName);
> > + Printf ("\n================GetNextVariableName
> > + Service==============\n"); Printf ("GetNextVariableName @ 0x%x\n",
> > + VRT->GetNextVariableName);
> >
> > - SctAPrint ("\n================SetVariable
> > Service==============\n");
> > - SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
> > + Printf ("\n================SetVariable Service==============\n");
> > + Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
> >
> > - SctAPrint ("\n================GetNextHighMonotonicCount
> > Service==============\n");
> > - SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> > >GetNextHighMonotonicCount);
> > + Printf ("\n================GetNextHighMonotonicCount
> > + Service==============\n"); Printf ("GetNextHighMonotonicCount @
> > + 0x%x\n", VRT->GetNextHighMonotonicCount);
> >
> > - SctAPrint ("\n================ResetSystem
> > Service==============\n");
> > - SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> > + Printf ("\n================ResetSystem Service==============\n");
> > + Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> > #if 0
> > - SctAPrint ("\n================UpdateCapsule
> > Service==============\n");
> > - SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> > + Printf ("\n================UpdateCapsule Service==============\n");
> > + Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> >
> > - SctAPrint ("\n================QueryCapsuleCapabilities
> > Service==============\n");
> > - SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> > >QueryCapsuleCapabilities);
> > + Printf ("\n================QueryCapsuleCapabilities
> > + Service==============\n"); Printf ("QueryCapsuleCapabilities @
> > + 0x%x\n", VRT->QueryCapsuleCapabilities);
> >
> > - SctAPrint ("\n================QueryVariableInfo
> > Service==============\n");
> > - SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> > + Printf ("\n================QueryVariableInfo
> > + Service==============\n"); Printf ("QueryVariableInfo @ 0x%x\n",
> > + VRT->QueryVariableInfo);
> > #endif
> > }
> > diff --git a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c b/uefi-
> > sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
> > index cc8d9869..5688849c 100644
> > --- a/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
> > +++ b/uefi-sct/SctPkg/SCRT/SCRTDriver/Riscv64/Dump.c
> > @@ -26,43 +26,43 @@ Module Name:
> > VOID
> > DumpRuntimeTable()
> > {
> > - SctAPrint ("\n================Dump Runtime
> > Table===============\n");
> > - SctAPrint ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> > + Printf ("\n================Dump Runtime Table===============\n");
> > + Printf ("Header Signature = 0x%x\n", VRT->Hdr.Signature);
> >
> > - SctAPrint ("\n================GetTime Service==============\n");
> > - SctAPrint ("GetTime @ 0x%x\n", VRT->GetTime);
> > + Printf ("\n================GetTime Service==============\n");
> > + Printf ("GetTime @ 0x%x\n", VRT->GetTime);
> >
> > - SctAPrint ("\n================SetTime Service==============\n");
> > - SctAPrint ("SetTime @ 0x%x\n", VRT->SetTime);
> > + Printf ("\n================SetTime Service==============\n");
> > + Printf ("SetTime @ 0x%x\n", VRT->SetTime);
> >
> > - SctAPrint ("\n================GetWakeupTime
> > Service==============\n");
> > - SctAPrint ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> > + Printf ("\n================GetWakeupTime Service==============\n");
> > + Printf ("GetWakeupTime @ 0x%x\n", VRT->GetWakeupTime);
> >
> > - SctAPrint ("\n================SetWakeupTime
> > Service==============\n");
> > - SctAPrint ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> > + Printf ("\n================SetWakeupTime Service==============\n");
> > + Printf ("SetWakeupTime @ 0x%x\n", VRT->SetWakeupTime);
> >
> > - SctAPrint ("\n================GetVariable
> > Service==============\n");
> > - SctAPrint ("GetVariable @ 0x%x\n", VRT->GetVariable);
> > + Printf ("\n================GetVariable Service==============\n");
> > + Printf ("GetVariable @ 0x%x\n", VRT->GetVariable);
> >
> > - SctAPrint ("\n================GetNextVariableName
> > Service==============\n");
> > - SctAPrint ("GetNextVariableName @ 0x%x\n",
> > VRT->GetNextVariableName);
> > + Printf ("\n================GetNextVariableName
> > + Service==============\n"); Printf ("GetNextVariableName @ 0x%x\n",
> > + VRT->GetNextVariableName);
> >
> > - SctAPrint ("\n================SetVariable
> > Service==============\n");
> > - SctAPrint ("SetVariable @ 0x%x\n", VRT->SetVariable);
> > + Printf ("\n================SetVariable Service==============\n");
> > + Printf ("SetVariable @ 0x%x\n", VRT->SetVariable);
> >
> > - SctAPrint ("\n================GetNextHighMonotonicCount
> > Service==============\n");
> > - SctAPrint ("GetNextHighMonotonicCount @ 0x%x\n", VRT-
> > >GetNextHighMonotonicCount);
> > + Printf ("\n================GetNextHighMonotonicCount
> > + Service==============\n"); Printf ("GetNextHighMonotonicCount @
> > + 0x%x\n", VRT->GetNextHighMonotonicCount);
> >
> > - SctAPrint ("\n================ResetSystem
> > Service==============\n");
> > - SctAPrint ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> > + Printf ("\n================ResetSystem Service==============\n");
> > + Printf ("ResetSystem @ 0x%x\n", VRT->ResetSystem);
> > #if 0
> > - SctAPrint ("\n================UpdateCapsule
> > Service==============\n");
> > - SctAPrint ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> > + Printf ("\n================UpdateCapsule Service==============\n");
> > + Printf ("UpdateCapsule @ 0x%x\n", VRT->UpdateCapsule);
> >
> > - SctAPrint ("\n================QueryCapsuleCapabilities
> > Service==============\n");
> > - SctAPrint ("QueryCapsuleCapabilities @ 0x%x\n", VRT-
> > >QueryCapsuleCapabilities);
> > + Printf ("\n================QueryCapsuleCapabilities
> > + Service==============\n"); Printf ("QueryCapsuleCapabilities @
> > + 0x%x\n", VRT->QueryCapsuleCapabilities);
> >
> > - SctAPrint ("\n================QueryVariableInfo
> > Service==============\n");
> > - SctAPrint ("QueryVariableInfo @ 0x%x\n", VRT->QueryVariableInfo);
> > + Printf ("\n================QueryVariableInfo
> > + Service==============\n"); Printf ("QueryVariableInfo @ 0x%x\n",
> > + VRT->QueryVariableInfo);
> > #endif
> > }
> > --
> > 2.25.1
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-23 14:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-12 16:13 [edk2-test][PATCH 1/1] SctPkg: Fix runtime access to boot services functions Jeff Brasen
2021-08-12 17:22 ` Samer El-Haj-Mahmoud
2021-08-20 7:18 ` G Edhaya Chandran
2021-08-23 14:41 ` G Edhaya Chandran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox