public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/1] OvmfPkg: Fix SMM/RT driver section alignment for XCODE5/CLANGPDB
@ 2020-03-29 13:21 Vitaly Cheptsov
  2020-03-29 13:21 ` [PATCH 1/1] " Vitaly Cheptsov
  0 siblings, 1 reply; 4+ messages in thread
From: Vitaly Cheptsov @ 2020-03-29 13:21 UTC (permalink / raw)
  To: devel

Currently memory protection attributes are not working with XCODE5
and CLANGPDB (Xen only) due to misaligned sections.

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

Requesting for merge in edk2-stable202005.

Vitaly Cheptsov (1):
  OvmfPkg: Fix SMM/RT driver section alignment for XCODE5/CLANGPDB

 OvmfPkg/OvmfPkgIa32.dsc    | 6 ++++--
 OvmfPkg/OvmfPkgIa32X64.dsc | 6 ++++--
 OvmfPkg/OvmfPkgX64.dsc     | 6 ++++--
 OvmfPkg/OvmfXen.dsc        | 8 ++++++--
 4 files changed, 18 insertions(+), 8 deletions(-)

-- 
2.24.1 (Apple Git-126)


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

* [PATCH 1/1] OvmfPkg: Fix SMM/RT driver section alignment for XCODE5/CLANGPDB
  2020-03-29 13:21 [PATCH 0/1] OvmfPkg: Fix SMM/RT driver section alignment for XCODE5/CLANGPDB Vitaly Cheptsov
@ 2020-03-29 13:21 ` Vitaly Cheptsov
  2020-03-30 11:37   ` Laszlo Ersek
  0 siblings, 1 reply; 4+ messages in thread
From: Vitaly Cheptsov @ 2020-03-29 13:21 UTC (permalink / raw)
  To: devel; +Cc: Andrew Fish, Laszlo Ersek, Marvin Häuser

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

This patch resolves the problem of using memory protection
attributes when OVMF firmware is compiled with XCODE5 and CLANGPDB.

CC: Andrew Fish <afish@apple.com>
CC: Laszlo Ersek <lersek@redhat.com>
CC: Marvin Häuser <mhaeuser@outlook.de>
Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
---
 OvmfPkg/OvmfPkgIa32.dsc    | 6 ++++--
 OvmfPkg/OvmfPkgIa32X64.dsc | 6 ++++--
 OvmfPkg/OvmfPkgX64.dsc     | 6 ++++--
 OvmfPkg/OvmfXen.dsc        | 8 ++++++--
 4 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 19728f20b3..0aba200c2d 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -80,14 +80,16 @@ [BuildOptions]
 
 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
-  XCODE:*_*_*_DLINK_FLAGS =
+  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
+  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
   CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
 
 # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
 # protection of DXE_SMM_DRIVER/SMM_CORE modules
 [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
-  XCODE:*_*_*_DLINK_FLAGS =
+  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
+  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
   CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
 
 ################################################################################
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index 3c0c229e3a..eca70d64c3 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -85,14 +85,16 @@ [BuildOptions]
 
 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
-  XCODE:*_*_*_DLINK_FLAGS =
+  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
+  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
   CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
 
 # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
 # protection of DXE_SMM_DRIVER/SMM_CORE modules
 [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
-  XCODE:*_*_*_DLINK_FLAGS =
+  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
+  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
   CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
 
 ################################################################################
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index f6c1d8d228..676d0ed9a6 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -85,14 +85,16 @@ [BuildOptions]
 
 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
-  XCODE:*_*_*_DLINK_FLAGS =
+  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
+  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
   CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
 
 # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
 # protection of DXE_SMM_DRIVER/SMM_CORE modules
 [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
-  XCODE:*_*_*_DLINK_FLAGS =
+  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
+  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
   CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
 
 ################################################################################
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 5751ff1f03..783bac3e8b 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -82,13 +82,17 @@ [BuildOptions]
 
 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
-  XCODE:*_*_*_DLINK_FLAGS =
+  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
+  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
+  CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
 
 # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
 # protection of DXE_SMM_DRIVER/SMM_CORE modules
 [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
-  XCODE:*_*_*_DLINK_FLAGS =
+  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
+  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
+  CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
 
 ################################################################################
 #
-- 
2.24.1 (Apple Git-126)


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

* Re: [PATCH 1/1] OvmfPkg: Fix SMM/RT driver section alignment for XCODE5/CLANGPDB
  2020-03-29 13:21 ` [PATCH 1/1] " Vitaly Cheptsov
@ 2020-03-30 11:37   ` Laszlo Ersek
  2020-04-01 14:37     ` [edk2-devel] " Laszlo Ersek
  0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2020-03-30 11:37 UTC (permalink / raw)
  To: Vitaly Cheptsov, devel
  Cc: Andrew Fish, Marvin Häuser, Liming Gao, Michael Kinney

On 03/29/20 15:21, Vitaly Cheptsov wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2642
> 
> This patch resolves the problem of using memory protection
> attributes when OVMF firmware is compiled with XCODE5 and CLANGPDB.
> 
> CC: Andrew Fish <afish@apple.com>
> CC: Laszlo Ersek <lersek@redhat.com>
> CC: Marvin Häuser <mhaeuser@outlook.de>
> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
> ---
>  OvmfPkg/OvmfPkgIa32.dsc    | 6 ++++--
>  OvmfPkg/OvmfPkgIa32X64.dsc | 6 ++++--
>  OvmfPkg/OvmfPkgX64.dsc     | 6 ++++--
>  OvmfPkg/OvmfXen.dsc        | 8 ++++++--
>  4 files changed, 18 insertions(+), 8 deletions(-)

This patch is an update on TianoCore#559 / commit 01e9597540fa
("OvmfPkg: Add XCODE5 statements to fix build break", 2017-05-19).

I'd like Mike and/or Liming to ACK this patch (I don't use either XCODE
or CLANGPDB, and the patches related to those toolchains seem to have
come from Liming and Mike mainly).

Afterwards, I'm happy to push this patch:

Acked-by: Laszlo Ersek <lersek@redhat.com>

Thanks
Laszlo


> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index 19728f20b3..0aba200c2d 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -80,14 +80,16 @@ [BuildOptions]
>  
>  [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
> -  XCODE:*_*_*_DLINK_FLAGS =
> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>  
>  # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
>  # protection of DXE_SMM_DRIVER/SMM_CORE modules
>  [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
> -  XCODE:*_*_*_DLINK_FLAGS =
> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>  
>  ################################################################################
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index 3c0c229e3a..eca70d64c3 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -85,14 +85,16 @@ [BuildOptions]
>  
>  [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
> -  XCODE:*_*_*_DLINK_FLAGS =
> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>  
>  # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
>  # protection of DXE_SMM_DRIVER/SMM_CORE modules
>  [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
> -  XCODE:*_*_*_DLINK_FLAGS =
> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>  
>  ################################################################################
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index f6c1d8d228..676d0ed9a6 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -85,14 +85,16 @@ [BuildOptions]
>  
>  [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
> -  XCODE:*_*_*_DLINK_FLAGS =
> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>  
>  # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
>  # protection of DXE_SMM_DRIVER/SMM_CORE modules
>  [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
> -  XCODE:*_*_*_DLINK_FLAGS =
> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>  
>  ################################################################################
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> index 5751ff1f03..783bac3e8b 100644
> --- a/OvmfPkg/OvmfXen.dsc
> +++ b/OvmfPkg/OvmfXen.dsc
> @@ -82,13 +82,17 @@ [BuildOptions]
>  
>  [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
> -  XCODE:*_*_*_DLINK_FLAGS =
> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
> +  CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>  
>  # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
>  # protection of DXE_SMM_DRIVER/SMM_CORE modules
>  [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
> -  XCODE:*_*_*_DLINK_FLAGS =
> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
> +  CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>  
>  ################################################################################
>  #
> 


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

* Re: [edk2-devel] [PATCH 1/1] OvmfPkg: Fix SMM/RT driver section alignment for XCODE5/CLANGPDB
  2020-03-30 11:37   ` Laszlo Ersek
@ 2020-04-01 14:37     ` Laszlo Ersek
  0 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2020-04-01 14:37 UTC (permalink / raw)
  To: Vitaly Cheptsov, devel
  Cc: Andrew Fish, Marvin Häuser, Liming Gao, Michael Kinney

On 03/30/20 13:37, Laszlo Ersek wrote:
> On 03/29/20 15:21, Vitaly Cheptsov wrote:
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2642
>>
>> This patch resolves the problem of using memory protection
>> attributes when OVMF firmware is compiled with XCODE5 and CLANGPDB.
>>
>> CC: Andrew Fish <afish@apple.com>
>> CC: Laszlo Ersek <lersek@redhat.com>
>> CC: Marvin Häuser <mhaeuser@outlook.de>
>> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
>> ---
>>  OvmfPkg/OvmfPkgIa32.dsc    | 6 ++++--
>>  OvmfPkg/OvmfPkgIa32X64.dsc | 6 ++++--
>>  OvmfPkg/OvmfPkgX64.dsc     | 6 ++++--
>>  OvmfPkg/OvmfXen.dsc        | 8 ++++++--
>>  4 files changed, 18 insertions(+), 8 deletions(-)
> 
> This patch is an update on TianoCore#559 / commit 01e9597540fa
> ("OvmfPkg: Add XCODE5 statements to fix build break", 2017-05-19).
> 
> I'd like Mike and/or Liming to ACK this patch (I don't use either XCODE
> or CLANGPDB, and the patches related to those toolchains seem to have
> come from Liming and Mike mainly).
> 
> Afterwards, I'm happy to push this patch:
> 
> Acked-by: Laszlo Ersek <lersek@redhat.com>

Pushed as commit 4fb393aaa8bb029dc98a1330f40303bf16e2b092, via
<https://github.com/tianocore/edk2/pull/491>.

(I didn't want to delay this patch -- it's potential to cause a
regression is limited, and if it happens, we still have plenty of time
to fix it for the stable tag.)

Thanks
Laszlo


>> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
>> index 19728f20b3..0aba200c2d 100644
>> --- a/OvmfPkg/OvmfPkgIa32.dsc
>> +++ b/OvmfPkg/OvmfPkgIa32.dsc
>> @@ -80,14 +80,16 @@ [BuildOptions]
>>
>>  [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
>>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
>> -  XCODE:*_*_*_DLINK_FLAGS =
>> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
>> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>>
>>  # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
>>  # protection of DXE_SMM_DRIVER/SMM_CORE modules
>>  [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
>>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
>> -  XCODE:*_*_*_DLINK_FLAGS =
>> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
>> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>>
>>  ################################################################################
>> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
>> index 3c0c229e3a..eca70d64c3 100644
>> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
>> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
>> @@ -85,14 +85,16 @@ [BuildOptions]
>>
>>  [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
>>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
>> -  XCODE:*_*_*_DLINK_FLAGS =
>> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
>> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>>
>>  # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
>>  # protection of DXE_SMM_DRIVER/SMM_CORE modules
>>  [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
>>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
>> -  XCODE:*_*_*_DLINK_FLAGS =
>> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
>> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>>
>>  ################################################################################
>> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
>> index f6c1d8d228..676d0ed9a6 100644
>> --- a/OvmfPkg/OvmfPkgX64.dsc
>> +++ b/OvmfPkg/OvmfPkgX64.dsc
>> @@ -85,14 +85,16 @@ [BuildOptions]
>>
>>  [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
>>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
>> -  XCODE:*_*_*_DLINK_FLAGS =
>> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
>> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>>
>>  # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
>>  # protection of DXE_SMM_DRIVER/SMM_CORE modules
>>  [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
>>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
>> -  XCODE:*_*_*_DLINK_FLAGS =
>> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
>> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>>    CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>>
>>  ################################################################################
>> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
>> index 5751ff1f03..783bac3e8b 100644
>> --- a/OvmfPkg/OvmfXen.dsc
>> +++ b/OvmfPkg/OvmfXen.dsc
>> @@ -82,13 +82,17 @@ [BuildOptions]
>>
>>  [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
>>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
>> -  XCODE:*_*_*_DLINK_FLAGS =
>> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
>> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>> +  CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>>
>>  # Force PE/COFF sections to be aligned at 4KB boundaries to support page level
>>  # protection of DXE_SMM_DRIVER/SMM_CORE modules
>>  [BuildOptions.common.EDKII.DXE_SMM_DRIVER, BuildOptions.common.EDKII.SMM_CORE]
>>    GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
>> -  XCODE:*_*_*_DLINK_FLAGS =
>> +  XCODE:*_*_*_DLINK_FLAGS = -seg1addr 0x1000 -segalign 0x1000
>> +  XCODE:*_*_*_MTOC_FLAGS = -align 0x1000
>> +  CLANGPDB:*_*_*_DLINK_FLAGS = /ALIGN:4096
>>
>>  ################################################################################
>>  #
>>
> 
> 
> 
> 


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

end of thread, other threads:[~2020-04-01 14:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-29 13:21 [PATCH 0/1] OvmfPkg: Fix SMM/RT driver section alignment for XCODE5/CLANGPDB Vitaly Cheptsov
2020-03-29 13:21 ` [PATCH 1/1] " Vitaly Cheptsov
2020-03-30 11:37   ` Laszlo Ersek
2020-04-01 14:37     ` [edk2-devel] " Laszlo Ersek

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