public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry
@ 2019-08-14  7:37 Zhang, Shenglei
  2019-08-14 17:11 ` [edk2-devel] " Laszlo Ersek
  0 siblings, 1 reply; 4+ messages in thread
From: Zhang, Shenglei @ 2019-08-14  7:37 UTC (permalink / raw)
  To: devel; +Cc: Dandan Bi, Liming Gao, Hao A Wu

Initialize PageMapLevel5Entry at the beginning of the function.

This commit will fix a GCC 4.8.5 build failure introduced by commit
b3527dedc3951f061c5a73cb4fb2b0f95f47e08b.

OvmfPkg build failure wtih gcc 4.8.5 still exists at latest edk2 version.
The commit 46f8a6891606746ca8b1e684ac379ce271306dc0 seems not to fix
the build failure completely.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
index 2389f3eb485b..aae80536ac3d 100644
--- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
+++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
@@ -652,6 +652,8 @@ CreateIdentityMappingPageTables (
   UINT64                                        AddressEncMask;
   IA32_CR4                                      Cr4;
 
+  PageMapLevel5Entry = NULL;
+
   //
   // Make sure AddressEncMask is contained to smallest supported address field
   //
-- 
2.18.0.windows.1


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

* Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry
  2019-08-14  7:37 [PATCH 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry Zhang, Shenglei
@ 2019-08-14 17:11 ` Laszlo Ersek
  2019-08-15  0:25   ` Liming Gao
  0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2019-08-14 17:11 UTC (permalink / raw)
  To: devel, shenglei.zhang; +Cc: Dandan Bi, Liming Gao, Hao A Wu

On 08/14/19 09:37, Zhang, Shenglei wrote:
> Initialize PageMapLevel5Entry at the beginning of the function.
> 
> This commit will fix a GCC 4.8.5 build failure introduced by commit
> b3527dedc3951f061c5a73cb4fb2b0f95f47e08b.
> 
> OvmfPkg build failure wtih gcc 4.8.5 still exists at latest edk2 version.
> The commit 46f8a6891606746ca8b1e684ac379ce271306dc0 seems not to fix
> the build failure completely.
> 
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> index 2389f3eb485b..aae80536ac3d 100644
> --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> @@ -652,6 +652,8 @@ CreateIdentityMappingPageTables (
>    UINT64                                        AddressEncMask;
>    IA32_CR4                                      Cr4;
>  
> +  PageMapLevel5Entry = NULL;
> +
>    //
>    // Make sure AddressEncMask is contained to smallest supported address field
>    //
> 

If you are convinced that we need this assignment *only* for suppressing
an invalid compiler warning, then please add a comment about it:

  //
  // set PageMapLevel5Entry to suppress incorrect compiler/analyzer
  // warnings
  //

Related documentation BZ:

https://bugzilla.tianocore.org/show_bug.cgi?id=607

... Just a suggestion from my side; I defer to the MdeModulePkg maintainers.

Thanks
Laszlo

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

* Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry
  2019-08-14 17:11 ` [edk2-devel] " Laszlo Ersek
@ 2019-08-15  0:25   ` Liming Gao
  2019-08-15  1:09     ` Wu, Hao A
  0 siblings, 1 reply; 4+ messages in thread
From: Liming Gao @ 2019-08-15  0:25 UTC (permalink / raw)
  To: devel@edk2.groups.io, lersek@redhat.com, Zhang, Shenglei
  Cc: Bi, Dandan, Wu, Hao A

Shenglei:
  The change is good. I agree to add comments for this change purpose like BZ https://bugzilla.tianocore.org/show_bug.cgi?id=607

  With this change, Reviewed-by: Liming Gao <liming.gao@intel.com>.

Thanks
Liming
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Laszlo Ersek
> Sent: Thursday, August 15, 2019 1:12 AM
> To: devel@edk2.groups.io; Zhang, Shenglei <shenglei.zhang@intel.com>
> Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry
> 
> On 08/14/19 09:37, Zhang, Shenglei wrote:
> > Initialize PageMapLevel5Entry at the beginning of the function.
> >
> > This commit will fix a GCC 4.8.5 build failure introduced by commit
> > b3527dedc3951f061c5a73cb4fb2b0f95f47e08b.
> >
> > OvmfPkg build failure wtih gcc 4.8.5 still exists at latest edk2 version.
> > The commit 46f8a6891606746ca8b1e684ac379ce271306dc0 seems not to fix
> > the build failure completely.
> >
> > Cc: Dandan Bi <dandan.bi@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Cc: Hao A Wu <hao.a.wu@intel.com>
> > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> > ---
> >  MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> > index 2389f3eb485b..aae80536ac3d 100644
> > --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> > +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> > @@ -652,6 +652,8 @@ CreateIdentityMappingPageTables (
> >    UINT64                                        AddressEncMask;
> >    IA32_CR4                                      Cr4;
> >
> > +  PageMapLevel5Entry = NULL;
> > +
> >    //
> >    // Make sure AddressEncMask is contained to smallest supported address field
> >    //
> >
> 
> If you are convinced that we need this assignment *only* for suppressing
> an invalid compiler warning, then please add a comment about it:
> 
>   //
>   // set PageMapLevel5Entry to suppress incorrect compiler/analyzer
>   // warnings
>   //
> 
> Related documentation BZ:
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=607
> 
> ... Just a suggestion from my side; I defer to the MdeModulePkg maintainers.
> 
> Thanks
> Laszlo
> 
> 


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

* Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry
  2019-08-15  0:25   ` Liming Gao
@ 2019-08-15  1:09     ` Wu, Hao A
  0 siblings, 0 replies; 4+ messages in thread
From: Wu, Hao A @ 2019-08-15  1:09 UTC (permalink / raw)
  To: Zhang, Shenglei, Gao, Liming, devel@edk2.groups.io,
	lersek@redhat.com
  Cc: Bi, Dandan

> -----Original Message-----
> From: Gao, Liming
> Sent: Thursday, August 15, 2019 8:26 AM
> To: devel@edk2.groups.io; lersek@redhat.com; Zhang, Shenglei
> Cc: Bi, Dandan; Wu, Hao A
> Subject: RE: [edk2-devel] [PATCH 1/1] MdeModulePkg/DxeIplPeim: Initialize
> pointer PageMapLevel5Entry
> 
> Shenglei:
>   The change is good. I agree to add comments for this change purpose like BZ
> https://bugzilla.tianocore.org/show_bug.cgi?id=607


Hello Shenglei,

Could you help to send out a V2 patch to address Laszlo's comments.
Thanks in advance.

Best Regards,
Hao Wu


> 
>   With this change, Reviewed-by: Liming Gao <liming.gao@intel.com>.
> 
> Thanks
> Liming
> > -----Original Message-----
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Laszlo Ersek
> > Sent: Thursday, August 15, 2019 1:12 AM
> > To: devel@edk2.groups.io; Zhang, Shenglei <shenglei.zhang@intel.com>
> > Cc: Bi, Dandan <dandan.bi@intel.com>; Gao, Liming
> <liming.gao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> > Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/DxeIplPeim:
> Initialize pointer PageMapLevel5Entry
> >
> > On 08/14/19 09:37, Zhang, Shenglei wrote:
> > > Initialize PageMapLevel5Entry at the beginning of the function.
> > >
> > > This commit will fix a GCC 4.8.5 build failure introduced by commit
> > > b3527dedc3951f061c5a73cb4fb2b0f95f47e08b.
> > >
> > > OvmfPkg build failure wtih gcc 4.8.5 still exists at latest edk2 version.
> > > The commit 46f8a6891606746ca8b1e684ac379ce271306dc0 seems not to
> fix
> > > the build failure completely.
> > >
> > > Cc: Dandan Bi <dandan.bi@intel.com>
> > > Cc: Liming Gao <liming.gao@intel.com>
> > > Cc: Hao A Wu <hao.a.wu@intel.com>
> > > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> > > ---
> > >  MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> > > index 2389f3eb485b..aae80536ac3d 100644
> > > --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> > > +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> > > @@ -652,6 +652,8 @@ CreateIdentityMappingPageTables (
> > >    UINT64                                        AddressEncMask;
> > >    IA32_CR4                                      Cr4;
> > >
> > > +  PageMapLevel5Entry = NULL;
> > > +
> > >    //
> > >    // Make sure AddressEncMask is contained to smallest supported
> address field
> > >    //
> > >
> >
> > If you are convinced that we need this assignment *only* for suppressing
> > an invalid compiler warning, then please add a comment about it:
> >
> >   //
> >   // set PageMapLevel5Entry to suppress incorrect compiler/analyzer
> >   // warnings
> >   //
> >
> > Related documentation BZ:
> >
> > https://bugzilla.tianocore.org/show_bug.cgi?id=607
> >
> > ... Just a suggestion from my side; I defer to the MdeModulePkg
> maintainers.
> >
> > Thanks
> > Laszlo
> >
> > 


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

end of thread, other threads:[~2019-08-15  1:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-14  7:37 [PATCH 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry Zhang, Shenglei
2019-08-14 17:11 ` [edk2-devel] " Laszlo Ersek
2019-08-15  0:25   ` Liming Gao
2019-08-15  1:09     ` Wu, Hao A

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