1/* 2 * Copyright 2014, General Dynamics C4 Systems 3 * 4 * SPDX-License-Identifier: GPL-2.0-only 5 */ 6 7#include <config.h> 8#include <arch/machine/capdl.h> 9#include <string.h> 10#include <kernel/cspace.h> 11#include <machine/io.h> 12#include <arch/object/iospace.h> 13 14 15void x86_obj_ioports_print_attrs(cap_t ioports_cap) 16{ 17 printf("(ports: (%lu, %lu))\n", 18 (long unsigned int)cap_io_port_cap_get_capIOPortFirstPort(ioports_cap), 19 (long unsigned int)cap_io_port_cap_get_capIOPortLastPort(ioports_cap)); 20} 21 22#ifdef CONFIG_IOMMU 23 24void x86_obj_iospace_print_attrs(cap_t iospace_cap) 25{ 26 printf("(domain_id: %lu, pci_device: %lu)\n", 27 (long unsigned int)cap_io_space_cap_get_capPCIDevice(iospace_cap), 28 (long unsigned int)cap_io_space_cap_get_capDomainID(iospace_cap)); 29} 30 31void x86_obj_iopt_print_attrs(cap_t iopt_cap) 32{ 33 printf("(level: %lu)\n", (long unsigned int)cap_io_page_table_cap_get_capIOPTLevel(iopt_cap)); 34} 35#endif 36