SMBIOS/SCONFIG: Allow devtree-defined Type 41 entries
Introduce the `smbios_dev_info` devicetree keyword to specify the instance ID and RefDes (Reference Designation) of onboard devices. Example syntax: device pci 1c.0 on # PCIe Port #1 device pci 00.0 on smbios_dev_info 6 end end device pci 1c.1 on # PCIe Port #2 device pci 00.0 on smbios_dev_info 42 "PCIe-PCI Time Machine" end end The `SMBIOS_TYPE41_PROVIDED_BY_DEVTREE` Kconfig option enables using this syntax to control the generated Type 41 entries. When this option is enabled, Type 41 entries are only autogenerated for devices with a defined instance ID. This avoids having to keep track of which instance IDs have been used for every device class. Using `smbios_dev_info` when `SMBIOS_TYPE41_PROVIDED_BY_DEVTREE` is not enabled will result in a build-time error, as the syntax is meaningless in this case. This is done with preprocessor guards around the Type 41 members in `struct device` and the code which uses the guarded members. Although the preprocessor usage isn't particularly elegant, adjusting the devicetree syntax and/or grammar depending on a Kconfig option is probably even worse. Change-Id: Iecca9ada6ee1000674cb5dd7afd5c309d8e1a64b Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57370 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
committed by
Patrick Georgi
parent
bb03e763de
commit
437da71d0a
@@ -1,4 +1,4 @@
|
||||
/* A Bison parser, made by GNU Bison 3.7.6. */
|
||||
/* A Bison parser, made by GNU Bison 3.8.1. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
USER NAME SPACE" below. */
|
||||
|
||||
/* Identify Bison output, and Bison version. */
|
||||
#define YYBISON 30706
|
||||
#define YYBISON 30801
|
||||
|
||||
/* Bison version string. */
|
||||
#define YYBISON_VERSION "3.7.6"
|
||||
#define YYBISON_VERSION "3.8.1"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@@ -138,54 +138,56 @@ enum yysymbol_kind_t
|
||||
YYSYMBOL_IRQ = 25, /* IRQ */
|
||||
YYSYMBOL_DRQ = 26, /* DRQ */
|
||||
YYSYMBOL_SLOT_DESC = 27, /* SLOT_DESC */
|
||||
YYSYMBOL_IO = 28, /* IO */
|
||||
YYSYMBOL_NUMBER = 29, /* NUMBER */
|
||||
YYSYMBOL_SUBSYSTEMID = 30, /* SUBSYSTEMID */
|
||||
YYSYMBOL_INHERIT = 31, /* INHERIT */
|
||||
YYSYMBOL_IOAPIC_IRQ = 32, /* IOAPIC_IRQ */
|
||||
YYSYMBOL_IOAPIC = 33, /* IOAPIC */
|
||||
YYSYMBOL_PCIINT = 34, /* PCIINT */
|
||||
YYSYMBOL_GENERIC = 35, /* GENERIC */
|
||||
YYSYMBOL_SPI = 36, /* SPI */
|
||||
YYSYMBOL_USB = 37, /* USB */
|
||||
YYSYMBOL_MMIO = 38, /* MMIO */
|
||||
YYSYMBOL_GPIO = 39, /* GPIO */
|
||||
YYSYMBOL_FW_CONFIG_TABLE = 40, /* FW_CONFIG_TABLE */
|
||||
YYSYMBOL_FW_CONFIG_FIELD = 41, /* FW_CONFIG_FIELD */
|
||||
YYSYMBOL_FW_CONFIG_OPTION = 42, /* FW_CONFIG_OPTION */
|
||||
YYSYMBOL_FW_CONFIG_PROBE = 43, /* FW_CONFIG_PROBE */
|
||||
YYSYMBOL_PIPE = 44, /* PIPE */
|
||||
YYSYMBOL_YYACCEPT = 45, /* $accept */
|
||||
YYSYMBOL_devtree = 46, /* devtree */
|
||||
YYSYMBOL_chipchild_nondev = 47, /* chipchild_nondev */
|
||||
YYSYMBOL_chipchild = 48, /* chipchild */
|
||||
YYSYMBOL_chipchildren = 49, /* chipchildren */
|
||||
YYSYMBOL_chipchildren_dev = 50, /* chipchildren_dev */
|
||||
YYSYMBOL_devicechildren = 51, /* devicechildren */
|
||||
YYSYMBOL_chip = 52, /* chip */
|
||||
YYSYMBOL_53_1 = 53, /* @1 */
|
||||
YYSYMBOL_device = 54, /* device */
|
||||
YYSYMBOL_55_2 = 55, /* @2 */
|
||||
YYSYMBOL_56_3 = 56, /* @3 */
|
||||
YYSYMBOL_alias = 57, /* alias */
|
||||
YYSYMBOL_status = 58, /* status */
|
||||
YYSYMBOL_resource = 59, /* resource */
|
||||
YYSYMBOL_reference = 60, /* reference */
|
||||
YYSYMBOL_registers = 61, /* registers */
|
||||
YYSYMBOL_subsystemid = 62, /* subsystemid */
|
||||
YYSYMBOL_ioapic_irq = 63, /* ioapic_irq */
|
||||
YYSYMBOL_smbios_slot_desc = 64, /* smbios_slot_desc */
|
||||
YYSYMBOL_fw_config_table = 65, /* fw_config_table */
|
||||
YYSYMBOL_fw_config_table_children = 66, /* fw_config_table_children */
|
||||
YYSYMBOL_fw_config_field_children = 67, /* fw_config_field_children */
|
||||
YYSYMBOL_fw_config_field_bits = 68, /* fw_config_field_bits */
|
||||
YYSYMBOL_fw_config_field_bits_repeating = 69, /* fw_config_field_bits_repeating */
|
||||
YYSYMBOL_fw_config_field = 70, /* fw_config_field */
|
||||
YYSYMBOL_71_4 = 71, /* $@4 */
|
||||
YYSYMBOL_72_5 = 72, /* $@5 */
|
||||
YYSYMBOL_73_6 = 73, /* $@6 */
|
||||
YYSYMBOL_fw_config_option = 74, /* fw_config_option */
|
||||
YYSYMBOL_fw_config_probe = 75 /* fw_config_probe */
|
||||
YYSYMBOL_SMBIOS_DEV_INFO = 28, /* SMBIOS_DEV_INFO */
|
||||
YYSYMBOL_IO = 29, /* IO */
|
||||
YYSYMBOL_NUMBER = 30, /* NUMBER */
|
||||
YYSYMBOL_SUBSYSTEMID = 31, /* SUBSYSTEMID */
|
||||
YYSYMBOL_INHERIT = 32, /* INHERIT */
|
||||
YYSYMBOL_IOAPIC_IRQ = 33, /* IOAPIC_IRQ */
|
||||
YYSYMBOL_IOAPIC = 34, /* IOAPIC */
|
||||
YYSYMBOL_PCIINT = 35, /* PCIINT */
|
||||
YYSYMBOL_GENERIC = 36, /* GENERIC */
|
||||
YYSYMBOL_SPI = 37, /* SPI */
|
||||
YYSYMBOL_USB = 38, /* USB */
|
||||
YYSYMBOL_MMIO = 39, /* MMIO */
|
||||
YYSYMBOL_GPIO = 40, /* GPIO */
|
||||
YYSYMBOL_FW_CONFIG_TABLE = 41, /* FW_CONFIG_TABLE */
|
||||
YYSYMBOL_FW_CONFIG_FIELD = 42, /* FW_CONFIG_FIELD */
|
||||
YYSYMBOL_FW_CONFIG_OPTION = 43, /* FW_CONFIG_OPTION */
|
||||
YYSYMBOL_FW_CONFIG_PROBE = 44, /* FW_CONFIG_PROBE */
|
||||
YYSYMBOL_PIPE = 45, /* PIPE */
|
||||
YYSYMBOL_YYACCEPT = 46, /* $accept */
|
||||
YYSYMBOL_devtree = 47, /* devtree */
|
||||
YYSYMBOL_chipchild_nondev = 48, /* chipchild_nondev */
|
||||
YYSYMBOL_chipchild = 49, /* chipchild */
|
||||
YYSYMBOL_chipchildren = 50, /* chipchildren */
|
||||
YYSYMBOL_chipchildren_dev = 51, /* chipchildren_dev */
|
||||
YYSYMBOL_devicechildren = 52, /* devicechildren */
|
||||
YYSYMBOL_chip = 53, /* chip */
|
||||
YYSYMBOL_54_1 = 54, /* @1 */
|
||||
YYSYMBOL_device = 55, /* device */
|
||||
YYSYMBOL_56_2 = 56, /* @2 */
|
||||
YYSYMBOL_57_3 = 57, /* @3 */
|
||||
YYSYMBOL_alias = 58, /* alias */
|
||||
YYSYMBOL_status = 59, /* status */
|
||||
YYSYMBOL_resource = 60, /* resource */
|
||||
YYSYMBOL_reference = 61, /* reference */
|
||||
YYSYMBOL_registers = 62, /* registers */
|
||||
YYSYMBOL_subsystemid = 63, /* subsystemid */
|
||||
YYSYMBOL_ioapic_irq = 64, /* ioapic_irq */
|
||||
YYSYMBOL_smbios_slot_desc = 65, /* smbios_slot_desc */
|
||||
YYSYMBOL_smbios_dev_info = 66, /* smbios_dev_info */
|
||||
YYSYMBOL_fw_config_table = 67, /* fw_config_table */
|
||||
YYSYMBOL_fw_config_table_children = 68, /* fw_config_table_children */
|
||||
YYSYMBOL_fw_config_field_children = 69, /* fw_config_field_children */
|
||||
YYSYMBOL_fw_config_field_bits = 70, /* fw_config_field_bits */
|
||||
YYSYMBOL_fw_config_field_bits_repeating = 71, /* fw_config_field_bits_repeating */
|
||||
YYSYMBOL_fw_config_field = 72, /* fw_config_field */
|
||||
YYSYMBOL_73_4 = 73, /* $@4 */
|
||||
YYSYMBOL_74_5 = 74, /* $@5 */
|
||||
YYSYMBOL_75_6 = 75, /* $@6 */
|
||||
YYSYMBOL_fw_config_option = 76, /* fw_config_option */
|
||||
YYSYMBOL_fw_config_probe = 77 /* fw_config_probe */
|
||||
};
|
||||
typedef enum yysymbol_kind_t yysymbol_kind_t;
|
||||
|
||||
@@ -343,12 +345,18 @@ typedef int yy_state_fast_t;
|
||||
# define YY_USE(E) /* empty */
|
||||
#endif
|
||||
|
||||
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
|
||||
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
|
||||
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
|
||||
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
|
||||
_Pragma ("GCC diagnostic push") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
|
||||
# else
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
|
||||
_Pragma ("GCC diagnostic push") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
|
||||
# endif
|
||||
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
|
||||
_Pragma ("GCC diagnostic pop")
|
||||
#else
|
||||
@@ -507,19 +515,19 @@ union yyalloc
|
||||
/* YYFINAL -- State number of the termination state. */
|
||||
#define YYFINAL 2
|
||||
/* YYLAST -- Last index in YYTABLE. */
|
||||
#define YYLAST 90
|
||||
#define YYLAST 98
|
||||
|
||||
/* YYNTOKENS -- Number of terminals. */
|
||||
#define YYNTOKENS 45
|
||||
#define YYNTOKENS 46
|
||||
/* YYNNTS -- Number of nonterminals. */
|
||||
#define YYNNTS 31
|
||||
#define YYNNTS 32
|
||||
/* YYNRULES -- Number of rules. */
|
||||
#define YYNRULES 57
|
||||
#define YYNRULES 60
|
||||
/* YYNSTATES -- Number of states. */
|
||||
#define YYNSTATES 101
|
||||
#define YYNSTATES 105
|
||||
|
||||
/* YYMAXUTOK -- Last valid token kind. */
|
||||
#define YYMAXUTOK 299
|
||||
#define YYMAXUTOK 300
|
||||
|
||||
|
||||
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
|
||||
@@ -562,19 +570,21 @@ static const yytype_int8 yytranslate[] =
|
||||
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
||||
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
||||
35, 36, 37, 38, 39, 40, 41, 42, 43, 44
|
||||
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
|
||||
45
|
||||
};
|
||||
|
||||
#if YYDEBUG
|
||||
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
|
||||
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
|
||||
static const yytype_uint8 yyrline[] =
|
||||
{
|
||||
0, 26, 26, 26, 26, 29, 29, 29, 30, 30,
|
||||
31, 31, 32, 32, 34, 34, 34, 34, 34, 34,
|
||||
34, 34, 34, 36, 36, 45, 45, 53, 53, 61,
|
||||
63, 67, 67, 69, 72, 75, 78, 81, 84, 87,
|
||||
90, 93, 97, 100, 100, 103, 103, 106, 112, 112,
|
||||
115, 114, 119, 119, 127, 127, 133, 137
|
||||
34, 34, 34, 34, 36, 36, 45, 45, 53, 53,
|
||||
61, 63, 67, 67, 69, 72, 75, 78, 81, 84,
|
||||
87, 90, 93, 96, 99, 103, 106, 106, 109, 109,
|
||||
112, 118, 118, 121, 120, 125, 125, 133, 133, 139,
|
||||
143
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -594,17 +604,18 @@ static const char *const yytname[] =
|
||||
"REGISTER", "ALIAS", "REFERENCE", "ASSOCIATION", "BOOL", "STATUS",
|
||||
"MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI",
|
||||
"PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ",
|
||||
"SLOT_DESC", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ",
|
||||
"IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO", "GPIO",
|
||||
"FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION",
|
||||
"SLOT_DESC", "SMBIOS_DEV_INFO", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT",
|
||||
"IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO",
|
||||
"GPIO", "FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION",
|
||||
"FW_CONFIG_PROBE", "PIPE", "$accept", "devtree", "chipchild_nondev",
|
||||
"chipchild", "chipchildren", "chipchildren_dev", "devicechildren",
|
||||
"chip", "@1", "device", "@2", "@3", "alias", "status", "resource",
|
||||
"reference", "registers", "subsystemid", "ioapic_irq",
|
||||
"smbios_slot_desc", "fw_config_table", "fw_config_table_children",
|
||||
"fw_config_field_children", "fw_config_field_bits",
|
||||
"fw_config_field_bits_repeating", "fw_config_field", "$@4", "$@5", "$@6",
|
||||
"fw_config_option", "fw_config_probe", YY_NULLPTR
|
||||
"smbios_slot_desc", "smbios_dev_info", "fw_config_table",
|
||||
"fw_config_table_children", "fw_config_field_children",
|
||||
"fw_config_field_bits", "fw_config_field_bits_repeating",
|
||||
"fw_config_field", "$@4", "$@5", "$@6", "fw_config_option",
|
||||
"fw_config_probe", YY_NULLPTR
|
||||
};
|
||||
|
||||
static const char *
|
||||
@@ -614,20 +625,7 @@ yysymbol_name (yysymbol_kind_t yysymbol)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef YYPRINT
|
||||
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
|
||||
(internal) symbol number NUM (which must be that of a token). */
|
||||
static const yytype_int16 yytoknum[] =
|
||||
{
|
||||
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
||||
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
|
||||
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
|
||||
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
|
||||
295, 296, 297, 298, 299
|
||||
};
|
||||
#endif
|
||||
|
||||
#define YYPACT_NINF (-61)
|
||||
#define YYPACT_NINF (-45)
|
||||
|
||||
#define yypact_value_is_default(Yyn) \
|
||||
((Yyn) == YYPACT_NINF)
|
||||
@@ -637,127 +635,129 @@ static const yytype_int16 yytoknum[] =
|
||||
#define yytable_value_is_error(Yyn) \
|
||||
0
|
||||
|
||||
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
||||
STATE-NUM. */
|
||||
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
||||
STATE-NUM. */
|
||||
static const yytype_int8 yypact[] =
|
||||
{
|
||||
-61, 12, -61, -7, -61, -61, -61, -61, -12, 46,
|
||||
-61, 8, -61, 14, 11, 18, 46, 23, -61, -61,
|
||||
-61, -61, 16, 24, 17, 25, 34, -61, -61, 46,
|
||||
26, 10, -61, 13, 51, 41, 42, -61, -61, -61,
|
||||
-61, -61, 31, -61, -3, -61, -61, -61, 44, 13,
|
||||
-61, -61, 2, 26, 10, -61, -61, 45, -61, -61,
|
||||
-61, -61, -61, -61, 6, 35, 0, -61, -61, -61,
|
||||
37, -61, 50, 39, 40, 53, -61, -61, -61, -61,
|
||||
-61, -61, -61, -61, 4, 48, 54, 43, 47, 56,
|
||||
-61, 49, 57, 55, 58, -61, -61, 59, -61, -61,
|
||||
-61
|
||||
-45, 6, -45, 4, -45, -45, -45, -45, -12, 45,
|
||||
-45, 15, -45, 11, 17, 18, 45, -3, -45, -45,
|
||||
-45, -45, 16, 34, 23, 14, 46, -45, -45, 45,
|
||||
25, 19, -45, 10, 51, 42, 43, -45, -45, -45,
|
||||
-45, -45, 31, -45, -7, -45, -45, -45, 49, 10,
|
||||
-45, -45, -6, 25, 19, -45, -45, 50, -45, -45,
|
||||
-45, -45, -45, -45, -2, 32, 0, -45, -45, -45,
|
||||
33, -45, 52, 38, 40, 41, 55, -45, -45, -45,
|
||||
-45, -45, -45, -45, -45, -45, 12, 58, 57, 59,
|
||||
47, 44, 61, -45, 53, 63, -45, 54, 60, -45,
|
||||
-45, 64, -45, -45, -45
|
||||
};
|
||||
|
||||
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
|
||||
Performed when YYTABLE does not specify something else to do. Zero
|
||||
means the default is an error. */
|
||||
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
|
||||
Performed when YYTABLE does not specify something else to do. Zero
|
||||
means the default is an error. */
|
||||
static const yytype_int8 yydefact[] =
|
||||
{
|
||||
2, 0, 1, 0, 44, 3, 4, 23, 0, 0,
|
||||
42, 0, 43, 0, 0, 0, 0, 0, 5, 11,
|
||||
7, 6, 54, 0, 0, 0, 0, 13, 24, 12,
|
||||
52, 49, 46, 0, 29, 0, 0, 9, 10, 8,
|
||||
47, 46, 0, 50, 0, 31, 32, 27, 0, 0,
|
||||
35, 34, 0, 0, 49, 46, 55, 0, 45, 22,
|
||||
30, 25, 53, 48, 0, 0, 0, 22, 51, 56,
|
||||
0, 28, 0, 0, 0, 0, 15, 14, 16, 20,
|
||||
17, 18, 19, 21, 0, 0, 0, 0, 0, 0,
|
||||
26, 0, 41, 36, 0, 57, 33, 40, 37, 38,
|
||||
39
|
||||
2, 0, 1, 0, 47, 3, 4, 24, 0, 0,
|
||||
45, 0, 46, 0, 0, 0, 0, 0, 5, 11,
|
||||
7, 6, 57, 0, 0, 0, 0, 13, 25, 12,
|
||||
55, 52, 49, 0, 30, 0, 0, 9, 10, 8,
|
||||
50, 49, 0, 53, 0, 32, 33, 28, 0, 0,
|
||||
36, 35, 0, 0, 52, 49, 58, 0, 48, 23,
|
||||
31, 26, 56, 51, 0, 0, 0, 23, 54, 59,
|
||||
0, 29, 0, 0, 0, 0, 0, 15, 14, 16,
|
||||
21, 17, 18, 19, 20, 22, 0, 0, 0, 44,
|
||||
0, 0, 0, 27, 0, 42, 43, 37, 0, 60,
|
||||
34, 41, 38, 39, 40
|
||||
};
|
||||
|
||||
/* YYPGOTO[NTERM-NUM]. */
|
||||
/* YYPGOTO[NTERM-NUM]. */
|
||||
static const yytype_int8 yypgoto[] =
|
||||
{
|
||||
-61, -61, 60, -61, -61, 61, 15, -1, -61, -28,
|
||||
-61, -61, -61, 30, -61, -61, -60, -61, -61, -61,
|
||||
-61, -61, -22, 33, 36, -61, -61, -61, -61, -61,
|
||||
-61
|
||||
-45, -45, 62, -45, -45, 66, 8, -1, -45, -28,
|
||||
-45, -45, -45, 35, -45, -45, -44, -45, -45, -45,
|
||||
-45, -45, -45, -31, 56, 39, -45, -45, -45, -45,
|
||||
-45, -45
|
||||
};
|
||||
|
||||
/* YYDEFGOTO[NTERM-NUM]. */
|
||||
/* YYDEFGOTO[NTERM-NUM]. */
|
||||
static const yytype_int8 yydefgoto[] =
|
||||
{
|
||||
0, 1, 16, 38, 29, 17, 66, 18, 9, 19,
|
||||
67, 59, 49, 47, 78, 20, 21, 80, 81, 82,
|
||||
6, 8, 44, 31, 43, 12, 55, 41, 32, 58,
|
||||
83
|
||||
67, 59, 49, 47, 79, 20, 21, 81, 82, 83,
|
||||
84, 6, 8, 44, 31, 43, 12, 55, 41, 32,
|
||||
58, 85
|
||||
};
|
||||
|
||||
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
|
||||
positive, shift that token. If negative, reduce the rule whose
|
||||
number is the opposite. If YYTABLE_NINF, syntax error. */
|
||||
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
|
||||
positive, shift that token. If negative, reduce the rule whose
|
||||
number is the opposite. If YYTABLE_NINF, syntax error. */
|
||||
static const yytype_int8 yytable[] =
|
||||
{
|
||||
5, 39, 10, 3, 13, 14, 79, 3, 13, 14,
|
||||
7, 56, 2, 70, 71, 3, 62, 70, 90, 52,
|
||||
68, 23, 45, 46, 79, 22, 24, 72, 25, 11,
|
||||
73, 72, 74, 64, 73, 26, 74, 28, 77, 57,
|
||||
35, 33, 36, 75, 57, 30, 34, 75, 57, 3,
|
||||
13, 14, 4, 15, 42, 40, 77, 48, 50, 51,
|
||||
53, 60, 65, 91, 69, 76, 85, 86, 87, 88,
|
||||
89, 92, 93, 95, 97, 54, 100, 27, 96, 61,
|
||||
0, 94, 84, 76, 0, 0, 98, 99, 0, 37,
|
||||
63
|
||||
5, 39, 10, 3, 13, 14, 2, 56, 62, 3,
|
||||
52, 28, 68, 70, 71, 3, 13, 14, 23, 45,
|
||||
46, 7, 80, 24, 64, 70, 93, 72, 73, 35,
|
||||
11, 74, 22, 75, 25, 26, 57, 57, 78, 72,
|
||||
73, 57, 80, 74, 76, 75, 30, 4, 3, 13,
|
||||
14, 33, 15, 34, 36, 40, 76, 48, 78, 50,
|
||||
51, 53, 69, 87, 42, 77, 60, 65, 89, 88,
|
||||
90, 91, 92, 94, 95, 86, 96, 97, 99, 98,
|
||||
101, 104, 27, 100, 61, 77, 102, 0, 0, 0,
|
||||
103, 37, 0, 63, 0, 0, 0, 0, 54
|
||||
};
|
||||
|
||||
static const yytype_int8 yycheck[] =
|
||||
{
|
||||
1, 29, 14, 3, 4, 5, 66, 3, 4, 5,
|
||||
17, 14, 0, 13, 14, 3, 14, 13, 14, 41,
|
||||
14, 7, 9, 10, 84, 17, 12, 27, 17, 41,
|
||||
30, 27, 32, 55, 30, 17, 32, 14, 66, 42,
|
||||
15, 17, 8, 43, 42, 29, 29, 43, 42, 3,
|
||||
4, 5, 40, 7, 44, 29, 84, 6, 17, 17,
|
||||
29, 17, 17, 15, 29, 66, 29, 17, 29, 29,
|
||||
17, 17, 29, 17, 17, 42, 17, 16, 29, 49,
|
||||
-1, 34, 67, 84, -1, -1, 31, 29, -1, 29,
|
||||
54
|
||||
1, 29, 14, 3, 4, 5, 0, 14, 14, 3,
|
||||
41, 14, 14, 13, 14, 3, 4, 5, 7, 9,
|
||||
10, 17, 66, 12, 55, 13, 14, 27, 28, 15,
|
||||
42, 31, 17, 33, 17, 17, 43, 43, 66, 27,
|
||||
28, 43, 86, 31, 44, 33, 30, 41, 3, 4,
|
||||
5, 17, 7, 30, 8, 30, 44, 6, 86, 17,
|
||||
17, 30, 30, 30, 45, 66, 17, 17, 30, 17,
|
||||
30, 30, 17, 15, 17, 67, 17, 30, 17, 35,
|
||||
17, 17, 16, 30, 49, 86, 32, -1, -1, -1,
|
||||
30, 29, -1, 54, -1, -1, -1, -1, 42
|
||||
};
|
||||
|
||||
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
||||
symbol of state STATE-NUM. */
|
||||
/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
|
||||
state STATE-NUM. */
|
||||
static const yytype_int8 yystos[] =
|
||||
{
|
||||
0, 46, 0, 3, 40, 52, 65, 17, 66, 53,
|
||||
14, 41, 70, 4, 5, 7, 47, 50, 52, 54,
|
||||
60, 61, 17, 7, 12, 17, 17, 50, 14, 49,
|
||||
29, 68, 73, 17, 29, 15, 8, 47, 48, 54,
|
||||
29, 72, 44, 69, 67, 9, 10, 58, 6, 57,
|
||||
17, 17, 67, 29, 68, 71, 14, 42, 74, 56,
|
||||
17, 58, 14, 69, 67, 17, 51, 55, 14, 29,
|
||||
13, 14, 27, 30, 32, 43, 52, 54, 59, 61,
|
||||
62, 63, 64, 75, 51, 29, 17, 29, 29, 17,
|
||||
14, 15, 17, 29, 34, 17, 29, 17, 31, 29,
|
||||
17
|
||||
0, 47, 0, 3, 41, 53, 67, 17, 68, 54,
|
||||
14, 42, 72, 4, 5, 7, 48, 51, 53, 55,
|
||||
61, 62, 17, 7, 12, 17, 17, 51, 14, 50,
|
||||
30, 70, 75, 17, 30, 15, 8, 48, 49, 55,
|
||||
30, 74, 45, 71, 69, 9, 10, 59, 6, 58,
|
||||
17, 17, 69, 30, 70, 73, 14, 43, 76, 57,
|
||||
17, 59, 14, 71, 69, 17, 52, 56, 14, 30,
|
||||
13, 14, 27, 28, 31, 33, 44, 53, 55, 60,
|
||||
62, 63, 64, 65, 66, 77, 52, 30, 17, 30,
|
||||
30, 30, 17, 14, 15, 17, 17, 30, 35, 17,
|
||||
30, 17, 32, 30, 17
|
||||
};
|
||||
|
||||
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
||||
/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
|
||||
static const yytype_int8 yyr1[] =
|
||||
{
|
||||
0, 45, 46, 46, 46, 47, 47, 47, 48, 48,
|
||||
49, 49, 50, 50, 51, 51, 51, 51, 51, 51,
|
||||
51, 51, 51, 53, 52, 55, 54, 56, 54, 57,
|
||||
57, 58, 58, 59, 60, 61, 62, 62, 63, 64,
|
||||
64, 64, 65, 66, 66, 67, 67, 68, 69, 69,
|
||||
71, 70, 72, 70, 73, 70, 74, 75
|
||||
0, 46, 47, 47, 47, 48, 48, 48, 49, 49,
|
||||
50, 50, 51, 51, 52, 52, 52, 52, 52, 52,
|
||||
52, 52, 52, 52, 54, 53, 56, 55, 57, 55,
|
||||
58, 58, 59, 59, 60, 61, 62, 63, 63, 64,
|
||||
65, 65, 65, 66, 66, 67, 68, 68, 69, 69,
|
||||
70, 71, 71, 73, 72, 74, 72, 75, 72, 76,
|
||||
77
|
||||
};
|
||||
|
||||
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
|
||||
/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
|
||||
static const yytype_int8 yyr2[] =
|
||||
{
|
||||
0, 2, 0, 2, 2, 1, 1, 1, 1, 1,
|
||||
2, 0, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 0, 0, 5, 0, 8, 0, 7, 0,
|
||||
2, 1, 1, 4, 4, 4, 3, 4, 4, 5,
|
||||
4, 3, 3, 2, 0, 2, 0, 2, 3, 0,
|
||||
0, 7, 0, 6, 0, 5, 3, 3
|
||||
2, 2, 2, 0, 0, 5, 0, 8, 0, 7,
|
||||
0, 2, 1, 1, 4, 4, 4, 3, 4, 4,
|
||||
5, 4, 3, 3, 2, 3, 2, 0, 2, 0,
|
||||
2, 3, 0, 0, 7, 0, 6, 0, 5, 3,
|
||||
3
|
||||
};
|
||||
|
||||
|
||||
@@ -769,6 +769,7 @@ enum { YYENOMEM = -2 };
|
||||
#define YYACCEPT goto yyacceptlab
|
||||
#define YYABORT goto yyabortlab
|
||||
#define YYERROR goto yyerrorlab
|
||||
#define YYNOMEM goto yyexhaustedlab
|
||||
|
||||
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
@@ -809,10 +810,7 @@ do { \
|
||||
YYFPRINTF Args; \
|
||||
} while (0)
|
||||
|
||||
/* This macro is provided for backward compatibility. */
|
||||
# ifndef YY_LOCATION_PRINT
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
# endif
|
||||
|
||||
|
||||
|
||||
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
|
||||
@@ -839,10 +837,6 @@ yy_symbol_value_print (FILE *yyo,
|
||||
YY_USE (yyoutput);
|
||||
if (!yyvaluep)
|
||||
return;
|
||||
# ifdef YYPRINT
|
||||
if (yykind < YYNTOKENS)
|
||||
YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
|
||||
# endif
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
YY_USE (yykind);
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
@@ -1027,6 +1021,7 @@ yyparse (void)
|
||||
YYDPRINTF ((stderr, "Starting parse\n"));
|
||||
|
||||
yychar = YYEMPTY; /* Cause a token to be read. */
|
||||
|
||||
goto yysetstate;
|
||||
|
||||
|
||||
@@ -1052,7 +1047,7 @@ yysetstate:
|
||||
|
||||
if (yyss + yystacksize - 1 <= yyssp)
|
||||
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
|
||||
goto yyexhaustedlab;
|
||||
YYNOMEM;
|
||||
#else
|
||||
{
|
||||
/* Get the current used size of the three stacks, in elements. */
|
||||
@@ -1080,7 +1075,7 @@ yysetstate:
|
||||
# else /* defined YYSTACK_RELOCATE */
|
||||
/* Extend the stack our own way. */
|
||||
if (YYMAXDEPTH <= yystacksize)
|
||||
goto yyexhaustedlab;
|
||||
YYNOMEM;
|
||||
yystacksize *= 2;
|
||||
if (YYMAXDEPTH < yystacksize)
|
||||
yystacksize = YYMAXDEPTH;
|
||||
@@ -1091,7 +1086,7 @@ yysetstate:
|
||||
YY_CAST (union yyalloc *,
|
||||
YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
|
||||
if (! yyptr)
|
||||
goto yyexhaustedlab;
|
||||
YYNOMEM;
|
||||
YYSTACK_RELOCATE (yyss_alloc, yyss);
|
||||
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
|
||||
# undef YYSTACK_RELOCATE
|
||||
@@ -1113,6 +1108,7 @@ yysetstate:
|
||||
}
|
||||
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
|
||||
|
||||
|
||||
if (yystate == YYFINAL)
|
||||
YYACCEPT;
|
||||
|
||||
@@ -1228,7 +1224,7 @@ yyreduce:
|
||||
{ cur_parent = root_parent; }
|
||||
break;
|
||||
|
||||
case 23: /* @1: %empty */
|
||||
case 24: /* @1: %empty */
|
||||
{
|
||||
(yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
|
||||
chip_enqueue_tail(cur_chip_instance);
|
||||
@@ -1236,105 +1232,113 @@ yyreduce:
|
||||
}
|
||||
break;
|
||||
|
||||
case 24: /* chip: CHIP STRING @1 chipchildren_dev END */
|
||||
case 25: /* chip: CHIP STRING @1 chipchildren_dev END */
|
||||
{
|
||||
cur_chip_instance = chip_dequeue_tail();
|
||||
}
|
||||
break;
|
||||
|
||||
case 25: /* @2: %empty */
|
||||
case 26: /* @2: %empty */
|
||||
{
|
||||
(yyval.dev) = new_device_raw(cur_parent, cur_chip_instance, (yyvsp[-3].number), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].number));
|
||||
cur_parent = (yyval.dev)->last_bus;
|
||||
}
|
||||
break;
|
||||
|
||||
case 26: /* device: DEVICE BUS NUMBER alias status @2 devicechildren END */
|
||||
case 27: /* device: DEVICE BUS NUMBER alias status @2 devicechildren END */
|
||||
{
|
||||
cur_parent = (yyvsp[-2].dev)->parent;
|
||||
}
|
||||
break;
|
||||
|
||||
case 27: /* @3: %empty */
|
||||
case 28: /* @3: %empty */
|
||||
{
|
||||
(yyval.dev) = new_device_reference(cur_parent, cur_chip_instance, (yyvsp[-1].string), (yyvsp[0].number));
|
||||
cur_parent = (yyval.dev)->last_bus;
|
||||
}
|
||||
break;
|
||||
|
||||
case 28: /* device: DEVICE REFERENCE STRING status @3 devicechildren END */
|
||||
case 29: /* device: DEVICE REFERENCE STRING status @3 devicechildren END */
|
||||
{
|
||||
cur_parent = (yyvsp[-2].dev)->parent;
|
||||
}
|
||||
break;
|
||||
|
||||
case 29: /* alias: %empty */
|
||||
case 30: /* alias: %empty */
|
||||
{
|
||||
(yyval.string) = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case 30: /* alias: ALIAS STRING */
|
||||
case 31: /* alias: ALIAS STRING */
|
||||
{
|
||||
(yyval.string) = (yyvsp[0].string);
|
||||
}
|
||||
break;
|
||||
|
||||
case 33: /* resource: RESOURCE NUMBER EQUALS NUMBER */
|
||||
case 34: /* resource: RESOURCE NUMBER EQUALS NUMBER */
|
||||
{ add_resource(cur_parent, (yyvsp[-3].number), strtol((yyvsp[-2].string), NULL, 0), strtol((yyvsp[0].string), NULL, 0)); }
|
||||
break;
|
||||
|
||||
case 34: /* reference: REFERENCE STRING ASSOCIATION STRING */
|
||||
case 35: /* reference: REFERENCE STRING ASSOCIATION STRING */
|
||||
{ add_reference(cur_chip_instance, (yyvsp[0].string), (yyvsp[-2].string)); }
|
||||
break;
|
||||
|
||||
case 35: /* registers: REGISTER STRING EQUALS STRING */
|
||||
case 36: /* registers: REGISTER STRING EQUALS STRING */
|
||||
{ add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
|
||||
break;
|
||||
|
||||
case 36: /* subsystemid: SUBSYSTEMID NUMBER NUMBER */
|
||||
case 37: /* subsystemid: SUBSYSTEMID NUMBER NUMBER */
|
||||
{ add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
|
||||
break;
|
||||
|
||||
case 37: /* subsystemid: SUBSYSTEMID NUMBER NUMBER INHERIT */
|
||||
case 38: /* subsystemid: SUBSYSTEMID NUMBER NUMBER INHERIT */
|
||||
{ add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
|
||||
break;
|
||||
|
||||
case 38: /* ioapic_irq: IOAPIC_IRQ NUMBER PCIINT NUMBER */
|
||||
case 39: /* ioapic_irq: IOAPIC_IRQ NUMBER PCIINT NUMBER */
|
||||
{ add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
|
||||
break;
|
||||
|
||||
case 39: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING STRING */
|
||||
case 40: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING STRING */
|
||||
{ add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
|
||||
break;
|
||||
|
||||
case 40: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING */
|
||||
case 41: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING */
|
||||
{ add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
|
||||
break;
|
||||
|
||||
case 41: /* smbios_slot_desc: SLOT_DESC STRING STRING */
|
||||
case 42: /* smbios_slot_desc: SLOT_DESC STRING STRING */
|
||||
{ add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
|
||||
break;
|
||||
|
||||
case 42: /* fw_config_table: FW_CONFIG_TABLE fw_config_table_children END */
|
||||
case 43: /* smbios_dev_info: SMBIOS_DEV_INFO NUMBER STRING */
|
||||
{ add_smbios_dev_info(cur_parent, strtol((yyvsp[-1].string), NULL, 0), (yyvsp[0].string)); }
|
||||
break;
|
||||
|
||||
case 44: /* smbios_dev_info: SMBIOS_DEV_INFO NUMBER */
|
||||
{ add_smbios_dev_info(cur_parent, strtol((yyvsp[0].string), NULL, 0), NULL); }
|
||||
break;
|
||||
|
||||
case 45: /* fw_config_table: FW_CONFIG_TABLE fw_config_table_children END */
|
||||
{ }
|
||||
break;
|
||||
|
||||
case 47: /* fw_config_field_bits: NUMBER NUMBER */
|
||||
case 50: /* fw_config_field_bits: NUMBER NUMBER */
|
||||
{
|
||||
append_fw_config_bits(&cur_bits, strtoul((yyvsp[-1].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
|
||||
}
|
||||
break;
|
||||
|
||||
case 50: /* $@4: %empty */
|
||||
case 53: /* $@4: %empty */
|
||||
{ cur_field = new_fw_config_field((yyvsp[-2].string), cur_bits); }
|
||||
break;
|
||||
|
||||
case 51: /* fw_config_field: FW_CONFIG_FIELD STRING fw_config_field_bits fw_config_field_bits_repeating $@4 fw_config_field_children END */
|
||||
case 54: /* fw_config_field: FW_CONFIG_FIELD STRING fw_config_field_bits fw_config_field_bits_repeating $@4 fw_config_field_children END */
|
||||
{ cur_bits = NULL; }
|
||||
break;
|
||||
|
||||
case 52: /* $@5: %empty */
|
||||
case 55: /* $@5: %empty */
|
||||
{
|
||||
cur_bits = NULL;
|
||||
append_fw_config_bits(&cur_bits, strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
|
||||
@@ -1342,25 +1346,25 @@ yyreduce:
|
||||
}
|
||||
break;
|
||||
|
||||
case 53: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END */
|
||||
case 56: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END */
|
||||
{ cur_bits = NULL; }
|
||||
break;
|
||||
|
||||
case 54: /* $@6: %empty */
|
||||
case 57: /* $@6: %empty */
|
||||
{
|
||||
cur_field = get_fw_config_field((yyvsp[0].string));
|
||||
}
|
||||
break;
|
||||
|
||||
case 55: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END */
|
||||
case 58: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END */
|
||||
{ cur_bits = NULL; }
|
||||
break;
|
||||
|
||||
case 56: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER */
|
||||
case 59: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER */
|
||||
{ add_fw_config_option(cur_field, (yyvsp[-1].string), strtoull((yyvsp[0].string), NULL, 0)); }
|
||||
break;
|
||||
|
||||
case 57: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING */
|
||||
case 60: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING */
|
||||
{ add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); }
|
||||
break;
|
||||
|
||||
@@ -1446,6 +1450,7 @@ yyerrorlab:
|
||||
label yyerrorlab therefore never appears in user code. */
|
||||
if (0)
|
||||
YYERROR;
|
||||
++yynerrs;
|
||||
|
||||
/* Do not reclaim the symbols of the rule whose action triggered
|
||||
this YYERROR. */
|
||||
@@ -1506,7 +1511,7 @@ yyerrlab1:
|
||||
`-------------------------------------*/
|
||||
yyacceptlab:
|
||||
yyresult = 0;
|
||||
goto yyreturn;
|
||||
goto yyreturnlab;
|
||||
|
||||
|
||||
/*-----------------------------------.
|
||||
@@ -1514,24 +1519,22 @@ yyacceptlab:
|
||||
`-----------------------------------*/
|
||||
yyabortlab:
|
||||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
goto yyreturnlab;
|
||||
|
||||
|
||||
#if !defined yyoverflow
|
||||
/*-------------------------------------------------.
|
||||
| yyexhaustedlab -- memory exhaustion comes here. |
|
||||
`-------------------------------------------------*/
|
||||
/*-----------------------------------------------------------.
|
||||
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
|
||||
`-----------------------------------------------------------*/
|
||||
yyexhaustedlab:
|
||||
yyerror (YY_("memory exhausted"));
|
||||
yyresult = 2;
|
||||
goto yyreturn;
|
||||
#endif
|
||||
goto yyreturnlab;
|
||||
|
||||
|
||||
/*-------------------------------------------------------.
|
||||
| yyreturn -- parsing is finished, clean up and return. |
|
||||
`-------------------------------------------------------*/
|
||||
yyreturn:
|
||||
/*----------------------------------------------------------.
|
||||
| yyreturnlab -- parsing is finished, clean up and return. |
|
||||
`----------------------------------------------------------*/
|
||||
yyreturnlab:
|
||||
if (yychar != YYEMPTY)
|
||||
{
|
||||
/* Make sure we have latest lookahead translation. See comments at
|
||||
|
Reference in New Issue
Block a user