diff options
| author | Ian Moffett <ian@osmora.org> | 2025-11-18 01:00:58 -0500 |
|---|---|---|
| committer | Ian Moffett <ian@osmora.org> | 2025-11-18 01:00:58 -0500 |
| commit | 635f680d45a58a4248f6dc6c833552836c1abed0 (patch) | |
| tree | e11a9262359ced3a5e006661944469a3f485f5c6 /sys | |
| parent | f3fe5e8d39fc9bbcffb346d0b7329445140a1e93 (diff) | |
kern/amd64: msr: Make md/msr.h includable in asm
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/inc/arch/amd64/msr.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 <sys/cdefs.h> #include <sys/types.h> +#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_ */ |
