From: "Chang, Abner" <abner.chang@amd.com>
To: "Oram, Isaac W" <isaac.w.oram@intel.com>,
"Chesley, Brit" <Brit.Chesley@amd.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Attar, AbdulLateef (Abdul Lateef)" <AbdulLateef.Attar@amd.com>,
Nickle Wang <nicklew@nvidia.com>
Subject: Re: [edk2-platforms][PATCH v1 1/1] ManageabilityPkg: Ipmi Get/Set Boot Options
Date: Wed, 12 Jul 2023 02:10:14 +0000 [thread overview]
Message-ID: <MN2PR12MB3966F1BBC79AD978C18DC15BEA36A@MN2PR12MB3966.namprd12.prod.outlook.com> (raw)
In-Reply-To: <SA1PR11MB58019AC85E436BFC5AAEC8B5D036A@SA1PR11MB5801.namprd11.prod.outlook.com>
[AMD Official Use Only - General]
Hi Isaac, thanks for the last minutes review.
Abner
> -----Original Message-----
> From: Oram, Isaac W <isaac.w.oram@intel.com>
> Sent: Wednesday, July 12, 2023 10:06 AM
> To: Chang, Abner <Abner.Chang@amd.com>; Chesley, Brit
> <Brit.Chesley@amd.com>; devel@edk2.groups.io
> Cc: Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Nickle
> Wang <nicklew@nvidia.com>
> Subject: RE: [edk2-platforms][PATCH v1 1/1] ManageabilityPkg: Ipmi Get/Set
> Boot Options
>
> [AMD Official Use Only - General]
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
>
> -----Original Message-----
> From: Chang, Abner <Abner.Chang@amd.com>
> Sent: Monday, July 10, 2023 6:36 PM
> To: Chesley, Brit <Brit.Chesley@amd.com>; devel@edk2.groups.io
> Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Attar, AbdulLateef (Abdul
> Lateef) <AbdulLateef.Attar@amd.com>; Nickle Wang <nicklew@nvidia.com>
> Subject: RE: [edk2-platforms][PATCH v1 1/1] ManageabilityPkg: Ipmi Get/Set
> Boot Options
>
> [AMD Official Use Only - General]
>
> Thank you Brit for the contribution! Let's wait for 1-2 days to see if there is any
> other comments for this change.
>
> Reviewed-by: Abner Chang <abner.chang@amd.com>
>
> > -----Original Message-----
> > From: Chesley, Brit <Brit.Chesley@amd.com>
> > Sent: Tuesday, July 11, 2023 3:23 AM
> > To: devel@edk2.groups.io
> > Cc: Chang, Abner <Abner.Chang@amd.com>; Isaac Oram
> > <isaac.w.oram@intel.com>; Attar, AbdulLateef (Abdul Lateef)
> > <AbdulLateef.Attar@amd.com>; Nickle Wang <nicklew@nvidia.com>
> > Subject: [edk2-platforms][PATCH v1 1/1] ManageabilityPkg: Ipmi Get/Set
> > Boot Options
> >
> > From: Brit Chesley <brit.chesley@amd.com>
> >
> > BZ #: 4455.
> > Support parameter selectors for IPMI Get/Set boot options. The size of
> > the response data is now dependent on the parameter selector, rather
> > than being fixed.
> >
> > Cc: Abner Chang <abner.chang@amd.com>
> > Cc: Isaac Oram <isaac.w.oram@intel.com>
> > Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> > Cc: Nickle Wang <nicklew@nvidia.com>
> > Signed-off-by: Brit Chesley <Brit.Chesley@amd.com>
> > ---
> > .../IpmiCommandLibNetFnChassis.c | 124 ++++++++++++++----
> > 1 file changed, 102 insertions(+), 22 deletions(-)
> >
> > diff --git
> >
> a/Features/ManageabilityPkg/Library/IpmiCommandLib/IpmiCommandLibNe
> > tFnChassis.c
> >
> b/Features/ManageabilityPkg/Library/IpmiCommandLib/IpmiCommandLibNe
> > tFnChassis.c
> > index 0c40ad20b98a..01682f55b36d 100644
> > ---
> >
> a/Features/ManageabilityPkg/Library/IpmiCommandLib/IpmiCommandLibNe
> > tFnChassis.c
> > +++
> >
> b/Features/ManageabilityPkg/Library/IpmiCommandLib/IpmiCommandLibNe
> > tFnChassis.c
> > @@ -152,17 +152,58 @@ IpmiSetSystemBootOptions (
> > )
> > {
> > EFI_STATUS Status;
> > - UINT32 DataSize;
> > -
> > - DataSize = sizeof (*BootOptionsResponse);
> > - Status = IpmiSubmitCommand (
> > - IPMI_NETFN_CHASSIS,
> > - IPMI_CHASSIS_SET_SYSTEM_BOOT_OPTIONS,
> > - (VOID *)BootOptionsRequest,
> > - sizeof (*BootOptionsRequest),
> > - (VOID *)BootOptionsResponse,
> > - &DataSize
> > - );
> > + UINT32 RequestDataSize;
> > + UINT32 ResponseDataSize;
> > +
> > + ResponseDataSize = sizeof (*BootOptionsResponse); RequestDataSize
> > + = sizeof (*BootOptionsRequest);
> > +
> > + switch (BootOptionsRequest->ParameterValid.Bits.ParameterSelector) {
> > + case IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SET_IN_PROGRESS:
> > + RequestDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0);
> > + break;
> > +
> > + case
> >
> IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SELECT
> > OR:
> > + RequestDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1);
> > + break;
> > +
> > + case
> > IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SCAN:
> > + RequestDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2);
> > + break;
> > +
> > + case IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_BMC_BOOT_FLAG:
> > + RequestDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3);
> > + break;
> > +
> > + case IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INFO_ACK:
> > + RequestDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4);
> > + break;
> > +
> > + case IPMI_BOOT_OPTIONS_PARAMETER_BOOT_FLAGS:
> > + RequestDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5);
> > + break;
> > +
> > + case IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_INFO:
> > + RequestDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6);
> > + break;
> > +
> > + case IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_MAILBOX:
> > + RequestDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7);
> > + break;
> > +
> > + default:
> > + return EFI_INVALID_PARAMETER;
> > + break;
> > + }
> > +
> > + Status = IpmiSubmitCommand (
> > + IPMI_NETFN_CHASSIS,
> > + IPMI_CHASSIS_SET_SYSTEM_BOOT_OPTIONS,
> > + (VOID *)BootOptionsRequest,
> > + RequestDataSize,
> > + (VOID *)BootOptionsResponse,
> > + &ResponseDataSize
> > + );
> > return Status;
> > }
> >
> > @@ -184,16 +225,55 @@ IpmiGetSystemBootOptions (
> > )
> > {
> > EFI_STATUS Status;
> > - UINT32 DataSize;
> > -
> > - DataSize = sizeof (*BootOptionsResponse);
> > - Status = IpmiSubmitCommand (
> > - IPMI_NETFN_CHASSIS,
> > - IPMI_CHASSIS_GET_SYSTEM_BOOT_OPTIONS,
> > - (VOID *)BootOptionsRequest,
> > - sizeof (*BootOptionsRequest),
> > - (VOID *)BootOptionsResponse,
> > - &DataSize
> > - );
> > + UINT32 ResponseDataSize;
> > +
> > + ResponseDataSize = sizeof (*BootOptionsResponse);
> > +
> > + switch (BootOptionsRequest->ParameterSelector.Bits.ParameterSelector) {
> > + case IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SET_IN_PROGRESS:
> > + ResponseDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0);
> > + break;
> > +
> > + case
> >
> IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SELECT
> > OR:
> > + ResponseDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1);
> > + break;
> > +
> > + case
> > IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_SERVICE_PARTITION_SCAN:
> > + ResponseDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2);
> > + break;
> > +
> > + case IPMI_BOOT_OPTIONS_PARAMETER_SELECTOR_BMC_BOOT_FLAG:
> > + ResponseDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3);
> > + break;
> > +
> > + case IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INFO_ACK:
> > + ResponseDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4);
> > + break;
> > +
> > + case IPMI_BOOT_OPTIONS_PARAMETER_BOOT_FLAGS:
> > + ResponseDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5);
> > + break;
> > +
> > + case IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_INFO:
> > + ResponseDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6);
> > + break;
> > +
> > + case IPMI_BOOT_OPTIONS_PARAMETER_BOOT_INITIATOR_MAILBOX:
> > + ResponseDataSize += sizeof
> > (IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7);
> > + break;
> > +
> > + default:
> > + return EFI_INVALID_PARAMETER;
> > + break;
> > + }
> > +
> > + Status = IpmiSubmitCommand (
> > + IPMI_NETFN_CHASSIS,
> > + IPMI_CHASSIS_GET_SYSTEM_BOOT_OPTIONS,
> > + (VOID *)BootOptionsRequest,
> > + sizeof (*BootOptionsRequest),
> > + (VOID *)BootOptionsResponse,
> > + &ResponseDataSize
> > + );
> > return Status;
> > }
> > --
> > 2.36.1
next prev parent reply other threads:[~2023-07-12 2:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 19:23 [edk2-platforms][PATCH v1 1/1] ManageabilityPkg: Ipmi Get/Set Boot Options brit.chesley
2023-07-11 1:36 ` Chang, Abner
2023-07-12 2:06 ` Isaac Oram
2023-07-12 2:10 ` Chang, Abner [this message]
[not found] ` <1770AC5D28826C6A.5563@groups.io>
2023-07-12 2:02 ` [edk2-devel] " Chang, Abner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MN2PR12MB3966F1BBC79AD978C18DC15BEA36A@MN2PR12MB3966.namprd12.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox