public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 0/1] Protect coreboot tables
@ 2020-07-08 12:01 Marcello Sylvester Bauer
  2020-07-08 12:01 ` [PATCH v1 1/1] UefipayloadPkg: " Marcello Sylvester Bauer
  0 siblings, 1 reply; 8+ messages in thread
From: Marcello Sylvester Bauer @ 2020-07-08 12:01 UTC (permalink / raw)
  To: devel

Protect coreboot tables from being overwritten by EDK2.

Ref: https://github.com/9elements/edk2-1/tree/UefiPayloadPkg-protect_coreboot_tables
PR: https://github.com/tianocore/edk2/pull/772

Patrick Rudolph (1):
  UefipayloadPkg: Protect coreboot tables

 UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 ++++++++++++++------
 1 file changed, 19 insertions(+), 7 deletions(-)

-- 
2.27.0


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

* [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
  2020-07-08 12:01 [PATCH v1 0/1] Protect coreboot tables Marcello Sylvester Bauer
@ 2020-07-08 12:01 ` Marcello Sylvester Bauer
  2020-09-08 21:40   ` [edk2-devel] " Guo Dong
  0 siblings, 1 reply; 8+ messages in thread
From: Marcello Sylvester Bauer @ 2020-07-08 12:01 UTC (permalink / raw)
  To: devel; +Cc: Maurice Ma, Nate DeSimone, Star Zeng

From: Patrick Rudolph <patrick.rudolph@9elements.com>

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
---
 UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 ++++++++++++++------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
index 22972453117a..b3ff065a537e 100644
--- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
+++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
@@ -390,24 +390,36 @@ BlPeiEntryPoint (
   EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;
   EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;
 
-
-  //
-  // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTRIBUTE_TESTED
-  // is intentionally omitted to prevent erasing of the coreboot header
-  // record before it is processed by ParseMemoryInfo.
+  // Report lower 640KB of RAM.
+  // Mark memory as reserved to keep coreboot header in place.
   //
   BuildResourceDescriptorHob (
-    EFI_RESOURCE_SYSTEM_MEMORY,
+    EFI_RESOURCE_MEMORY_RESERVED,
     (
     EFI_RESOURCE_ATTRIBUTE_PRESENT |
     EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
+    EFI_RESOURCE_ATTRIBUTE_TESTED |
     EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
     EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
     EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
     EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
     ),
     (EFI_PHYSICAL_ADDRESS)(0),
-    (UINT64)(0xA0000)
+    (UINT64)(0x1000)
+    );
+
+  BuildResourceDescriptorHob (
+    EFI_RESOURCE_SYSTEM_MEMORY,
+    (
+    EFI_RESOURCE_ATTRIBUTE_PRESENT |
+    EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
+    EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
+    EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
+    EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
+    EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
+    ),
+    (EFI_PHYSICAL_ADDRESS)(0x1000),
+    (UINT64)(0x9F000)
     );
 
   BuildResourceDescriptorHob (
-- 
2.27.0


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

* Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
  2020-07-08 12:01 ` [PATCH v1 1/1] UefipayloadPkg: " Marcello Sylvester Bauer
@ 2020-09-08 21:40   ` Guo Dong
  2020-09-14  8:59     ` Marcello Sylvester Bauer
  0 siblings, 1 reply; 8+ messages in thread
From: Guo Dong @ 2020-09-08 21:40 UTC (permalink / raw)
  To: devel@edk2.groups.io, marcello.bauer@9elements.com
  Cc: Ma, Maurice, Desimone, Nathaniel L, Zeng, Star


Hi Marcello,

In the UEFI payload, we should not hardcoded any memory usage. It means UEFI payload should use the memory map whatever reported from the bootloader. I plan to remove this hardcoded memory usage soon.
Before that, it is OK for me to merge this change if you want.
BTW, did you see any issue with current implement?

Thanks,
Guo

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marcello
> Sylvester Bauer
> Sent: Wednesday, July 8, 2020 5:01 AM
> To: devel@edk2.groups.io
> Cc: Ma, Maurice <maurice.ma@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
> 
> From: Patrick Rudolph <patrick.rudolph@9elements.com>
> 
> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> ---
>  UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 ++++++++++++++------
>  1 file changed, 19 insertions(+), 7 deletions(-)
> 
> diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> index 22972453117a..b3ff065a537e 100644
> --- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> +++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> @@ -390,24 +390,36 @@ BlPeiEntryPoint (
>    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;
> 
>    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;
> 
> 
> 
> -
> 
> -  //
> 
> -  // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTRIBUTE_TESTED
> 
> -  // is intentionally omitted to prevent erasing of the coreboot header
> 
> -  // record before it is processed by ParseMemoryInfo.
> 
> +  // Report lower 640KB of RAM.
> 
> +  // Mark memory as reserved to keep coreboot header in place.
> 
>    //
> 
>    BuildResourceDescriptorHob (
> 
> -    EFI_RESOURCE_SYSTEM_MEMORY,
> 
> +    EFI_RESOURCE_MEMORY_RESERVED,
> 
>      (
> 
>      EFI_RESOURCE_ATTRIBUTE_PRESENT |
> 
>      EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
> 
> +    EFI_RESOURCE_ATTRIBUTE_TESTED |
> 
>      EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
> 
>      EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
> 
>      EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
> 
>      EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
> 
>      ),
> 
>      (EFI_PHYSICAL_ADDRESS)(0),
> 
> -    (UINT64)(0xA0000)
> 
> +    (UINT64)(0x1000)
> 
> +    );
> 
> +
> 
> +  BuildResourceDescriptorHob (
> 
> +    EFI_RESOURCE_SYSTEM_MEMORY,
> 
> +    (
> 
> +    EFI_RESOURCE_ATTRIBUTE_PRESENT |
> 
> +    EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
> 
> +    EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
> 
> +    EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
> 
> +    EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
> 
> +    EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
> 
> +    ),
> 
> +    (EFI_PHYSICAL_ADDRESS)(0x1000),
> 
> +    (UINT64)(0x9F000)
> 
>      );
> 
> 
> 
>    BuildResourceDescriptorHob (
> 
> --
> 2.27.0
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> 
> View/Reply Online (#62229): https://edk2.groups.io/g/devel/message/62229
> Mute This Topic: https://groups.io/mt/75374752/1781375
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [guo.dong@intel.com]
> -=-=-=-=-=-=


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

* Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
  2020-09-08 21:40   ` [edk2-devel] " Guo Dong
@ 2020-09-14  8:59     ` Marcello Sylvester Bauer
  2020-09-14 17:32       ` Guo Dong
  0 siblings, 1 reply; 8+ messages in thread
From: Marcello Sylvester Bauer @ 2020-09-14  8:59 UTC (permalink / raw)
  To: Dong, Guo
  Cc: devel@edk2.groups.io, Ma, Maurice, Desimone, Nathaniel L,
	Zeng, Star

[-- Attachment #1: Type: text/plain, Size: 4716 bytes --]

Hi Guo,

Sounds like a good proposal, but it would be great to merge this change
temporarily.
In some cases of the current implementation edk2 does override the memory
area, where the coreboot table pointer is located.
Therefore the kernel and cbmem tool is not able to locate the tables
anymore.

Thanks,
Marcello

On Tue, Sep 8, 2020 at 11:40 PM Dong, Guo <guo.dong@intel.com> wrote:

>
> Hi Marcello,
>
> In the UEFI payload, we should not hardcoded any memory usage. It means
> UEFI payload should use the memory map whatever reported from the
> bootloader. I plan to remove this hardcoded memory usage soon.
> Before that, it is OK for me to merge this change if you want.
> BTW, did you see any issue with current implement?
>
> Thanks,
> Guo
>
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marcello
> > Sylvester Bauer
> > Sent: Wednesday, July 8, 2020 5:01 AM
> > To: devel@edk2.groups.io
> > Cc: Ma, Maurice <maurice.ma@intel.com>; Desimone, Nathaniel L
> > <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com>
> > Subject: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot
> tables
> >
> > From: Patrick Rudolph <patrick.rudolph@9elements.com>
> >
> > Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> > Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
> > Cc: Maurice Ma <maurice.ma@intel.com>
> > Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> > Cc: Star Zeng <star.zeng@intel.com>
> > ---
> >  UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 ++++++++++++++------
> >  1 file changed, 19 insertions(+), 7 deletions(-)
> >
> > diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> > b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> > index 22972453117a..b3ff065a537e 100644
> > --- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> > +++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> > @@ -390,24 +390,36 @@ BlPeiEntryPoint (
> >    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;
> >
> >    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;
> >
> >
> >
> > -
> >
> > -  //
> >
> > -  // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTRIBUTE_TESTED
> >
> > -  // is intentionally omitted to prevent erasing of the coreboot header
> >
> > -  // record before it is processed by ParseMemoryInfo.
> >
> > +  // Report lower 640KB of RAM.
> >
> > +  // Mark memory as reserved to keep coreboot header in place.
> >
> >    //
> >
> >    BuildResourceDescriptorHob (
> >
> > -    EFI_RESOURCE_SYSTEM_MEMORY,
> >
> > +    EFI_RESOURCE_MEMORY_RESERVED,
> >
> >      (
> >
> >      EFI_RESOURCE_ATTRIBUTE_PRESENT |
> >
> >      EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
> >
> > +    EFI_RESOURCE_ATTRIBUTE_TESTED |
> >
> >      EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
> >
> >      EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
> >
> >      EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
> >
> >      EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
> >
> >      ),
> >
> >      (EFI_PHYSICAL_ADDRESS)(0),
> >
> > -    (UINT64)(0xA0000)
> >
> > +    (UINT64)(0x1000)
> >
> > +    );
> >
> > +
> >
> > +  BuildResourceDescriptorHob (
> >
> > +    EFI_RESOURCE_SYSTEM_MEMORY,
> >
> > +    (
> >
> > +    EFI_RESOURCE_ATTRIBUTE_PRESENT |
> >
> > +    EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
> >
> > +    EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
> >
> > +    EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
> >
> > +    EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
> >
> > +    EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
> >
> > +    ),
> >
> > +    (EFI_PHYSICAL_ADDRESS)(0x1000),
> >
> > +    (UINT64)(0x9F000)
> >
> >      );
> >
> >
> >
> >    BuildResourceDescriptorHob (
> >
> > --
> > 2.27.0
> >
> >
> > -=-=-=-=-=-=
> > Groups.io Links: You receive all messages sent to this group.
> >
> > View/Reply Online (#62229): https://edk2.groups.io/g/devel/message/62229
> > Mute This Topic: https://groups.io/mt/75374752/1781375
> > Group Owner: devel+owner@edk2.groups.io
> > Unsubscribe: https://edk2.groups.io/g/devel/unsub  [guo.dong@intel.com]
> > -=-=-=-=-=-=
>
>

-- 
*[Marcello Sylvester Bauer]*



9elements Agency GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email:  [DEINE EMAIL ADDRESSE]
<https://static.9elements.com/email_signatur.html>
Phone:  *+49 234 68 94 188 <+492346894188>*
Mobile:  *+49 1722847618 <+491722847618>*

Sitz der Gesellschaft: Bochum
Handelsregister: Amtsgericht Bochum, HRB 17519
Geschäftsführung: Sebastian Deutsch, Eray Basar

Datenschutzhinweise nach Art. 13 DSGVO <https://9elements.com/privacy>

[-- Attachment #2: Type: text/html, Size: 8919 bytes --]

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

* Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
  2020-09-14  8:59     ` Marcello Sylvester Bauer
@ 2020-09-14 17:32       ` Guo Dong
  2020-10-01 10:23         ` Laszlo Ersek
  0 siblings, 1 reply; 8+ messages in thread
From: Guo Dong @ 2020-09-14 17:32 UTC (permalink / raw)
  To: Marcello Sylvester Bauer
  Cc: devel@edk2.groups.io, Ma, Maurice, Desimone, Nathaniel L,
	Zeng, Star

[-- Attachment #1: Type: text/plain, Size: 5383 bytes --]


OK. Let me merge this patch firstly. /Guo

From: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
Sent: Monday, September 14, 2020 2:00 AM
To: Dong, Guo <guo.dong@intel.com>
Cc: devel@edk2.groups.io; Ma, Maurice <maurice.ma@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables

Hi Guo,

Sounds like a good proposal, but it would be great to merge this change temporarily.
In some cases of the current implementation edk2 does override the memory area, where the coreboot table pointer is located.
Therefore the kernel and cbmem tool is not able to locate the tables anymore.

Thanks,
Marcello

On Tue, Sep 8, 2020 at 11:40 PM Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>> wrote:

Hi Marcello,

In the UEFI payload, we should not hardcoded any memory usage. It means UEFI payload should use the memory map whatever reported from the bootloader. I plan to remove this hardcoded memory usage soon.
Before that, it is OK for me to merge this change if you want.
BTW, did you see any issue with current implement?

Thanks,
Guo

> -----Original Message-----
> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Marcello
> Sylvester Bauer
> Sent: Wednesday, July 8, 2020 5:01 AM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Ma, Maurice <maurice.ma@intel.com<mailto:maurice.ma@intel.com>>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>; Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>
> Subject: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
>
> From: Patrick Rudolph <patrick.rudolph@9elements.com<mailto:patrick.rudolph@9elements.com>>
>
> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com<mailto:patrick.rudolph@9elements.com>>
> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com<mailto:marcello.bauer@9elements.com>>
> Cc: Maurice Ma <maurice.ma@intel.com<mailto:maurice.ma@intel.com>>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
> Cc: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>
> ---
>  UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 ++++++++++++++------
>  1 file changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> index 22972453117a..b3ff065a537e 100644
> --- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> +++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> @@ -390,24 +390,36 @@ BlPeiEntryPoint (
>    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;
>
>    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;
>
>
>
> -
>
> -  //
>
> -  // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTRIBUTE_TESTED
>
> -  // is intentionally omitted to prevent erasing of the coreboot header
>
> -  // record before it is processed by ParseMemoryInfo.
>
> +  // Report lower 640KB of RAM.
>
> +  // Mark memory as reserved to keep coreboot header in place.
>
>    //
>
>    BuildResourceDescriptorHob (
>
> -    EFI_RESOURCE_SYSTEM_MEMORY,
>
> +    EFI_RESOURCE_MEMORY_RESERVED,
>
>      (
>
>      EFI_RESOURCE_ATTRIBUTE_PRESENT |
>
>      EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
>
> +    EFI_RESOURCE_ATTRIBUTE_TESTED |
>
>      EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
>
>      EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
>
>      EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
>
>      EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
>
>      ),
>
>      (EFI_PHYSICAL_ADDRESS)(0),
>
> -    (UINT64)(0xA0000)
>
> +    (UINT64)(0x1000)
>
> +    );
>
> +
>
> +  BuildResourceDescriptorHob (
>
> +    EFI_RESOURCE_SYSTEM_MEMORY,
>
> +    (
>
> +    EFI_RESOURCE_ATTRIBUTE_PRESENT |
>
> +    EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
>
> +    EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
>
> +    EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
>
> +    EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
>
> +    EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
>
> +    ),
>
> +    (EFI_PHYSICAL_ADDRESS)(0x1000),
>
> +    (UINT64)(0x9F000)
>
>      );
>
>
>
>    BuildResourceDescriptorHob (
>
> --
> 2.27.0
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#62229): https://edk2.groups.io/g/devel/message/62229
> Mute This Topic: https://groups.io/mt/75374752/1781375
> Group Owner: devel+owner@edk2.groups.io<mailto:devel%2Bowner@edk2.groups.io>
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [guo.dong@intel.com<mailto:guo.dong@intel.com>]
> -=-=-=-=-=-=


--
[Marcello Sylvester Bauer]

[http://static.9elements.com/logo-signature.png]
9elements Agency GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email:  [DEINE EMAIL ADDRESSE]<https://static.9elements.com/email_signatur.html>
Phone:  +49 234 68 94 188<tel:+492346894188>
Mobile:  +49 1722847618<tel:+491722847618>

Sitz der Gesellschaft: Bochum
Handelsregister: Amtsgericht Bochum, HRB 17519
Geschäftsführung: Sebastian Deutsch, Eray Basar

Datenschutzhinweise nach Art. 13 DSGVO<https://9elements.com/privacy>

[-- Attachment #2: Type: text/html, Size: 13853 bytes --]

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

* Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
  2020-09-14 17:32       ` Guo Dong
@ 2020-10-01 10:23         ` Laszlo Ersek
  2020-10-05 15:34           ` Marcello Sylvester Bauer
  0 siblings, 1 reply; 8+ messages in thread
From: Laszlo Ersek @ 2020-10-01 10:23 UTC (permalink / raw)
  To: devel, guo.dong, Marcello Sylvester Bauer
  Cc: Ma, Maurice, Desimone, Nathaniel L, Zeng, Star

On 09/14/20 19:32, Guo Dong wrote:
> 
> OK. Let me merge this patch firstly. /Guo

The PR at <https://github.com/tianocore/edk2/pull/924> failed 17 days
ago and there have been no updates since, as far as I can tell. I've
closed the PR for now.

Thanks
Laszlo

> 
> From: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
> Sent: Monday, September 14, 2020 2:00 AM
> To: Dong, Guo <guo.dong@intel.com>
> Cc: devel@edk2.groups.io; Ma, Maurice <maurice.ma@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
> 
> Hi Guo,
> 
> Sounds like a good proposal, but it would be great to merge this change temporarily.
> In some cases of the current implementation edk2 does override the memory area, where the coreboot table pointer is located.
> Therefore the kernel and cbmem tool is not able to locate the tables anymore.
> 
> Thanks,
> Marcello
> 
> On Tue, Sep 8, 2020 at 11:40 PM Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>> wrote:
> 
> Hi Marcello,
> 
> In the UEFI payload, we should not hardcoded any memory usage. It means UEFI payload should use the memory map whatever reported from the bootloader. I plan to remove this hardcoded memory usage soon.
> Before that, it is OK for me to merge this change if you want.
> BTW, did you see any issue with current implement?
> 
> Thanks,
> Guo
> 
>> -----Original Message-----
>> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Marcello
>> Sylvester Bauer
>> Sent: Wednesday, July 8, 2020 5:01 AM
>> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
>> Cc: Ma, Maurice <maurice.ma@intel.com<mailto:maurice.ma@intel.com>>; Desimone, Nathaniel L
>> <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>; Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>
>> Subject: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
>>
>> From: Patrick Rudolph <patrick.rudolph@9elements.com<mailto:patrick.rudolph@9elements.com>>
>>
>> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com<mailto:patrick.rudolph@9elements.com>>
>> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com<mailto:marcello.bauer@9elements.com>>
>> Cc: Maurice Ma <maurice.ma@intel.com<mailto:maurice.ma@intel.com>>
>> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>
>> Cc: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>
>> ---
>>  UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 ++++++++++++++------
>>  1 file changed, 19 insertions(+), 7 deletions(-)
>>
>> diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>> b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>> index 22972453117a..b3ff065a537e 100644
>> --- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>> +++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>> @@ -390,24 +390,36 @@ BlPeiEntryPoint (
>>    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;
>>
>>    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;
>>
>>
>>
>> -
>>
>> -  //
>>
>> -  // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTRIBUTE_TESTED
>>
>> -  // is intentionally omitted to prevent erasing of the coreboot header
>>
>> -  // record before it is processed by ParseMemoryInfo.
>>
>> +  // Report lower 640KB of RAM.
>>
>> +  // Mark memory as reserved to keep coreboot header in place.
>>
>>    //
>>
>>    BuildResourceDescriptorHob (
>>
>> -    EFI_RESOURCE_SYSTEM_MEMORY,
>>
>> +    EFI_RESOURCE_MEMORY_RESERVED,
>>
>>      (
>>
>>      EFI_RESOURCE_ATTRIBUTE_PRESENT |
>>
>>      EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
>>
>> +    EFI_RESOURCE_ATTRIBUTE_TESTED |
>>
>>      EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
>>
>>      EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
>>
>>      EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
>>
>>      EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
>>
>>      ),
>>
>>      (EFI_PHYSICAL_ADDRESS)(0),
>>
>> -    (UINT64)(0xA0000)
>>
>> +    (UINT64)(0x1000)
>>
>> +    );
>>
>> +
>>
>> +  BuildResourceDescriptorHob (
>>
>> +    EFI_RESOURCE_SYSTEM_MEMORY,
>>
>> +    (
>>
>> +    EFI_RESOURCE_ATTRIBUTE_PRESENT |
>>
>> +    EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
>>
>> +    EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
>>
>> +    EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
>>
>> +    EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
>>
>> +    EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
>>
>> +    ),
>>
>> +    (EFI_PHYSICAL_ADDRESS)(0x1000),
>>
>> +    (UINT64)(0x9F000)
>>
>>      );
>>
>>
>>
>>    BuildResourceDescriptorHob (
>>
>> --
>> 2.27.0
>>
>>
>> -=-=-=-=-=-=
>> Groups.io Links: You receive all messages sent to this group.
>>
>> View/Reply Online (#62229): https://edk2.groups.io/g/devel/message/62229
>> Mute This Topic: https://groups.io/mt/75374752/1781375
>> Group Owner: devel+owner@edk2.groups.io<mailto:devel%2Bowner@edk2.groups.io>
>> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [guo.dong@intel.com<mailto:guo.dong@intel.com>]
>> -=-=-=-=-=-=
> 
> 
> --
> [Marcello Sylvester Bauer]
> 
> [http://static.9elements.com/logo-signature.png]
> 9elements Agency GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
> Email:  [DEINE EMAIL ADDRESSE]<https://static.9elements.com/email_signatur.html>
> Phone:  +49 234 68 94 188<tel:+492346894188>
> Mobile:  +49 1722847618<tel:+491722847618>
> 
> Sitz der Gesellschaft: Bochum
> Handelsregister: Amtsgericht Bochum, HRB 17519
> Geschäftsführung: Sebastian Deutsch, Eray Basar
> 
> Datenschutzhinweise nach Art. 13 DSGVO<https://9elements.com/privacy>
> 
> 
> 


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

* Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
  2020-10-01 10:23         ` Laszlo Ersek
@ 2020-10-05 15:34           ` Marcello Sylvester Bauer
  2020-10-06  8:25             ` Laszlo Ersek
  0 siblings, 1 reply; 8+ messages in thread
From: Marcello Sylvester Bauer @ 2020-10-05 15:34 UTC (permalink / raw)
  To: Laszlo Ersek
  Cc: devel, Guo Dong, Ma, Maurice, Desimone, Nathaniel L, Zeng, Star

[-- Attachment #1: Type: text/plain, Size: 7107 bytes --]

On Thu, Oct 1, 2020 at 12:24 PM Laszlo Ersek <lersek@redhat.com> wrote:

> On 09/14/20 19:32, Guo Dong wrote:
> >
> > OK. Let me merge this patch firstly. /Guo
>
> The PR at <https://github.com/tianocore/edk2/pull/924> failed 17 days
> ago and there have been no updates since, as far as I can tell. I've
> closed the PR for now.
>
> Thanks
> Laszlo
>

"Mergify / Rule: Automatically merge a PR when all required checks pass and
'push' label is present (merge)" is
the only that failed, because mergify thinks it has no rights to update the
base branch (tianocore/master).
I don't understand why. What should I do?

Thanks
Marcello

> >
> > From: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
> > Sent: Monday, September 14, 2020 2:00 AM
> > To: Dong, Guo <guo.dong@intel.com>
> > Cc: devel@edk2.groups.io; Ma, Maurice <maurice.ma@intel.com>; Desimone,
> Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star <
> star.zeng@intel.com>
> > Subject: Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect
> coreboot tables
> >
> > Hi Guo,
> >
> > Sounds like a good proposal, but it would be great to merge this change
> temporarily.
> > In some cases of the current implementation edk2 does override the
> memory area, where the coreboot table pointer is located.
> > Therefore the kernel and cbmem tool is not able to locate the tables
> anymore.
> >
> > Thanks,
> > Marcello
> >
> > On Tue, Sep 8, 2020 at 11:40 PM Dong, Guo <guo.dong@intel.com<mailto:
> guo.dong@intel.com>> wrote:
> >
> > Hi Marcello,
> >
> > In the UEFI payload, we should not hardcoded any memory usage. It means
> UEFI payload should use the memory map whatever reported from the
> bootloader. I plan to remove this hardcoded memory usage soon.
> > Before that, it is OK for me to merge this change if you want.
> > BTW, did you see any issue with current implement?
> >
> > Thanks,
> > Guo
> >
> >> -----Original Message-----
> >> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <
> devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Marcello
> >> Sylvester Bauer
> >> Sent: Wednesday, July 8, 2020 5:01 AM
> >> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> >> Cc: Ma, Maurice <maurice.ma@intel.com<mailto:maurice.ma@intel.com>>;
> Desimone, Nathaniel L
> >> <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>;
> Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>
> >> Subject: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot
> tables
> >>
> >> From: Patrick Rudolph <patrick.rudolph@9elements.com<mailto:
> patrick.rudolph@9elements.com>>
> >>
> >> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com<mailto:
> patrick.rudolph@9elements.com>>
> >> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com
> <mailto:marcello.bauer@9elements.com>>
> >> Cc: Maurice Ma <maurice.ma@intel.com<mailto:maurice.ma@intel.com>>
> >> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:
> nathaniel.l.desimone@intel.com>>
> >> Cc: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>
> >> ---
> >>  UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 ++++++++++++++------
> >>  1 file changed, 19 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> >> b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> >> index 22972453117a..b3ff065a537e 100644
> >> --- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> >> +++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
> >> @@ -390,24 +390,36 @@ BlPeiEntryPoint (
> >>    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;
> >>
> >>    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;
> >>
> >>
> >>
> >> -
> >>
> >> -  //
> >>
> >> -  // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTRIBUTE_TESTED
> >>
> >> -  // is intentionally omitted to prevent erasing of the coreboot header
> >>
> >> -  // record before it is processed by ParseMemoryInfo.
> >>
> >> +  // Report lower 640KB of RAM.
> >>
> >> +  // Mark memory as reserved to keep coreboot header in place.
> >>
> >>    //
> >>
> >>    BuildResourceDescriptorHob (
> >>
> >> -    EFI_RESOURCE_SYSTEM_MEMORY,
> >>
> >> +    EFI_RESOURCE_MEMORY_RESERVED,
> >>
> >>      (
> >>
> >>      EFI_RESOURCE_ATTRIBUTE_PRESENT |
> >>
> >>      EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
> >>
> >> +    EFI_RESOURCE_ATTRIBUTE_TESTED |
> >>
> >>      EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
> >>
> >>      EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
> >>
> >>      EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
> >>
> >>      EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
> >>
> >>      ),
> >>
> >>      (EFI_PHYSICAL_ADDRESS)(0),
> >>
> >> -    (UINT64)(0xA0000)
> >>
> >> +    (UINT64)(0x1000)
> >>
> >> +    );
> >>
> >> +
> >>
> >> +  BuildResourceDescriptorHob (
> >>
> >> +    EFI_RESOURCE_SYSTEM_MEMORY,
> >>
> >> +    (
> >>
> >> +    EFI_RESOURCE_ATTRIBUTE_PRESENT |
> >>
> >> +    EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
> >>
> >> +    EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
> >>
> >> +    EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
> >>
> >> +    EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
> >>
> >> +    EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
> >>
> >> +    ),
> >>
> >> +    (EFI_PHYSICAL_ADDRESS)(0x1000),
> >>
> >> +    (UINT64)(0x9F000)
> >>
> >>      );
> >>
> >>
> >>
> >>    BuildResourceDescriptorHob (
> >>
> >> --
> >> 2.27.0
> >>
> >>
> >> -=-=-=-=-=-=
> >> Groups.io Links: You receive all messages sent to this group.
> >>
> >> View/Reply Online (#62229):
> https://edk2.groups.io/g/devel/message/62229
> >> Mute This Topic: https://groups.io/mt/75374752/1781375
> >> Group Owner: devel+owner@edk2.groups.io<mailto:
> devel%2Bowner@edk2.groups.io>
> >> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [guo.dong@intel.com
> <mailto:guo.dong@intel.com>]
> >> -=-=-=-=-=-=
> >
> >
> > --
> > [Marcello Sylvester Bauer]
> >
> > [http://static.9elements.com/logo-signature.png]
> > 9elements Agency GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
> > Email:  [DEINE EMAIL ADDRESSE]<
> https://static.9elements.com/email_signatur.html>
> > Phone:  +49 234 68 94 188<tel:+492346894188>
> > Mobile:  +49 1722847618<tel:+491722847618>
> >
> > Sitz der Gesellschaft: Bochum
> > Handelsregister: Amtsgericht Bochum, HRB 17519
> > Geschäftsführung: Sebastian Deutsch, Eray Basar
> >
> > Datenschutzhinweise nach Art. 13 DSGVO<https://9elements.com/privacy>
> >
> > 
> >
>
>

-- 
*[Marcello Sylvester Bauer]*



9elements Agency GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email:  [DEINE EMAIL ADDRESSE]
<https://static.9elements.com/email_signatur.html>
Phone:  *+49 234 68 94 188 <+492346894188>*
Mobile:  *+49 1722847618 <+491722847618>*

Sitz der Gesellschaft: Bochum
Handelsregister: Amtsgericht Bochum, HRB 17519
Geschäftsführung: Sebastian Deutsch, Eray Basar

Datenschutzhinweise nach Art. 13 DSGVO <https://9elements.com/privacy>

[-- Attachment #2: Type: text/html, Size: 14081 bytes --]

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

* Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables
  2020-10-05 15:34           ` Marcello Sylvester Bauer
@ 2020-10-06  8:25             ` Laszlo Ersek
  0 siblings, 0 replies; 8+ messages in thread
From: Laszlo Ersek @ 2020-10-06  8:25 UTC (permalink / raw)
  To: Marcello Sylvester Bauer
  Cc: devel, Desimone, Nathaniel L, Zeng, Star,
	Leif Lindholm (Nuvia address), Andrew Fish, Michael Kinney,
	Maurice Ma, Dong Guo, You, Benjamin

Hi Marcello,

On 10/05/20 17:34, Marcello Sylvester Bauer wrote:
> On Thu, Oct 1, 2020 at 12:24 PM Laszlo Ersek <lersek@redhat.com> wrote:
> 
>> On 09/14/20 19:32, Guo Dong wrote:
>>>
>>> OK. Let me merge this patch firstly. /Guo
>>
>> The PR at <https://github.com/tianocore/edk2/pull/924> failed 17 days
>> ago and there have been no updates since, as far as I can tell. I've
>> closed the PR for now.
>>
>> Thanks
>> Laszlo
>>
> 
> "Mergify / Rule: Automatically merge a PR when all required checks pass and
> 'push' label is present (merge)" is
> the only that failed, because mergify thinks it has no rights to update the
> base branch (tianocore/master).
> I don't understand why. What should I do?

I don't know -- I've seen this issue before, and it seems like a bug in
github / mergify. In some cases, when all of the other checks pass, this
check suddenly flips to "OK" as well, and then the series is merged.

I'm now actually tempted to merge this patch for you (in Guo Dong's
absence). However, Guo Dong never posted an Acked-by or Reviewed-by to
the list, while reviewing this patch. So I cannot merge the patch for you.

... In fact, the commit that Guo Dong tried to merge:

https://github.com/tianocore/edk2/pull/924/commits/3f61e8ba9750d66430835fe5812c4329a1f4c2ec

doesn't even have any kind of R-b or A-b feedback tag in the commit
message. Guo Dong only edited the PR description -- that's where he
added his R-b. That is a complete failure of the development process,
and it's *just as well* that the PR failed -- for whatever reason.

One of the UefiPayloadPkg maintainers (Maurice Ma, Guo Dong, Benjamin
You) needs to approve the patch ON THE LIST, and then any maintainer
with push access can merge the patch for you.

Sorry about this mess,
Laszlo


> 
> Thanks
> Marcello
> 
>>>
>>> From: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
>>> Sent: Monday, September 14, 2020 2:00 AM
>>> To: Dong, Guo <guo.dong@intel.com>
>>> Cc: devel@edk2.groups.io; Ma, Maurice <maurice.ma@intel.com>; Desimone,
>> Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star <
>> star.zeng@intel.com>
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect
>> coreboot tables
>>>
>>> Hi Guo,
>>>
>>> Sounds like a good proposal, but it would be great to merge this change
>> temporarily.
>>> In some cases of the current implementation edk2 does override the
>> memory area, where the coreboot table pointer is located.
>>> Therefore the kernel and cbmem tool is not able to locate the tables
>> anymore.
>>>
>>> Thanks,
>>> Marcello
>>>
>>> On Tue, Sep 8, 2020 at 11:40 PM Dong, Guo <guo.dong@intel.com<mailto:
>> guo.dong@intel.com>> wrote:
>>>
>>> Hi Marcello,
>>>
>>> In the UEFI payload, we should not hardcoded any memory usage. It means
>> UEFI payload should use the memory map whatever reported from the
>> bootloader. I plan to remove this hardcoded memory usage soon.
>>> Before that, it is OK for me to merge this change if you want.
>>> BTW, did you see any issue with current implement?
>>>
>>> Thanks,
>>> Guo
>>>
>>>> -----Original Message-----
>>>> From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <
>> devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Marcello
>>>> Sylvester Bauer
>>>> Sent: Wednesday, July 8, 2020 5:01 AM
>>>> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
>>>> Cc: Ma, Maurice <maurice.ma@intel.com<mailto:maurice.ma@intel.com>>;
>> Desimone, Nathaniel L
>>>> <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com>>;
>> Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>
>>>> Subject: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot
>> tables
>>>>
>>>> From: Patrick Rudolph <patrick.rudolph@9elements.com<mailto:
>> patrick.rudolph@9elements.com>>
>>>>
>>>> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com<mailto:
>> patrick.rudolph@9elements.com>>
>>>> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com
>> <mailto:marcello.bauer@9elements.com>>
>>>> Cc: Maurice Ma <maurice.ma@intel.com<mailto:maurice.ma@intel.com>>
>>>> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:
>> nathaniel.l.desimone@intel.com>>
>>>> Cc: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>
>>>> ---
>>>>  UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 ++++++++++++++------
>>>>  1 file changed, 19 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>>>> b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>>>> index 22972453117a..b3ff065a537e 100644
>>>> --- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>>>> +++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>>>> @@ -390,24 +390,36 @@ BlPeiEntryPoint (
>>>>    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;
>>>>
>>>>    EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;
>>>>
>>>>
>>>>
>>>> -
>>>>
>>>> -  //
>>>>
>>>> -  // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTRIBUTE_TESTED
>>>>
>>>> -  // is intentionally omitted to prevent erasing of the coreboot header
>>>>
>>>> -  // record before it is processed by ParseMemoryInfo.
>>>>
>>>> +  // Report lower 640KB of RAM.
>>>>
>>>> +  // Mark memory as reserved to keep coreboot header in place.
>>>>
>>>>    //
>>>>
>>>>    BuildResourceDescriptorHob (
>>>>
>>>> -    EFI_RESOURCE_SYSTEM_MEMORY,
>>>>
>>>> +    EFI_RESOURCE_MEMORY_RESERVED,
>>>>
>>>>      (
>>>>
>>>>      EFI_RESOURCE_ATTRIBUTE_PRESENT |
>>>>
>>>>      EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
>>>>
>>>> +    EFI_RESOURCE_ATTRIBUTE_TESTED |
>>>>
>>>>      EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
>>>>
>>>>      EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
>>>>
>>>>      EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
>>>>
>>>>      EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
>>>>
>>>>      ),
>>>>
>>>>      (EFI_PHYSICAL_ADDRESS)(0),
>>>>
>>>> -    (UINT64)(0xA0000)
>>>>
>>>> +    (UINT64)(0x1000)
>>>>
>>>> +    );
>>>>
>>>> +
>>>>
>>>> +  BuildResourceDescriptorHob (
>>>>
>>>> +    EFI_RESOURCE_SYSTEM_MEMORY,
>>>>
>>>> +    (
>>>>
>>>> +    EFI_RESOURCE_ATTRIBUTE_PRESENT |
>>>>
>>>> +    EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
>>>>
>>>> +    EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
>>>>
>>>> +    EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
>>>>
>>>> +    EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
>>>>
>>>> +    EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
>>>>
>>>> +    ),
>>>>
>>>> +    (EFI_PHYSICAL_ADDRESS)(0x1000),
>>>>
>>>> +    (UINT64)(0x9F000)
>>>>
>>>>      );
>>>>
>>>>
>>>>
>>>>    BuildResourceDescriptorHob (
>>>>
>>>> --
>>>> 2.27.0
>>>>
>>>>
>>>> -=-=-=-=-=-=
>>>> Groups.io Links: You receive all messages sent to this group.
>>>>
>>>> View/Reply Online (#62229):
>> https://edk2.groups.io/g/devel/message/62229
>>>> Mute This Topic: https://groups.io/mt/75374752/1781375
>>>> Group Owner: devel+owner@edk2.groups.io<mailto:
>> devel%2Bowner@edk2.groups.io>
>>>> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [guo.dong@intel.com
>> <mailto:guo.dong@intel.com>]
>>>> -=-=-=-=-=-=
>>>
>>>
>>> --
>>> [Marcello Sylvester Bauer]
>>>
>>> [http://static.9elements.com/logo-signature.png]
>>> 9elements Agency GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
>>> Email:  [DEINE EMAIL ADDRESSE]<
>> https://static.9elements.com/email_signatur.html>
>>> Phone:  +49 234 68 94 188<tel:+492346894188>
>>> Mobile:  +49 1722847618<tel:+491722847618>
>>>
>>> Sitz der Gesellschaft: Bochum
>>> Handelsregister: Amtsgericht Bochum, HRB 17519
>>> Geschäftsführung: Sebastian Deutsch, Eray Basar
>>>
>>> Datenschutzhinweise nach Art. 13 DSGVO<https://9elements.com/privacy>
>>>
>>> 
>>>
>>
>>
> 


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

end of thread, other threads:[~2020-10-06  8:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-08 12:01 [PATCH v1 0/1] Protect coreboot tables Marcello Sylvester Bauer
2020-07-08 12:01 ` [PATCH v1 1/1] UefipayloadPkg: " Marcello Sylvester Bauer
2020-09-08 21:40   ` [edk2-devel] " Guo Dong
2020-09-14  8:59     ` Marcello Sylvester Bauer
2020-09-14 17:32       ` Guo Dong
2020-10-01 10:23         ` Laszlo Ersek
2020-10-05 15:34           ` Marcello Sylvester Bauer
2020-10-06  8:25             ` Laszlo Ersek

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