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