1#- 2# SPDX-License-Identifier: BSD-2-Clause 3# 4# Copyright (c) 2025 Netflix, Inc. 5# Written by: John Baldwin <jhb@FreeBSD.org> 6# 7 8#include <sys/bus.h> 9 10#include <contrib/dev/acpica/include/acpi.h> 11 12/** 13 * @defgroup APEI apei - KObj methods for ACPI platform error interface drivers 14 * @brief A pair of methods to allocate/deallocate registers for APEI 15 * @{ 16 */ 17INTERFACE apei; 18 19/** 20 * @brief Allocate a mapping for a resource. 21 * 22 * @param _bus parent device 23 * @param _dev device requesting the mapping 24 * @param _type resource type 25 * @param _start start address 26 * @param _count length 27 * 28 * @returns resource mapping on success, or @c NULL on failure 29 */ 30METHOD struct resource_map * map_register { 31 device_t _bus; 32 device_t _child; 33 int _type; 34 rman_res_t _start; 35 rman_res_t _count; 36}; 37 38/** 39 * @brief Deallocate a mapping for a resource. 40 * 41 * @param _bus parent device 42 * @param _dev device releasing the mapping 43 * @param _map resource map 44 */ 45METHOD int unmap_register { 46 device_t _bus; 47 device_t _child; 48 struct resource_map *_map; 49}; 50