Hi Mike
I agree that we can change this from ERROR to WARNING, and only add 1 ERROR
message.
However, the \MdeModulePkg\Universal\PropertiesTableAttributesDxe module is
optional module, because a platform may use its own module to set attributes
for ACPINvs or reserved.
How about we add error message when install this table in
DxeCore.InstallPropertiesTable().
if ((mPropertiesTable.MemoryProtectionAttribute &
EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA) == 0) {
DEBUG ((EFI_D_ERROR, "MemoryProtectionAttribute NON_EXECUTABLE_PE_DATA
not set\n")); <== New line
return ;
}
Thank you
Yao Jiewen
-----Original Message-----
From: edk2-devel [mailto:[email protected]] On Behalf Of Kinney,
Michael D
Sent: Friday, December 04, 2015 8:27 AM
To: Laszlo Ersek; Kinney, Michael D
Cc: Hamel, Lee M; [email protected]
Subject: Re: [edk2] InsertImageRecord and Section Alignment
Laszlo,
That is a good question. If a platform requires
EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA to be set, then
it is an error condition. That is why it is an error message and not a warning
message.
We could consider changing this specific message to a warning, and add one
error message from the \MdeModulePkg\Universal\PropertiesTableAttributesDxe
module. That way, only platforms that include this module will get an error
message if any runtime modules for not use 4KB aligned.
Mike
> -----Original Message-----
> From: Laszlo Ersek [mailto:[email protected]]
> Sent: Thursday, December 3, 2015 3:36 PM
> To: Kinney, Michael D <[email protected]>
> Cc: Hamel, Lee M <[email protected]>; [email protected]
> <[email protected]>
> Subject: Re: [edk2] InsertImageRecord and Section Alignment
>
> On 12/03/15 21:16, Kinney, Michael D wrote:
> > Lee,
> >
> > It is a feature from UEFI Specification 2.5 - Section 4.6 -
> > EFI_PROPERTIES_TABLE
> >
> > In order to set the
> > EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA bit,
> > runtime drivers need to be built so their PE/COFF code and data
> > sections do not share the same 4KB page.
> >
> > The log message you are seeing is not an error. It is a warning
> > message that a runtime driver was loaded that does not meet the
> > requirements to set this bit.
>
> Should the message be downgraded from EFI_D_ERROR to EFI_D_WARN
> ("MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c")?
>
> Thanks
> Laszlo
>
> >
> > Mike
> >
> >> -----Original Message-----
> >> From: Hamel, Lee M
> >> Sent: Thursday, December 3, 2015 11:19 AM
> >> To: Kinney, Michael D <[email protected]>;
> >> [email protected]
> >> Subject: RE: InsertImageRecord and Section Alignment
> >>
> >> Thanks for the solution. Any idea why my code was fine before and
> >> now it's not (the design change reason, not that tools_def.txt changed)?
> >> I'm trying to understand why a change was made that caused the problem.
> >>
> >> -----Original Message-----
> >> From: Kinney, Michael D
> >> Sent: Thursday, December 03, 2015 11:13 AM
> >> To: Hamel, Lee M <[email protected]>; [email protected];
> >> Kinney, Michael D <[email protected]>
> >> Subject: RE: InsertImageRecord and Section Alignment
> >>
> >> Lee,
> >>
> >> You can fix this by adding the following to the DSC file to force modules
> >> of type DXE_RUNTIME_DRIVER to use 4KB alignment.
> >>
> >> [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
> >> MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096
> >>
> >> Mike
> >>
> >>> -----Original Message-----
> >>> From: edk2-devel [mailto:[email protected]] On
> >>> Behalf Of Hamel, Lee M
> >>> Sent: Thursday, December 3, 2015 10:57 AM
> >>> To: [email protected]
> >>> Subject: [edk2] InsertImageRecord and Section Alignment
> >>>
> >>> I recently synced to a newer UDK 2015 and now get this serial output many
> >>> times for different images:
> >>>
> >>> !!!!!!!! InsertImageRecord - Section Alignment(0x20) is not 4K !!!!!!!!
> >>> !!!!!!!! Image - <some path>\ReportStatusCodeRouterRuntimeDxe.pdb
> >>>
> >>> Has anyone seen this problem when syncing to UDK 2015? I am using Visual
> >>> Studio 2010 to build.
> >>>
> >>> _______________________________________________
> >>> edk2-devel mailing list
> >>> [email protected]
> >>> https://lists.01.org/mailman/listinfo/edk2-devel
> > _______________________________________________
> > edk2-devel mailing list
> > [email protected]
> > https://lists.01.org/mailman/listinfo/edk2-devel
> >
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel