From 635f680d45a58a4248f6dc6c833552836c1abed0 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 18 Nov 2025 01:00:58 -0500 Subject: kern/amd64: msr: Make md/msr.h includable in asm Signed-off-by: Ian Moffett --- sys/inc/arch/amd64/msr.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/inc/arch/amd64') diff --git a/sys/inc/arch/amd64/msr.h b/sys/inc/arch/amd64/msr.h index c194ec0..f71103b 100644 --- a/sys/inc/arch/amd64/msr.h +++ b/sys/inc/arch/amd64/msr.h @@ -30,8 +30,10 @@ #ifndef _MACHINE_MSR_H_ #define _MACHINE_MSR_H_ 1 +#if !defined(__ASSEMBLER__) #include #include +#endif /* !__ASSEMBLER__ */ #define IA32_APIC_BASE 0x0000001B #define IA32_GS_BASE 0xC0000101 @@ -41,6 +43,7 @@ #define IA32_MTRR_PHYSMASK 0x00000201 #define IA32_KERNEL_GS_BASE 0xC0000102 +#if !defined(__ASSEMBLER__) __always_inline static inline uint64_t rdmsr(uint32_t msr) { @@ -72,4 +75,5 @@ wrmsr(uint32_t msr, uint64_t val) ); } +#endif /* !__ASSEMBLER__ */ #endif /* !_MACHINE_MSR_H_ */ -- cgit v1.2.3