aml-build.h (adb354dd1e00aa6b8bd674f0e1f70008badded0f) aml-build.h (d0384d9020f1f52f90e5e5b1b6c9c04aac5f6756)
1#ifndef HW_ACPI_AML_BUILD_H
2#define HW_ACPI_AML_BUILD_H
3
4#include "hw/acpi/acpi-defs.h"
5#include "hw/acpi/bios-linker-loader.h"
6
7/* Reserve RAM space for tables: add another order of magnitude. */
8#define ACPI_BUILD_TABLE_MAX_SIZE 0x200000

--- 64 unchanged lines hidden (view full) ---

73
74typedef enum {
75 AML_PRESERVE = 0,
76 AML_WRITE_AS_ONES = 1,
77 AML_WRITE_AS_ZEROS = 2,
78} AmlUpdateRule;
79
80typedef enum {
1#ifndef HW_ACPI_AML_BUILD_H
2#define HW_ACPI_AML_BUILD_H
3
4#include "hw/acpi/acpi-defs.h"
5#include "hw/acpi/bios-linker-loader.h"
6
7/* Reserve RAM space for tables: add another order of magnitude. */
8#define ACPI_BUILD_TABLE_MAX_SIZE 0x200000

--- 64 unchanged lines hidden (view full) ---

73
74typedef enum {
75 AML_PRESERVE = 0,
76 AML_WRITE_AS_ONES = 1,
77 AML_WRITE_AS_ZEROS = 2,
78} AmlUpdateRule;
79
80typedef enum {
81 AML_AS_SYSTEM_MEMORY = 0X00,
82 AML_AS_SYSTEM_IO = 0X01,
83 AML_AS_PCI_CONFIG = 0X02,
84 AML_AS_EMBEDDED_CTRL = 0X03,
85 AML_AS_SMBUS = 0X04,
86 AML_AS_FFH = 0X7F,
87} AmlAddressSpace;
88
89typedef enum {
81 AML_SYSTEM_MEMORY = 0X00,
82 AML_SYSTEM_IO = 0X01,
83 AML_PCI_CONFIG = 0X02,
84} AmlRegionSpace;
85
86typedef enum {
87 AML_MEMORY_RANGE = 0,
88 AML_IO_RANGE = 1,

--- 295 unchanged lines hidden (view full) ---

384void
385build_xsdt(GArray *table_data, BIOSLinker *linker, GArray *table_offsets,
386 const char *oem_id, const char *oem_table_id);
387
388int
389build_append_named_dword(GArray *array, const char *name_format, ...)
390GCC_FMT_ATTR(2, 3);
391
90 AML_SYSTEM_MEMORY = 0X00,
91 AML_SYSTEM_IO = 0X01,
92 AML_PCI_CONFIG = 0X02,
93} AmlRegionSpace;
94
95typedef enum {
96 AML_MEMORY_RANGE = 0,
97 AML_IO_RANGE = 1,

--- 295 unchanged lines hidden (view full) ---

393void
394build_xsdt(GArray *table_data, BIOSLinker *linker, GArray *table_offsets,
395 const char *oem_id, const char *oem_table_id);
396
397int
398build_append_named_dword(GArray *array, const char *name_format, ...)
399GCC_FMT_ATTR(2, 3);
400
401void build_append_gas(GArray *table, AmlAddressSpace as,
402 uint8_t bit_width, uint8_t bit_offset,
403 uint8_t access_width, uint64_t address);
404
405static inline void
406build_append_gas_from_struct(GArray *table, const struct AcpiGenericAddress *s)
407{
408 build_append_gas(table, s->space_id, s->bit_width, s->bit_offset,
409 s->access_width, s->address);
410}
411
392void build_srat_memory(AcpiSratMemoryAffinity *numamem, uint64_t base,
393 uint64_t len, int node, MemoryAffinityFlags flags);
394
395void build_slit(GArray *table_data, BIOSLinker *linker);
396#endif
412void build_srat_memory(AcpiSratMemoryAffinity *numamem, uint64_t base,
413 uint64_t len, int node, MemoryAffinityFlags flags);
414
415void build_slit(GArray *table_data, BIOSLinker *linker);
416#endif