Loading...
1/*******************************************************************************
2 *
3 * Module Name: rsinfo - Dispatch and Info tables
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2011, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#include <acpi/acpi.h>
45#include "accommon.h"
46#include "acresrc.h"
47
48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsinfo")
50
51/*
52 * Resource dispatch and information tables. Any new resource types (either
53 * Large or Small) must be reflected in each of these tables, so they are here
54 * in one place.
55 *
56 * The tables for Large descriptors are indexed by bits 6:0 of the AML
57 * descriptor type byte. The tables for Small descriptors are indexed by
58 * bits 6:3 of the descriptor byte. The tables for internal resource
59 * descriptors are indexed by the acpi_resource_type field.
60 */
61/* Dispatch table for resource-to-AML (Set Resource) conversion functions */
62struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[] = {
63 acpi_rs_set_irq, /* 0x00, ACPI_RESOURCE_TYPE_IRQ */
64 acpi_rs_convert_dma, /* 0x01, ACPI_RESOURCE_TYPE_DMA */
65 acpi_rs_set_start_dpf, /* 0x02, ACPI_RESOURCE_TYPE_START_DEPENDENT */
66 acpi_rs_convert_end_dpf, /* 0x03, ACPI_RESOURCE_TYPE_END_DEPENDENT */
67 acpi_rs_convert_io, /* 0x04, ACPI_RESOURCE_TYPE_IO */
68 acpi_rs_convert_fixed_io, /* 0x05, ACPI_RESOURCE_TYPE_FIXED_IO */
69 acpi_rs_set_vendor, /* 0x06, ACPI_RESOURCE_TYPE_VENDOR */
70 acpi_rs_convert_end_tag, /* 0x07, ACPI_RESOURCE_TYPE_END_TAG */
71 acpi_rs_convert_memory24, /* 0x08, ACPI_RESOURCE_TYPE_MEMORY24 */
72 acpi_rs_convert_memory32, /* 0x09, ACPI_RESOURCE_TYPE_MEMORY32 */
73 acpi_rs_convert_fixed_memory32, /* 0x0A, ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */
74 acpi_rs_convert_address16, /* 0x0B, ACPI_RESOURCE_TYPE_ADDRESS16 */
75 acpi_rs_convert_address32, /* 0x0C, ACPI_RESOURCE_TYPE_ADDRESS32 */
76 acpi_rs_convert_address64, /* 0x0D, ACPI_RESOURCE_TYPE_ADDRESS64 */
77 acpi_rs_convert_ext_address64, /* 0x0E, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
78 acpi_rs_convert_ext_irq, /* 0x0F, ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
79 acpi_rs_convert_generic_reg /* 0x10, ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
80};
81
82/* Dispatch tables for AML-to-resource (Get Resource) conversion functions */
83
84struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = {
85 /* Small descriptors */
86
87 NULL, /* 0x00, Reserved */
88 NULL, /* 0x01, Reserved */
89 NULL, /* 0x02, Reserved */
90 NULL, /* 0x03, Reserved */
91 acpi_rs_get_irq, /* 0x04, ACPI_RESOURCE_NAME_IRQ */
92 acpi_rs_convert_dma, /* 0x05, ACPI_RESOURCE_NAME_DMA */
93 acpi_rs_get_start_dpf, /* 0x06, ACPI_RESOURCE_NAME_START_DEPENDENT */
94 acpi_rs_convert_end_dpf, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */
95 acpi_rs_convert_io, /* 0x08, ACPI_RESOURCE_NAME_IO */
96 acpi_rs_convert_fixed_io, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO */
97 NULL, /* 0x0A, Reserved */
98 NULL, /* 0x0B, Reserved */
99 NULL, /* 0x0C, Reserved */
100 NULL, /* 0x0D, Reserved */
101 acpi_rs_get_vendor_small, /* 0x0E, ACPI_RESOURCE_NAME_VENDOR_SMALL */
102 acpi_rs_convert_end_tag, /* 0x0F, ACPI_RESOURCE_NAME_END_TAG */
103
104 /* Large descriptors */
105
106 NULL, /* 0x00, Reserved */
107 acpi_rs_convert_memory24, /* 0x01, ACPI_RESOURCE_NAME_MEMORY24 */
108 acpi_rs_convert_generic_reg, /* 0x02, ACPI_RESOURCE_NAME_GENERIC_REGISTER */
109 NULL, /* 0x03, Reserved */
110 acpi_rs_get_vendor_large, /* 0x04, ACPI_RESOURCE_NAME_VENDOR_LARGE */
111 acpi_rs_convert_memory32, /* 0x05, ACPI_RESOURCE_NAME_MEMORY32 */
112 acpi_rs_convert_fixed_memory32, /* 0x06, ACPI_RESOURCE_NAME_FIXED_MEMORY32 */
113 acpi_rs_convert_address32, /* 0x07, ACPI_RESOURCE_NAME_ADDRESS32 */
114 acpi_rs_convert_address16, /* 0x08, ACPI_RESOURCE_NAME_ADDRESS16 */
115 acpi_rs_convert_ext_irq, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_IRQ */
116 acpi_rs_convert_address64, /* 0x0A, ACPI_RESOURCE_NAME_ADDRESS64 */
117 acpi_rs_convert_ext_address64 /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */
118};
119
120#ifdef ACPI_FUTURE_USAGE
121#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
122
123/* Dispatch table for resource dump functions */
124
125struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = {
126 acpi_rs_dump_irq, /* ACPI_RESOURCE_TYPE_IRQ */
127 acpi_rs_dump_dma, /* ACPI_RESOURCE_TYPE_DMA */
128 acpi_rs_dump_start_dpf, /* ACPI_RESOURCE_TYPE_START_DEPENDENT */
129 acpi_rs_dump_end_dpf, /* ACPI_RESOURCE_TYPE_END_DEPENDENT */
130 acpi_rs_dump_io, /* ACPI_RESOURCE_TYPE_IO */
131 acpi_rs_dump_fixed_io, /* ACPI_RESOURCE_TYPE_FIXED_IO */
132 acpi_rs_dump_vendor, /* ACPI_RESOURCE_TYPE_VENDOR */
133 acpi_rs_dump_end_tag, /* ACPI_RESOURCE_TYPE_END_TAG */
134 acpi_rs_dump_memory24, /* ACPI_RESOURCE_TYPE_MEMORY24 */
135 acpi_rs_dump_memory32, /* ACPI_RESOURCE_TYPE_MEMORY32 */
136 acpi_rs_dump_fixed_memory32, /* ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */
137 acpi_rs_dump_address16, /* ACPI_RESOURCE_TYPE_ADDRESS16 */
138 acpi_rs_dump_address32, /* ACPI_RESOURCE_TYPE_ADDRESS32 */
139 acpi_rs_dump_address64, /* ACPI_RESOURCE_TYPE_ADDRESS64 */
140 acpi_rs_dump_ext_address64, /* ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
141 acpi_rs_dump_ext_irq, /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
142 acpi_rs_dump_generic_reg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
143};
144#endif
145
146#endif /* ACPI_FUTURE_USAGE */
147/*
148 * Base sizes for external AML resource descriptors, indexed by internal type.
149 * Includes size of the descriptor header (1 byte for small descriptors,
150 * 3 bytes for large descriptors)
151 */
152const u8 acpi_gbl_aml_resource_sizes[] = {
153 sizeof(struct aml_resource_irq), /* ACPI_RESOURCE_TYPE_IRQ (optional Byte 3 always created) */
154 sizeof(struct aml_resource_dma), /* ACPI_RESOURCE_TYPE_DMA */
155 sizeof(struct aml_resource_start_dependent), /* ACPI_RESOURCE_TYPE_START_DEPENDENT (optional Byte 1 always created) */
156 sizeof(struct aml_resource_end_dependent), /* ACPI_RESOURCE_TYPE_END_DEPENDENT */
157 sizeof(struct aml_resource_io), /* ACPI_RESOURCE_TYPE_IO */
158 sizeof(struct aml_resource_fixed_io), /* ACPI_RESOURCE_TYPE_FIXED_IO */
159 sizeof(struct aml_resource_vendor_small), /* ACPI_RESOURCE_TYPE_VENDOR */
160 sizeof(struct aml_resource_end_tag), /* ACPI_RESOURCE_TYPE_END_TAG */
161 sizeof(struct aml_resource_memory24), /* ACPI_RESOURCE_TYPE_MEMORY24 */
162 sizeof(struct aml_resource_memory32), /* ACPI_RESOURCE_TYPE_MEMORY32 */
163 sizeof(struct aml_resource_fixed_memory32), /* ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */
164 sizeof(struct aml_resource_address16), /* ACPI_RESOURCE_TYPE_ADDRESS16 */
165 sizeof(struct aml_resource_address32), /* ACPI_RESOURCE_TYPE_ADDRESS32 */
166 sizeof(struct aml_resource_address64), /* ACPI_RESOURCE_TYPE_ADDRESS64 */
167 sizeof(struct aml_resource_extended_address64), /*ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
168 sizeof(struct aml_resource_extended_irq), /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
169 sizeof(struct aml_resource_generic_register) /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
170};
171
172const u8 acpi_gbl_resource_struct_sizes[] = {
173 /* Small descriptors */
174
175 0,
176 0,
177 0,
178 0,
179 ACPI_RS_SIZE(struct acpi_resource_irq),
180 ACPI_RS_SIZE(struct acpi_resource_dma),
181 ACPI_RS_SIZE(struct acpi_resource_start_dependent),
182 ACPI_RS_SIZE_MIN,
183 ACPI_RS_SIZE(struct acpi_resource_io),
184 ACPI_RS_SIZE(struct acpi_resource_fixed_io),
185 0,
186 0,
187 0,
188 0,
189 ACPI_RS_SIZE(struct acpi_resource_vendor),
190 ACPI_RS_SIZE_MIN,
191
192 /* Large descriptors */
193
194 0,
195 ACPI_RS_SIZE(struct acpi_resource_memory24),
196 ACPI_RS_SIZE(struct acpi_resource_generic_register),
197 0,
198 ACPI_RS_SIZE(struct acpi_resource_vendor),
199 ACPI_RS_SIZE(struct acpi_resource_memory32),
200 ACPI_RS_SIZE(struct acpi_resource_fixed_memory32),
201 ACPI_RS_SIZE(struct acpi_resource_address32),
202 ACPI_RS_SIZE(struct acpi_resource_address16),
203 ACPI_RS_SIZE(struct acpi_resource_extended_irq),
204 ACPI_RS_SIZE(struct acpi_resource_address64),
205 ACPI_RS_SIZE(struct acpi_resource_extended_address64)
206};
1// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
2/*******************************************************************************
3 *
4 * Module Name: rsinfo - Dispatch and Info tables
5 *
6 ******************************************************************************/
7
8#include <acpi/acpi.h>
9#include "accommon.h"
10#include "acresrc.h"
11
12#define _COMPONENT ACPI_RESOURCES
13ACPI_MODULE_NAME("rsinfo")
14
15/*
16 * Resource dispatch and information tables. Any new resource types (either
17 * Large or Small) must be reflected in each of these tables, so they are here
18 * in one place.
19 *
20 * The tables for Large descriptors are indexed by bits 6:0 of the AML
21 * descriptor type byte. The tables for Small descriptors are indexed by
22 * bits 6:3 of the descriptor byte. The tables for internal resource
23 * descriptors are indexed by the acpi_resource_type field.
24 */
25/* Dispatch table for resource-to-AML (Set Resource) conversion functions */
26struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[] = {
27 acpi_rs_set_irq, /* 0x00, ACPI_RESOURCE_TYPE_IRQ */
28 acpi_rs_convert_dma, /* 0x01, ACPI_RESOURCE_TYPE_DMA */
29 acpi_rs_set_start_dpf, /* 0x02, ACPI_RESOURCE_TYPE_START_DEPENDENT */
30 acpi_rs_convert_end_dpf, /* 0x03, ACPI_RESOURCE_TYPE_END_DEPENDENT */
31 acpi_rs_convert_io, /* 0x04, ACPI_RESOURCE_TYPE_IO */
32 acpi_rs_convert_fixed_io, /* 0x05, ACPI_RESOURCE_TYPE_FIXED_IO */
33 acpi_rs_set_vendor, /* 0x06, ACPI_RESOURCE_TYPE_VENDOR */
34 acpi_rs_convert_end_tag, /* 0x07, ACPI_RESOURCE_TYPE_END_TAG */
35 acpi_rs_convert_memory24, /* 0x08, ACPI_RESOURCE_TYPE_MEMORY24 */
36 acpi_rs_convert_memory32, /* 0x09, ACPI_RESOURCE_TYPE_MEMORY32 */
37 acpi_rs_convert_fixed_memory32, /* 0x0A, ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */
38 acpi_rs_convert_address16, /* 0x0B, ACPI_RESOURCE_TYPE_ADDRESS16 */
39 acpi_rs_convert_address32, /* 0x0C, ACPI_RESOURCE_TYPE_ADDRESS32 */
40 acpi_rs_convert_address64, /* 0x0D, ACPI_RESOURCE_TYPE_ADDRESS64 */
41 acpi_rs_convert_ext_address64, /* 0x0E, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
42 acpi_rs_convert_ext_irq, /* 0x0F, ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
43 acpi_rs_convert_generic_reg, /* 0x10, ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
44 acpi_rs_convert_gpio, /* 0x11, ACPI_RESOURCE_TYPE_GPIO */
45 acpi_rs_convert_fixed_dma, /* 0x12, ACPI_RESOURCE_TYPE_FIXED_DMA */
46 NULL, /* 0x13, ACPI_RESOURCE_TYPE_SERIAL_BUS - Use subtype table below */
47 acpi_rs_convert_pin_function, /* 0x14, ACPI_RESOURCE_TYPE_PIN_FUNCTION */
48 acpi_rs_convert_pin_config, /* 0x15, ACPI_RESOURCE_TYPE_PIN_CONFIG */
49 acpi_rs_convert_pin_group, /* 0x16, ACPI_RESOURCE_TYPE_PIN_GROUP */
50 acpi_rs_convert_pin_group_function, /* 0x17, ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */
51 acpi_rs_convert_pin_group_config, /* 0x18, ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */
52};
53
54/* Dispatch tables for AML-to-resource (Get Resource) conversion functions */
55
56struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = {
57 /* Small descriptors */
58
59 NULL, /* 0x00, Reserved */
60 NULL, /* 0x01, Reserved */
61 NULL, /* 0x02, Reserved */
62 NULL, /* 0x03, Reserved */
63 acpi_rs_get_irq, /* 0x04, ACPI_RESOURCE_NAME_IRQ */
64 acpi_rs_convert_dma, /* 0x05, ACPI_RESOURCE_NAME_DMA */
65 acpi_rs_get_start_dpf, /* 0x06, ACPI_RESOURCE_NAME_START_DEPENDENT */
66 acpi_rs_convert_end_dpf, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */
67 acpi_rs_convert_io, /* 0x08, ACPI_RESOURCE_NAME_IO */
68 acpi_rs_convert_fixed_io, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO */
69 acpi_rs_convert_fixed_dma, /* 0x0A, ACPI_RESOURCE_NAME_FIXED_DMA */
70 NULL, /* 0x0B, Reserved */
71 NULL, /* 0x0C, Reserved */
72 NULL, /* 0x0D, Reserved */
73 acpi_rs_get_vendor_small, /* 0x0E, ACPI_RESOURCE_NAME_VENDOR_SMALL */
74 acpi_rs_convert_end_tag, /* 0x0F, ACPI_RESOURCE_NAME_END_TAG */
75
76 /* Large descriptors */
77
78 NULL, /* 0x00, Reserved */
79 acpi_rs_convert_memory24, /* 0x01, ACPI_RESOURCE_NAME_MEMORY24 */
80 acpi_rs_convert_generic_reg, /* 0x02, ACPI_RESOURCE_NAME_GENERIC_REGISTER */
81 NULL, /* 0x03, Reserved */
82 acpi_rs_get_vendor_large, /* 0x04, ACPI_RESOURCE_NAME_VENDOR_LARGE */
83 acpi_rs_convert_memory32, /* 0x05, ACPI_RESOURCE_NAME_MEMORY32 */
84 acpi_rs_convert_fixed_memory32, /* 0x06, ACPI_RESOURCE_NAME_FIXED_MEMORY32 */
85 acpi_rs_convert_address32, /* 0x07, ACPI_RESOURCE_NAME_ADDRESS32 */
86 acpi_rs_convert_address16, /* 0x08, ACPI_RESOURCE_NAME_ADDRESS16 */
87 acpi_rs_convert_ext_irq, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_IRQ */
88 acpi_rs_convert_address64, /* 0x0A, ACPI_RESOURCE_NAME_ADDRESS64 */
89 acpi_rs_convert_ext_address64, /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */
90 acpi_rs_convert_gpio, /* 0x0C, ACPI_RESOURCE_NAME_GPIO */
91 acpi_rs_convert_pin_function, /* 0x0D, ACPI_RESOURCE_NAME_PIN_FUNCTION */
92 NULL, /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use subtype table below */
93 acpi_rs_convert_pin_config, /* 0x0F, ACPI_RESOURCE_NAME_PIN_CONFIG */
94 acpi_rs_convert_pin_group, /* 0x10, ACPI_RESOURCE_NAME_PIN_GROUP */
95 acpi_rs_convert_pin_group_function, /* 0x11, ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION */
96 acpi_rs_convert_pin_group_config, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG */
97};
98
99/* Subtype table for serial_bus -- I2C, SPI, and UART */
100
101struct acpi_rsconvert_info *acpi_gbl_convert_resource_serial_bus_dispatch[] = {
102 NULL,
103 acpi_rs_convert_i2c_serial_bus,
104 acpi_rs_convert_spi_serial_bus,
105 acpi_rs_convert_uart_serial_bus,
106};
107
108#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
109
110/* Dispatch table for resource dump functions */
111
112struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = {
113 acpi_rs_dump_irq, /* ACPI_RESOURCE_TYPE_IRQ */
114 acpi_rs_dump_dma, /* ACPI_RESOURCE_TYPE_DMA */
115 acpi_rs_dump_start_dpf, /* ACPI_RESOURCE_TYPE_START_DEPENDENT */
116 acpi_rs_dump_end_dpf, /* ACPI_RESOURCE_TYPE_END_DEPENDENT */
117 acpi_rs_dump_io, /* ACPI_RESOURCE_TYPE_IO */
118 acpi_rs_dump_fixed_io, /* ACPI_RESOURCE_TYPE_FIXED_IO */
119 acpi_rs_dump_vendor, /* ACPI_RESOURCE_TYPE_VENDOR */
120 acpi_rs_dump_end_tag, /* ACPI_RESOURCE_TYPE_END_TAG */
121 acpi_rs_dump_memory24, /* ACPI_RESOURCE_TYPE_MEMORY24 */
122 acpi_rs_dump_memory32, /* ACPI_RESOURCE_TYPE_MEMORY32 */
123 acpi_rs_dump_fixed_memory32, /* ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */
124 acpi_rs_dump_address16, /* ACPI_RESOURCE_TYPE_ADDRESS16 */
125 acpi_rs_dump_address32, /* ACPI_RESOURCE_TYPE_ADDRESS32 */
126 acpi_rs_dump_address64, /* ACPI_RESOURCE_TYPE_ADDRESS64 */
127 acpi_rs_dump_ext_address64, /* ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
128 acpi_rs_dump_ext_irq, /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
129 acpi_rs_dump_generic_reg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
130 acpi_rs_dump_gpio, /* ACPI_RESOURCE_TYPE_GPIO */
131 acpi_rs_dump_fixed_dma, /* ACPI_RESOURCE_TYPE_FIXED_DMA */
132 NULL, /* ACPI_RESOURCE_TYPE_SERIAL_BUS */
133 acpi_rs_dump_pin_function, /* ACPI_RESOURCE_TYPE_PIN_FUNCTION */
134 acpi_rs_dump_pin_config, /* ACPI_RESOURCE_TYPE_PIN_CONFIG */
135 acpi_rs_dump_pin_group, /* ACPI_RESOURCE_TYPE_PIN_GROUP */
136 acpi_rs_dump_pin_group_function, /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */
137 acpi_rs_dump_pin_group_config, /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */
138};
139
140struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = {
141 NULL,
142 acpi_rs_dump_i2c_serial_bus, /* AML_RESOURCE_I2C_BUS_TYPE */
143 acpi_rs_dump_spi_serial_bus, /* AML_RESOURCE_SPI_BUS_TYPE */
144 acpi_rs_dump_uart_serial_bus, /* AML_RESOURCE_UART_BUS_TYPE */
145};
146#endif
147
148/*
149 * Base sizes for external AML resource descriptors, indexed by internal type.
150 * Includes size of the descriptor header (1 byte for small descriptors,
151 * 3 bytes for large descriptors)
152 */
153const u8 acpi_gbl_aml_resource_sizes[] = {
154 sizeof(struct aml_resource_irq), /* ACPI_RESOURCE_TYPE_IRQ (optional Byte 3 always created) */
155 sizeof(struct aml_resource_dma), /* ACPI_RESOURCE_TYPE_DMA */
156 sizeof(struct aml_resource_start_dependent), /* ACPI_RESOURCE_TYPE_START_DEPENDENT (optional Byte 1 always created) */
157 sizeof(struct aml_resource_end_dependent), /* ACPI_RESOURCE_TYPE_END_DEPENDENT */
158 sizeof(struct aml_resource_io), /* ACPI_RESOURCE_TYPE_IO */
159 sizeof(struct aml_resource_fixed_io), /* ACPI_RESOURCE_TYPE_FIXED_IO */
160 sizeof(struct aml_resource_vendor_small), /* ACPI_RESOURCE_TYPE_VENDOR */
161 sizeof(struct aml_resource_end_tag), /* ACPI_RESOURCE_TYPE_END_TAG */
162 sizeof(struct aml_resource_memory24), /* ACPI_RESOURCE_TYPE_MEMORY24 */
163 sizeof(struct aml_resource_memory32), /* ACPI_RESOURCE_TYPE_MEMORY32 */
164 sizeof(struct aml_resource_fixed_memory32), /* ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */
165 sizeof(struct aml_resource_address16), /* ACPI_RESOURCE_TYPE_ADDRESS16 */
166 sizeof(struct aml_resource_address32), /* ACPI_RESOURCE_TYPE_ADDRESS32 */
167 sizeof(struct aml_resource_address64), /* ACPI_RESOURCE_TYPE_ADDRESS64 */
168 sizeof(struct aml_resource_extended_address64), /*ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
169 sizeof(struct aml_resource_extended_irq), /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
170 sizeof(struct aml_resource_generic_register), /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
171 sizeof(struct aml_resource_gpio), /* ACPI_RESOURCE_TYPE_GPIO */
172 sizeof(struct aml_resource_fixed_dma), /* ACPI_RESOURCE_TYPE_FIXED_DMA */
173 sizeof(struct aml_resource_common_serialbus), /* ACPI_RESOURCE_TYPE_SERIAL_BUS */
174 sizeof(struct aml_resource_pin_function), /* ACPI_RESOURCE_TYPE_PIN_FUNCTION */
175 sizeof(struct aml_resource_pin_config), /* ACPI_RESOURCE_TYPE_PIN_CONFIG */
176 sizeof(struct aml_resource_pin_group), /* ACPI_RESOURCE_TYPE_PIN_GROUP */
177 sizeof(struct aml_resource_pin_group_function), /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */
178 sizeof(struct aml_resource_pin_group_config), /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */
179};
180
181const u8 acpi_gbl_resource_struct_sizes[] = {
182 /* Small descriptors */
183
184 0,
185 0,
186 0,
187 0,
188 ACPI_RS_SIZE(struct acpi_resource_irq),
189 ACPI_RS_SIZE(struct acpi_resource_dma),
190 ACPI_RS_SIZE(struct acpi_resource_start_dependent),
191 ACPI_RS_SIZE_MIN,
192 ACPI_RS_SIZE(struct acpi_resource_io),
193 ACPI_RS_SIZE(struct acpi_resource_fixed_io),
194 ACPI_RS_SIZE(struct acpi_resource_fixed_dma),
195 0,
196 0,
197 0,
198 ACPI_RS_SIZE(struct acpi_resource_vendor),
199 ACPI_RS_SIZE_MIN,
200
201 /* Large descriptors */
202
203 0,
204 ACPI_RS_SIZE(struct acpi_resource_memory24),
205 ACPI_RS_SIZE(struct acpi_resource_generic_register),
206 0,
207 ACPI_RS_SIZE(struct acpi_resource_vendor),
208 ACPI_RS_SIZE(struct acpi_resource_memory32),
209 ACPI_RS_SIZE(struct acpi_resource_fixed_memory32),
210 ACPI_RS_SIZE(struct acpi_resource_address32),
211 ACPI_RS_SIZE(struct acpi_resource_address16),
212 ACPI_RS_SIZE(struct acpi_resource_extended_irq),
213 ACPI_RS_SIZE(struct acpi_resource_address64),
214 ACPI_RS_SIZE(struct acpi_resource_extended_address64),
215 ACPI_RS_SIZE(struct acpi_resource_gpio),
216 ACPI_RS_SIZE(struct acpi_resource_pin_function),
217 ACPI_RS_SIZE(struct acpi_resource_common_serialbus),
218 ACPI_RS_SIZE(struct acpi_resource_pin_config),
219 ACPI_RS_SIZE(struct acpi_resource_pin_group),
220 ACPI_RS_SIZE(struct acpi_resource_pin_group_function),
221 ACPI_RS_SIZE(struct acpi_resource_pin_group_config),
222};
223
224const u8 acpi_gbl_aml_resource_serial_bus_sizes[] = {
225 0,
226 sizeof(struct aml_resource_i2c_serialbus),
227 sizeof(struct aml_resource_spi_serialbus),
228 sizeof(struct aml_resource_uart_serialbus),
229};
230
231const u8 acpi_gbl_resource_struct_serial_bus_sizes[] = {
232 0,
233 ACPI_RS_SIZE(struct acpi_resource_i2c_serialbus),
234 ACPI_RS_SIZE(struct acpi_resource_spi_serialbus),
235 ACPI_RS_SIZE(struct acpi_resource_uart_serialbus),
236};