mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-06 17:21:22 +00:00
hv: lapic: export write_lapic_reg32
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -166,15 +166,19 @@ struct lapic_info {
|
||||
|
||||
static struct lapic_info lapic_info;
|
||||
|
||||
static uint32_t read_lapic_reg32(uint32_t offset)
|
||||
static inline uint32_t read_lapic_reg32(uint32_t offset)
|
||||
{
|
||||
ASSERT((offset >= 0x020) && (offset <= 0x3FF), "");
|
||||
if (offset < 0x20 || offset > 0x3ff)
|
||||
return 0;
|
||||
|
||||
return mmio_read_long(lapic_info.xapic.vaddr + offset);
|
||||
}
|
||||
|
||||
static void write_lapic_reg32(uint32_t offset, uint32_t value)
|
||||
inline void write_lapic_reg32(uint32_t offset, uint32_t value)
|
||||
{
|
||||
ASSERT((offset >= 0x020) && (offset <= 0x3FF), "");
|
||||
if (offset < 0x20 || offset > 0x3ff)
|
||||
return;
|
||||
|
||||
mmio_write_long(value, lapic_info.xapic.vaddr + offset);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user