* [edk2-platforms PATCH v2 1/1] SbsaQemu: Add OemMiscLib boot information and chassis status functions
@ 2021-04-23 21:57 Rebecca Cran
2021-04-23 22:06 ` Rebecca Cran
2021-04-27 12:31 ` Leif Lindholm
0 siblings, 2 replies; 4+ messages in thread
From: Rebecca Cran @ 2021-04-23 21:57 UTC (permalink / raw)
To: devel
Cc: Rebecca Cran, Leif Lindholm, Ard Biesheuvel, Graeme Gregory,
Radoslaw Biernacki
Add new SMBIOS Type 32 boot information and Type 3 chassis status
functions that have been added to OemMiscLib in ArmPkg.
Since this is a virtual platform, return fixed values for the chassis
statuses.
Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
---
Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 91 ++++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
index eb405b259848..326bb56bcfa3 100644
--- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
+++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
@@ -239,3 +239,94 @@ OemUpdateSmbiosInfo (
HiiSetString (HiiHandle, TokenToUpdate, String, NULL);
}
}
+
+/** Fetches the Type 32 boot information status.
+
+ @return Boot status.
+**/
+MISC_BOOT_INFORMATION_STATUS_DATA_TYPE
+EFIAPI
+OemGetBootStatus (
+ VOID
+ )
+{
+ return BootInformationStatusNoError;
+}
+
+/** Fetches the chassis status when it was last booted.
+
+ @return Chassis status.
+**/
+MISC_CHASSIS_STATE
+EFIAPI
+OemGetChassisBootupState (
+ VOID
+ )
+{
+ return ChassisStateSafe;
+}
+
+/** Fetches the chassis power supply/supplies status when last booted.
+
+ @return Chassis power supply/supplies status.
+**/
+MISC_CHASSIS_STATE
+EFIAPI
+OemGetChassisPowerSupplyState (
+ VOID
+ )
+{
+ return ChassisStateSafe;
+}
+
+/** Fetches the chassis thermal status when last booted.
+
+ @return Chassis thermal status.
+**/
+MISC_CHASSIS_STATE
+EFIAPI
+OemGetChassisThermalState (
+ VOID
+ )
+{
+ return ChassisStateSafe;
+}
+
+/** Fetches the chassis security status when last booted.
+
+ @return Chassis security status.
+**/
+MISC_CHASSIS_SECURITY_STATE
+EFIAPI
+OemGetChassisSecurityStatus (
+ VOID
+ )
+{
+ return ChassisSecurityStatusNone;
+}
+
+/** Fetches the chassis height in RMUs (Rack Mount Units).
+
+ @return The height of the chassis.
+**/
+UINT8
+EFIAPI
+OemGetChassisHeight (
+ VOID
+ )
+{
+ return 1U;
+}
+
+/** Fetches the number of power cords.
+
+ @return The number of power cords.
+**/
+UINT8
+EFIAPI
+OemGetChassisNumPowerCords (
+ VOID
+ )
+{
+ return 1;
+}
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-platforms PATCH v2 1/1] SbsaQemu: Add OemMiscLib boot information and chassis status functions
2021-04-23 21:57 [edk2-platforms PATCH v2 1/1] SbsaQemu: Add OemMiscLib boot information and chassis status functions Rebecca Cran
@ 2021-04-23 22:06 ` Rebecca Cran
2021-04-27 12:31 ` Leif Lindholm
1 sibling, 0 replies; 4+ messages in thread
From: Rebecca Cran @ 2021-04-23 22:06 UTC (permalink / raw)
To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, Graeme Gregory, Radoslaw Biernacki
v2 has no changes other than adding a newline at the end of
Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c and reverting the change
to SbsaQemu.dec.
--
Rebecca Cran
On 4/23/21 3:57 PM, Rebecca Cran wrote:
> Add new SMBIOS Type 32 boot information and Type 3 chassis status
> functions that have been added to OemMiscLib in ArmPkg.
>
> Since this is a virtual platform, return fixed values for the chassis
> statuses.
>
> Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
> ---
> Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 91 ++++++++++++++++++++
> 1 file changed, 91 insertions(+)
>
> diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> index eb405b259848..326bb56bcfa3 100644
> --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> @@ -239,3 +239,94 @@ OemUpdateSmbiosInfo (
> HiiSetString (HiiHandle, TokenToUpdate, String, NULL);
> }
> }
> +
> +/** Fetches the Type 32 boot information status.
> +
> + @return Boot status.
> +**/
> +MISC_BOOT_INFORMATION_STATUS_DATA_TYPE
> +EFIAPI
> +OemGetBootStatus (
> + VOID
> + )
> +{
> + return BootInformationStatusNoError;
> +}
> +
> +/** Fetches the chassis status when it was last booted.
> +
> + @return Chassis status.
> +**/
> +MISC_CHASSIS_STATE
> +EFIAPI
> +OemGetChassisBootupState (
> + VOID
> + )
> +{
> + return ChassisStateSafe;
> +}
> +
> +/** Fetches the chassis power supply/supplies status when last booted.
> +
> + @return Chassis power supply/supplies status.
> +**/
> +MISC_CHASSIS_STATE
> +EFIAPI
> +OemGetChassisPowerSupplyState (
> + VOID
> + )
> +{
> + return ChassisStateSafe;
> +}
> +
> +/** Fetches the chassis thermal status when last booted.
> +
> + @return Chassis thermal status.
> +**/
> +MISC_CHASSIS_STATE
> +EFIAPI
> +OemGetChassisThermalState (
> + VOID
> + )
> +{
> + return ChassisStateSafe;
> +}
> +
> +/** Fetches the chassis security status when last booted.
> +
> + @return Chassis security status.
> +**/
> +MISC_CHASSIS_SECURITY_STATE
> +EFIAPI
> +OemGetChassisSecurityStatus (
> + VOID
> + )
> +{
> + return ChassisSecurityStatusNone;
> +}
> +
> +/** Fetches the chassis height in RMUs (Rack Mount Units).
> +
> + @return The height of the chassis.
> +**/
> +UINT8
> +EFIAPI
> +OemGetChassisHeight (
> + VOID
> + )
> +{
> + return 1U;
> +}
> +
> +/** Fetches the number of power cords.
> +
> + @return The number of power cords.
> +**/
> +UINT8
> +EFIAPI
> +OemGetChassisNumPowerCords (
> + VOID
> + )
> +{
> + return 1;
> +}
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-platforms PATCH v2 1/1] SbsaQemu: Add OemMiscLib boot information and chassis status functions
2021-04-23 21:57 [edk2-platforms PATCH v2 1/1] SbsaQemu: Add OemMiscLib boot information and chassis status functions Rebecca Cran
2021-04-23 22:06 ` Rebecca Cran
@ 2021-04-27 12:31 ` Leif Lindholm
2021-04-27 12:54 ` Leif Lindholm
1 sibling, 1 reply; 4+ messages in thread
From: Leif Lindholm @ 2021-04-27 12:31 UTC (permalink / raw)
To: Rebecca Cran; +Cc: devel, Ard Biesheuvel, Graeme Gregory, Radoslaw Biernacki
On Fri, Apr 23, 2021 at 15:57:19 -0600, Rebecca Cran wrote:
> Add new SMBIOS Type 32 boot information and Type 3 chassis status
> functions that have been added to OemMiscLib in ArmPkg.
>
> Since this is a virtual platform, return fixed values for the chassis
> statuses.
>
> Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
I will push this patch (with Graeme's r-b added) once the edk2
OemMiscLib set is successfully merged.
/
Leif
> ---
> Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 91 ++++++++++++++++++++
> 1 file changed, 91 insertions(+)
>
> diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> index eb405b259848..326bb56bcfa3 100644
> --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> @@ -239,3 +239,94 @@ OemUpdateSmbiosInfo (
> HiiSetString (HiiHandle, TokenToUpdate, String, NULL);
> }
> }
> +
> +/** Fetches the Type 32 boot information status.
> +
> + @return Boot status.
> +**/
> +MISC_BOOT_INFORMATION_STATUS_DATA_TYPE
> +EFIAPI
> +OemGetBootStatus (
> + VOID
> + )
> +{
> + return BootInformationStatusNoError;
> +}
> +
> +/** Fetches the chassis status when it was last booted.
> +
> + @return Chassis status.
> +**/
> +MISC_CHASSIS_STATE
> +EFIAPI
> +OemGetChassisBootupState (
> + VOID
> + )
> +{
> + return ChassisStateSafe;
> +}
> +
> +/** Fetches the chassis power supply/supplies status when last booted.
> +
> + @return Chassis power supply/supplies status.
> +**/
> +MISC_CHASSIS_STATE
> +EFIAPI
> +OemGetChassisPowerSupplyState (
> + VOID
> + )
> +{
> + return ChassisStateSafe;
> +}
> +
> +/** Fetches the chassis thermal status when last booted.
> +
> + @return Chassis thermal status.
> +**/
> +MISC_CHASSIS_STATE
> +EFIAPI
> +OemGetChassisThermalState (
> + VOID
> + )
> +{
> + return ChassisStateSafe;
> +}
> +
> +/** Fetches the chassis security status when last booted.
> +
> + @return Chassis security status.
> +**/
> +MISC_CHASSIS_SECURITY_STATE
> +EFIAPI
> +OemGetChassisSecurityStatus (
> + VOID
> + )
> +{
> + return ChassisSecurityStatusNone;
> +}
> +
> +/** Fetches the chassis height in RMUs (Rack Mount Units).
> +
> + @return The height of the chassis.
> +**/
> +UINT8
> +EFIAPI
> +OemGetChassisHeight (
> + VOID
> + )
> +{
> + return 1U;
> +}
> +
> +/** Fetches the number of power cords.
> +
> + @return The number of power cords.
> +**/
> +UINT8
> +EFIAPI
> +OemGetChassisNumPowerCords (
> + VOID
> + )
> +{
> + return 1;
> +}
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-platforms PATCH v2 1/1] SbsaQemu: Add OemMiscLib boot information and chassis status functions
2021-04-27 12:31 ` Leif Lindholm
@ 2021-04-27 12:54 ` Leif Lindholm
0 siblings, 0 replies; 4+ messages in thread
From: Leif Lindholm @ 2021-04-27 12:54 UTC (permalink / raw)
To: Rebecca Cran; +Cc: devel, Ard Biesheuvel, Graeme Gregory, Radoslaw Biernacki
On Tue, Apr 27, 2021 at 13:31:32 +0100, Leif Lindholm wrote:
> On Fri, Apr 23, 2021 at 15:57:19 -0600, Rebecca Cran wrote:
> > Add new SMBIOS Type 32 boot information and Type 3 chassis status
> > functions that have been added to OemMiscLib in ArmPkg.
> >
> > Since this is a virtual platform, return fixed values for the chassis
> > statuses.
> >
> > Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
>
> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
>
> I will push this patch (with Graeme's r-b added) once the edk2
> OemMiscLib set is successfully merged.
Pushed as a996c765008d.
> /
> Leif
>
> > ---
> > Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 91 ++++++++++++++++++++
> > 1 file changed, 91 insertions(+)
> >
> > diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> > index eb405b259848..326bb56bcfa3 100644
> > --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> > +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> > @@ -239,3 +239,94 @@ OemUpdateSmbiosInfo (
> > HiiSetString (HiiHandle, TokenToUpdate, String, NULL);
> > }
> > }
> > +
> > +/** Fetches the Type 32 boot information status.
> > +
> > + @return Boot status.
> > +**/
> > +MISC_BOOT_INFORMATION_STATUS_DATA_TYPE
> > +EFIAPI
> > +OemGetBootStatus (
> > + VOID
> > + )
> > +{
> > + return BootInformationStatusNoError;
> > +}
> > +
> > +/** Fetches the chassis status when it was last booted.
> > +
> > + @return Chassis status.
> > +**/
> > +MISC_CHASSIS_STATE
> > +EFIAPI
> > +OemGetChassisBootupState (
> > + VOID
> > + )
> > +{
> > + return ChassisStateSafe;
> > +}
> > +
> > +/** Fetches the chassis power supply/supplies status when last booted.
> > +
> > + @return Chassis power supply/supplies status.
> > +**/
> > +MISC_CHASSIS_STATE
> > +EFIAPI
> > +OemGetChassisPowerSupplyState (
> > + VOID
> > + )
> > +{
> > + return ChassisStateSafe;
> > +}
> > +
> > +/** Fetches the chassis thermal status when last booted.
> > +
> > + @return Chassis thermal status.
> > +**/
> > +MISC_CHASSIS_STATE
> > +EFIAPI
> > +OemGetChassisThermalState (
> > + VOID
> > + )
> > +{
> > + return ChassisStateSafe;
> > +}
> > +
> > +/** Fetches the chassis security status when last booted.
> > +
> > + @return Chassis security status.
> > +**/
> > +MISC_CHASSIS_SECURITY_STATE
> > +EFIAPI
> > +OemGetChassisSecurityStatus (
> > + VOID
> > + )
> > +{
> > + return ChassisSecurityStatusNone;
> > +}
> > +
> > +/** Fetches the chassis height in RMUs (Rack Mount Units).
> > +
> > + @return The height of the chassis.
> > +**/
> > +UINT8
> > +EFIAPI
> > +OemGetChassisHeight (
> > + VOID
> > + )
> > +{
> > + return 1U;
> > +}
> > +
> > +/** Fetches the number of power cords.
> > +
> > + @return The number of power cords.
> > +**/
> > +UINT8
> > +EFIAPI
> > +OemGetChassisNumPowerCords (
> > + VOID
> > + )
> > +{
> > + return 1;
> > +}
> > --
> > 2.26.2
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-27 12:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-23 21:57 [edk2-platforms PATCH v2 1/1] SbsaQemu: Add OemMiscLib boot information and chassis status functions Rebecca Cran
2021-04-23 22:06 ` Rebecca Cran
2021-04-27 12:31 ` Leif Lindholm
2021-04-27 12:54 ` Leif Lindholm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox