public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* How to retrieve HII form's default value
@ 2018-05-18  2:09 methavanitpong.pipat
  2018-05-18  8:50 ` Gao, Liming
  0 siblings, 1 reply; 5+ messages in thread
From: methavanitpong.pipat @ 2018-05-18  2:09 UTC (permalink / raw)
  To: edk2-devel; +Cc: ard.biesheuvel

Hi,

I'm working on changing SynQuacer/PlatformDxe initial HII configuration. 

In the current implementation, SynQuacerPlatformSettings HII variable doesn't set its initial value from PcdPlatfromSettings. 

* PcdPlatformSettings is initially set with value in dsc at build time

    * https://github.com/tianocore/edk2-platforms/blob/master/Platform/Socionext/DeveloperBox/DeveloperBox.dsc#L439

* SynQuacerPlatformSettings is initially set to zeros at run time

    * https://github.com/tianocore/edk2-platforms/blob/master/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c#L246

They are unsync, but are both initially assigned to 0 independently.

What I want to do with this issue is

* Set initial SynQuacerPlatformSettings value from its
  SYNQUACER_PLATFORM_FORMSET_GUID form's default value
* Set initial PcdPlatformSettings value from its
  SYNQUACER_PLATFORM_FORMSET_GUID form's default value

Could anyone give me an advice on retrieving default value from a HII form and assign in C and DSC files?


Thanks,
--
Pipat Methavanitpong
Software Developer, S-Project 3
Socionext Inc.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to retrieve HII form's default value
  2018-05-18  2:09 How to retrieve HII form's default value methavanitpong.pipat
@ 2018-05-18  8:50 ` Gao, Liming
  2018-05-21  0:24   ` methavanitpong.pipat
  0 siblings, 1 reply; 5+ messages in thread
From: Gao, Liming @ 2018-05-18  8:50 UTC (permalink / raw)
  To: methavanitpong.pipat@socionext.com, edk2-devel@lists.01.org
  Cc: ard.biesheuvel@linaro.org

Intel provides FCE tool. It can parse the generated BIOS image and output the default value for every HII question. You can try it. 

Here is the latest version https://firmware.intel.com/sites/default/files/2018-WW13-FCE.34-Release.zip

>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>methavanitpong.pipat@socionext.com
>Sent: Friday, May 18, 2018 10:09 AM
>To: edk2-devel@lists.01.org
>Cc: ard.biesheuvel@linaro.org
>Subject: [edk2] How to retrieve HII form's default value
>
>Hi,
>
>I'm working on changing SynQuacer/PlatformDxe initial HII configuration.
>
>In the current implementation, SynQuacerPlatformSettings HII variable
>doesn't set its initial value from PcdPlatfromSettings.
>
>* PcdPlatformSettings is initially set with value in dsc at build time
>
>    * https://github.com/tianocore/edk2-
>platforms/blob/master/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
>#L439
>
>* SynQuacerPlatformSettings is initially set to zeros at run time
>
>    * https://github.com/tianocore/edk2-
>platforms/blob/master/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Pl
>atformDxe.c#L246
>
>They are unsync, but are both initially assigned to 0 independently.
>
>What I want to do with this issue is
>
>* Set initial SynQuacerPlatformSettings value from its
>  SYNQUACER_PLATFORM_FORMSET_GUID form's default value
>* Set initial PcdPlatformSettings value from its
>  SYNQUACER_PLATFORM_FORMSET_GUID form's default value
>
>Could anyone give me an advice on retrieving default value from a HII form
>and assign in C and DSC files?
>
>
>Thanks,
>--
>Pipat Methavanitpong
>Software Developer, S-Project 3
>Socionext Inc.
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to retrieve HII form's default value
  2018-05-18  8:50 ` Gao, Liming
@ 2018-05-21  0:24   ` methavanitpong.pipat
  2018-05-21  0:57     ` Gao, Liming
  0 siblings, 1 reply; 5+ messages in thread
From: methavanitpong.pipat @ 2018-05-21  0:24 UTC (permalink / raw)
  To: liming.gao, edk2-devel; +Cc: ard.biesheuvel

> Intel provides FCE tool. It can parse the generated BIOS image and output
> the default value for every HII question. You can try it.

Thanks Gao. This looks useful :)
I have to prepare my Windows environment before trying this out. 

But, is there a way to do it at build time?
Since default values are written in VFR files, it should be able to 
resolve at both build time and runtime. 

* Is there any macro to let HII PCDs set to their default values in a DSC file?
* Is there a function or macro to lookup HII default values in a driver file?


Thank you,
--
Pipat Methavanitpong
Software Developer, S-Project 3
Socionext Inc.
> -----Original Message-----
> From: Gao, Liming [mailto:liming.gao@intel.com]
> Sent: Friday, May 18, 2018 5:50 PM
> To: Methavanitpong, Pipat/メタワニットポン ピパット
> <methavanitpong.pipat@socionext.com>; edk2-devel@lists.01.org
> Cc: ard.biesheuvel@linaro.org
> Subject: RE: How to retrieve HII form's default value
> 
> Intel provides FCE tool. It can parse the generated BIOS image and output
> the default value for every HII question. You can try it.
> 
> Here is the latest version
> https://firmware.intel.com/sites/default/files/2018-WW13-FCE.34-
> Release.zip
> 
> >-----Original Message-----
> >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> >methavanitpong.pipat@socionext.com
> >Sent: Friday, May 18, 2018 10:09 AM
> >To: edk2-devel@lists.01.org
> >Cc: ard.biesheuvel@linaro.org
> >Subject: [edk2] How to retrieve HII form's default value
> >
> >Hi,
> >
> >I'm working on changing SynQuacer/PlatformDxe initial HII configuration.
> >
> >In the current implementation, SynQuacerPlatformSettings HII variable
> >doesn't set its initial value from PcdPlatfromSettings.
> >
> >* PcdPlatformSettings is initially set with value in dsc at build time
> >
> >    * https://github.com/tianocore/edk2-
> >platforms/blob/master/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
> >#L439
> >
> >* SynQuacerPlatformSettings is initially set to zeros at run time
> >
> >    * https://github.com/tianocore/edk2-
> >platforms/blob/master/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/P
> >l
> >atformDxe.c#L246
> >
> >They are unsync, but are both initially assigned to 0 independently.
> >
> >What I want to do with this issue is
> >
> >* Set initial SynQuacerPlatformSettings value from its
> >  SYNQUACER_PLATFORM_FORMSET_GUID form's default value
> >* Set initial PcdPlatformSettings value from its
> >  SYNQUACER_PLATFORM_FORMSET_GUID form's default value
> >
> >Could anyone give me an advice on retrieving default value from a HII
> >form and assign in C and DSC files?
> >
> >
> >Thanks,
> >--
> >Pipat Methavanitpong
> >Software Developer, S-Project 3
> >Socionext Inc.
> >_______________________________________________
> >edk2-devel mailing list
> >edk2-devel@lists.01.org
> >https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to retrieve HII form's default value
  2018-05-21  0:24   ` methavanitpong.pipat
@ 2018-05-21  0:57     ` Gao, Liming
  2018-05-21  1:21       ` methavanitpong.pipat
  0 siblings, 1 reply; 5+ messages in thread
From: Gao, Liming @ 2018-05-21  0:57 UTC (permalink / raw)
  To: methavanitpong.pipat@socionext.com, edk2-devel@lists.01.org
  Cc: ard.biesheuvel@linaro.org

FCE supports Linux also. 

There is no MACRO to describe VFR default value as PCD value in DSC file. 
MdeModulePkg HiiLib has one function HiiSetToDefaults() to retrieve the default setting and set it at boot time. Its first parameter is ConfigRequestHdr that represents one varstore or efi varstore defined in VFR. You can see this function usage in MdeModulePkg\Universal\DriverSampleDxe\DriverSample.c

Thanks
Liming
> -----Original Message-----
> From: methavanitpong.pipat@socionext.com [mailto:methavanitpong.pipat@socionext.com]
> Sent: Monday, May 21, 2018 8:25 AM
> To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
> Cc: ard.biesheuvel@linaro.org
> Subject: RE: How to retrieve HII form's default value
> 
> > Intel provides FCE tool. It can parse the generated BIOS image and output
> > the default value for every HII question. You can try it.
> 
> Thanks Gao. This looks useful :)
> I have to prepare my Windows environment before trying this out.
> 
> But, is there a way to do it at build time?
> Since default values are written in VFR files, it should be able to
> resolve at both build time and runtime.
> 
> * Is there any macro to let HII PCDs set to their default values in a DSC file?
> * Is there a function or macro to lookup HII default values in a driver file?
> 
> 
> Thank you,
> --
> Pipat Methavanitpong
> Software Developer, S-Project 3
> Socionext Inc.
> > -----Original Message-----
> > From: Gao, Liming [mailto:liming.gao@intel.com]
> > Sent: Friday, May 18, 2018 5:50 PM
> > To: Methavanitpong, Pipat/メタワニットポン ピパット
> > <methavanitpong.pipat@socionext.com>; edk2-devel@lists.01.org
> > Cc: ard.biesheuvel@linaro.org
> > Subject: RE: How to retrieve HII form's default value
> >
> > Intel provides FCE tool. It can parse the generated BIOS image and output
> > the default value for every HII question. You can try it.
> >
> > Here is the latest version
> > https://firmware.intel.com/sites/default/files/2018-WW13-FCE.34-
> > Release.zip
> >
> > >-----Original Message-----
> > >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > >methavanitpong.pipat@socionext.com
> > >Sent: Friday, May 18, 2018 10:09 AM
> > >To: edk2-devel@lists.01.org
> > >Cc: ard.biesheuvel@linaro.org
> > >Subject: [edk2] How to retrieve HII form's default value
> > >
> > >Hi,
> > >
> > >I'm working on changing SynQuacer/PlatformDxe initial HII configuration.
> > >
> > >In the current implementation, SynQuacerPlatformSettings HII variable
> > >doesn't set its initial value from PcdPlatfromSettings.
> > >
> > >* PcdPlatformSettings is initially set with value in dsc at build time
> > >
> > >    * https://github.com/tianocore/edk2-
> > >platforms/blob/master/Platform/Socionext/DeveloperBox/DeveloperBox.dsc
> > >#L439
> > >
> > >* SynQuacerPlatformSettings is initially set to zeros at run time
> > >
> > >    * https://github.com/tianocore/edk2-
> > >platforms/blob/master/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/P
> > >l
> > >atformDxe.c#L246
> > >
> > >They are unsync, but are both initially assigned to 0 independently.
> > >
> > >What I want to do with this issue is
> > >
> > >* Set initial SynQuacerPlatformSettings value from its
> > >  SYNQUACER_PLATFORM_FORMSET_GUID form's default value
> > >* Set initial PcdPlatformSettings value from its
> > >  SYNQUACER_PLATFORM_FORMSET_GUID form's default value
> > >
> > >Could anyone give me an advice on retrieving default value from a HII
> > >form and assign in C and DSC files?
> > >
> > >
> > >Thanks,
> > >--
> > >Pipat Methavanitpong
> > >Software Developer, S-Project 3
> > >Socionext Inc.
> > >_______________________________________________
> > >edk2-devel mailing list
> > >edk2-devel@lists.01.org
> > >https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to retrieve HII form's default value
  2018-05-21  0:57     ` Gao, Liming
@ 2018-05-21  1:21       ` methavanitpong.pipat
  0 siblings, 0 replies; 5+ messages in thread
From: methavanitpong.pipat @ 2018-05-21  1:21 UTC (permalink / raw)
  To: liming.gao, edk2-devel; +Cc: ard.biesheuvel

> FCE supports Linux also.

Nice. 

> There is no MACRO to describe VFR default value as PCD value in DSC file.

Too bad :(
For my case, the variable is UINT64, so it's easy to assign in a DSC file. 
FCE looks needed for HII variables not being primitive data types. 

> MdeModulePkg HiiLib has one function HiiSetToDefaults() to retrieve the
> default setting and set it at boot time.

COOL! This one should solve initializing HII variables at runtime. 
Many thanks, Gao!
--
Pipat Methavanitpong
Software Developer, S-Project 3
Socionext Inc.


> -----Original Message-----
> From: Gao, Liming [mailto:liming.gao@intel.com]
> Sent: Monday, May 21, 2018 9:57 AM
> To: Methavanitpong, Pipat/メタワニットポン ピパット
> <methavanitpong.pipat@socionext.com>; edk2-devel@lists.01.org
> Cc: ard.biesheuvel@linaro.org
> Subject: RE: How to retrieve HII form's default value
> 
> FCE supports Linux also.
> 
> There is no MACRO to describe VFR default value as PCD value in DSC file.
> MdeModulePkg HiiLib has one function HiiSetToDefaults() to retrieve the
> default setting and set it at boot time. Its first parameter is
> ConfigRequestHdr that represents one varstore or efi varstore defined in
> VFR. You can see this function usage in
> MdeModulePkg\Universal\DriverSampleDxe\DriverSample.c
> 
> Thanks
> Liming
> > -----Original Message-----
> > From: methavanitpong.pipat@socionext.com
> > [mailto:methavanitpong.pipat@socionext.com]
> > Sent: Monday, May 21, 2018 8:25 AM
> > To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
> > Cc: ard.biesheuvel@linaro.org
> > Subject: RE: How to retrieve HII form's default value
> >
> > > Intel provides FCE tool. It can parse the generated BIOS image and
> > > output the default value for every HII question. You can try it.
> >
> > Thanks Gao. This looks useful :)
> > I have to prepare my Windows environment before trying this out.
> >
> > But, is there a way to do it at build time?
> > Since default values are written in VFR files, it should be able to
> > resolve at both build time and runtime.
> >
> > * Is there any macro to let HII PCDs set to their default values in a
> DSC file?
> > * Is there a function or macro to lookup HII default values in a driver
> file?
> >
> >
> > Thank you,
> > --
> > Pipat Methavanitpong
> > Software Developer, S-Project 3
> > Socionext Inc.
> > > -----Original Message-----
> > > From: Gao, Liming [mailto:liming.gao@intel.com]
> > > Sent: Friday, May 18, 2018 5:50 PM
> > > To: Methavanitpong, Pipat/メタワニットポン ピパット
> > > <methavanitpong.pipat@socionext.com>; edk2-devel@lists.01.org
> > > Cc: ard.biesheuvel@linaro.org
> > > Subject: RE: How to retrieve HII form's default value
> > >
> > > Intel provides FCE tool. It can parse the generated BIOS image and
> > > output the default value for every HII question. You can try it.
> > >
> > > Here is the latest version
> > > https://firmware.intel.com/sites/default/files/2018-WW13-FCE.34-
> > > Release.zip
> > >
> > > >-----Original Message-----
> > > >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf
> > > >Of methavanitpong.pipat@socionext.com
> > > >Sent: Friday, May 18, 2018 10:09 AM
> > > >To: edk2-devel@lists.01.org
> > > >Cc: ard.biesheuvel@linaro.org
> > > >Subject: [edk2] How to retrieve HII form's default value
> > > >
> > > >Hi,
> > > >
> > > >I'm working on changing SynQuacer/PlatformDxe initial HII
> configuration.
> > > >
> > > >In the current implementation, SynQuacerPlatformSettings HII
> > > >variable doesn't set its initial value from PcdPlatfromSettings.
> > > >
> > > >* PcdPlatformSettings is initially set with value in dsc at build
> > > >time
> > > >
> > > >    * https://github.com/tianocore/edk2-
> > > >platforms/blob/master/Platform/Socionext/DeveloperBox/DeveloperBox.
> > > >dsc
> > > >#L439
> > > >
> > > >* SynQuacerPlatformSettings is initially set to zeros at run time
> > > >
> > > >    * https://github.com/tianocore/edk2-
> > > >platforms/blob/master/Silicon/Socionext/SynQuacer/Drivers/PlatformD
> > > >xe/P
> > > >l
> > > >atformDxe.c#L246
> > > >
> > > >They are unsync, but are both initially assigned to 0 independently.
> > > >
> > > >What I want to do with this issue is
> > > >
> > > >* Set initial SynQuacerPlatformSettings value from its
> > > >  SYNQUACER_PLATFORM_FORMSET_GUID form's default value
> > > >* Set initial PcdPlatformSettings value from its
> > > >  SYNQUACER_PLATFORM_FORMSET_GUID form's default value
> > > >
> > > >Could anyone give me an advice on retrieving default value from a
> > > >HII form and assign in C and DSC files?
> > > >
> > > >
> > > >Thanks,
> > > >--
> > > >Pipat Methavanitpong
> > > >Software Developer, S-Project 3
> > > >Socionext Inc.
> > > >_______________________________________________
> > > >edk2-devel mailing list
> > > >edk2-devel@lists.01.org
> > > >https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-21  1:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-18  2:09 How to retrieve HII form's default value methavanitpong.pipat
2018-05-18  8:50 ` Gao, Liming
2018-05-21  0:24   ` methavanitpong.pipat
2018-05-21  0:57     ` Gao, Liming
2018-05-21  1:21       ` methavanitpong.pipat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox