sconfig: Allow setting device status in device tree
For devices supporting both Linux and Windows, we may find some ACPI
devices that only need drivers in Linux and should not even be shown in
Windows Device Manager UI.
The new 'hidden' keyword in device tree 'device' statement allows
devices sharing same driver to call acpi_gen_writeSTA with different
values.
BUG=b:72200466
BRANCH=eve
TEST=Builds and boots properly on device eve
Change-Id: Iae881a294b122d3a581b456285d2992ab637fb8e
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/28566
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
diff --git a/util/sconfig/sconfig.tab.c_shipped b/util/sconfig/sconfig.tab.c_shipped
index c298a65..d59a1b6 100644
--- a/util/sconfig/sconfig.tab.c_shipped
+++ b/util/sconfig/sconfig.tab.c_shipped
@@ -128,32 +128,33 @@
DEVICE = 259,
REGISTER = 260,
BOOL = 261,
- BUS = 262,
- RESOURCE = 263,
- END = 264,
- EQUALS = 265,
- HEX = 266,
- STRING = 267,
- PCI = 268,
- PNP = 269,
- I2C = 270,
- APIC = 271,
- CPU_CLUSTER = 272,
- CPU = 273,
- DOMAIN = 274,
- IRQ = 275,
- DRQ = 276,
- IO = 277,
- NUMBER = 278,
- SUBSYSTEMID = 279,
- INHERIT = 280,
- IOAPIC_IRQ = 281,
- IOAPIC = 282,
- PCIINT = 283,
- GENERIC = 284,
- SPI = 285,
- USB = 286,
- MMIO = 287
+ HIDDEN = 262,
+ BUS = 263,
+ RESOURCE = 264,
+ END = 265,
+ EQUALS = 266,
+ HEX = 267,
+ STRING = 268,
+ PCI = 269,
+ PNP = 270,
+ I2C = 271,
+ APIC = 272,
+ CPU_CLUSTER = 273,
+ CPU = 274,
+ DOMAIN = 275,
+ IRQ = 276,
+ DRQ = 277,
+ IO = 278,
+ NUMBER = 279,
+ SUBSYSTEMID = 280,
+ INHERIT = 281,
+ IOAPIC_IRQ = 282,
+ IOAPIC = 283,
+ PCIINT = 284,
+ GENERIC = 285,
+ SPI = 286,
+ USB = 287,
+ MMIO = 288
};
#endif
@@ -428,21 +429,21 @@
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 39
+#define YYLAST 40
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 33
+#define YYNTOKENS 34
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 13
+#define YYNNTS 14
/* YYNRULES -- Number of rules. */
-#define YYNRULES 22
+#define YYNRULES 24
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 41
+#define YYNSTATES 43
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 287
+#define YYMAXUTOK 288
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -479,7 +480,7 @@
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
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
+ 25, 26, 27, 28, 29, 30, 31, 32, 33
};
#if YYDEBUG
@@ -487,8 +488,8 @@
static const yytype_uint8 yyrline[] =
{
0, 36, 36, 36, 38, 38, 38, 38, 40, 40,
- 40, 40, 40, 40, 42, 42, 51, 51, 59, 62,
- 65, 68, 71
+ 40, 40, 40, 40, 42, 42, 51, 51, 59, 59,
+ 61, 64, 67, 70, 73
};
#endif
@@ -498,12 +499,12 @@
static const char *const yytname[] =
{
"$end", "error", "$undefined", "CHIP", "DEVICE", "REGISTER", "BOOL",
- "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI", "PNP", "I2C",
- "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ", "IO", "NUMBER",
- "SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC",
- "SPI", "USB", "MMIO", "$accept", "devtree", "$@1", "chipchildren",
- "devicechildren", "chip", "@2", "device", "@3", "resource", "registers",
- "subsystemid", "ioapic_irq", YY_NULLPTR
+ "HIDDEN", "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI",
+ "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ", "IO",
+ "NUMBER", "SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ", "IOAPIC", "PCIINT",
+ "GENERIC", "SPI", "USB", "MMIO", "$accept", "devtree", "$@1",
+ "chipchildren", "devicechildren", "chip", "@2", "device", "@3", "status",
+ "resource", "registers", "subsystemid", "ioapic_irq", YY_NULLPTR
};
#endif
@@ -515,7 +516,7 @@
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
+ 285, 286, 287, 288
};
# endif
@@ -533,11 +534,11 @@
STATE-NUM. */
static const yytype_int8 yypact[] =
{
- -10, 3, 1, -10, -2, -10, -10, -10, 4, 5,
- -1, -10, -10, -10, -10, -9, 7, 9, 6, -10,
- -10, -10, -3, -4, -10, 2, 8, -10, -10, -10,
- -10, -10, 10, 11, 0, 12, 13, 14, -10, -10,
- -10
+ -10, 11, 9, -10, 1, -10, -10, -10, 0, 5,
+ 3, -10, -10, -10, -10, -9, 6, 2, 7, -10,
+ -10, -10, -10, -10, -3, -5, -10, -1, 4, -10,
+ -10, -10, -10, -10, 10, 8, -4, 12, 13, 14,
+ -10, -10, -10
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -546,24 +547,24 @@
static const yytype_uint8 yydefact[] =
{
2, 0, 0, 1, 0, 3, 14, 7, 0, 0,
- 0, 15, 5, 4, 6, 0, 0, 0, 0, 16,
- 19, 13, 0, 0, 17, 0, 0, 9, 8, 10,
- 11, 12, 0, 0, 0, 0, 20, 0, 18, 21,
- 22
+ 0, 15, 5, 4, 6, 0, 0, 0, 0, 18,
+ 19, 16, 21, 13, 0, 0, 17, 0, 0, 9,
+ 8, 10, 11, 12, 0, 0, 0, 0, 22, 0,
+ 20, 23, 24
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -10, -10, -10, -10, -10, -6, -10, 17, -10, -10,
- -10, -10, -10
+ -10, -10, -10, -10, -10, -6, -10, 16, -10, -10,
+ -10, -10, -10, -10
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 1, 2, 8, 22, 5, 7, 13, 21, 29,
- 14, 30, 31
+ -1, 1, 2, 8, 24, 5, 7, 13, 23, 21,
+ 31, 14, 32, 33
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -571,45 +572,47 @@
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
- 4, 9, 12, 3, 4, 23, 24, 4, 9, 10,
- 6, 16, 15, 11, 17, 19, 27, 18, 20, 32,
- 35, 25, 0, 26, 0, 33, 0, 0, 37, 0,
- 0, 34, 0, 0, 36, 38, 0, 40, 39, 28
+ 4, 9, 12, 4, 9, 10, 25, 26, 19, 20,
+ 11, 3, 4, 15, 6, 17, 16, 18, 29, 34,
+ 22, 37, 27, 35, 28, 39, 0, 0, 36, 0,
+ 0, 0, 38, 0, 0, 0, 40, 0, 42, 41,
+ 30
};
static const yytype_int8 yycheck[] =
{
- 3, 4, 8, 0, 3, 8, 9, 3, 4, 5,
- 12, 12, 7, 9, 23, 6, 22, 10, 12, 23,
- 10, 24, -1, 26, -1, 23, -1, -1, 28, -1,
- -1, 23, -1, -1, 23, 23, -1, 23, 25, 22
+ 3, 4, 8, 3, 4, 5, 9, 10, 6, 7,
+ 10, 0, 3, 8, 13, 24, 13, 11, 24, 24,
+ 13, 11, 25, 24, 27, 29, -1, -1, 24, -1,
+ -1, -1, 24, -1, -1, -1, 24, -1, 24, 26,
+ 24
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 34, 35, 0, 3, 38, 12, 39, 36, 4,
- 5, 9, 38, 40, 43, 7, 12, 23, 10, 6,
- 12, 41, 37, 8, 9, 24, 26, 38, 40, 42,
- 44, 45, 23, 23, 23, 10, 23, 28, 23, 25,
- 23
+ 0, 35, 36, 0, 3, 39, 13, 40, 37, 4,
+ 5, 10, 39, 41, 45, 8, 13, 24, 11, 6,
+ 7, 43, 13, 42, 38, 9, 10, 25, 27, 39,
+ 41, 44, 46, 47, 24, 24, 24, 11, 24, 29,
+ 24, 26, 24
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 33, 35, 34, 36, 36, 36, 36, 37, 37,
- 37, 37, 37, 37, 39, 38, 41, 40, 42, 43,
- 44, 44, 45
+ 0, 34, 36, 35, 37, 37, 37, 37, 38, 38,
+ 38, 38, 38, 38, 40, 39, 42, 41, 43, 43,
+ 44, 45, 46, 46, 47
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 0, 2, 2, 2, 2, 0, 2, 2,
- 2, 2, 2, 0, 0, 5, 0, 7, 4, 4,
- 3, 4, 4
+ 2, 2, 2, 0, 0, 5, 0, 7, 1, 1,
+ 4, 4, 3, 4, 4
};
@@ -1326,31 +1329,31 @@
break;
- case 18:
+ case 20:
{ add_resource(cur_parent, (yyvsp[-3].number), strtol((yyvsp[-2].string), NULL, 0), strtol((yyvsp[0].string), NULL, 0)); }
break;
- case 19:
+ case 21:
{ add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
break;
- case 20:
+ case 22:
{ add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
break;
- case 21:
+ case 23:
{ add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
break;
- case 22:
+ case 24:
{ add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }