Lines Matching full:reg

18 #define LOAPIC_ID 0x020		  /* Local APIC ID Reg */
19 #define LOAPIC_VER 0x030 /* Local APIC Version Reg */
20 #define LOAPIC_TPR 0x080 /* Task Priority Reg */
21 #define LOAPIC_APR 0x090 /* Arbitration Priority Reg */
22 #define LOAPIC_PPR 0x0a0 /* Processor Priority Reg */
23 #define LOAPIC_EOI 0x0b0 /* EOI Reg */
24 #define LOAPIC_LDR 0x0d0 /* Logical Destination Reg */
25 #define LOAPIC_DFR 0x0e0 /* Destination Format Reg */
26 #define LOAPIC_SVR 0x0f0 /* Spurious Interrupt Reg */
27 #define LOAPIC_ISR 0x100 /* In-service Reg */
28 #define LOAPIC_TMR 0x180 /* Trigger Mode Reg */
29 #define LOAPIC_IRR 0x200 /* Interrupt Request Reg */
30 #define LOAPIC_ESR 0x280 /* Error Status Reg */
31 #define LOAPIC_ICRLO 0x300 /* Interrupt Command Reg */
32 #define LOAPIC_ICRHI 0x310 /* Interrupt Command Reg */
39 #define LOAPIC_TIMER_ICR 0x380 /* Timer Initial Count Reg */
40 #define LOAPIC_TIMER_CCR 0x390 /* Timer Current Count Reg */
41 #define LOAPIC_TIMER_CONFIG 0x3e0 /* Timer Divide Config Reg */
42 #define LOAPIC_SELF_IPI 0x3f0 /* Self IPI Reg, only support in X2APIC mode */
72 * @param reg the LOAPIC register number to read (LOAPIC_*)
74 static inline uint64_t x86_read_x2apic(unsigned int reg) in x86_read_x2apic() argument
76 reg >>= 4; in x86_read_x2apic()
77 return z_x86_msr_read(X86_X2APIC_BASE_MSR + reg); in x86_read_x2apic()
83 * @param reg the LOAPIC register number to read (LOAPIC_*)
85 static inline uint32_t x86_read_xapic(unsigned int reg) in x86_read_xapic() argument
89 return sys_read32(base + reg); in x86_read_xapic()
100 * @param reg the LOAPIC register number to read (LOAPIC_*)
102 static inline uint32_t x86_read_loapic(unsigned int reg) in x86_read_loapic() argument
105 return x86_read_x2apic(reg); in x86_read_loapic()
107 return x86_read_xapic(reg); in x86_read_loapic()
114 * @param reg the LOAPIC register number to write (one of LOAPIC_*)
117 static inline void x86_write_x2apic(unsigned int reg, uint64_t val) in x86_write_x2apic() argument
119 reg >>= 4; in x86_write_x2apic()
120 z_x86_msr_write(X86_X2APIC_BASE_MSR + reg, val); in x86_write_x2apic()
126 * @param reg the LOAPIC register number to write (one of LOAPIC_*)
129 static inline void x86_write_xapic(unsigned int reg, uint32_t val) in x86_write_xapic() argument
133 sys_write32(val, base + reg); in x86_write_xapic()
144 * @param reg the LOAPIC register number to write (one of LOAPIC_*)
147 static inline void x86_write_loapic(unsigned int reg, uint32_t val) in x86_write_loapic() argument
150 x86_write_x2apic(reg, val); in x86_write_loapic()
152 x86_write_xapic(reg, val); in x86_write_loapic()