<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/BaseTools/Source/C, branch trunk</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=trunk</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=trunk'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2024-06-04T03:43:08+00:00</updated>
<entry>
<title>Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305b</title>
<updated>2024-06-04T03:43:08+00:00</updated>
<author>
<name>kx</name>
<email>kx@radix.pro</email>
</author>
<published>2024-06-04T03:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7e2ccccace24636f29ddc210b94606abd4c7e42b'/>
<id>urn:sha1:7e2ccccace24636f29ddc210b94606abd4c7e42b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>BaseTools: Update keybaord map based on UEFI spec 2.10</title>
<updated>2024-02-26T15:32:09+00:00</updated>
<author>
<name>Yi Li</name>
<email>yi1.li@intel.com</email>
</author>
<published>2023-12-22T02:23:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=44fdc4f3983be77dda709d7a0c3fb8905fbf920b'/>
<id>urn:sha1:44fdc4f3983be77dda709d7a0c3fb8905fbf920b</id>
<content type='text'>
REF: UEFI SPEC 2.10 34.8.10 EFI_KEY

Add EfiKeyIntl0-9.

Signed-off-by: Yi Li &lt;yi1.li@intel.com&gt;

Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>BaseTools/GenFw: Correct offset when relocating an ADR</title>
<updated>2023-12-21T10:08:47+00:00</updated>
<author>
<name>Jake Garver</name>
<email>jake@nvidia.com</email>
</author>
<published>2023-12-20T19:31:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5d533bbc27732a421e3bf35c5af77782b8a85e6f'/>
<id>urn:sha1:5d533bbc27732a421e3bf35c5af77782b8a85e6f</id>
<content type='text'>
When converting ELF to PE/COFF for the AArch64 target, we may encounter
an R_AARCH64_ADR_GOT_PAGE relocation that refers to an ADR instruction
instead of an ADRP instruction. This can happen when the toolchain is
working around Cortex-A53 erratum #843419.  If that's the case, be sure
to calculate the offset appropriately.

This resolves an issue experienced when building a StandaloneMm image
(which is built with -fpie) with stack protection enabled on GCC
compiled with "--enable-fix-cortex-a53-843419". In this case, the linker
may convert an ADRP instruction appearing at an offset of 0xff8 or 0xffc
modulo 4KiB into an ADR instruction, but will leave the original
R_AARCH64_ADR_GOT_PAGE relocation in place. (This is not a bug in the
linker, given that there is no other relocation type that it could
reasonably convert it into)

In this scenario, the following code is being generated by the
toolchain:

    # Load to set the stack canary
    2ffc:	10028020 	adr	x0, 8000 &lt;mErrorString+0x1bc&gt;
    3008:	f940d400 	ldr	x0, [x0, #424]

    # Load to check the stack canary
    30cc:	b0000020 	adrp	x0, 8000 &lt;mErrorString+0x1bc&gt;
    30d0:	f940d400 	ldr	x0, [x0, #424]

GenFw rewrote that to:

    # Load to set the stack canary
    2ffc:	10000480 	adr	x0, 0x308c
    3008:	912ec000 	add	x0, x0, #0xbb0

    # Load to check the stack canary
    30cc:	f0000460 	adrp	x0, 0x92000
    30d0:	912ec000 	add	x0, x0, #0xbb0

Note that we're now setting the stack canary from the wrong address,
resulting in an erroneous stack fault.

After this fix, the offset will be calculated correctly for an ADR and
the stack canary is set correctly. Note that there is a corner case
where this may cause the conversion to fail: if the original GOT entry
is just within -/+ 1 MiB of the reference, but the actual variable it
refers to is not, the resulting offset cannot be represented by the
immediate offset field in a ADR instruction. Given that this issue only
affects PIE executables, which are rare and usually tiny, this is
unlikely to cause problems in practice.

Ref: https://edk2.groups.io/g/devel/topic/102202314

[ardb: expand commit log, add reference]

Signed-off-by: Jake Garver &lt;jake@nvidia.com&gt;
Reviewed-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: GenFw: auto-set nxcompat flag</title>
<updated>2023-11-06T21:44:34+00:00</updated>
<author>
<name>Joey Vagedes</name>
<email>joeyvagedes@microsoft.com</email>
</author>
<published>2023-07-13T15:24:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=da219919538b679d5cf7387f4eba6c20384bf868'/>
<id>urn:sha1:da219919538b679d5cf7387f4eba6c20384bf868</id>
<content type='text'>
Automatically set the nxcompat flag in the DLL Characteristics field of
the Optional Header of the PE32+ image. For this flag to be set
automatically, the section alignment must be evenly divisible
by 4K (EFI_PAGE_SIZE) and no section must be executable and writable.

Adds a command line flag to GenFw, --nonxcompat, to ensure the
IMAGE_DLLCHARACTERISTICS_NX_COMPAT bit is not set, even if all
requirements are met. Updates the manual for GenFw to include the new
flag.

Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Signed-off-by: Joey Vagedes &lt;joeyvagedes@gmail.com&gt;
Acked-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Reviewed-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/GenFw: Add support for LOONGARCH64 relax relocation</title>
<updated>2023-09-25T08:32:47+00:00</updated>
<author>
<name>Dongyan Qian</name>
<email>qiandongyan@loongson.cn</email>
</author>
<published>2023-09-22T07:12:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c70d91442889078eb94e0abf777f74e403b72d37'/>
<id>urn:sha1:c70d91442889078eb94e0abf777f74e403b72d37</id>
<content type='text'>
Correct relax id from 99 to 100 and added relocation support up to 109

fix gcc14 adds new relocation, and the generated relocation
causes the build and compilation to fail.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4559

Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Cc: Chao Li &lt;lichao@loongson.cn&gt;
Signed-off-by: Dongyan Qian &lt;qiandongyan@loongson.cn&gt;
Reviewed-by: Chao Li &lt;lichao@loongson.cn&gt;
</content>
</entry>
<entry>
<title>BaseTools: Remove logic to create AP waking vector in GenFv</title>
<updated>2023-09-18T02:39:25+00:00</updated>
<author>
<name>Zhiguang Liu</name>
<email>zhiguang.liu@intel.com</email>
</author>
<published>2023-07-07T05:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=392456240aa74966ee857ae1e5628943ee8c1b88'/>
<id>urn:sha1:392456240aa74966ee857ae1e5628943ee8c1b88</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4494

Today for SEC core(not VTF-0), GenFv finds free 4K aligned space in
FV for AP waking vector and JMP to 4G-30h in the waking vector.
There is no usage of this today. Remove the logic to avoid confusing
and save spaces in reset vector.

Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Signed-off-by: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: remove duplicate includes: IndustryStandard/*.h</title>
<updated>2023-06-01T10:53:35+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2023-05-24T14:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1df6658bcbc4cade29a8763808a9804e5d449046'/>
<id>urn:sha1:1df6658bcbc4cade29a8763808a9804e5d449046</id>
<content type='text'>
Use the MdePkg versions instead of maintaining a copy in BaseTools.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Reviewed-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: remove duplicate includes: IndustryStandard/PeImage.h</title>
<updated>2023-06-01T10:53:35+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2023-05-24T14:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6101bd125ad7842e25ea0df233ce8f2758f3df9c'/>
<id>urn:sha1:6101bd125ad7842e25ea0df233ce8f2758f3df9c</id>
<content type='text'>
Use the MdePkg version instead of maintaining a copy in BaseTools.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Chao Li &lt;lichao@loongson.cn&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Reviewed-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: switch from EFI_IMAGE_MACHINE_* to IMAGE_FILE_MACHINE_*</title>
<updated>2023-06-01T10:53:35+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2023-05-24T14:05:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c15941a643e2e82bdf516a27ef7e3a15ebc2686c'/>
<id>urn:sha1:c15941a643e2e82bdf516a27ef7e3a15ebc2686c</id>
<content type='text'>
Use the newer versions of the machine #defines.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Chao Li &lt;lichao@loongson.cn&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Reviewed-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: drop IMAGE_FILE_MACHINE_ARM hacks</title>
<updated>2023-06-01T10:53:35+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2023-05-24T14:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=fdc6288f81f6e4cd20c75768d6e968467cbc07bf'/>
<id>urn:sha1:fdc6288f81f6e4cd20c75768d6e968467cbc07bf</id>
<content type='text'>
The #define for IMAGE_FILE_MACHINE_ARM is not present in MdePkg,
this looks like a relic not used any more.  Remove.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Reviewed-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
</content>
</entry>
</feed>
