<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/conf/ldscript.arm64, branch releng/15.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>arm64: Create an L3 table to limit permissions</title>
<updated>2025-06-17T12:48:22+00:00</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2025-06-17T10:12:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ea8dc498aa8ea91ce0364a3f0ccdb740a24dcfb4'/>
<id>ea8dc498aa8ea91ce0364a3f0ccdb740a24dcfb4</id>
<content type='text'>
When building a 4k page kernel we use 2M blocks to map the kernel
contents. As the .text section may not end on a 2M aligned address
we need to split one block into level 3 pages and pad the end of the
section to an appropriate boundary.

With both these changes we can then mapjust the code as executable.
While here also map it as read-only as none ofthis shouldbe written
to directly.

Reviewed by:	alc
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45064
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building a 4k page kernel we use 2M blocks to map the kernel
contents. As the .text section may not end on a 2M aligned address
we need to split one block into level 3 pages and pad the end of the
section to an appropriate boundary.

With both these changes we can then mapjust the code as executable.
While here also map it as read-only as none ofthis shouldbe written
to directly.

Reviewed by:	alc
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45064
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: Add defination of .init_array and .fini_array for all other platforms</title>
<updated>2024-09-02T04:26:48+00:00</updated>
<author>
<name>Zhenlei Huang</name>
<email>zlei@FreeBSD.org</email>
</author>
<published>2024-09-02T04:26:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3e76d05231b0aa77d922bdbc9abf62d9747a91ab'/>
<id>3e76d05231b0aa77d922bdbc9abf62d9747a91ab</id>
<content type='text'>
Currently these sections are not used but defined only for amd64 and
i386. Added them for all other platforms to keep all platforms in sync.
There should be no functional change.

This change is extracted from a bigger patch [1] of hselasky, with
additional fix for the order of .fini_array section.

1. https://reviews.freebsd.org/D40467

Obtained from:	hselasky
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45214
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently these sections are not used but defined only for amd64 and
i386. Added them for all other platforms to keep all platforms in sync.
There should be no functional change.

This change is extracted from a bigger patch [1] of hselasky, with
additional fix for the order of .fini_array section.

1. https://reviews.freebsd.org/D40467

Obtained from:	hselasky
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45214
</pre>
</div>
</content>
</entry>
<entry>
<title>arm64: Use store-pair to zero the kernel bss</title>
<updated>2024-08-21T10:16:10+00:00</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2024-08-20T17:14:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f1bc3750cf9a6623b0c0861984ef2a8ac966a4e3'/>
<id>f1bc3750cf9a6623b0c0861984ef2a8ac966a4e3</id>
<content type='text'>
While this won't be noticed by most users the time to zero the bss
while using instruction tracing in the Arm FVP models (simulators) is
noticeable.

Reduce this time by using a store-pair instruction to double the size
of memory we zero on each iteration of the loop.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42733
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While this won't be noticed by most users the time to zero the bss
while using instruction tracing in the Arm FVP models (simulators) is
noticeable.

Reduce this time by using a store-pair instruction to double the size
of memory we zero on each iteration of the loop.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42733
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: Move the debug stuff into a common script</title>
<updated>2024-08-01T04:23:24+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-08-01T04:21:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=37d6d682af59ba8b868515c835e433ec85900f6d'/>
<id>37d6d682af59ba8b868515c835e433ec85900f6d</id>
<content type='text'>
Move a copy of amd64's debug code into debug.ldscript. Make all the
kernels use this. This has the effect of modernizing the STABS for
powerpc as the others were almost already in sync. For the ones that
weren't this adds the DWARF 3 debug symbols from i386/amd64.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44071
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move a copy of amd64's debug code into debug.ldscript. Make all the
kernels use this. This has the effect of modernizing the STABS for
powerpc as the others were almost already in sync. For the ones that
weren't this adds the DWARF 3 debug symbols from i386/amd64.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44071
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: Sync ldscript files wrt gnu.attributes and .note.GNU-stack</title>
<updated>2024-02-29T16:30:37+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-02-29T16:30:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=23dff4fdba987a56f4118f065cdb534cb6faba37'/>
<id>23dff4fdba987a56f4118f065cdb534cb6faba37</id>
<content type='text'>
Bring the keeping of .gnu.attributes to all architectures. Also discard
.note.GNU-stack on all archtiectures. Plus delete obsolete comment that
was removed from i386 in 2010.

Sponsored by:		Netflix
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D44069
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bring the keeping of .gnu.attributes to all architectures. Also discard
.note.GNU-stack on all archtiectures. Plus delete obsolete comment that
was removed from i386 in 2010.

Sponsored by:		Netflix
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D44069
</pre>
</div>
</content>
</entry>
<entry>
<title>Import the kernel parts of bhyve/arm64</title>
<updated>2024-02-21T18:55:32+00:00</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2024-01-09T15:22:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=47e073941f4e7ca6e9bde3fa65abbfcfed6bfa2b'/>
<id>47e073941f4e7ca6e9bde3fa65abbfcfed6bfa2b</id>
<content type='text'>
To support virtual machines on arm64 add the vmm code. This is based on
earlier work by Mihai Carabas and Alexandru Elisei at University
Politehnica of Bucharest, with further work by myself and Mark Johnston.

All AArch64 CPUs should work, however only the GICv3 interrupt
controller is supported. There is initial support to allow the GICv2
to be supported in the future. Only pure Armv8.0 virtualisation is
supported, the Virtualization Host Extensions are not currently used.

With a separate userspace patch and U-Boot port FreeBSD guests are able
to boot to multiuser mode, and the hypervisor can be tested with the
kvm unit tests. Linux partially boots, but hangs before entering
userspace. Other operating systems are untested.

Sponsored by:	Arm Ltd
Sponsored by:	Innovate UK
Sponsored by:	The FreeBSD Foundation
Sponsored by:	University Politehnica of Bucharest
Differential Revision:	https://reviews.freebsd.org/D37428
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To support virtual machines on arm64 add the vmm code. This is based on
earlier work by Mihai Carabas and Alexandru Elisei at University
Politehnica of Bucharest, with further work by myself and Mark Johnston.

All AArch64 CPUs should work, however only the GICv3 interrupt
controller is supported. There is initial support to allow the GICv2
to be supported in the future. Only pure Armv8.0 virtualisation is
supported, the Virtualization Host Extensions are not currently used.

With a separate userspace patch and U-Boot port FreeBSD guests are able
to boot to multiuser mode, and the hypervisor can be tested with the
kvm unit tests. Linux partially boots, but hangs before entering
userspace. Other operating systems are untested.

Sponsored by:	Arm Ltd
Sponsored by:	Innovate UK
Sponsored by:	The FreeBSD Foundation
Sponsored by:	University Politehnica of Bucharest
Differential Revision:	https://reviews.freebsd.org/D37428
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c comment pattern</title>
<updated>2023-08-16T17:54:24+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=71625ec9ad2a9bc8c09784fbd23b759830e0ee5f'/>
<id>71625ec9ad2a9bc8c09784fbd23b759830e0ee5f</id>
<content type='text'>
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>arm64: add read_frequently, read_mostluy and exclusive_cache_line to linker script</title>
<updated>2021-08-23T13:22:17+00:00</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2021-08-23T09:44:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=766a7c73e92aee0fc1a2059919015000e8cbfa05'/>
<id>766a7c73e92aee0fc1a2059919015000e8cbfa05</id>
<content type='text'>
Reviewed by:	andrew
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D31643
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	andrew
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D31643
</pre>
</div>
</content>
</entry>
<entry>
<title>More the arm64 early page tables and stack to .bss</title>
<updated>2020-12-23T13:10:23+00:00</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2020-12-23T08:05:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=166ceb6fd18ba315b66c8b712e04f9ded3b31277'/>
<id>166ceb6fd18ba315b66c8b712e04f9ded3b31277</id>
<content type='text'>
This removes 806k from the kernel ELF file that is only needed while
the kernel is running, not in the static file.

Sponsored by:	Innovate UK
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes 806k from the kernel ELF file that is only needed while
the kernel is running, not in the static file.

Sponsored by:	Innovate UK
</pre>
</div>
</content>
</entry>
<entry>
<title>Eliminate the generated ldscript for arm and arm64, and strip $a/$d marker</title>
<updated>2019-12-29T18:17:12+00:00</updated>
<author>
<name>Ian Lepore</name>
<email>ian@FreeBSD.org</email>
</author>
<published>2019-12-29T18:17:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=31333ebb9964e2ef53af143498639ec67f4ae40a'/>
<id>31333ebb9964e2ef53af143498639ec67f4ae40a</id>
<content type='text'>
symbols from the linked kernel.

The main thrust of this change is to generate a kernel that has the arm
"marker" symbols stripped. Marker symbols start with $a, $d, $t or $x, and
are emitted by the compiler to tell other toolchain components about the
locations of data embedded in the instruction stream (literal-pool
stuff). They are used for generating mixed-endian binaries (which we don't
support). The linked kernel has approximately 21,000 such symbols in it,
wasting space (500K in kernel.full, 190K in the final linked kernel), and
sometimes obscuring function names in stack tracebacks.

This change also simplifies the way the kernel is linked. Instead of using
sed to generate two different ldscript files to generate both an elf kernel
and a binary (elf headers stripped) kernel, we now use a single ldscript
that refers to a "text_start" symbol, and we provide the value for that
symbol using --defsym on the linker command line.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
symbols from the linked kernel.

The main thrust of this change is to generate a kernel that has the arm
"marker" symbols stripped. Marker symbols start with $a, $d, $t or $x, and
are emitted by the compiler to tell other toolchain components about the
locations of data embedded in the instruction stream (literal-pool
stuff). They are used for generating mixed-endian binaries (which we don't
support). The linked kernel has approximately 21,000 such symbols in it,
wasting space (500K in kernel.full, 190K in the final linked kernel), and
sometimes obscuring function names in stack tracebacks.

This change also simplifies the way the kernel is linked. Instead of using
sed to generate two different ldscript files to generate both an elf kernel
and a binary (elf headers stripped) kernel, we now use a single ldscript
that refers to a "text_start" symbol, and we provide the value for that
symbol using --defsym on the linker command line.
</pre>
</div>
</content>
</entry>
</feed>
