sconfig: Add support for firmware configuration
This change adds support to sconfig for generating the firmware configuration field and option definitions in devicetree.cb. In addition these fields and options can be used to probe for a device and have that device be disabled if it is not found at boot time. New tokens: fw_config: top level token, table can be defined before chips field: define field in the mask with the start and end bits option: define option in a field with the value of the field probe: indicate that a device should probe by field and option Example: fw_config field FEATURE 0 0 option DISABLE 0 option ENABLE 1 end end chip drivers/generic/feature device generic 0 on probe FEATURE ENABLE end end Variants can add new fields and add new options to existing fields in overridetree.cb but cannot redefine an existing option. Devices can have multiple probe tokens, and the device will be considered to be found if any of them return true. The output from defining this field are: 1) the various fields and options will be added as macro constants to static.h and can be used by fw_config for probing. 2) the probe entries will result in a list of fields/options to probe that is added to the resulting struct device and handled by coreboot. BUG=b:147462631 Signed-off-by: Duncan Laurie <dlaurie@google.com> Change-Id: I8aea63e577d933aea09e0d0b09470929cc96e0de Reviewed-on: https://review.coreboot.org/c/coreboot/+/41440 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
committed by
Duncan Laurie
parent
36e6c6f8d2
commit
47b7b3402b
@@ -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 41
|
||||
#define YY_END_OF_BUFFER 42
|
||||
#define YY_NUM_RULES 45
|
||||
#define YY_END_OF_BUFFER 46
|
||||
/* This struct is not used in this scanner,
|
||||
but its presence is necessary. */
|
||||
struct yy_trans_info
|
||||
@@ -358,27 +358,30 @@ struct yy_trans_info
|
||||
flex_int32_t yy_verify;
|
||||
flex_int32_t yy_nxt;
|
||||
};
|
||||
static const flex_int16_t yy_accept[173] =
|
||||
static const flex_int16_t yy_accept[195] =
|
||||
{ 0,
|
||||
0, 0, 42, 40, 1, 3, 40, 40, 40, 35,
|
||||
35, 33, 36, 40, 36, 36, 36, 40, 40, 40,
|
||||
40, 40, 40, 40, 40, 40, 40, 40, 1, 3,
|
||||
40, 0, 40, 40, 0, 2, 35, 36, 40, 40,
|
||||
40, 40, 36, 40, 40, 40, 40, 40, 40, 40,
|
||||
40, 27, 40, 40, 40, 40, 40, 40, 7, 40,
|
||||
40, 40, 40, 40, 40, 40, 39, 39, 40, 0,
|
||||
34, 40, 40, 17, 40, 40, 26, 31, 40, 40,
|
||||
40, 14, 40, 40, 25, 40, 23, 40, 40, 8,
|
||||
11, 13, 40, 40, 21, 40, 22, 40, 0, 37,
|
||||
0, 0, 46, 44, 1, 3, 44, 44, 44, 39,
|
||||
39, 37, 40, 44, 40, 40, 40, 40, 44, 44,
|
||||
44, 44, 44, 44, 44, 44, 44, 44, 44, 1,
|
||||
3, 44, 0, 44, 44, 0, 2, 39, 40, 44,
|
||||
44, 44, 44, 40, 44, 44, 44, 44, 44, 44,
|
||||
44, 44, 44, 44, 31, 44, 44, 44, 44, 44,
|
||||
44, 11, 44, 44, 44, 44, 44, 44, 44, 44,
|
||||
44, 43, 43, 44, 0, 38, 44, 44, 21, 44,
|
||||
44, 30, 35, 44, 44, 44, 44, 44, 18, 44,
|
||||
44, 29, 44, 27, 44, 44, 12, 44, 15, 17,
|
||||
|
||||
44, 44, 44, 25, 44, 26, 44, 0, 41, 4,
|
||||
44, 44, 44, 28, 44, 44, 44, 44, 44, 44,
|
||||
44, 44, 24, 44, 44, 44, 44, 44, 42, 42,
|
||||
44, 44, 44, 8, 44, 44, 44, 44, 44, 19,
|
||||
44, 44, 10, 44, 44, 44, 44, 5, 22, 44,
|
||||
44, 13, 44, 16, 44, 9, 44, 44, 44, 44,
|
||||
44, 23, 33, 44, 44, 44, 44, 44, 44, 44,
|
||||
44, 44, 6, 44, 44, 44, 7, 44, 14, 44,
|
||||
44, 44, 32, 44, 44, 20, 44, 34, 44, 44,
|
||||
44, 44, 36, 0
|
||||
|
||||
4, 40, 40, 40, 24, 40, 40, 40, 40, 40,
|
||||
40, 20, 40, 40, 40, 38, 38, 40, 40, 40,
|
||||
40, 40, 40, 40, 15, 40, 40, 40, 40, 40,
|
||||
5, 18, 40, 9, 40, 12, 40, 40, 40, 40,
|
||||
40, 19, 29, 40, 40, 40, 40, 40, 40, 40,
|
||||
40, 6, 40, 40, 40, 40, 10, 40, 40, 40,
|
||||
28, 40, 40, 16, 40, 30, 40, 40, 40, 40,
|
||||
32, 0
|
||||
} ;
|
||||
|
||||
static const YY_CHAR yy_ec[256] =
|
||||
@@ -395,8 +398,8 @@ static const YY_CHAR yy_ec[256] =
|
||||
1, 1, 1, 1, 16, 1, 17, 18, 19, 20,
|
||||
|
||||
21, 22, 23, 24, 25, 1, 1, 26, 27, 28,
|
||||
29, 30, 31, 32, 33, 34, 35, 36, 1, 37,
|
||||
38, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
|
||||
39, 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,
|
||||
@@ -413,126 +416,142 @@ static const YY_CHAR yy_ec[256] =
|
||||
1, 1, 1, 1, 1
|
||||
} ;
|
||||
|
||||
static const YY_CHAR yy_meta[39] =
|
||||
static const YY_CHAR yy_meta[40] =
|
||||
{ 0,
|
||||
1, 2, 2, 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, 1, 1, 1, 1
|
||||
} ;
|
||||
|
||||
static const flex_int16_t yy_base[180] =
|
||||
static const flex_int16_t yy_base[202] =
|
||||
{ 0,
|
||||
0, 0, 240, 0, 237, 241, 235, 37, 41, 38,
|
||||
200, 0, 44, 222, 54, 78, 60, 214, 209, 45,
|
||||
49, 48, 42, 52, 212, 62, 199, 0, 229, 241,
|
||||
93, 225, 98, 79, 226, 241, 0, 97, 104, 213,
|
||||
202, 191, 110, 198, 193, 203, 192, 193, 200, 200,
|
||||
194, 200, 185, 185, 195, 185, 187, 189, 0, 185,
|
||||
179, 185, 189, 181, 187, 186, 0, 241, 125, 198,
|
||||
0, 191, 171, 184, 174, 181, 0, 0, 172, 175,
|
||||
175, 0, 173, 163, 0, 167, 0, 171, 161, 0,
|
||||
0, 0, 164, 163, 0, 154, 0, 181, 180, 0,
|
||||
0, 0, 265, 0, 262, 266, 260, 38, 42, 39,
|
||||
224, 0, 45, 247, 55, 79, 61, 58, 239, 234,
|
||||
46, 54, 55, 68, 73, 237, 46, 224, 0, 254,
|
||||
266, 101, 250, 107, 111, 251, 266, 0, 108, 111,
|
||||
238, 227, 216, 117, 223, 218, 228, 217, 225, 229,
|
||||
216, 223, 223, 217, 223, 208, 208, 218, 208, 210,
|
||||
212, 0, 199, 207, 201, 201, 206, 210, 202, 208,
|
||||
207, 0, 266, 132, 219, 0, 212, 192, 205, 195,
|
||||
202, 0, 0, 193, 191, 197, 194, 194, 0, 192,
|
||||
182, 0, 186, 0, 190, 180, 0, 183, 0, 0,
|
||||
|
||||
0, 165, 164, 157, 0, 149, 159, 147, 153, 158,
|
||||
159, 0, 142, 145, 135, 0, 241, 146, 150, 142,
|
||||
144, 140, 142, 147, 0, 131, 130, 130, 129, 126,
|
||||
0, 0, 141, 0, 125, 129, 115, 122, 126, 107,
|
||||
107, 0, 0, 114, 106, 105, 103, 114, 100, 101,
|
||||
94, 0, 105, 102, 99, 83, 0, 80, 83, 70,
|
||||
0, 60, 71, 0, 74, 0, 63, 55, 39, 29,
|
||||
0, 241, 40, 146, 148, 150, 152, 154, 156
|
||||
189, 181, 180, 0, 171, 0, 198, 197, 0, 0,
|
||||
182, 181, 174, 0, 178, 168, 164, 174, 162, 168,
|
||||
173, 174, 0, 161, 168, 155, 158, 147, 0, 266,
|
||||
159, 163, 155, 0, 154, 156, 152, 154, 159, 0,
|
||||
143, 148, 0, 141, 141, 140, 137, 0, 0, 149,
|
||||
151, 0, 135, 152, 138, 0, 145, 136, 117, 117,
|
||||
124, 0, 0, 123, 115, 114, 112, 123, 109, 119,
|
||||
109, 101, 0, 113, 111, 115, 0, 96, 0, 92,
|
||||
82, 70, 0, 65, 77, 0, 77, 0, 71, 59,
|
||||
44, 30, 0, 266, 41, 153, 155, 157, 159, 161,
|
||||
|
||||
163
|
||||
} ;
|
||||
|
||||
static const flex_int16_t yy_def[180] =
|
||||
static const flex_int16_t yy_def[202] =
|
||||
{ 0,
|
||||
172, 1, 172, 173, 172, 172, 173, 174, 175, 173,
|
||||
10, 173, 10, 173, 10, 10, 10, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 173, 173, 172, 172,
|
||||
174, 176, 177, 175, 178, 172, 10, 10, 10, 173,
|
||||
173, 173, 10, 173, 173, 173, 173, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 173, 172, 177, 179,
|
||||
39, 173, 173, 173, 173, 173, 173, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 173, 173, 172, 173,
|
||||
194, 1, 194, 195, 194, 194, 195, 196, 197, 195,
|
||||
10, 195, 10, 195, 10, 10, 10, 10, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 194,
|
||||
194, 196, 198, 199, 197, 200, 194, 10, 10, 10,
|
||||
195, 195, 195, 10, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 194, 199, 201, 40, 195, 195, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
|
||||
173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 172, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
|
||||
173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
|
||||
173, 0, 172, 172, 172, 172, 172, 172, 172
|
||||
195, 195, 195, 195, 195, 195, 195, 194, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 194,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
|
||||
195, 195, 195, 0, 194, 194, 194, 194, 194, 194,
|
||||
|
||||
194
|
||||
} ;
|
||||
|
||||
static const flex_int16_t yy_nxt[280] =
|
||||
static const flex_int16_t yy_nxt[306] =
|
||||
{ 0,
|
||||
4, 5, 6, 7, 8, 9, 10, 11, 10, 12,
|
||||
13, 13, 14, 4, 4, 4, 13, 13, 15, 16,
|
||||
17, 13, 18, 19, 20, 21, 22, 4, 23, 24,
|
||||
4, 25, 26, 4, 27, 4, 4, 4, 32, 32,
|
||||
28, 33, 35, 36, 37, 37, 37, 171, 38, 38,
|
||||
38, 38, 38, 50, 38, 38, 38, 38, 38, 38,
|
||||
38, 38, 38, 58, 56, 54, 38, 38, 38, 59,
|
||||
60, 170, 51, 52, 57, 169, 53, 41, 55, 61,
|
||||
35, 36, 168, 42, 38, 38, 38, 46, 63, 167,
|
||||
166, 64, 47, 165, 32, 32, 65, 67, 43, 70,
|
||||
17, 18, 19, 20, 21, 22, 23, 4, 24, 25,
|
||||
4, 26, 27, 4, 28, 4, 4, 4, 4, 33,
|
||||
33, 29, 34, 36, 37, 38, 38, 38, 193, 39,
|
||||
39, 39, 39, 39, 53, 39, 39, 39, 39, 39,
|
||||
39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
|
||||
57, 59, 68, 54, 55, 69, 192, 56, 42, 191,
|
||||
70, 60, 49, 58, 43, 39, 39, 39, 47, 61,
|
||||
190, 64, 189, 48, 50, 62, 188, 63, 187, 44,
|
||||
|
||||
70, 164, 28, 38, 38, 38, 44, 163, 162, 45,
|
||||
71, 71, 71, 161, 71, 71, 38, 38, 38, 160,
|
||||
71, 71, 71, 71, 71, 71, 70, 70, 159, 98,
|
||||
158, 157, 156, 155, 154, 153, 152, 151, 150, 149,
|
||||
148, 147, 146, 145, 144, 75, 31, 31, 34, 34,
|
||||
32, 32, 69, 69, 35, 35, 70, 70, 143, 142,
|
||||
65, 186, 33, 33, 66, 72, 185, 45, 75, 75,
|
||||
46, 29, 36, 37, 39, 39, 39, 76, 76, 76,
|
||||
184, 76, 76, 39, 39, 39, 183, 76, 76, 76,
|
||||
76, 76, 76, 75, 75, 182, 107, 181, 180, 179,
|
||||
178, 177, 176, 175, 174, 173, 172, 171, 170, 169,
|
||||
168, 167, 80, 32, 32, 35, 35, 33, 33, 74,
|
||||
74, 36, 36, 75, 75, 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, 112,
|
||||
111, 110, 109, 108, 107, 106, 105, 104, 103, 102,
|
||||
|
||||
101, 100, 99, 97, 96, 95, 94, 93, 92, 91,
|
||||
111, 110, 109, 108, 106, 105, 104, 103, 102, 101,
|
||||
100, 99, 98, 97, 96, 95, 94, 93, 92, 91,
|
||||
90, 89, 88, 87, 86, 85, 84, 83, 82, 81,
|
||||
80, 79, 78, 77, 76, 74, 73, 72, 36, 68,
|
||||
29, 66, 62, 49, 48, 40, 39, 30, 29, 172,
|
||||
3, 172, 172, 172, 172, 172, 172, 172, 172, 172,
|
||||
172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
|
||||
172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
|
||||
172, 172, 172, 172, 172, 172, 172, 172, 172
|
||||
79, 78, 77, 37, 73, 30, 71, 67, 52, 51,
|
||||
41, 40, 31, 30, 194, 3, 194, 194, 194, 194,
|
||||
194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
|
||||
194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
|
||||
194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
|
||||
|
||||
194, 194, 194, 194, 194
|
||||
} ;
|
||||
|
||||
static const flex_int16_t yy_chk[280] =
|
||||
static const flex_int16_t yy_chk[306] =
|
||||
{ 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, 8, 8,
|
||||
173, 8, 9, 9, 10, 10, 10, 170, 10, 10,
|
||||
13, 13, 13, 20, 10, 10, 10, 10, 10, 10,
|
||||
15, 15, 15, 23, 22, 21, 17, 17, 17, 23,
|
||||
24, 169, 20, 20, 22, 168, 20, 15, 21, 24,
|
||||
34, 34, 167, 15, 16, 16, 16, 17, 26, 165,
|
||||
163, 26, 17, 162, 31, 31, 26, 31, 16, 33,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 8,
|
||||
8, 195, 8, 9, 9, 10, 10, 10, 192, 10,
|
||||
10, 13, 13, 13, 21, 10, 10, 10, 10, 10,
|
||||
10, 15, 15, 15, 18, 18, 18, 17, 17, 17,
|
||||
22, 23, 27, 21, 21, 27, 191, 21, 15, 190,
|
||||
27, 23, 18, 22, 15, 16, 16, 16, 17, 24,
|
||||
189, 25, 187, 17, 18, 24, 185, 24, 184, 16,
|
||||
|
||||
33, 160, 33, 38, 38, 38, 16, 159, 158, 16,
|
||||
39, 39, 39, 156, 39, 39, 43, 43, 43, 155,
|
||||
39, 39, 39, 39, 39, 39, 69, 69, 154, 69,
|
||||
153, 151, 150, 149, 148, 147, 146, 145, 144, 141,
|
||||
140, 139, 138, 137, 136, 43, 174, 174, 175, 175,
|
||||
176, 176, 177, 177, 178, 178, 179, 179, 135, 133,
|
||||
130, 129, 128, 127, 126, 124, 123, 122, 121, 120,
|
||||
119, 118, 115, 114, 113, 111, 110, 109, 108, 107,
|
||||
106, 104, 103, 102, 99, 98, 96, 94, 93, 89,
|
||||
88, 86, 84, 83, 81, 80, 79, 76, 75, 74,
|
||||
25, 182, 32, 32, 25, 32, 181, 16, 34, 34,
|
||||
16, 34, 35, 35, 39, 39, 39, 40, 40, 40,
|
||||
180, 40, 40, 44, 44, 44, 178, 40, 40, 40,
|
||||
40, 40, 40, 74, 74, 176, 74, 175, 174, 172,
|
||||
171, 170, 169, 168, 167, 166, 165, 164, 161, 160,
|
||||
159, 158, 44, 196, 196, 197, 197, 198, 198, 199,
|
||||
199, 200, 200, 201, 201, 157, 155, 154, 153, 151,
|
||||
150, 147, 146, 145, 144, 142, 141, 139, 138, 137,
|
||||
136, 135, 133, 132, 131, 128, 127, 126, 125, 124,
|
||||
122, 121, 120, 119, 118, 117, 116, 115, 113, 112,
|
||||
|
||||
73, 72, 70, 66, 65, 64, 63, 62, 61, 60,
|
||||
58, 57, 56, 55, 54, 53, 52, 51, 50, 49,
|
||||
48, 47, 46, 45, 44, 42, 41, 40, 35, 32,
|
||||
29, 27, 25, 19, 18, 14, 11, 7, 5, 3,
|
||||
172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
|
||||
172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
|
||||
172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
|
||||
172, 172, 172, 172, 172, 172, 172, 172, 172
|
||||
111, 108, 107, 105, 103, 102, 101, 98, 96, 95,
|
||||
93, 91, 90, 88, 87, 86, 85, 84, 81, 80,
|
||||
79, 78, 77, 75, 71, 70, 69, 68, 67, 66,
|
||||
65, 64, 63, 61, 60, 59, 58, 57, 56, 55,
|
||||
54, 53, 52, 51, 50, 49, 48, 47, 46, 45,
|
||||
43, 42, 41, 36, 33, 30, 28, 26, 20, 19,
|
||||
14, 11, 7, 5, 3, 194, 194, 194, 194, 194,
|
||||
194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
|
||||
194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
|
||||
194, 194, 194, 194, 194, 194, 194, 194, 194, 194,
|
||||
|
||||
194, 194, 194, 194, 194
|
||||
} ;
|
||||
|
||||
static yy_state_type yy_last_accepting_state;
|
||||
@@ -549,21 +568,8 @@ int yy_flex_debug = 0;
|
||||
#define YY_MORE_ADJ 0
|
||||
#define YY_RESTORE_YY_MORE_OFFSET
|
||||
char *yytext;
|
||||
/*
|
||||
* sconfig, coreboot device tree compiler
|
||||
*
|
||||
* Copyright (C) 2010 coresystems GmbH
|
||||
* written by Patrick Georgi <patrick@georgi-clan.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
/* sconfig, coreboot device tree compiler */
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include "sconfig.tab.h"
|
||||
|
||||
@@ -810,13 +816,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 >= 173 )
|
||||
if ( yy_current_state >= 195 )
|
||||
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] != 241 );
|
||||
while ( yy_base[yy_current_state] != 266 );
|
||||
|
||||
yy_find_action:
|
||||
yy_act = yy_accept[yy_current_state];
|
||||
@@ -868,144 +874,160 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 7:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=1; return(BOOL);}
|
||||
{return(FW_CONFIG_TABLE);}
|
||||
YY_BREAK
|
||||
case 8:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=0; return(BOOL);}
|
||||
{return(FW_CONFIG_FIELD);}
|
||||
YY_BREAK
|
||||
case 9:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=3; return(STATUS);}
|
||||
{return(FW_CONFIG_OPTION);}
|
||||
YY_BREAK
|
||||
case 10:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=5; return(STATUS);}
|
||||
{return(FW_CONFIG_PROBE);}
|
||||
YY_BREAK
|
||||
case 11:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=PCI; return(BUS);}
|
||||
{yylval.number=1; return(BOOL);}
|
||||
YY_BREAK
|
||||
case 12:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=IOAPIC; return(BUS);}
|
||||
{yylval.number=0; return(BOOL);}
|
||||
YY_BREAK
|
||||
case 13:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=PNP; return(BUS);}
|
||||
{yylval.number=3; return(STATUS);}
|
||||
YY_BREAK
|
||||
case 14:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=I2C; return(BUS);}
|
||||
{yylval.number=5; return(STATUS);}
|
||||
YY_BREAK
|
||||
case 15:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=APIC; return(BUS);}
|
||||
{yylval.number=PCI; return(BUS);}
|
||||
YY_BREAK
|
||||
case 16:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=CPU_CLUSTER; return(BUS);}
|
||||
{yylval.number=IOAPIC; return(BUS);}
|
||||
YY_BREAK
|
||||
case 17:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=CPU; return(BUS);}
|
||||
{yylval.number=PNP; return(BUS);}
|
||||
YY_BREAK
|
||||
case 18:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=DOMAIN; return(BUS);}
|
||||
{yylval.number=I2C; return(BUS);}
|
||||
YY_BREAK
|
||||
case 19:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=GENERIC; return(BUS);}
|
||||
{yylval.number=APIC; return(BUS);}
|
||||
YY_BREAK
|
||||
case 20:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=MMIO; return(BUS);}
|
||||
{yylval.number=CPU_CLUSTER; return(BUS);}
|
||||
YY_BREAK
|
||||
case 21:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=SPI; return(BUS);}
|
||||
{yylval.number=CPU; return(BUS);}
|
||||
YY_BREAK
|
||||
case 22:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=USB; return(BUS);}
|
||||
{yylval.number=DOMAIN; return(BUS);}
|
||||
YY_BREAK
|
||||
case 23:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=LPC; return(BUS);}
|
||||
{yylval.number=GENERIC; return(BUS);}
|
||||
YY_BREAK
|
||||
case 24:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=ESPI; return(BUS);}
|
||||
{yylval.number=MMIO; return(BUS);}
|
||||
YY_BREAK
|
||||
case 25:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=IRQ; return(RESOURCE);}
|
||||
{yylval.number=SPI; return(BUS);}
|
||||
YY_BREAK
|
||||
case 26:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=DRQ; return(RESOURCE);}
|
||||
{yylval.number=USB; return(BUS);}
|
||||
YY_BREAK
|
||||
case 27:
|
||||
YY_RULE_SETUP
|
||||
{yylval.number=IO; return(RESOURCE);}
|
||||
{yylval.number=LPC; return(BUS);}
|
||||
YY_BREAK
|
||||
case 28:
|
||||
YY_RULE_SETUP
|
||||
{return(IOAPIC_IRQ);}
|
||||
{yylval.number=ESPI; return(BUS);}
|
||||
YY_BREAK
|
||||
case 29:
|
||||
YY_RULE_SETUP
|
||||
{return(INHERIT);}
|
||||
{yylval.number=IRQ; return(RESOURCE);}
|
||||
YY_BREAK
|
||||
case 30:
|
||||
YY_RULE_SETUP
|
||||
{return(SUBSYSTEMID);}
|
||||
{yylval.number=DRQ; return(RESOURCE);}
|
||||
YY_BREAK
|
||||
case 31:
|
||||
YY_RULE_SETUP
|
||||
{return(END);}
|
||||
{yylval.number=IO; return(RESOURCE);}
|
||||
YY_BREAK
|
||||
case 32:
|
||||
YY_RULE_SETUP
|
||||
{return(SLOT_DESC);}
|
||||
{return(IOAPIC_IRQ);}
|
||||
YY_BREAK
|
||||
case 33:
|
||||
YY_RULE_SETUP
|
||||
{return(EQUALS);}
|
||||
{return(INHERIT);}
|
||||
YY_BREAK
|
||||
case 34:
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
|
||||
{return(SUBSYSTEMID);}
|
||||
YY_BREAK
|
||||
case 35:
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
|
||||
{return(END);}
|
||||
YY_BREAK
|
||||
case 36:
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
|
||||
{return(SLOT_DESC);}
|
||||
YY_BREAK
|
||||
case 37:
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);}
|
||||
{return(EQUALS);}
|
||||
YY_BREAK
|
||||
case 38:
|
||||
/* rule 38 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 39:
|
||||
/* rule 39 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 40:
|
||||
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, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
|
||||
YY_BREAK
|
||||
case 41:
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);}
|
||||
YY_BREAK
|
||||
case 42:
|
||||
/* rule 42 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 43:
|
||||
/* rule 43 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 44:
|
||||
YY_RULE_SETUP
|
||||
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);}
|
||||
YY_BREAK
|
||||
case 45:
|
||||
YY_RULE_SETUP
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
@@ -1304,7 +1326,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 >= 173 )
|
||||
if ( yy_current_state >= 195 )
|
||||
yy_c = yy_meta[yy_c];
|
||||
}
|
||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
||||
@@ -1332,11 +1354,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 >= 173 )
|
||||
if ( yy_current_state >= 195 )
|
||||
yy_c = yy_meta[yy_c];
|
||||
}
|
||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
||||
yy_is_jam = (yy_current_state == 172);
|
||||
yy_is_jam = (yy_current_state == 194);
|
||||
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
}
|
||||
|
Reference in New Issue
Block a user