summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mos/sys/inc/kern/bpt.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/mos/sys/inc/kern/bpt.h b/mos/sys/inc/kern/bpt.h
index 3e3c3f2..e343f7b 100644
--- a/mos/sys/inc/kern/bpt.h
+++ b/mos/sys/inc/kern/bpt.h
@@ -8,6 +8,7 @@
#include <sdk/types.h>
#include <sdk/status.h>
+#include <sdk/defs.h>
/*
* Represents memory map entry types
@@ -80,4 +81,16 @@ MOS_STATUS bpt_get_mementry(USIZE index, BPT_MEMENTRY *res);
*/
MOS_STATUS bpt_init(void);
+ALWAYS_INLINE static inline UPTR
+bpt_kernel_base(void)
+{
+ BPT_VARS vars;
+
+ if (bpt_get_vars(&vars) != STATUS_SUCCESS) {
+ return 0;
+ }
+
+ return vars.kernel_base;
+}
+
#endif /* !_KERN_BPT_H_ */