MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lapic_mmio_write

Function lapic_mmio_write

freebsd/amd64/vmm/vmm_lapic.c:199–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199int
200lapic_mmio_write(void *vm, int cpu, uint64_t gpa, uint64_t wval, int size,
201 void *arg)
202{
203 int error;
204 uint64_t off;
205 struct vlapic *vlapic;
206
207 off = gpa - DEFAULT_APIC_BASE;
208
209 /*
210 * Memory mapped local apic accesses must be 4 bytes wide and
211 * aligned on a 16-byte boundary.
212 */
213 if (size != 4 || off & 0xf)
214 return (EINVAL);
215
216 vlapic = vm_lapic(vm, cpu);
217 error = vlapic_write(vlapic, 1, off, wval, arg);
218 return (error);
219}
220
221int
222lapic_mmio_read(void *vm, int cpu, uint64_t gpa, uint64_t *rval, int size,

Callers

nothing calls this directly

Calls 2

vm_lapicFunction · 0.85
vlapic_writeFunction · 0.85

Tested by

no test coverage detected