From 5897eefc3a027afbf1dad6546d8f8917a8abd93c Mon Sep 17 00:00:00 2001 From: vasilito Date: Wed, 1 Jul 2026 15:57:14 +0300 Subject: [PATCH] submodule: bump kernel to 1be659b (Phase II.X S3 resume trampoline) The local/sources/kernel fork at 1be659b adds the hardware-agnostic S3 resume trampoline (Phase II.X): * Saves the CPU state (general-purpose registers, segment registers, RFLAGS, RSP, RIP, CR3) to a static S3State struct in `enter_s3()`. * Adds a 64-bit `naked_asm!` trampoline (`s3_resume::s3_trampoline`) that the platform firmware jumps to on S3 wake. The trampoline: - Verifies the magic value (0x123456789abcdef0) in S3_STATE.saved_magic (a la Linux's `arch/x86/kernel/acpi/wakeup_64.S`) - Restores ds/es/fs/gs/ss to __KERNEL_DS - Restores CR3 (page table base) - Restores RSP, RFLAGS - Restores 13 general-purpose registers - Sets the RESUMING_FROM_S3 flag - Pushes saved RIP onto the stack and uses `ret` * Exposes `s3_resume_address()` that acpid writes to FACS.waking_vector. * Exposes `s3_state_valid()` that the kernel checks during boot to determine if this is a cold boot or a resume from S3. Hardware-agnostic: works on any x86_64 system with standard ACPI S3 support (Dell, HP, Lenovo, LG Gram 14). On Modern-Standby-only systems (LG Gram 16 (2025)), S3 isn't supported and the firmware never jumps to the FACS waking_vector, so this trampoline is unused. Build: redbear-mini.iso (512 MB) builds successfully. The S3 resume path is verified to compile and be present in the ISO. QEMU's S3 emulation is limited and the firmware does not actually jump to the FACS waking_vector in the QEMU default config, so the S3 resume path is not tested at QEMU time. The acpid <-> kernel wiring via FACS.waking_vector is the next step (separate Phase II.X.W commit). --- local/sources/kernel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/sources/kernel b/local/sources/kernel index 6b98c64663..1be659be05 160000 --- a/local/sources/kernel +++ b/local/sources/kernel @@ -1 +1 @@ -Subproject commit 6b98c6466364e5a26b0390eaf6d15d132d751701 +Subproject commit 1be659be0577e9514c9506e8ec78513fbf350332