Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83983?usp=email )
Change subject: util/sconfig: Probe device when fw_config is unprovisioned ......................................................................
util/sconfig: Probe device when fw_config is unprovisioned
When fw_config is unprovisioned (eg. in the factory), devices that do not have any probe list are enabled by default and those that have probe list are disabled. On mainboards that support multiple types of boot critical devices (eg. storage) through probing fw_config, all of them are disabled when fw_config is unprovisioned. Hence the devices do not boot to OS. Add sconfig fw_config rule `probe unprovisioned` to enable such devices when fw_config is unprovisioned.
BUG=None TEST=Build Brox firmware and boot to OS when fw_config is unprovisioned.
Change-Id: I178f821e077912776d654971924d67203a7c43df Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/include/device/device.h M src/lib/fw_config.c M util/sconfig/lex.yy.c_shipped M util/sconfig/main.c M util/sconfig/sconfig.h M util/sconfig/sconfig.l M util/sconfig/sconfig.tab.c_shipped M util/sconfig/sconfig.tab.h_shipped M util/sconfig/sconfig.y 9 files changed, 298 insertions(+), 260 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/83983/1
diff --git a/src/include/device/device.h b/src/include/device/device.h index 3eee321..a1a64e2 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -150,6 +150,7 @@
/* Zero-terminated array of fields and options to probe. */ DEVTREE_CONST struct fw_config *probe_list; + bool enable_on_unprovisioned_fw_config; };
/** diff --git a/src/lib/fw_config.c b/src/lib/fw_config.c index 02e2a7d..e032567 100644 --- a/src/lib/fw_config.c +++ b/src/lib/fw_config.c @@ -104,6 +104,10 @@ if (!dev->probe_list) return true;
+ /* If the device wants to be enabled during unprovisioned fw_config */ + if (!fw_config_is_provisioned() && dev->enable_on_unprovisioned_fw_config) + return true; + for (probe = dev->probe_list; probe && probe->mask != 0; probe++) { if (!fw_config_probe(probe)) continue; diff --git a/util/sconfig/lex.yy.c_shipped b/util/sconfig/lex.yy.c_shipped index 3fc7ddc..5554a35 100644 --- a/util/sconfig/lex.yy.c_shipped +++ b/util/sconfig/lex.yy.c_shipped @@ -349,8 +349,8 @@ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 48 -#define YY_END_OF_BUFFER 49 +#define YY_NUM_RULES 49 +#define YY_END_OF_BUFFER 50 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -358,30 +358,31 @@ flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[197] = +static const flex_int16_t yy_accept[209] = { 0, - 0, 0, 49, 47, 1, 3, 47, 47, 47, 43, - 43, 40, 44, 44, 44, 44, 44, 44, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 41, 47, 1, - 3, 47, 0, 47, 47, 0, 2, 43, 44, 47, - 47, 10, 47, 47, 44, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 34, 47, 47, 47, 47, - 47, 16, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 46, 46, 47, 0, 42, 47, 47, 24, 47, - 47, 33, 37, 47, 47, 47, 47, 47, 22, 47, - 32, 47, 47, 47, 17, 7, 47, 20, 21, 47, + 0, 0, 50, 48, 1, 3, 48, 48, 48, 44, + 44, 41, 45, 45, 45, 45, 45, 45, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 42, 48, 1, + 3, 48, 0, 48, 48, 0, 2, 44, 45, 48, + 48, 10, 48, 48, 45, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 35, 48, 48, 48, 48, + 48, 17, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 47, 47, 48, 0, 43, 48, 48, 25, + 48, 48, 34, 38, 48, 48, 48, 48, 48, 23, + 48, 33, 48, 48, 48, 18, 7, 48, 21, 22,
- 9, 47, 47, 28, 47, 29, 8, 47, 0, 47, - 4, 47, 47, 47, 47, 47, 47, 30, 47, 47, - 47, 31, 27, 47, 47, 47, 47, 47, 45, 45, - 6, 47, 47, 47, 13, 47, 47, 47, 47, 47, - 47, 15, 47, 47, 47, 47, 5, 25, 47, 47, - 18, 47, 47, 14, 47, 47, 47, 47, 47, 26, - 35, 47, 47, 47, 47, 47, 47, 47, 11, 47, - 47, 47, 47, 12, 19, 47, 47, 47, 47, 47, - 47, 47, 23, 47, 47, 36, 47, 47, 47, 47, - 47, 47, 39, 47, 38, 0 + 48, 9, 48, 48, 29, 48, 48, 30, 8, 48, + 0, 48, 4, 48, 48, 48, 48, 48, 48, 31, + 48, 48, 48, 32, 28, 48, 48, 48, 48, 48, + 48, 46, 46, 6, 48, 48, 48, 13, 48, 48, + 48, 48, 48, 48, 15, 48, 48, 48, 48, 48, + 5, 26, 48, 48, 19, 48, 48, 14, 48, 48, + 48, 48, 48, 48, 27, 36, 48, 48, 48, 48, + 48, 48, 48, 48, 11, 48, 48, 48, 48, 48, + 12, 20, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 24, 48, 48, 37, 48, 48, 48, 48, 48,
+ 48, 16, 48, 48, 40, 48, 39, 0 } ;
static const YY_CHAR yy_ec[256] = @@ -424,61 +425,63 @@ 1, 1, 1, 1, 1, 1 } ;
-static const flex_int16_t yy_base[204] = +static const flex_int16_t yy_base[216] = { 0, - 0, 0, 265, 0, 262, 266, 260, 35, 39, 36, - 228, 0, 48, 51, 55, 75, 61, 58, 22, 240, - 62, 81, 75, 74, 243, 82, 230, 0, 0, 256, - 266, 104, 252, 109, 74, 253, 266, 0, 108, 111, - 234, 0, 233, 222, 123, 229, 224, 234, 232, 236, - 223, 225, 229, 229, 223, 0, 215, 217, 219, 218, - 220, 0, 66, 216, 210, 210, 115, 220, 212, 218, - 121, 0, 266, 134, 226, 0, 217, 203, 216, 206, - 213, 0, 0, 203, 209, 206, 197, 205, 0, 203, - 0, 203, 193, 192, 0, 0, 195, 0, 0, 201, + 0, 0, 277, 0, 274, 278, 272, 35, 39, 36, + 240, 0, 48, 51, 55, 75, 61, 58, 22, 252, + 62, 81, 75, 74, 255, 82, 48, 0, 0, 269, + 278, 104, 265, 109, 93, 266, 278, 0, 108, 111, + 247, 0, 246, 235, 123, 242, 237, 247, 245, 249, + 236, 238, 242, 242, 236, 0, 228, 230, 232, 231, + 233, 0, 104, 229, 223, 223, 117, 233, 225, 231, + 218, 123, 0, 278, 136, 238, 0, 229, 215, 228, + 218, 225, 0, 0, 215, 221, 218, 209, 217, 0, + 215, 0, 215, 205, 204, 0, 0, 207, 0, 0,
- 0, 193, 192, 0, 183, 0, 0, 206, 205, 180, - 0, 193, 192, 185, 189, 179, 175, 0, 185, 173, - 187, 0, 0, 174, 181, 168, 171, 160, 0, 266, - 0, 172, 176, 168, 0, 167, 169, 165, 167, 157, - 162, 0, 155, 155, 154, 151, 0, 0, 163, 165, - 0, 149, 153, 0, 160, 164, 145, 145, 152, 0, - 0, 144, 143, 45, 153, 139, 149, 119, 0, 136, - 130, 128, 133, 0, 0, 117, 123, 126, 118, 133, - 114, 127, 0, 121, 129, 0, 116, 107, 103, 93, - 63, 49, 0, 57, 0, 266, 45, 155, 157, 159, + 213, 0, 205, 204, 0, 195, 195, 0, 0, 217, + 216, 191, 0, 204, 203, 196, 200, 190, 186, 0, + 196, 184, 198, 0, 0, 185, 192, 179, 182, 171, + 180, 0, 278, 0, 182, 186, 178, 0, 177, 179, + 175, 177, 167, 172, 0, 165, 165, 164, 160, 160, + 0, 0, 172, 174, 0, 158, 162, 0, 169, 173, + 154, 162, 153, 160, 0, 0, 152, 151, 45, 161, + 148, 146, 156, 139, 0, 156, 150, 148, 149, 152, + 0, 0, 136, 129, 132, 127, 123, 138, 119, 132, + 123, 0, 125, 133, 0, 127, 119, 126, 107, 103,
- 161, 163, 165 + 93, 0, 63, 49, 0, 61, 0, 278, 45, 155, + 157, 159, 161, 163, 165 } ;
-static const flex_int16_t yy_def[204] = +static const flex_int16_t yy_def[216] = { 0, - 196, 1, 196, 197, 196, 196, 197, 198, 199, 197, - 10, 197, 10, 10, 10, 10, 10, 10, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 196, - 196, 198, 200, 201, 199, 202, 196, 10, 10, 10, - 197, 197, 197, 197, 10, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 196, 201, 203, 40, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 208, 1, 208, 209, 208, 208, 209, 210, 211, 209, + 10, 209, 10, 10, 10, 10, 10, 10, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 208, + 208, 210, 212, 213, 211, 214, 208, 10, 10, 10, + 209, 209, 209, 209, 10, 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, 208, 213, 215, 40, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
- 197, 197, 197, 197, 197, 197, 197, 197, 196, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 196, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 197, 197, 197, 197, 0, 196, 196, 196, 196, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 208, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 209, 209, 208, 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, 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,
- 196, 196, 196 + 209, 209, 209, 209, 209, 209, 209, 0, 208, 208, + 208, 208, 208, 208, 208 } ;
-static const flex_int16_t yy_nxt[303] = +static const flex_int16_t yy_nxt[315] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 10, 12, 13, 4, 14, 13, 15, 16, 17, 18, 19, 20, @@ -486,72 +489,74 @@ 27, 4, 4, 4, 4, 28, 33, 33, 51, 34, 36, 37, 38, 38, 38, 29, 39, 52, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 170, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 54, 195, 41, 171, 43, 36, 37, 194, 49, 42, - 44, 39, 39, 39, 48, 55, 56, 193, 64, 57, - 50, 45, 61, 58, 96, 97, 59, 65, 62, 46, + 176, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 54, 71, 41, 177, 43, 207, 72, 206, 49, 42, + 44, 39, 39, 39, 48, 55, 56, 205, 64, 57, + 50, 45, 61, 58, 36, 37, 59, 65, 62, 46,
- 63, 66, 47, 60, 68, 33, 33, 69, 72, 192, - 75, 75, 70, 29, 39, 39, 39, 76, 76, 76, - 191, 76, 190, 76, 76, 76, 76, 76, 76, 39, - 39, 39, 101, 102, 106, 75, 75, 107, 108, 189, - 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, - 178, 177, 176, 175, 80, 32, 32, 35, 35, 33, - 33, 74, 74, 36, 36, 75, 75, 174, 173, 172, - 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, + 63, 66, 47, 60, 68, 33, 33, 69, 73, 204, + 76, 76, 70, 29, 39, 39, 39, 77, 77, 77, + 203, 77, 202, 77, 77, 77, 77, 77, 77, 39, + 39, 39, 97, 98, 102, 103, 108, 76, 76, 109, + 110, 201, 200, 199, 198, 197, 196, 195, 194, 193, + 192, 191, 190, 189, 81, 32, 32, 35, 35, 33, + 33, 75, 75, 36, 36, 76, 76, 188, 187, 186, + 185, 184, 183, 182, 181, 180, 179, 178, 175, 174, + 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, + 163, 162, 161, 160, 159, 158, 157, 156, 155, 154,
- 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, 112, 111, 110, - 109, 105, 104, 103, 100, 99, 98, 95, 94, 93, - 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, - 82, 81, 79, 78, 77, 37, 73, 30, 71, 67, - 53, 40, 31, 30, 196, 3, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 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, 112, 111, 107, 106, 105, 104, 101, 100, 99, + 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, + 86, 85, 84, 83, 82, 80, 79, 78, 37, 74, + 30, 67, 53, 40, 31, 30, 208, 3, 208, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 196, 196 + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 208 } ;
-static const flex_int16_t yy_chk[303] = +static const flex_int16_t yy_chk[315] = { 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, 8, 8, 19, 8, - 9, 9, 10, 10, 10, 197, 10, 19, 10, 10, + 9, 9, 10, 10, 10, 209, 10, 19, 10, 10, 10, 10, 10, 10, 13, 13, 13, 14, 14, 14, - 164, 15, 15, 15, 18, 18, 18, 17, 17, 17, - 21, 194, 14, 164, 15, 35, 35, 192, 18, 14, - 15, 16, 16, 16, 17, 21, 21, 191, 24, 21, - 18, 16, 23, 22, 63, 63, 22, 24, 23, 16, + 169, 15, 15, 15, 18, 18, 18, 17, 17, 17, + 21, 27, 14, 169, 15, 206, 27, 204, 18, 14, + 15, 16, 16, 16, 17, 21, 21, 203, 24, 21, + 18, 16, 23, 22, 35, 35, 22, 24, 23, 16,
- 23, 24, 16, 22, 26, 32, 32, 26, 32, 190, + 23, 24, 16, 22, 26, 32, 32, 26, 32, 201, 34, 34, 26, 34, 39, 39, 39, 40, 40, 40, - 189, 40, 188, 40, 40, 40, 40, 40, 40, 45, - 45, 45, 67, 67, 71, 74, 74, 71, 74, 187, - 185, 184, 182, 181, 180, 179, 178, 177, 176, 173, - 172, 171, 170, 168, 45, 198, 198, 199, 199, 200, - 200, 201, 201, 202, 202, 203, 203, 167, 166, 165, - 163, 162, 159, 158, 157, 156, 155, 153, 152, 150, - 149, 146, 145, 144, 143, 141, 140, 139, 138, 137, - 136, 134, 133, 132, 128, 127, 126, 125, 124, 121, + 200, 40, 199, 40, 40, 40, 40, 40, 40, 45, + 45, 45, 63, 63, 67, 67, 72, 75, 75, 72, + 75, 198, 197, 196, 194, 193, 191, 190, 189, 188, + 187, 186, 185, 184, 45, 210, 210, 211, 211, 212, + 212, 213, 213, 214, 214, 215, 215, 183, 180, 179, + 178, 177, 176, 174, 173, 172, 171, 170, 168, 167, + 164, 163, 162, 161, 160, 159, 157, 156, 154, 153, + 150, 149, 148, 147, 146, 144, 143, 142, 141, 140,
- 120, 119, 117, 116, 115, 114, 113, 112, 110, 109, - 108, 105, 103, 102, 100, 97, 94, 93, 92, 90, - 88, 87, 86, 85, 84, 81, 80, 79, 78, 77, - 75, 70, 69, 68, 66, 65, 64, 61, 60, 59, - 58, 57, 55, 54, 53, 52, 51, 50, 49, 48, - 47, 46, 44, 43, 41, 36, 33, 30, 27, 25, - 20, 11, 7, 5, 3, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 139, 137, 136, 135, 131, 130, 129, 128, 127, 126, + 123, 122, 121, 119, 118, 117, 116, 115, 114, 112, + 111, 110, 107, 106, 104, 103, 101, 98, 95, 94, + 93, 91, 89, 88, 87, 86, 85, 82, 81, 80, + 79, 78, 76, 71, 70, 69, 68, 66, 65, 64, + 61, 60, 59, 58, 57, 55, 54, 53, 52, 51, + 50, 49, 48, 47, 46, 44, 43, 41, 36, 33, + 30, 25, 20, 11, 7, 5, 3, 208, 208, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208,
- 196, 196 + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 208 } ;
static yy_state_type yy_last_accepting_state; @@ -816,13 +821,13 @@ 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 >= 197 ) + if ( yy_current_state >= 209 ) 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] != 266 ); + while ( yy_base[yy_current_state] != 278 );
yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -910,111 +915,111 @@ YY_BREAK case 16: YY_RULE_SETUP -{yylval.number=1; return(BOOL);} +{return(FW_CONFIG_UNPROVISIONED);} YY_BREAK case 17: YY_RULE_SETUP -{yylval.number=0; return(BOOL);} +{yylval.number=1; return(BOOL);} YY_BREAK case 18: YY_RULE_SETUP -{yylval.number=3; return(STATUS);} +{yylval.number=0; return(BOOL);} YY_BREAK case 19: YY_RULE_SETUP -{yylval.number=5; return(STATUS);} +{yylval.number=3; return(STATUS);} YY_BREAK case 20: YY_RULE_SETUP -{yylval.number=PCI; return(BUS);} +{yylval.number=5; return(STATUS);} YY_BREAK case 21: YY_RULE_SETUP -{yylval.number=PNP; return(BUS);} +{yylval.number=PCI; return(BUS);} YY_BREAK case 22: YY_RULE_SETUP -{yylval.number=I2C; return(BUS);} +{yylval.number=PNP; return(BUS);} YY_BREAK case 23: YY_RULE_SETUP -{yylval.number=CPU_CLUSTER; return(BUS);} +{yylval.number=I2C; return(BUS);} YY_BREAK case 24: YY_RULE_SETUP -{yylval.number=CPU; return(BUS);} +{yylval.number=CPU_CLUSTER; return(BUS);} YY_BREAK case 25: YY_RULE_SETUP -{yylval.number=DOMAIN; return(BUS);} +{yylval.number=CPU; return(BUS);} YY_BREAK case 26: YY_RULE_SETUP -{yylval.number=GENERIC; return(BUS);} +{yylval.number=DOMAIN; return(BUS);} YY_BREAK case 27: YY_RULE_SETUP -{yylval.number=MMIO; return(BUS);} +{yylval.number=GENERIC; return(BUS);} YY_BREAK case 28: YY_RULE_SETUP -{yylval.number=SPI; return(BUS);} +{yylval.number=MMIO; return(BUS);} YY_BREAK case 29: YY_RULE_SETUP -{yylval.number=USB; return(BUS);} +{yylval.number=SPI; return(BUS);} YY_BREAK case 30: YY_RULE_SETUP -{yylval.number=GPIO; return(BUS);} +{yylval.number=USB; return(BUS);} YY_BREAK case 31: YY_RULE_SETUP -{yylval.number=MDIO; return(BUS);} +{yylval.number=GPIO; return(BUS);} YY_BREAK case 32: YY_RULE_SETUP -{yylval.number=IRQ; return(RESOURCE);} +{yylval.number=MDIO; return(BUS);} YY_BREAK case 33: YY_RULE_SETUP -{yylval.number=DRQ; return(RESOURCE);} +{yylval.number=IRQ; return(RESOURCE);} YY_BREAK case 34: YY_RULE_SETUP -{yylval.number=IO; return(RESOURCE);} +{yylval.number=DRQ; return(RESOURCE);} YY_BREAK case 35: YY_RULE_SETUP -{return(INHERIT);} +{yylval.number=IO; return(RESOURCE);} YY_BREAK case 36: YY_RULE_SETUP -{return(SUBSYSTEMID);} +{return(INHERIT);} YY_BREAK case 37: YY_RULE_SETUP -{return(END);} +{return(SUBSYSTEMID);} YY_BREAK case 38: YY_RULE_SETUP -{return(SLOT_DESC);} +{return(END);} YY_BREAK case 39: YY_RULE_SETUP -{return(SMBIOS_DEV_INFO);} +{return(SLOT_DESC);} 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 @@ -1025,9 +1030,8 @@ {yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);} YY_BREAK case 45: -/* rule 45 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(NUMBER);} YY_BREAK case 46: /* rule 46 can match eol */ @@ -1035,10 +1039,15 @@ {yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);} YY_BREAK case 47: +/* rule 47 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);} + YY_BREAK +case 48: YY_RULE_SETUP {yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);} YY_BREAK -case 48: +case 49: YY_RULE_SETUP ECHO; YY_BREAK @@ -1338,7 +1347,7 @@ 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 >= 197 ) + if ( yy_current_state >= 209 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1366,11 +1375,11 @@ 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 >= 197 ) + if ( yy_current_state >= 209 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 196); + yy_is_jam = (yy_current_state == 208);
return yy_is_jam ? 0 : yy_current_state; } diff --git a/util/sconfig/main.c b/util/sconfig/main.c index acab06a..c06e67e 100644 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -581,6 +581,11 @@ append_fw_config_probe_to_dev(bus->dev, probe); }
+void probe_unprovisioned_fw_config(struct bus *bus) +{ + bus->dev->enable_on_unprovisioned_fw_config = true; +} + static uint64_t compute_fw_config_mask(const struct fw_config_field_bits *bits) { uint64_t mask = 0; @@ -1260,6 +1265,8 @@ fprintf(fil, "\t.sibling = NULL,\n"); if (ptr->probe) fprintf(fil, "\t.probe_list = %s_probe_list,\n", ptr->name); + fprintf(fil, "\t.enable_on_unprovisioned_fw_config = %d,\n", + ptr->enable_on_unprovisioned_fw_config); fprintf(fil, "#if !DEVTREE_EARLY\n"); fprintf(fil, "\t.chip_ops = &%s_ops,\n", chip_ins->chip->name_underscore); @@ -1783,6 +1790,8 @@ * to allow an override to remove a probe from the base device. */ base_dev->probe = override_dev->probe; + base_dev->enable_on_unprovisioned_fw_config = + override_dev->enable_on_unprovisioned_fw_config;
/* Copy SMBIOS slot information from base device */ base_dev->smbios_slot_type = override_dev->smbios_slot_type; diff --git a/util/sconfig/sconfig.h b/util/sconfig/sconfig.h index bb9a98f..5fc8b4f 100644 --- a/util/sconfig/sconfig.h +++ b/util/sconfig/sconfig.h @@ -8,6 +8,7 @@ #include <sys/types.h> #include <unistd.h> #include <errno.h> +#include <stdbool.h>
struct resource; struct resource { @@ -176,6 +177,7 @@
/* List of field+option to probe. */ struct fw_config_probe *probe; + bool enable_on_unprovisioned_fw_config; };
extern struct bus *root_parent; @@ -226,4 +228,6 @@ void append_fw_config_bits(struct fw_config_field_bits **bits, unsigned int start_bit, unsigned int end_bit);
+void probe_unprovisioned_fw_config(struct bus *bus); + void add_device_ops(struct bus *, char *ops_id); diff --git a/util/sconfig/sconfig.l b/util/sconfig/sconfig.l index 0e4e708..e0e3c6b 100644 --- a/util/sconfig/sconfig.l +++ b/util/sconfig/sconfig.l @@ -23,6 +23,7 @@ field {return(FW_CONFIG_FIELD);} option {return(FW_CONFIG_OPTION);} probe {return(FW_CONFIG_PROBE);} +unprovisioned {return(FW_CONFIG_UNPROVISIONED);} on {yylval.number=1; return(BOOL);} off {yylval.number=0; return(BOOL);} hidden {yylval.number=3; return(STATUS);} diff --git a/util/sconfig/sconfig.tab.c_shipped b/util/sconfig/sconfig.tab.c_shipped index 5b10922..b0252cd 100644 --- a/util/sconfig/sconfig.tab.c_shipped +++ b/util/sconfig/sconfig.tab.c_shipped @@ -153,40 +153,41 @@ YYSYMBOL_FW_CONFIG_FIELD = 40, /* FW_CONFIG_FIELD */ YYSYMBOL_FW_CONFIG_OPTION = 41, /* FW_CONFIG_OPTION */ YYSYMBOL_FW_CONFIG_PROBE = 42, /* FW_CONFIG_PROBE */ - YYSYMBOL_PIPE = 43, /* PIPE */ - YYSYMBOL_OPS = 44, /* OPS */ - 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_smbios_slot_desc = 63, /* smbios_slot_desc */ - YYSYMBOL_smbios_dev_info = 64, /* smbios_dev_info */ - 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_ops = 76 /* ops */ + YYSYMBOL_FW_CONFIG_UNPROVISIONED = 43, /* FW_CONFIG_UNPROVISIONED */ + YYSYMBOL_PIPE = 44, /* PIPE */ + YYSYMBOL_OPS = 45, /* OPS */ + 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_smbios_slot_desc = 64, /* smbios_slot_desc */ + YYSYMBOL_smbios_dev_info = 65, /* smbios_dev_info */ + YYSYMBOL_fw_config_table = 66, /* fw_config_table */ + YYSYMBOL_fw_config_table_children = 67, /* fw_config_table_children */ + YYSYMBOL_fw_config_field_children = 68, /* fw_config_field_children */ + YYSYMBOL_fw_config_field_bits = 69, /* fw_config_field_bits */ + YYSYMBOL_fw_config_field_bits_repeating = 70, /* fw_config_field_bits_repeating */ + YYSYMBOL_fw_config_field = 71, /* fw_config_field */ + YYSYMBOL_72_4 = 72, /* $@4 */ + YYSYMBOL_73_5 = 73, /* $@5 */ + YYSYMBOL_74_6 = 74, /* $@6 */ + YYSYMBOL_fw_config_option = 75, /* fw_config_option */ + YYSYMBOL_fw_config_probe = 76, /* fw_config_probe */ + YYSYMBOL_ops = 77 /* ops */ }; typedef enum yysymbol_kind_t yysymbol_kind_t;
@@ -514,19 +515,19 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 94 +#define YYLAST 93
/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 45 +#define YYNTOKENS 46 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 32 /* YYNRULES -- Number of rules. */ -#define YYNRULES 60 +#define YYNRULES 61 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 103 +#define YYNSTATES 104
/* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 299 +#define YYMAXUTOK 300
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -569,7 +570,8 @@ 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 @@ -582,7 +584,7 @@ 61, 63, 67, 67, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 100, 103, 103, 106, 106, 109, 115, 115, 118, 117, 122, 122, 130, 130, 136, 140, - 143 + 143, 146 }; #endif
@@ -604,15 +606,15 @@ "PNP", "I2C", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ", "SLOT_DESC", "SMBIOS_DEV_INFO", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT", "PCIINT", "GENERIC", "SPI", "USB", "MMIO", "GPIO", "MDIO", "FW_CONFIG_TABLE", - "FW_CONFIG_FIELD", "FW_CONFIG_OPTION", "FW_CONFIG_PROBE", "PIPE", "OPS", - "$accept", "devtree", "chipchild_nondev", "chipchild", "chipchildren", - "chipchildren_dev", "devicechildren", "chip", "@1", "device", "@2", "@3", - "alias", "status", "resource", "reference", "registers", "subsystemid", - "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", "ops", YY_NULLPTR + "FW_CONFIG_FIELD", "FW_CONFIG_OPTION", "FW_CONFIG_PROBE", + "FW_CONFIG_UNPROVISIONED", "PIPE", "OPS", "$accept", "devtree", + "chipchild_nondev", "chipchild", "chipchildren", "chipchildren_dev", + "devicechildren", "chip", "@1", "device", "@2", "@3", "alias", "status", + "resource", "reference", "registers", "subsystemid", "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", "ops", YY_NULLPTR };
static const char * @@ -636,17 +638,17 @@ STATE-NUM. */ static const yytype_int8 yypact[] = { - -51, 12, -51, 6, -51, -51, -51, -51, -3, 49, - -51, 7, -51, 10, 23, 24, 49, 14, -51, -51, - -51, -51, 16, 26, 17, 33, 42, -51, -51, 49, - 28, 18, -51, 11, 53, 38, 43, -51, -51, -51, - -51, -51, 34, -51, -12, -51, -51, -51, 45, 11, - -51, -51, -8, 28, 18, -51, -51, 47, -51, -51, + -51, 12, -51, 4, -51, -51, -51, -51, -3, 49, + -51, 11, -51, 10, 23, 24, 49, 29, -51, -51, + -51, -51, 15, 31, 20, 40, 51, -51, -51, 49, + 28, 16, -51, 14, 55, 45, 46, -51, -51, -51, + -51, -51, 35, -51, -12, -51, -51, -51, 50, 14, + -51, -51, -8, 28, 16, -51, -51, 52, -51, -51, -51, -51, -51, -51, -7, 37, 0, -51, -51, -51, - 39, -51, 50, 40, 41, 54, 55, -51, -51, -51, - -51, -51, -51, -51, -51, -51, 5, 58, 57, 59, - 46, 60, -51, -51, 51, 61, -51, 48, -51, -51, - 64, -51, -51 + 39, -51, 53, 42, 43, 3, 56, -51, -51, -51, + -51, -51, -51, -51, -51, -51, 5, 59, 58, 60, + 47, 61, -51, -51, -51, 54, 62, -51, 57, -51, + -51, 63, -51, -51 };
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -663,16 +665,16 @@ 31, 26, 55, 50, 0, 0, 0, 23, 53, 58, 0, 29, 0, 0, 0, 0, 0, 15, 14, 16, 20, 17, 18, 19, 21, 22, 0, 0, 0, 43, - 0, 0, 60, 27, 0, 41, 42, 37, 59, 34, - 40, 38, 39 + 0, 0, 60, 61, 27, 0, 41, 42, 37, 59, + 34, 40, 38, 39 };
/* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -51, -51, 62, -51, -51, 66, 19, -1, -51, -28, - -51, -51, -51, 35, -51, -51, -50, -51, -51, -51, - -51, -51, -16, 52, 29, -51, -51, -51, -51, -51, + -51, -51, 64, -51, -51, 65, 17, -1, -51, -28, + -51, -51, -51, 33, -51, -51, -50, -51, -51, -51, + -51, -51, -16, 44, 36, -51, -51, -51, -51, -51, -51, -51 };
@@ -691,58 +693,58 @@ static const yytype_int8 yytable[] = { 5, 39, 56, 3, 13, 14, 62, 68, 3, 13, - 14, 10, 2, 70, 71, 3, 80, 23, 70, 93, - 45, 46, 24, 7, 22, 52, 72, 73, 28, 57, + 14, 10, 2, 70, 71, 3, 80, 23, 70, 94, + 91, 7, 24, 45, 46, 52, 72, 73, 22, 57, 74, 72, 73, 57, 57, 74, 80, 11, 78, 64, - 25, 26, 75, 33, 76, 30, 34, 75, 35, 76, - 36, 4, 3, 13, 14, 50, 15, 40, 78, 48, - 51, 42, 60, 53, 65, 77, 69, 88, 87, 89, - 90, 91, 92, 94, 95, 97, 96, 98, 100, 101, - 99, 102, 27, 63, 61, 77, 86, 0, 0, 0, - 0, 37, 0, 0, 54 + 25, 26, 75, 28, 30, 76, 92, 75, 33, 34, + 76, 4, 3, 13, 14, 35, 15, 40, 78, 36, + 42, 48, 50, 51, 53, 77, 69, 60, 87, 65, + 88, 89, 90, 93, 95, 96, 98, 97, 99, 101, + 103, 27, 61, 100, 86, 77, 54, 0, 102, 0, + 63, 0, 0, 37 };
static const yytype_int8 yycheck[] = { 1, 29, 14, 3, 4, 5, 14, 14, 3, 4, 5, 14, 0, 13, 14, 3, 66, 7, 13, 14, - 9, 10, 12, 17, 17, 41, 26, 27, 14, 41, + 17, 17, 12, 9, 10, 41, 26, 27, 17, 41, 30, 26, 27, 41, 41, 30, 86, 40, 66, 55, - 17, 17, 42, 17, 44, 29, 29, 42, 15, 44, - 8, 39, 3, 4, 5, 17, 7, 29, 86, 6, - 17, 43, 17, 29, 17, 66, 29, 17, 29, 29, - 29, 17, 17, 15, 17, 29, 17, 17, 17, 31, - 29, 17, 16, 54, 49, 86, 67, -1, -1, -1, - -1, 29, -1, -1, 42 + 17, 17, 42, 14, 29, 45, 43, 42, 17, 29, + 45, 39, 3, 4, 5, 15, 7, 29, 86, 8, + 44, 6, 17, 17, 29, 66, 29, 17, 29, 17, + 17, 29, 29, 17, 15, 17, 29, 17, 17, 17, + 17, 16, 49, 29, 67, 86, 42, -1, 31, -1, + 54, -1, -1, 29 };
/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_int8 yystos[] = { - 0, 46, 0, 3, 39, 52, 65, 17, 66, 53, - 14, 40, 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, 43, 69, 67, 9, 10, 58, 6, 57, - 17, 17, 67, 29, 68, 71, 14, 41, 74, 56, - 17, 58, 14, 69, 67, 17, 51, 55, 14, 29, - 13, 14, 26, 27, 30, 42, 44, 52, 54, 59, - 61, 62, 63, 64, 75, 76, 51, 29, 17, 29, - 29, 17, 17, 14, 15, 17, 17, 29, 17, 29, - 17, 31, 17 + 0, 47, 0, 3, 39, 53, 66, 17, 67, 54, + 14, 40, 71, 4, 5, 7, 48, 51, 53, 55, + 61, 62, 17, 7, 12, 17, 17, 51, 14, 50, + 29, 69, 74, 17, 29, 15, 8, 48, 49, 55, + 29, 73, 44, 70, 68, 9, 10, 59, 6, 58, + 17, 17, 68, 29, 69, 72, 14, 41, 75, 57, + 17, 59, 14, 70, 68, 17, 52, 56, 14, 29, + 13, 14, 26, 27, 30, 42, 45, 53, 55, 60, + 62, 63, 64, 65, 76, 77, 52, 29, 17, 29, + 29, 17, 43, 17, 14, 15, 17, 17, 29, 17, + 29, 17, 31, 17 };
/* 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, 51, 53, 52, 55, 54, 56, 54, - 57, 57, 58, 58, 59, 60, 61, 62, 62, 63, - 63, 63, 64, 64, 65, 66, 66, 67, 67, 68, - 69, 69, 71, 70, 72, 70, 73, 70, 74, 75, - 76 + 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, + 64, 64, 65, 65, 66, 67, 67, 68, 68, 69, + 70, 70, 72, 71, 73, 71, 74, 71, 75, 76, + 76, 77 };
/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -754,7 +756,7 @@ 0, 2, 1, 1, 4, 4, 4, 3, 4, 5, 4, 3, 3, 2, 3, 2, 0, 2, 0, 2, 3, 0, 0, 7, 0, 6, 0, 5, 3, 3, - 2 + 2, 2 };
@@ -1361,7 +1363,11 @@ { add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); } break;
- case 60: /* ops: OPS STRING */ + case 60: /* fw_config_probe: FW_CONFIG_PROBE FW_CONFIG_UNPROVISIONED */ + { probe_unprovisioned_fw_config(cur_parent); } + break; + + case 61: /* ops: OPS STRING */ { add_device_ops(cur_parent, (yyvsp[0].string)); } break;
diff --git a/util/sconfig/sconfig.tab.h_shipped b/util/sconfig/sconfig.tab.h_shipped index eb5b97c..302e082 100644 --- a/util/sconfig/sconfig.tab.h_shipped +++ b/util/sconfig/sconfig.tab.h_shipped @@ -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_ARTHUR_SRC_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED -# define YY_YY_HOME_ARTHUR_SRC_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED +#ifndef YY_YY_SCONFIG_TAB_H_SHIPPED_INCLUDED +# define YY_YY_SCONFIG_TAB_H_SHIPPED_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -94,8 +94,9 @@ FW_CONFIG_FIELD = 295, /* FW_CONFIG_FIELD */ FW_CONFIG_OPTION = 296, /* FW_CONFIG_OPTION */ FW_CONFIG_PROBE = 297, /* FW_CONFIG_PROBE */ - PIPE = 298, /* PIPE */ - OPS = 299 /* OPS */ + FW_CONFIG_UNPROVISIONED = 298, /* FW_CONFIG_UNPROVISIONED */ + PIPE = 299, /* PIPE */ + OPS = 300 /* OPS */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -124,4 +125,4 @@ int yyparse (void);
-#endif /* !YY_YY_HOME_ARTHUR_SRC_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED */ +#endif /* !YY_YY_SCONFIG_TAB_H_SHIPPED_INCLUDED */ diff --git a/util/sconfig/sconfig.y b/util/sconfig/sconfig.y index 8ec103c..ecf2b9a 100644 --- a/util/sconfig/sconfig.y +++ b/util/sconfig/sconfig.y @@ -21,7 +21,7 @@ uint64_t number; }
-%token CHIP DEVICE REGISTER ALIAS REFERENCE ASSOCIATION BOOL STATUS MANDATORY BUS RESOURCE END EQUALS HEX STRING PCI PNP I2C CPU_CLUSTER CPU DOMAIN IRQ DRQ SLOT_DESC SMBIOS_DEV_INFO IO NUMBER SUBSYSTEMID INHERIT PCIINT GENERIC SPI USB MMIO GPIO MDIO FW_CONFIG_TABLE FW_CONFIG_FIELD FW_CONFIG_OPTION FW_CONFIG_PROBE PIPE OPS +%token CHIP DEVICE REGISTER ALIAS REFERENCE ASSOCIATION BOOL STATUS MANDATORY BUS RESOURCE END EQUALS HEX STRING PCI PNP I2C CPU_CLUSTER CPU DOMAIN IRQ DRQ SLOT_DESC SMBIOS_DEV_INFO IO NUMBER SUBSYSTEMID INHERIT PCIINT GENERIC SPI USB MMIO GPIO MDIO FW_CONFIG_TABLE FW_CONFIG_FIELD FW_CONFIG_OPTION FW_CONFIG_PROBE FW_CONFIG_UNPROVISIONED PIPE OPS %% devtree: { cur_parent = root_parent; } | devtree chip | devtree fw_config_table;
@@ -139,6 +139,9 @@ /* probe <field> <option> */ fw_config_probe: FW_CONFIG_PROBE STRING /* == field */ STRING /* == option */ { add_fw_config_probe(cur_parent, $<string>2, $<string>3); } + | /* probe unprovisioned */ + FW_CONFIG_PROBE FW_CONFIG_UNPROVISIONED + { probe_unprovisioned_fw_config(cur_parent); };
ops: OPS STRING /* == global identifier */ { add_device_ops(cur_parent, $<string>2); }