aml-build.c (0403b0f539f40a21da60409b825b4653b273ab39) | aml-build.c (ff80dc7fa8045e2b2531888d965424d2b0e1d1b6) |
---|---|
1/* Support for generating ACPI tables and passing them to Guests 2 * 3 * Copyright (C) 2015 Red Hat Inc 4 * 5 * Author: Michael S. Tsirkin <mst@redhat.com> 6 * Author: Igor Mammedov <imammedo@redhat.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 819 unchanged lines hidden (view full) --- 828 * ACPI 5.0: 19.5.141 WordBusNumber (Word Bus Number Resource Descriptor Macro) 829 */ 830Aml *aml_word_bus_number(AmlMinFixed min_fixed, AmlMaxFixed max_fixed, 831 AmlDecode dec, uint16_t addr_gran, 832 uint16_t addr_min, uint16_t addr_max, 833 uint16_t addr_trans, uint16_t len) 834 835{ | 1/* Support for generating ACPI tables and passing them to Guests 2 * 3 * Copyright (C) 2015 Red Hat Inc 4 * 5 * Author: Michael S. Tsirkin <mst@redhat.com> 6 * Author: Igor Mammedov <imammedo@redhat.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 819 unchanged lines hidden (view full) --- 828 * ACPI 5.0: 19.5.141 WordBusNumber (Word Bus Number Resource Descriptor Macro) 829 */ 830Aml *aml_word_bus_number(AmlMinFixed min_fixed, AmlMaxFixed max_fixed, 831 AmlDecode dec, uint16_t addr_gran, 832 uint16_t addr_min, uint16_t addr_max, 833 uint16_t addr_trans, uint16_t len) 834 835{ |
836 return aml_word_as_desc(aml_bus_number_range, min_fixed, max_fixed, dec, | 836 return aml_word_as_desc(AML_BUS_NUMBER_RANGE, min_fixed, max_fixed, dec, |
837 addr_gran, addr_min, addr_max, addr_trans, len, 0); 838} 839 840/* 841 * ACPI 1.0b: 6.4.3.5.6 ASL Macros for WORD Address Descriptor 842 * 843 * More verbose description at: 844 * ACPI 5.0: 19.5.142 WordIO (Word IO Resource Descriptor Macro) 845 */ 846Aml *aml_word_io(AmlMinFixed min_fixed, AmlMaxFixed max_fixed, 847 AmlDecode dec, AmlISARanges isa_ranges, 848 uint16_t addr_gran, uint16_t addr_min, 849 uint16_t addr_max, uint16_t addr_trans, 850 uint16_t len) 851 852{ | 837 addr_gran, addr_min, addr_max, addr_trans, len, 0); 838} 839 840/* 841 * ACPI 1.0b: 6.4.3.5.6 ASL Macros for WORD Address Descriptor 842 * 843 * More verbose description at: 844 * ACPI 5.0: 19.5.142 WordIO (Word IO Resource Descriptor Macro) 845 */ 846Aml *aml_word_io(AmlMinFixed min_fixed, AmlMaxFixed max_fixed, 847 AmlDecode dec, AmlISARanges isa_ranges, 848 uint16_t addr_gran, uint16_t addr_min, 849 uint16_t addr_max, uint16_t addr_trans, 850 uint16_t len) 851 852{ |
853 return aml_word_as_desc(aml_io_range, min_fixed, max_fixed, dec, | 853 return aml_word_as_desc(AML_IO_RANGE, min_fixed, max_fixed, dec, |
854 addr_gran, addr_min, addr_max, addr_trans, len, 855 isa_ranges); 856} 857 858/* 859 * ACPI 1.0b: 6.4.3.5.4 ASL Macros for DWORD Address Space Descriptor 860 * 861 * More verbose description at: 862 * ACPI 5.0: 19.5.34 DWordMemory (DWord Memory Resource Descriptor Macro) 863 */ 864Aml *aml_dword_memory(AmlDecode dec, AmlMinFixed min_fixed, | 854 addr_gran, addr_min, addr_max, addr_trans, len, 855 isa_ranges); 856} 857 858/* 859 * ACPI 1.0b: 6.4.3.5.4 ASL Macros for DWORD Address Space Descriptor 860 * 861 * More verbose description at: 862 * ACPI 5.0: 19.5.34 DWordMemory (DWord Memory Resource Descriptor Macro) 863 */ 864Aml *aml_dword_memory(AmlDecode dec, AmlMinFixed min_fixed, |
865 AmlMaxFixed max_fixed, AmlCacheble cacheable, | 865 AmlMaxFixed max_fixed, AmlCacheable cacheable, |
866 AmlReadAndWrite read_and_write, 867 uint32_t addr_gran, uint32_t addr_min, 868 uint32_t addr_max, uint32_t addr_trans, 869 uint32_t len) 870{ 871 uint8_t flags = read_and_write | (cacheable << 1); 872 | 866 AmlReadAndWrite read_and_write, 867 uint32_t addr_gran, uint32_t addr_min, 868 uint32_t addr_max, uint32_t addr_trans, 869 uint32_t len) 870{ 871 uint8_t flags = read_and_write | (cacheable << 1); 872 |
873 return aml_dword_as_desc(aml_memory_range, min_fixed, max_fixed, | 873 return aml_dword_as_desc(AML_MEMORY_RANGE, min_fixed, max_fixed, |
874 dec, addr_gran, addr_min, addr_max, 875 addr_trans, len, flags); 876} 877 878/* 879 * ACPI 1.0b: 6.4.3.5.2 ASL Macros for QWORD Address Space Descriptor 880 * 881 * More verbose description at: 882 * ACPI 5.0: 19.5.102 QWordMemory (QWord Memory Resource Descriptor Macro) 883 */ 884Aml *aml_qword_memory(AmlDecode dec, AmlMinFixed min_fixed, | 874 dec, addr_gran, addr_min, addr_max, 875 addr_trans, len, flags); 876} 877 878/* 879 * ACPI 1.0b: 6.4.3.5.2 ASL Macros for QWORD Address Space Descriptor 880 * 881 * More verbose description at: 882 * ACPI 5.0: 19.5.102 QWordMemory (QWord Memory Resource Descriptor Macro) 883 */ 884Aml *aml_qword_memory(AmlDecode dec, AmlMinFixed min_fixed, |
885 AmlMaxFixed max_fixed, AmlCacheble cacheable, | 885 AmlMaxFixed max_fixed, AmlCacheable cacheable, |
886 AmlReadAndWrite read_and_write, 887 uint64_t addr_gran, uint64_t addr_min, 888 uint64_t addr_max, uint64_t addr_trans, 889 uint64_t len) 890{ 891 uint8_t flags = read_and_write | (cacheable << 1); 892 | 886 AmlReadAndWrite read_and_write, 887 uint64_t addr_gran, uint64_t addr_min, 888 uint64_t addr_max, uint64_t addr_trans, 889 uint64_t len) 890{ 891 uint8_t flags = read_and_write | (cacheable << 1); 892 |
893 return aml_qword_as_desc(aml_memory_range, min_fixed, max_fixed, | 893 return aml_qword_as_desc(AML_MEMORY_RANGE, min_fixed, max_fixed, |
894 dec, addr_gran, addr_min, addr_max, 895 addr_trans, len, flags); 896} 897 898void 899build_header(GArray *linker, GArray *table_data, 900 AcpiTableHeader *h, const char *sig, int len, uint8_t rev) 901{ --- 52 unchanged lines hidden --- | 894 dec, addr_gran, addr_min, addr_max, 895 addr_trans, len, flags); 896} 897 898void 899build_header(GArray *linker, GArray *table_data, 900 AcpiTableHeader *h, const char *sig, int len, uint8_t rev) 901{ --- 52 unchanged lines hidden --- |