Patrick Rudolph | 7efbdbb | 2024-10-23 15:19:50 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
| 3 | #ifndef __ASM_ACPI_TABLE_H__ |
| 4 | #define __ASM_ACPI_TABLE_H__ |
| 5 | |
| 6 | #ifndef __ACPI__ |
| 7 | |
| 8 | #include <acpi/acpi_table.h> |
| 9 | |
| 10 | /** |
| 11 | * acpi_write_madt_gicc() - Write out a MADT GICC sub-table |
| 12 | * |
| 13 | * Write out the GIC CPU Interface sub-table. |
| 14 | * |
| 15 | * @gicc: Pointer to place to put the sub-table |
| 16 | * @cpu_num: GIC's CPU Interface Number |
| 17 | * @perf_gsiv: The GSIV used for Performance Monitoring Interrupts |
| 18 | * @phys_base: Address at which the processor can access this |
| 19 | * GIC CPU Interface |
| 20 | * @gicv: Address of the GIC virtual CPU interface registers |
| 21 | * @gich: Address of the GIC virtual interface control block |
| 22 | * registers |
| 23 | * @vgic_maint_irq: GSIV for Virtual GIC maintenance interrupt |
| 24 | * @gicr_base: Physical address of the associated Redistributor |
| 25 | * @mpidr: MPIDR as defined by ARM architecture |
| 26 | * @efficiency: Describes the relative power efficiency |
| 27 | */ |
| 28 | void acpi_write_madt_gicc(struct acpi_madt_gicc *gicc, uint cpu_num, |
| 29 | uint perf_gsiv, ulong phys_base, ulong gicv, |
| 30 | ulong gich, uint vgic_maint_irq, u64 gicr_base, |
| 31 | ulong mpidr, uint efficiency); |
| 32 | |
| 33 | /** |
| 34 | * acpi_write_madt_gicd() - Write out a MADT GICD sub-table |
| 35 | * |
| 36 | * Write out the GIC Distributor sub-table. |
| 37 | * |
| 38 | * @gicd: Pointer to place to put the sub-table |
| 39 | * @gic_id: This GIC Distributor's hardware ID |
| 40 | * @phys_base: The 64-bit physical address for this Distributor |
| 41 | * @gic_version: GIC version |
| 42 | */ |
| 43 | void acpi_write_madt_gicd(struct acpi_madt_gicd *gicd, uint gic_id, |
| 44 | ulong phys_base, uint gic_version); |
| 45 | |
| 46 | /** |
| 47 | * acpi_write_madt_gicr() - Write out a MADT GICR sub-table |
| 48 | * |
| 49 | * Write out the GIC Redistributor sub-table. |
| 50 | * |
| 51 | * @gicr: Pointer to place to put the sub-table |
| 52 | * @discovery_range_base_address: Physical address of a page range |
| 53 | * containing all GIC Redistributors |
| 54 | * @discovery_range_length: Length of the GIC Redistributor |
| 55 | * Discovery page range |
| 56 | */ |
| 57 | void acpi_write_madt_gicr(struct acpi_madt_gicr *gicr, |
| 58 | u64 discovery_range_base_address, |
| 59 | u32 discovery_range_length); |
| 60 | |
| 61 | /** |
| 62 | * acpi_write_madt_its() - Write out a MADT ITS sub-table |
| 63 | * |
| 64 | * Write out the GIC Interrupt Translation Service sub-table. |
| 65 | * |
| 66 | * @its: Pointer to place to put the sub-table |
| 67 | * @its_id: Uniqueue GIC ITS ID |
| 68 | * @physical_base_address: Physical address for the Interrupt |
| 69 | * Translation Service |
| 70 | */ |
| 71 | void acpi_write_madt_its(struct acpi_madt_its *its, |
| 72 | u32 its_id, |
| 73 | u64 physical_base_address); |
| 74 | |
| 75 | /** |
| 76 | * acpi_pptt_add_proc() - Write out a PPTT processor sub-table |
| 77 | * |
| 78 | * Write out the Processor Properties Topology Table processor sub-table. |
| 79 | * |
| 80 | * @ctx: ACPI context pointer |
| 81 | * @flags: Processor Structure Flags |
| 82 | * @parent: Reference to parent processor |
| 83 | * @proc_id: ACPI processor ID as defined in MADT |
| 84 | * @num_resources: Number of resource structure references |
| 85 | * @resource_list: References to other PPTT structures |
| 86 | * Return: offset from start of PPTT in bytes |
| 87 | */ |
| 88 | int acpi_pptt_add_proc(struct acpi_ctx *ctx, const u32 flags, const u32 parent, |
| 89 | const u32 proc_id, const u32 num_resources, |
| 90 | const u32 *resource_list); |
| 91 | |
| 92 | /** |
| 93 | * acpi_pptt_add_cache() - Write out a PPTT cache sub-table |
| 94 | * |
| 95 | * Write out the Processor Properties Topology Table cache sub-table. |
| 96 | * |
| 97 | * @ctx: ACPI context pointer |
| 98 | * @flags: Cache Structure Flags |
| 99 | * @next_cache_level: Reference to next level of cache |
| 100 | * @size: Size of the cache in bytes |
| 101 | * @sets: Number of sets in the cache |
| 102 | * @assoc: Integer number of ways |
| 103 | * @attributes: Allocation type, Cache type, policy |
| 104 | * @line_size: Line size in bytes |
| 105 | * Return: offset from start of PPTT in bytes |
| 106 | */ |
| 107 | int acpi_pptt_add_cache(struct acpi_ctx *ctx, const u32 flags, |
| 108 | const u32 next_cache_level, const u32 size, |
| 109 | const u32 sets, const u8 assoc, const u8 attributes, |
| 110 | const u16 line_size); |
| 111 | |
| 112 | #endif /* !__ASSEMBLY__ */ |
| 113 | #endif /* !__ACPI__ */ |
| 114 | |
| 115 | #endif /* __ASM_ACPI_TABLE_H__ */ |