[prev in list] [next in list] [prev in thread] [next in thread]
List: fwts-devel
Subject: Re: ACK: [PATCH 2/3][RESEND 2] uefi: uefidump: Add support for OsIndicationsSupported
From: Keng-Yu Lin <kengyu () canonical ! com>
Date: 2013-09-09 7:42:36
Message-ID: CADXHx7azPaDgrz-Sg7wmPDQXRFeO4XA=4kMMbf8QsjvGbb0CaA () mail ! gmail ! com
[Download RAW message or body]
On Mon, Sep 9, 2013 at 3:34 PM, Colin Ian King <colin.king@canonical.com> wrote:
> On 09/09/13 03:31, Ivan Hu wrote:
> > From: IvanHu <ivan.hu@canonical.com>
> >
> > The OsIndicationsSupported variable indicates which of the OS indication features \
> > and actions that the firmware supports.
> > Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> > ---
> > src/lib/include/fwts_uefi.h | 6 ++++++
> > src/uefi/uefidump/uefidump.c | 44 ++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 50 insertions(+)
> >
> > diff --git a/src/lib/include/fwts_uefi.h b/src/lib/include/fwts_uefi.h
> > index c0a6ce5..ecac84d 100644
> > --- a/src/lib/include/fwts_uefi.h
> > +++ b/src/lib/include/fwts_uefi.h
> > @@ -88,6 +88,12 @@ enum {
> >
> > #define FWTS_UEFI_UNSPECIFIED_TIMEZONE 0x07FF
> >
> > +#define EFI_OS_INDICATIONS_BOOT_TO_FW_UI 0x0000000000000001
> > +#define EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION 0x0000000000000002
> > +#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED 0x0000000000000004
> > +#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED 0x0000000000000008
> > +#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED \
> > 0x0000000000000010 +
> > #if 0
> > typedef struct {
> > char *description;
> > diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> > index dc576c7..3cc99a7 100644
> > --- a/src/uefi/uefidump/uefidump.c
> > +++ b/src/uefi/uefidump/uefidump.c
> > @@ -680,6 +680,49 @@ static void uefidump_info_hwerrrec_support(fwts_framework \
> > *fw, fwts_uefi_var *va }
> > }
> >
> > +static void uefidump_info_osindications_supported(fwts_framework *fw, \
> > fwts_uefi_var *var) +{
> > + if (var->datalen != 8) {
> > + /* Should be 8 bytes, of not, dump it out as a hex dump */
> > + uefidump_var_hexdump(fw, var);
> > + } else {
> > + uint64_t value;
> > + char str[300];
> > +
> > + memcpy(&value, var->data, sizeof(uint64_t));
> > + *str = 0;
> > +
> > + if (value & EFI_OS_INDICATIONS_BOOT_TO_FW_UI)
> > + strcat(str, "EFI_OS_INDICATIONS_BOOT_TO_FW_UI");
> > +
> > + if (value & EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION) {
> > + if (*str)
> > + strcat(str, ",");
> > + strcat(str, "EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION");
> > + }
> > +
> > + if (value & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED) {
> > + if (*str)
> > + strcat(str, ",");
> > + strcat(str, \
> > "EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED"); + }
> > +
> > + if (value & EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED) {
> > + if (*str)
> > + strcat(str, ",");
> > + strcat(str, "EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED");
> > + }
> > +
> > + if (value & EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED) {
> > + if (*str)
> > + strcat(str, ",");
> > + strcat(str, \
> > "EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED"); + }
> > +
> > + fwts_log_info_verbatum(fw, " Value: 0x%16.16" PRIx64 " (%s).", \
> > value, str); + }
> > +}
> > +
> > static uefidump_info uefidump_info_table[] = {
> > { "PlatformLangCodes", uefidump_info_platform_langcodes },
> > { "PlatformLang", uefidump_info_platform_lang },
> > @@ -705,6 +748,7 @@ static uefidump_info uefidump_info_table[] = {
> > { "AcpiGlobalVariable", uefidump_info_acpi_global_variable },
> > { "SignatureSupport", uefidump_info_signature_support },
> > { "HwErrRecSupport", uefidump_info_hwerrrec_support },
> > + { "OsIndicationsSupported", uefidump_info_osindications_supported },
> > { NULL, NULL }
> > };
> >
> >
> Acked-by: Colin Ian King <colin.king@canonical.com>
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic