<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/include/nolibc/arch-mips.h, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-10-29T15:29:16Z</updated>
<entry>
<title>tools/nolibc: add option to disable runtime</title>
<updated>2025-10-29T15:29:16Z</updated>
<author>
<name>Benjamin Berg</name>
<email>benjamin.berg@intel.com</email>
</author>
<published>2025-09-24T14:20:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3d66c4e14fbf4d59ca4665391d133655fa668042'/>
<id>urn:sha1:3d66c4e14fbf4d59ca4665391d133655fa668042</id>
<content type='text'>
In principle, it is possible to use nolibc for only some object files in
a program. In that case, the startup code in _start and _start_c is not
going to be used. Add the NOLIBC_NO_RUNTIME compile time option to
disable it entirely and also remove anything that depends on it.

Doing this avoids warnings from modpost for UML as the _start_c code
references the main function from the .init.text section while it is not
inside .init itself.

Signed-off-by: Benjamin Berg &lt;benjamin.berg@intel.com&gt;
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: MIPS: add support for N64 and N32 ABIs</title>
<updated>2025-06-28T20:23:33Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-06-23T21:25:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a6a2a8a42972476ecff61d2ffabaa1e8ae162f34'/>
<id>urn:sha1:a6a2a8a42972476ecff61d2ffabaa1e8ae162f34</id>
<content type='text'>
Add support for the MIPS 64bit N64 and ILP32 N32 ABIs.

In addition to different byte orders and ABIs there are also different
releases of the MIPS architecture. To avoid blowing up the test matrix,
only add a subset of all possible test combinations.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Tested-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Link: https://lore.kernel.org/r/20250623-nolibc-mips-n32-v3-4-6ae2d89f4259@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: MIPS: drop noreorder option</title>
<updated>2025-06-28T20:23:25Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-06-23T21:25:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=69891dca804c08c13f9d490f9bea060149aef10e'/>
<id>urn:sha1:69891dca804c08c13f9d490f9bea060149aef10e</id>
<content type='text'>
There are no more statements in the assembly code which would require
the usage of ".set noreorder".

Remove the option.

This also allows removal of the manual "nop" instruction in the
delay slot.

Suggested-by: Maciej W. Rozycki &lt;macro@orcam.me.uk&gt;
Link: https://lore.kernel.org/lkml/alpine.DEB.2.21.2502172208570.65342@angie.orcam.me.uk/
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Tested-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Link: https://lore.kernel.org/r/20250623-nolibc-mips-n32-v3-3-6ae2d89f4259@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: MIPS: drop manual stack pointer alignment</title>
<updated>2025-06-28T20:23:20Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-06-23T21:25:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=36aab1693ade824640318746c2cbf085b687bad4'/>
<id>urn:sha1:36aab1693ade824640318746c2cbf085b687bad4</id>
<content type='text'>
The stack pointer is already aligned by the kernel to a multiple of 16.
All modifications of the register have been removed from the entrypoint,
so the manual realignment is unnecessary.

Drop the manual alignment.

Suggested-by: Maciej W. Rozycki &lt;macro@orcam.me.uk&gt;
Link: https://lore.kernel.org/lkml/alpine.DEB.2.21.2502161523290.65342@angie.orcam.me.uk/
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Tested-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Link: https://lore.kernel.org/r/20250623-nolibc-mips-n32-v3-2-6ae2d89f4259@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: MIPS: drop $gp setup</title>
<updated>2025-06-28T20:23:02Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-06-23T21:25:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f1e303348d137c710cf3fbf2eadf9d273a204987'/>
<id>urn:sha1:f1e303348d137c710cf3fbf2eadf9d273a204987</id>
<content type='text'>
The setup of the global pointer "$gp" register was necessary when the C
entrypoint was called through "jal &lt;symbol&gt;".
However since commit 0daf8c86a451 ("tools/nolibc: mips: load current function to $t9")
"jalr" is used instead which does not require "$gp".

Remove the unnecessary $gp setup, simplifying the code and opening the
road for some other cleanups.

Suggested-by: Maciej W. Rozycki &lt;macro@orcam.me.uk&gt;
Link: https://lore.kernel.org/lkml/alpine.DEB.2.21.2502172208570.65342@angie.orcam.me.uk/
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Tested-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Link: https://lore.kernel.org/r/20250623-nolibc-mips-n32-v3-1-6ae2d89f4259@weissschuh.net
</content>
</entry>
<entry>
<title>tools/nolibc: add prototypes for non-static functions</title>
<updated>2025-02-03T19:57:37Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2025-01-23T20:10:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0de64754a55470adb0a870f3105c8922334bb6fe'/>
<id>urn:sha1:0de64754a55470adb0a870f3105c8922334bb6fe</id>
<content type='text'>
With -Wmissing-prototypes the compiler will warn about non-static
functions which don't have a prototype defined.
This warning doesn't make much sense for nolibc itself but for user code
it is still useful.
To pacify the compiler add prototypes next to the function definitions,
similar to how it is handled elsewhere in the kernel.

Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20250123-nolibc-prototype-v1-1-e1afc5c1999a@weissschuh.net
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: move entrypoint specifics to compiler.h</title>
<updated>2024-08-12T20:21:00Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-08-07T21:51:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ef32e9b6a325d1d013b30d898b4dff94082902cd'/>
<id>urn:sha1:ef32e9b6a325d1d013b30d898b4dff94082902cd</id>
<content type='text'>
The specific attributes for the _start entrypoint are duplicated for
each architecture.
Deduplicate it into a dedicated #define into compiler.h.

For clang compatibility, the epilogue will also need to be adapted, so
move that one, too.

Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-5-c20f2f5fc7c2@weissschuh.net
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: mips: load current function to $t9</title>
<updated>2024-08-10T15:08:10Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-08-07T21:51:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0daf8c86a45163f35b8d4f7795068c2511dd0ad9'/>
<id>urn:sha1:0daf8c86a45163f35b8d4f7795068c2511dd0ad9</id>
<content type='text'>
The MIPS calling convention requires the address of the current function
to be available in $t9.
This was not done so far.

For GCC this seems to have worked, but when compiled with clang the
executable segfault instantly.
Properly load the address of _start_c() into $t9 before calling it.

Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-2-c20f2f5fc7c2@weissschuh.net
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: mips: add support for PIC</title>
<updated>2023-12-11T21:38:30Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2023-11-08T18:14:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=544102458a8d1c33f9f5f99f9bda8e2b858bcb10'/>
<id>urn:sha1:544102458a8d1c33f9f5f99f9bda8e2b858bcb10</id>
<content type='text'>
MIPS requires some extra instructions to set up the $gp register for the
with a pointer to the global data area.

This isn't needed for non-PIC builds, but this patch enables the code
unconditionally to prevent bitrot.

Also enable PIC in one of the test configurations for ongoing
validation.

Link: https://lore.kernel.org/r/20231108-nolibc-pic-v2-1-4fb0d6284757@weissschuh.net
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
</content>
</entry>
<entry>
<title>tools/nolibc: move MIPS ABI validation into arch-mips.h</title>
<updated>2023-12-11T21:38:21Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2023-10-20T07:30:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aa68a5a83a0acc4c1babcb4f8be49261514ab65c'/>
<id>urn:sha1:aa68a5a83a0acc4c1babcb4f8be49261514ab65c</id>
<content type='text'>
When installing nolibc to a sysroot arch.h is not used so its ABI check
is bypassed. This makes is possible to compile nolibc with a non O32 ABI
which may build but can not run.

Move the check into arch-mips.h so it will always be evaluated.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Acked-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
</feed>
