1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved
4  */
5 
6 #ifndef ACPI_GENERIC_INITIATOR_H
7 #define ACPI_GENERIC_INITIATOR_H
8 
9 #include "qom/object_interfaces.h"
10 
11 #define TYPE_ACPI_GENERIC_INITIATOR "acpi-generic-initiator"
12 
13 typedef struct AcpiGenericInitiator {
14     /* private */
15     Object parent;
16 
17     /* public */
18     char *pci_dev;
19     uint16_t node;
20 } AcpiGenericInitiator;
21 
22 /*
23  * ACPI 6.3:
24  * Table 5-81 Flags – Generic Initiator Affinity Structure
25  */
26 typedef enum {
27     /*
28      * If clear, the OSPM ignores the contents of the Generic
29      * Initiator/Port Affinity Structure. This allows system firmware
30      * to populate the SRAT with a static number of structures, but only
31      * enable them as necessary.
32      */
33     GEN_AFFINITY_ENABLED = (1 << 0),
34 } GenericAffinityFlags;
35 
36 /*
37  * ACPI 6.3:
38  * Table 5-80 Device Handle - PCI
39  */
40 typedef struct PCIDeviceHandle {
41     uint16_t segment;
42     uint16_t bdf;
43 } PCIDeviceHandle;
44 
45 void build_srat_generic_pci_initiator(GArray *table_data);
46 
47 #endif
48