2023-03-18 19:35:00 +00:00
|
|
|
#ifndef ARCH_MSR_H_
|
|
|
|
|
#define ARCH_MSR_H_
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
2026-03-18 21:07:05 +00:00
|
|
|
#define MSR_FS_BASE 0xC0000100
|
2026-02-23 18:26:21 +00:00
|
|
|
#define MSR_GS_BASE 0xC0000101
|
|
|
|
|
#define MSR_KERNEL_GS_BASE 0xC0000102
|
2023-03-18 19:35:00 +00:00
|
|
|
|
2023-03-20 20:41:39 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-03-18 19:35:00 +00:00
|
|
|
/* defined in cpu_ctrl.S */
|
|
|
|
|
extern uint64_t rdmsr(uint32_t id);
|
|
|
|
|
extern void wrmsr(uint32_t id, uint64_t val);
|
|
|
|
|
|
2023-03-20 20:41:39 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-03-18 19:35:00 +00:00
|
|
|
#endif
|