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

Function vrtc_addr_handler

freebsd/amd64/vmm/io/vrtc.c:847–868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

845}
846
847int
848vrtc_addr_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,
849 uint32_t *val)
850{
851 struct vrtc *vrtc;
852
853 vrtc = vm_rtc(vm);
854
855 if (bytes != 1)
856 return (-1);
857
858 if (in) {
859 *val = 0xff;
860 return (0);
861 }
862
863 VRTC_LOCK(vrtc);
864 vrtc->addr = *val & 0x7f;
865 VRTC_UNLOCK(vrtc);
866
867 return (0);
868}
869
870int
871vrtc_data_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes,

Callers

nothing calls this directly

Calls 1

vm_rtcFunction · 0.85

Tested by

no test coverage detected