From 707ba009a2f5e5b381d83332e5bb693b8ebe4480 Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Thu, 26 Feb 2026 11:13:29 +1100 Subject: [PATCH 1/3] Update to seL4 efd942 Signed-off-by: Ivan Velickovic --- .github/workflows/sdk.yaml | 2 +- DEVELOPER.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sdk.yaml b/.github/workflows/sdk.yaml index b951a56e..4de30df5 100644 --- a/.github/workflows/sdk.yaml +++ b/.github/workflows/sdk.yaml @@ -16,7 +16,7 @@ on: branches: [ "main" ] env: - SEL4_VERSION: c55f50b6e5e5c753ec9295d85ed5dff91a1e1562 + SEL4_VERSION: efd9426e1771b6cdbcc7e58d3fd58d3df77c337e # To reduce the load we cancel any older runs of this workflow for the current # PR. For deployment to the main branch, the workflow will run on each push, diff --git a/DEVELOPER.md b/DEVELOPER.md index f4b3a2ba..61dd8ba3 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -120,7 +120,7 @@ It should be noted that while Microkit uses mainline seL4, it is fairly tied to specific version used. For this version of Microkit please use the following commit: -`c55f50b6e5e5c753ec9295d85ed5dff91a1e1562`. +`efd9426e1771b6cdbcc7e58d3fd58d3df77c337e`. ## Building the SDK From 54c3e936c0f39fa5132a8e2a6a050aa18a23006d Mon Sep 17 00:00:00 2001 From: Julia Vassiliki Date: Fri, 13 Feb 2026 11:00:12 +1100 Subject: [PATCH 2/3] use LibSel4UseThreadLocals to disable TLS ipcbuf See the motivation in the commit libsel4: make thread-local ipc buffer optional in seL4 which adds this option. Signed-off-by: Julia Vassiliki --- build_sdk.py | 7 +++++++ libmicrokit/include/microkit.h | 1 - libmicrokit/src/dbg.c | 1 - libmicrokit/src/main.c | 1 - monitor/src/main.c | 21 --------------------- 5 files changed, 7 insertions(+), 24 deletions(-) diff --git a/build_sdk.py b/build_sdk.py index 17380aab..4fb4f092 100644 --- a/build_sdk.py +++ b/build_sdk.py @@ -45,6 +45,13 @@ DEFAULT_KERNEL_OPTIONS = { "KernelIsMCS": True, "KernelRootCNodeSizeBits": "17", + # Thread local storage is painful and annoying to configure. + # We'd really rather NOT use thread local storage (especially + # consider we never have more than one thread in a Vspace) + # + # Turning off this feature removes the __thread attribute on + # __sel4_ipc_buffer and makes it a true global. + "LibSel4UseThreadLocals": False, } DEFAULT_KERNEL_OPTIONS_AARCH64 = { diff --git a/libmicrokit/include/microkit.h b/libmicrokit/include/microkit.h index db43ff99..90155d21 100644 --- a/libmicrokit/include/microkit.h +++ b/libmicrokit/include/microkit.h @@ -9,7 +9,6 @@ #pragma once -#define __thread #include typedef unsigned int microkit_channel; diff --git a/libmicrokit/src/dbg.c b/libmicrokit/src/dbg.c index 298b3c12..60090e42 100644 --- a/libmicrokit/src/dbg.c +++ b/libmicrokit/src/dbg.c @@ -5,7 +5,6 @@ */ #include -#define __thread #include void microkit_dbg_putc(int c) diff --git a/libmicrokit/src/main.c b/libmicrokit/src/main.c index c533bb0c..cff14f64 100644 --- a/libmicrokit/src/main.c +++ b/libmicrokit/src/main.c @@ -7,7 +7,6 @@ #include #include -#define __thread #include #include diff --git a/monitor/src/main.c b/monitor/src/main.c index b2ff8019..2adb47a5 100644 --- a/monitor/src/main.c +++ b/monitor/src/main.c @@ -12,27 +12,6 @@ * Acting as the fault handler for protection domains. */ -/* - * Why this you may ask? Well, the seL4 headers depend on - * a global `__sel4_ipc_buffer` which is a pointer to the - * thread's IPC buffer. Which is reasonable enough, passing - * that explicitly to every function would be annoying. - * - * The seL4 headers make this global a thread-local global, - * which is also reasonable, considering it applies to a - * specific thread! But, for our purposes we don't have threads! - * - * Thread local storage is painful and annoying to configure. - * We'd really rather NOT use thread local storage (especially - * consider we never have more than one thread in a Vspace) - * - * So, by defining __thread to be empty it means the variable - * becomes a true global rather than thread local storage - * variable, which means, we don't need to waste a bunch - * of effort and complexity on thread local storage implementation. - */ -#define __thread - #include #include #include From 25dc736bd5ae2998167d1340504a5e09ec4cd9fb Mon Sep 17 00:00:00 2001 From: Ivan Velickovic Date: Thu, 26 Feb 2026 11:19:46 +1100 Subject: [PATCH 3/3] build_sdk.py: fix typo Signed-off-by: Ivan Velickovic --- build_sdk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_sdk.py b/build_sdk.py index 4fb4f092..c6781ad8 100644 --- a/build_sdk.py +++ b/build_sdk.py @@ -47,7 +47,7 @@ "KernelRootCNodeSizeBits": "17", # Thread local storage is painful and annoying to configure. # We'd really rather NOT use thread local storage (especially - # consider we never have more than one thread in a Vspace) + # considering we never have more than one thread in a VSpace) # # Turning off this feature removes the __thread attribute on # __sel4_ipc_buffer and makes it a true global.