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

Function ppt_map_mmio

freebsd/amd64/vmm/io/ppt.c:443–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443int
444ppt_map_mmio(struct vm *vm, int bus, int slot, int func,
445 vm_paddr_t gpa, size_t len, vm_paddr_t hpa)
446{
447 int i, error;
448 struct pptseg *seg;
449 struct pptdev *ppt;
450
451 error = ppt_find(vm, bus, slot, func, &ppt);
452 if (error)
453 return (error);
454
455 for (i = 0; i < MAX_MMIOSEGS; i++) {
456 seg = &ppt->mmio[i];
457 if (seg->len == 0) {
458 error = vm_map_mmio(vm, gpa, len, hpa);
459 if (error == 0) {
460 seg->gpa = gpa;
461 seg->len = len;
462 }
463 return (error);
464 }
465 }
466 return (ENOSPC);
467}
468
469static int
470pptintr(void *arg)

Callers 1

vmmdev_ioctlFunction · 0.85

Calls 2

ppt_findFunction · 0.85
vm_map_mmioFunction · 0.85

Tested by

no test coverage detected