From 437da71d0a9c7f397860efd02ddb03de9fd5b874 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Fri, 3 Sep 2021 16:51:40 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/57370 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Nico Huber --- util/sconfig/lex.yy.c_shipped | 298 +++++++++++++------------ util/sconfig/main.c | 27 +++ util/sconfig/sconfig.h | 7 + util/sconfig/sconfig.l | 1 + util/sconfig/sconfig.tab.c_shipped | 443 +++++++++++++++++++------------------ util/sconfig/sconfig.tab.h_shipped | 45 ++-- util/sconfig/sconfig.y | 10 +- 7 files changed, 443 insertions(+), 388 deletions(-) (limited to 'util') diff --git a/util/sconfig/lex.yy.c_shipped b/util/sconfig/lex.yy.c_shipped index 07cb64b60f..647ec3d796 100644 --- a/util/sconfig/lex.yy.c_shipped +++ b/util/sconfig/lex.yy.c_shipped @@ -349,8 +349,8 @@ static void yynoreturn yy_fatal_error ( const char* msg ); (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 49 -#define YY_END_OF_BUFFER 50 +#define YY_NUM_RULES 50 +#define YY_END_OF_BUFFER 51 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -358,31 +358,31 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[202] = +static const flex_int16_t yy_accept[210] = { 0, - 0, 0, 50, 48, 1, 3, 48, 48, 48, 43, - 43, 40, 44, 48, 44, 44, 44, 44, 44, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 41, - 48, 1, 3, 48, 0, 48, 48, 0, 2, 43, - 44, 48, 48, 48, 9, 48, 48, 44, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 34, 48, - 48, 48, 48, 48, 15, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 47, 47, 48, 0, 42, 48, - 48, 48, 25, 48, 48, 33, 38, 48, 48, 48, - 48, 48, 22, 48, 48, 32, 48, 48, 48, 16, - - 48, 19, 21, 48, 8, 48, 48, 29, 48, 30, - 7, 48, 0, 45, 48, 4, 48, 48, 48, 48, - 48, 48, 31, 48, 48, 48, 48, 48, 28, 48, - 48, 48, 48, 48, 46, 46, 6, 48, 48, 48, - 12, 48, 48, 48, 48, 48, 23, 48, 48, 14, - 48, 48, 48, 48, 5, 26, 48, 48, 17, 48, - 20, 48, 13, 48, 48, 48, 48, 48, 27, 36, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 10, - 48, 48, 48, 11, 48, 18, 48, 48, 48, 35, - 48, 48, 24, 48, 37, 48, 48, 48, 48, 39, - - 0 + 0, 0, 51, 49, 1, 3, 49, 49, 49, 44, + 44, 41, 45, 49, 45, 45, 45, 45, 45, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 42, + 49, 1, 3, 49, 0, 49, 49, 0, 2, 44, + 45, 49, 49, 49, 9, 49, 49, 45, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 34, 49, + 49, 49, 49, 49, 15, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 48, 48, 49, 0, 43, 49, + 49, 49, 25, 49, 49, 33, 38, 49, 49, 49, + 49, 49, 22, 49, 49, 32, 49, 49, 49, 16, + + 49, 19, 21, 49, 8, 49, 49, 29, 49, 30, + 7, 49, 0, 46, 49, 4, 49, 49, 49, 49, + 49, 49, 31, 49, 49, 49, 49, 49, 28, 49, + 49, 49, 49, 49, 47, 47, 6, 49, 49, 49, + 12, 49, 49, 49, 49, 49, 23, 49, 49, 14, + 49, 49, 49, 49, 5, 26, 49, 49, 17, 49, + 20, 49, 13, 49, 49, 49, 49, 49, 27, 36, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 10, + 49, 49, 49, 49, 11, 49, 18, 49, 49, 49, + 49, 35, 49, 49, 49, 24, 49, 49, 37, 49, + + 49, 49, 49, 49, 49, 40, 49, 39, 0 } ; static const YY_CHAR yy_ec[256] = @@ -425,136 +425,140 @@ static const YY_CHAR yy_meta[41] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; -static const flex_int16_t yy_base[209] = +static const flex_int16_t yy_base[217] = { 0, - 0, 0, 274, 0, 271, 275, 269, 39, 43, 40, - 233, 0, 46, 256, 56, 60, 64, 67, 72, 56, - 244, 74, 251, 39, 70, 59, 246, 77, 233, 0, - 0, 263, 275, 108, 259, 112, 116, 260, 275, 0, - 113, 116, 247, 236, 0, 235, 224, 122, 231, 226, - 236, 234, 238, 225, 227, 231, 231, 225, 231, 216, - 216, 217, 219, 221, 0, 208, 216, 210, 210, 117, - 220, 212, 218, 87, 0, 275, 139, 230, 0, 223, - 216, 202, 215, 205, 212, 0, 0, 202, 208, 205, - 196, 204, 0, 202, 192, 0, 196, 200, 190, 0, - - 193, 0, 0, 199, 0, 191, 190, 0, 181, 0, - 0, 208, 207, 0, 178, 0, 191, 190, 183, 187, - 177, 173, 0, 183, 171, 177, 182, 183, 0, 170, - 177, 164, 167, 156, 0, 275, 0, 168, 172, 164, - 0, 163, 165, 161, 163, 168, 0, 152, 157, 0, - 150, 150, 149, 146, 0, 0, 158, 160, 0, 144, - 161, 147, 0, 154, 158, 139, 139, 146, 0, 0, - 132, 124, 123, 121, 132, 118, 128, 118, 110, 0, - 122, 120, 125, 0, 114, 0, 114, 107, 94, 0, - 82, 81, 0, 83, 0, 74, 67, 37, 31, 0, - - 275, 42, 158, 160, 162, 164, 166, 168 + 0, 0, 282, 0, 279, 283, 277, 39, 43, 40, + 241, 0, 46, 264, 56, 60, 64, 67, 72, 56, + 252, 74, 259, 39, 70, 59, 254, 77, 241, 0, + 0, 271, 283, 108, 267, 112, 116, 268, 283, 0, + 113, 116, 255, 244, 0, 243, 232, 122, 239, 234, + 244, 242, 246, 233, 235, 239, 239, 233, 239, 224, + 224, 225, 227, 229, 0, 216, 224, 218, 218, 117, + 228, 220, 226, 87, 0, 283, 139, 238, 0, 231, + 224, 210, 223, 213, 220, 0, 0, 210, 216, 213, + 204, 212, 0, 210, 200, 0, 204, 208, 198, 0, + + 201, 0, 0, 207, 0, 199, 198, 0, 189, 0, + 0, 216, 215, 0, 186, 0, 199, 198, 191, 195, + 185, 181, 0, 191, 179, 185, 190, 191, 0, 178, + 185, 172, 175, 164, 0, 283, 0, 176, 180, 172, + 0, 171, 173, 169, 171, 176, 0, 160, 165, 0, + 158, 158, 157, 154, 0, 0, 166, 168, 0, 152, + 169, 155, 0, 162, 166, 147, 147, 154, 0, 0, + 153, 145, 144, 68, 154, 140, 150, 140, 132, 0, + 136, 130, 128, 133, 0, 122, 0, 116, 122, 125, + 117, 0, 132, 113, 126, 0, 120, 127, 0, 104, + + 106, 94, 78, 65, 37, 0, 31, 0, 283, 42, + 158, 160, 162, 164, 166, 168 } ; -static const flex_int16_t yy_def[209] = +static const flex_int16_t yy_def[217] = { 0, - 201, 1, 201, 202, 201, 201, 202, 203, 204, 202, - 10, 202, 10, 202, 10, 10, 10, 10, 10, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 201, 201, 203, 205, 206, 204, 207, 201, 10, - 10, 10, 202, 202, 202, 202, 202, 10, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 201, 206, 208, 42, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 201, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 201, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - - 0, 201, 201, 201, 201, 201, 201, 201 + 209, 1, 209, 210, 209, 209, 210, 211, 212, 210, + 10, 210, 10, 210, 10, 10, 10, 10, 10, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 209, 209, 211, 213, 214, 212, 215, 209, 10, + 10, 10, 210, 210, 210, 210, 210, 10, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 209, 214, 216, 42, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 209, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 209, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + + 210, 210, 210, 210, 210, 210, 210, 210, 0, 209, + 209, 209, 209, 209, 209, 209 } ; -static const flex_int16_t yy_nxt[316] = +static const flex_int16_t yy_nxt[324] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 10, 12, 13, 13, 14, 4, 4, 4, 15, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 4, 25, 26, 4, 27, 28, 4, 29, 4, 4, 4, 4, 30, - 35, 35, 31, 36, 38, 39, 40, 40, 40, 200, + 35, 35, 31, 36, 38, 39, 40, 40, 40, 208, 41, 41, 41, 41, 41, 62, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 63, 41, 41, 41, 199, + 41, 41, 41, 41, 41, 63, 41, 41, 41, 207, 41, 41, 41, 41, 41, 41, 54, 67, 41, 41, - 41, 44, 57, 46, 48, 55, 68, 198, 45, 47, - 69, 64, 49, 197, 51, 50, 52, 65, 196, 66, - - 195, 58, 59, 71, 110, 60, 72, 111, 53, 35, - 35, 73, 75, 78, 78, 194, 31, 38, 39, 41, - 41, 41, 79, 79, 79, 193, 79, 79, 41, 41, - 41, 192, 79, 79, 79, 79, 79, 79, 105, 106, - 78, 78, 191, 112, 190, 189, 188, 187, 186, 185, - 184, 183, 182, 181, 180, 179, 178, 84, 34, 34, + 41, 44, 57, 46, 48, 55, 68, 181, 45, 47, + 69, 64, 49, 206, 51, 50, 52, 65, 205, 66, + + 182, 58, 59, 71, 110, 60, 72, 111, 53, 35, + 35, 73, 75, 78, 78, 204, 31, 38, 39, 41, + 41, 41, 79, 79, 79, 203, 79, 79, 41, 41, + 41, 202, 79, 79, 79, 79, 79, 79, 105, 106, + 78, 78, 201, 112, 200, 199, 198, 197, 196, 195, + 194, 193, 192, 191, 190, 189, 188, 84, 34, 34, 37, 37, 35, 35, 77, 77, 38, 38, 78, 78, - 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, - 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, - 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, - - 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, - 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, - 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, - 117, 116, 115, 114, 113, 109, 108, 107, 104, 103, - 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, - 92, 91, 90, 89, 88, 87, 86, 85, 83, 82, - 81, 80, 39, 76, 32, 74, 70, 61, 56, 43, - 42, 33, 32, 201, 3, 201, 201, 201, 201, 201, - 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, - 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, - - 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, - 201, 201, 201, 201, 201 + 187, 186, 185, 184, 183, 180, 179, 178, 177, 176, + 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, + 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, + + 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, + 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, + 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, + 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, + 115, 114, 113, 109, 108, 107, 104, 103, 102, 101, + 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, + 90, 89, 88, 87, 86, 85, 83, 82, 81, 80, + 39, 76, 32, 74, 70, 61, 56, 43, 42, 33, + 32, 209, 3, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209 } ; -static const flex_int16_t yy_chk[316] = +static const flex_int16_t yy_chk[324] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 8, 8, 202, 8, 9, 9, 10, 10, 10, 199, + 8, 8, 210, 8, 9, 9, 10, 10, 10, 207, 10, 10, 13, 13, 13, 24, 10, 10, 10, 10, - 10, 10, 15, 15, 15, 24, 16, 16, 16, 198, + 10, 10, 15, 15, 15, 24, 16, 16, 16, 205, 17, 17, 17, 18, 18, 18, 20, 26, 19, 19, - 19, 15, 22, 16, 17, 20, 26, 197, 15, 16, - 26, 25, 17, 196, 18, 17, 19, 25, 194, 25, - - 192, 22, 22, 28, 74, 22, 28, 74, 19, 34, - 34, 28, 34, 36, 36, 191, 36, 37, 37, 41, - 41, 41, 42, 42, 42, 189, 42, 42, 48, 48, - 48, 188, 42, 42, 42, 42, 42, 42, 70, 70, - 77, 77, 187, 77, 185, 183, 182, 181, 179, 178, - 177, 176, 175, 174, 173, 172, 171, 48, 203, 203, - 204, 204, 205, 205, 206, 206, 207, 207, 208, 208, - 168, 167, 166, 165, 164, 162, 161, 160, 158, 157, - 154, 153, 152, 151, 149, 148, 146, 145, 144, 143, - 142, 140, 139, 138, 134, 133, 132, 131, 130, 128, - - 127, 126, 125, 124, 122, 121, 120, 119, 118, 117, - 115, 113, 112, 109, 107, 106, 104, 101, 99, 98, - 97, 95, 94, 92, 91, 90, 89, 88, 85, 84, - 83, 82, 81, 80, 78, 73, 72, 71, 69, 68, - 67, 66, 64, 63, 62, 61, 60, 59, 58, 57, - 56, 55, 54, 53, 52, 51, 50, 49, 47, 46, - 44, 43, 38, 35, 32, 29, 27, 23, 21, 14, - 11, 7, 5, 3, 201, 201, 201, 201, 201, 201, - 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, - 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, - - 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, - 201, 201, 201, 201, 201 + 19, 15, 22, 16, 17, 20, 26, 174, 15, 16, + 26, 25, 17, 204, 18, 17, 19, 25, 203, 25, + + 174, 22, 22, 28, 74, 22, 28, 74, 19, 34, + 34, 28, 34, 36, 36, 202, 36, 37, 37, 41, + 41, 41, 42, 42, 42, 201, 42, 42, 48, 48, + 48, 200, 42, 42, 42, 42, 42, 42, 70, 70, + 77, 77, 198, 77, 197, 195, 194, 193, 191, 190, + 189, 188, 186, 184, 183, 182, 181, 48, 211, 211, + 212, 212, 213, 213, 214, 214, 215, 215, 216, 216, + 179, 178, 177, 176, 175, 173, 172, 171, 168, 167, + 166, 165, 164, 162, 161, 160, 158, 157, 154, 153, + 152, 151, 149, 148, 146, 145, 144, 143, 142, 140, + + 139, 138, 134, 133, 132, 131, 130, 128, 127, 126, + 125, 124, 122, 121, 120, 119, 118, 117, 115, 113, + 112, 109, 107, 106, 104, 101, 99, 98, 97, 95, + 94, 92, 91, 90, 89, 88, 85, 84, 83, 82, + 81, 80, 78, 73, 72, 71, 69, 68, 67, 66, + 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, + 54, 53, 52, 51, 50, 49, 47, 46, 44, 43, + 38, 35, 32, 29, 27, 23, 21, 14, 11, 7, + 5, 3, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209 } ; static yy_state_type yy_last_accepting_state; @@ -819,13 +823,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 202 ) + if ( yy_current_state >= 210 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 275 ); + while ( yy_base[yy_current_state] != 283 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1009,15 +1013,15 @@ YY_RULE_SETUP YY_BREAK case 40: YY_RULE_SETUP -{return(EQUALS);} +{return(SMBIOS_DEV_INFO);} YY_BREAK case 41: YY_RULE_SETUP -{return(PIPE);} +{return(EQUALS);} YY_BREAK case 42: YY_RULE_SETUP -{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);} +{return(PIPE);} YY_BREAK case 43: YY_RULE_SETUP @@ -1029,12 +1033,11 @@ YY_RULE_SETUP YY_BREAK case 45: YY_RULE_SETUP -{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);} +{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);} YY_BREAK case 46: -/* rule 46 can match eol */ YY_RULE_SETUP -{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);} +{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);} YY_BREAK case 47: /* rule 47 can match eol */ @@ -1042,11 +1045,16 @@ YY_RULE_SETUP {yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);} YY_BREAK case 48: +/* rule 48 can match eol */ YY_RULE_SETUP -{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);} +{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);} YY_BREAK case 49: YY_RULE_SETUP +{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);} + YY_BREAK +case 50: +YY_RULE_SETUP ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): @@ -1345,7 +1353,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 202 ) + if ( yy_current_state >= 210 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1373,11 +1381,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 202 ) + if ( yy_current_state >= 210 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 201); + yy_is_jam = (yy_current_state == 209); return yy_is_jam ? 0 : yy_current_state; } diff --git a/util/sconfig/main.c b/util/sconfig/main.c index 685da9dbfe..1de98d481a 100644 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -1023,6 +1023,25 @@ void add_slot_desc(struct bus *bus, char *type, char *length, char *designation, dev->smbios_slot_designation = designation; } +void add_smbios_dev_info(struct bus *bus, long instance_id, const char *refdes) +{ + struct device *dev = bus->dev; + + if (dev->bustype != PCI && dev->bustype != DOMAIN) { + printf("ERROR: 'dev_info' only allowed for PCI devices\n"); + exit(1); + } + + if (instance_id < 0 || instance_id > UINT8_MAX) { + printf("ERROR: SMBIOS dev info instance ID '%ld' out of range\n", instance_id); + exit(1); + } + + dev->smbios_instance_id_valid = 1; + dev->smbios_instance_id = (unsigned int)instance_id; + dev->smbios_refdes = refdes; +} + void add_pci_subsystem_ids(struct bus *bus, int vendor, int device, int inherit) { @@ -1135,6 +1154,14 @@ static void emit_smbios_data(FILE *fil, struct device *ptr) fprintf(fil, "\t.smbios_slot_length = %s,\n", ptr->smbios_slot_length); + /* Fill in SMBIOS type41 fields */ + if (ptr->smbios_instance_id_valid) { + fprintf(fil, "\t.smbios_instance_id_valid = true,\n"); + fprintf(fil, "\t.smbios_instance_id = %u,\n", ptr->smbios_instance_id); + if (ptr->smbios_refdes) + fprintf(fil, "\t.smbios_refdes = \"%s\",\n", ptr->smbios_refdes); + } + fprintf(fil, "#endif\n"); fprintf(fil, "#endif\n"); } diff --git a/util/sconfig/sconfig.h b/util/sconfig/sconfig.h index e6bd5aadd3..5b50cc0158 100644 --- a/util/sconfig/sconfig.h +++ b/util/sconfig/sconfig.h @@ -177,6 +177,11 @@ struct device { /* SMBIOS slot length */ char *smbios_slot_length; + /* SMBIOS type41 fields */ + int smbios_instance_id_valid; + unsigned int smbios_instance_id; + const char *smbios_refdes; + /* List of field+option to probe. */ struct fw_config_probe *probe; }; @@ -203,6 +208,8 @@ void add_ioapic_info(struct bus *bus, int apicid, const char *_srcpin, void add_slot_desc(struct bus *bus, char *type, char *length, char *designation, char *data_width); +void add_smbios_dev_info(struct bus *bus, long instance_id, const char *refdes); + void yyrestart(FILE *input_file); /* Add chip data to tail of queue. */ diff --git a/util/sconfig/sconfig.l b/util/sconfig/sconfig.l index 1111267278..0997ff6444 100755 --- a/util/sconfig/sconfig.l +++ b/util/sconfig/sconfig.l @@ -47,6 +47,7 @@ inherit {return(INHERIT);} subsystemid {return(SUBSYSTEMID);} end {return(END);} smbios_slot_desc {return(SLOT_DESC);} +smbios_dev_info {return(SMBIOS_DEV_INFO);} = {return(EQUALS);} \| {return(PIPE);} 0x[0-9a-fA-F.]+ {yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);} diff --git a/util/sconfig/sconfig.tab.c_shipped b/util/sconfig/sconfig.tab.c_shipped index b07adcb25e..c319a79527 100644 --- a/util/sconfig/sconfig.tab.c_shipped +++ b/util/sconfig/sconfig.tab.c_shipped @@ -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 diff --git a/util/sconfig/sconfig.tab.h_shipped b/util/sconfig/sconfig.tab.h_shipped index 1d96a35ab6..fb14adcf1d 100644 --- a/util/sconfig/sconfig.tab.h_shipped +++ b/util/sconfig/sconfig.tab.h_shipped @@ -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 interface for Yacc-like parsers in C @@ -35,8 +35,8 @@ especially those whose name start with YY_ or yy_. They are private implementation details that can be changed or removed. */ -#ifndef YY_YY_HOME_ICON_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED -# define YY_YY_HOME_ICON_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED +#ifndef YY_YY_HOME_USUARIO_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED +# define YY_YY_HOME_USUARIO_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -79,23 +79,24 @@ extern int yydebug; IRQ = 280, /* IRQ */ DRQ = 281, /* DRQ */ SLOT_DESC = 282, /* SLOT_DESC */ - IO = 283, /* IO */ - NUMBER = 284, /* NUMBER */ - SUBSYSTEMID = 285, /* SUBSYSTEMID */ - INHERIT = 286, /* INHERIT */ - IOAPIC_IRQ = 287, /* IOAPIC_IRQ */ - IOAPIC = 288, /* IOAPIC */ - PCIINT = 289, /* PCIINT */ - GENERIC = 290, /* GENERIC */ - SPI = 291, /* SPI */ - USB = 292, /* USB */ - MMIO = 293, /* MMIO */ - GPIO = 294, /* GPIO */ - FW_CONFIG_TABLE = 295, /* FW_CONFIG_TABLE */ - FW_CONFIG_FIELD = 296, /* FW_CONFIG_FIELD */ - FW_CONFIG_OPTION = 297, /* FW_CONFIG_OPTION */ - FW_CONFIG_PROBE = 298, /* FW_CONFIG_PROBE */ - PIPE = 299 /* PIPE */ + SMBIOS_DEV_INFO = 283, /* SMBIOS_DEV_INFO */ + IO = 284, /* IO */ + NUMBER = 285, /* NUMBER */ + SUBSYSTEMID = 286, /* SUBSYSTEMID */ + INHERIT = 287, /* INHERIT */ + IOAPIC_IRQ = 288, /* IOAPIC_IRQ */ + IOAPIC = 289, /* IOAPIC */ + PCIINT = 290, /* PCIINT */ + GENERIC = 291, /* GENERIC */ + SPI = 292, /* SPI */ + USB = 293, /* USB */ + MMIO = 294, /* MMIO */ + GPIO = 295, /* GPIO */ + FW_CONFIG_TABLE = 296, /* FW_CONFIG_TABLE */ + FW_CONFIG_FIELD = 297, /* FW_CONFIG_FIELD */ + FW_CONFIG_OPTION = 298, /* FW_CONFIG_OPTION */ + FW_CONFIG_PROBE = 299, /* FW_CONFIG_PROBE */ + PIPE = 300 /* PIPE */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -120,6 +121,8 @@ typedef union YYSTYPE YYSTYPE; extern YYSTYPE yylval; + int yyparse (void); -#endif /* !YY_YY_HOME_ICON_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED */ + +#endif /* !YY_YY_HOME_USUARIO_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED */ diff --git a/util/sconfig/sconfig.y b/util/sconfig/sconfig.y index da6d97b1a6..1b611e4b85 100755 --- a/util/sconfig/sconfig.y +++ b/util/sconfig/sconfig.y @@ -21,7 +21,7 @@ static struct fw_config_field_bits *cur_bits; uint64_t number; } -%token CHIP DEVICE 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 FW_CONFIG_PROBE PIPE +%token CHIP DEVICE 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 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 %% devtree: { cur_parent = root_parent; } | devtree chip | devtree fw_config_table; @@ -31,7 +31,7 @@ chipchild: device | chipchild_nondev; chipchildren: chipchildren chipchild | /* empty */ ; chipchildren_dev: device chipchildren | chipchild_nondev chipchildren_dev; -devicechildren: devicechildren device | devicechildren chip | devicechildren resource | devicechildren subsystemid | devicechildren ioapic_irq | devicechildren smbios_slot_desc | devicechildren registers | devicechildren fw_config_probe | /* empty */ ; +devicechildren: devicechildren device | devicechildren chip | devicechildren resource | devicechildren subsystemid | devicechildren ioapic_irq | devicechildren smbios_slot_desc | devicechildren smbios_dev_info | devicechildren registers | devicechildren fw_config_probe | /* empty */ ; chip: CHIP STRING /* == path */ { $$ = new_chip_instance($2); @@ -93,6 +93,12 @@ smbios_slot_desc: SLOT_DESC STRING STRING STRING smbios_slot_desc: SLOT_DESC STRING STRING { add_slot_desc(cur_parent, $2, $3, NULL, NULL); }; +smbios_dev_info: SMBIOS_DEV_INFO NUMBER STRING + { add_smbios_dev_info(cur_parent, strtol($2, NULL, 0), $3); }; + +smbios_dev_info: SMBIOS_DEV_INFO NUMBER + { add_smbios_dev_info(cur_parent, strtol($2, NULL, 0), NULL); }; + /* fw_config: firmware configuration table */ fw_config_table: FW_CONFIG_TABLE fw_config_table_children END { }; -- cgit v1.2.3