From 504a4b19b48ef0f87a84d6c1d4f6ef6c655931e5 Mon Sep 17 00:00:00 2001 From: "Chloe M." Date: Mon, 22 Jun 2026 03:50:12 +0000 Subject: [PATCH] stos: bpal: Add helper to get kernel base Signed-off-by: Chloe M. --- paw/stos/head/ke/bpal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/paw/stos/head/ke/bpal.h b/paw/stos/head/ke/bpal.h index 2f9471f..1ba7cac 100644 --- a/paw/stos/head/ke/bpal.h +++ b/paw/stos/head/ke/bpal.h @@ -51,6 +51,18 @@ VOID KeBpalInit(VOID); */ VOID KeBpalGetHandle(BPAL_HANDLE *Result); +/* + * Obtain the kernel load virtual memory base + */ +ALWAYS_INLINE static inline UPTR +KeBpalLoadBase(VOID) +{ + BPAL_HANDLE Handle; + + KeBpalGetHandle(&Handle); + return Handle.KernelBase; +} + /* Backend init functions */ VOID KeBpalLimineInit(BPAL_HANDLE *Handle);