diff mbox series

[edk2,edk2-platforms,v3,05/18] Hisilicon/D06: Fix access variable fail issue

Message ID 20190320080829.52003-6-ming.huang@linaro.org
State New
Headers show
Series Fix issues and improve D0x | expand

Commit Message

Ming Huang March 20, 2019, 8:08 a.m. UTC
From: Jason Zhang <zhangjinsong2@huawei.com>


BmcWdtEnable is a field of OemConfigData structure, need have
runtime service attribution if use it during exit boot service

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>

---
 Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr | 2 +-
 Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.9.5

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Leif Lindholm March 21, 2019, 5:52 p.m. UTC | #1
I will update the subject line to reflect what is actually being
changed.

Other than that,
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>



On Wed, Mar 20, 2019 at 04:08:16PM +0800, Ming Huang wrote:
> From: Jason Zhang <zhangjinsong2@huawei.com>

> 

> BmcWdtEnable is a field of OemConfigData structure, need have

> runtime service attribution if use it during exit boot service

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ming Huang <ming.huang@linaro.org>

> ---

>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr | 2 +-

>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c      | 2 +-

>  2 files changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr

> index 470e9ace3dcf..08236704fbfe 100644

> --- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr

> +++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr

> @@ -23,7 +23,7 @@ formset

>    help      = STRING_TOKEN(STR_OEM_CONFIG),

>    classguid = gEfiIfrFrontPageGuid,  // for MdeModule Bds.

>    efivarstore OEM_CONFIG_DATA,

> -    attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,

> +    attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS,

>      name  = OemConfig,

>      guid  = gOemConfigGuid;

>  

> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c

> index 012d45bc0214..6668103af027 100644

> --- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c

> +++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c

> @@ -316,7 +316,7 @@ OemConfigUiLibConstructor (

>        Status = gRT->SetVariable (

>                        OEM_CONFIG_NAME,

>                        &gOemConfigGuid,

> -                      EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,

> +                      EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,

>                        sizeof (OEM_CONFIG_DATA),

>                        &Configuration

>                        );

> -- 

> 2.9.5

> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Leif Lindholm March 21, 2019, 5:56 p.m. UTC | #2
Urgh, this was an unfortunate off-by-one post:
I am deferring this patch until after Linaro's 2019.03 firmware
release and cherry-picking it into that. There must be a better way to
solve this.

My comment referred to "Hisilicon/D06: Drop the leading 0 (0x0 ->
0x)", which will be pushed with an improved subject.

/
    Leif

On Thu, Mar 21, 2019 at 05:52:18PM +0000, Leif Lindholm wrote:
> I will update the subject line to reflect what is actually being

> changed.

> 

> Other than that,

> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> 

> 

> On Wed, Mar 20, 2019 at 04:08:16PM +0800, Ming Huang wrote:

> > From: Jason Zhang <zhangjinsong2@huawei.com>

> > 

> > BmcWdtEnable is a field of OemConfigData structure, need have

> > runtime service attribution if use it during exit boot service

> > 

> > Contributed-under: TianoCore Contribution Agreement 1.1

> > Signed-off-by: Ming Huang <ming.huang@linaro.org>

> > ---

> >  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr | 2 +-

> >  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c      | 2 +-

> >  2 files changed, 2 insertions(+), 2 deletions(-)

> > 

> > diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr

> > index 470e9ace3dcf..08236704fbfe 100644

> > --- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr

> > +++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr

> > @@ -23,7 +23,7 @@ formset

> >    help      = STRING_TOKEN(STR_OEM_CONFIG),

> >    classguid = gEfiIfrFrontPageGuid,  // for MdeModule Bds.

> >    efivarstore OEM_CONFIG_DATA,

> > -    attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,

> > +    attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS,

> >      name  = OemConfig,

> >      guid  = gOemConfigGuid;

> >  

> > diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c

> > index 012d45bc0214..6668103af027 100644

> > --- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c

> > +++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c

> > @@ -316,7 +316,7 @@ OemConfigUiLibConstructor (

> >        Status = gRT->SetVariable (

> >                        OEM_CONFIG_NAME,

> >                        &gOemConfigGuid,

> > -                      EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,

> > +                      EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,

> >                        sizeof (OEM_CONFIG_DATA),

> >                        &Configuration

> >                        );

> > -- 

> > 2.9.5

> > 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ming Huang March 22, 2019, 4:27 a.m. UTC | #3
On 3/22/2019 1:56 AM, Leif Lindholm wrote:
> Urgh, this was an unfortunate off-by-one post:

> I am deferring this patch until after Linaro's 2019.03 firmware

> release and cherry-picking it into that. There must be a better way to

> solve this.

> 

> My comment referred to "Hisilicon/D06: Drop the leading 0 (0x0 ->

> 0x)", which will be pushed with an improved subject.


I will change subject to:
Add runtime attribution to OemConfig variable
Should I change author to me to remove the "From: Jason Zhang"?

Thanks

> 

> /

>     Leif

> 

> On Thu, Mar 21, 2019 at 05:52:18PM +0000, Leif Lindholm wrote:

>> I will update the subject line to reflect what is actually being

>> changed.

>>

>> Other than that,

>> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

>>

>>

>> On Wed, Mar 20, 2019 at 04:08:16PM +0800, Ming Huang wrote:

>>> From: Jason Zhang <zhangjinsong2@huawei.com>

>>>

>>> BmcWdtEnable is a field of OemConfigData structure, need have

>>> runtime service attribution if use it during exit boot service

>>>

>>> Contributed-under: TianoCore Contribution Agreement 1.1

>>> Signed-off-by: Ming Huang <ming.huang@linaro.org>

>>> ---

>>>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr | 2 +-

>>>  Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c      | 2 +-

>>>  2 files changed, 2 insertions(+), 2 deletions(-)

>>>

>>> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr

>>> index 470e9ace3dcf..08236704fbfe 100644

>>> --- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr

>>> +++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr

>>> @@ -23,7 +23,7 @@ formset

>>>    help      = STRING_TOKEN(STR_OEM_CONFIG),

>>>    classguid = gEfiIfrFrontPageGuid,  // for MdeModule Bds.

>>>    efivarstore OEM_CONFIG_DATA,

>>> -    attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,

>>> +    attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS,

>>>      name  = OemConfig,

>>>      guid  = gOemConfigGuid;

>>>  

>>> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c

>>> index 012d45bc0214..6668103af027 100644

>>> --- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c

>>> +++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c

>>> @@ -316,7 +316,7 @@ OemConfigUiLibConstructor (

>>>        Status = gRT->SetVariable (

>>>                        OEM_CONFIG_NAME,

>>>                        &gOemConfigGuid,

>>> -                      EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,

>>> +                      EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,

>>>                        sizeof (OEM_CONFIG_DATA),

>>>                        &Configuration

>>>                        );

>>> -- 

>>> 2.9.5

>>>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr
index 470e9ace3dcf..08236704fbfe 100644
--- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr
+++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfigVfr.vfr
@@ -23,7 +23,7 @@  formset
   help      = STRING_TOKEN(STR_OEM_CONFIG),
   classguid = gEfiIfrFrontPageGuid,  // for MdeModule Bds.
   efivarstore OEM_CONFIG_DATA,
-    attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
+    attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS,
     name  = OemConfig,
     guid  = gOemConfigGuid;
 
diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c
index 012d45bc0214..6668103af027 100644
--- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c
+++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c
@@ -316,7 +316,7 @@  OemConfigUiLibConstructor (
       Status = gRT->SetVariable (
                       OEM_CONFIG_NAME,
                       &gOemConfigGuid,
-                      EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
+                      EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
                       sizeof (OEM_CONFIG_DATA),
                       &Configuration
                       );