sconfig: add cpu device type

In order to enumerate CPU devices that are non-x86 (read: no lapic)
provide a generic 'cpu' device.

Change-Id: Ifeafdad8076935c3448784e6958117002509acbf
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/6824
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Aaron Durbin
2014-09-03 12:40:15 -05:00
committed by Aaron Durbin
parent a296f9e3d3
commit ffda804b52
6 changed files with 97 additions and 86 deletions

View File

@@ -133,16 +133,17 @@ static struct device *cur_parent, *cur_bus;
I2C = 270,
APIC = 271,
CPU_CLUSTER = 272,
DOMAIN = 273,
IRQ = 274,
DRQ = 275,
IO = 276,
NUMBER = 277,
SUBSYSTEMID = 278,
INHERIT = 279,
IOAPIC_IRQ = 280,
IOAPIC = 281,
PCIINT = 282
CPU = 273,
DOMAIN = 274,
IRQ = 275,
DRQ = 276,
IO = 277,
NUMBER = 278,
SUBSYSTEMID = 279,
INHERIT = 280,
IOAPIC_IRQ = 281,
IOAPIC = 282,
PCIINT = 283
};
#endif
@@ -387,10 +388,10 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 37
#define YYLAST 39
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 28
#define YYNTOKENS 29
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 13
/* YYNRULES -- Number of rules. */
@@ -400,7 +401,7 @@ union yyalloc
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 282
#define YYMAXUTOK 283
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -436,7 +437,7 @@ static const yytype_uint8 yytranslate[] =
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
25, 26, 27, 28
};
#if YYDEBUG
@@ -452,14 +453,14 @@ static const yytype_uint8 yyprhs[] =
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
29, 0, -1, -1, 30, 33, -1, 31, 35, -1,
31, 33, -1, 31, 38, -1, -1, 32, 35, -1,
32, 33, -1, 32, 37, -1, 32, 39, -1, 32,
40, -1, -1, -1, 3, 12, 34, 31, 9, -1,
-1, 4, 7, 22, 6, 36, 32, 9, -1, 8,
22, 10, 22, -1, 5, 12, 10, 12, -1, 23,
22, 22, -1, 23, 22, 22, 24, -1, 25, 22,
27, 22, -1
30, 0, -1, -1, 31, 34, -1, 32, 36, -1,
32, 34, -1, 32, 39, -1, -1, 33, 36, -1,
33, 34, -1, 33, 38, -1, 33, 40, -1, 33,
41, -1, -1, -1, 3, 12, 35, 32, 9, -1,
-1, 4, 7, 23, 6, 37, 33, 9, -1, 8,
23, 10, 23, -1, 5, 12, 10, 12, -1, 24,
23, 23, -1, 24, 23, 23, 25, -1, 26, 23,
28, 23, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@@ -478,7 +479,7 @@ static const char *const yytname[] =
{
"$end", "error", "$undefined", "CHIP", "DEVICE", "REGISTER", "BOOL",
"BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI", "PNP", "I2C",
"APIC", "CPU_CLUSTER", "DOMAIN", "IRQ", "DRQ", "IO", "NUMBER",
"APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ", "IO", "NUMBER",
"SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ", "IOAPIC", "PCIINT", "$accept",
"devtree", "$@1", "chipchildren", "devicechildren", "chip", "@2",
"device", "@3", "resource", "registers", "subsystemid", "ioapic_irq", 0
@@ -492,16 +493,16 @@ static const yytype_uint16 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
275, 276, 277, 278, 279, 280, 281, 282, 283
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
0, 28, 30, 29, 31, 31, 31, 31, 32, 32,
32, 32, 32, 32, 34, 33, 36, 35, 37, 38,
39, 39, 40
0, 29, 31, 30, 32, 32, 32, 32, 33, 33,
33, 33, 33, 33, 35, 34, 37, 36, 38, 39,
40, 40, 41
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -533,21 +534,21 @@ static const yytype_int8 yydefgoto[] =
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -9
#define YYPACT_NINF -10
static const yytype_int8 yypact[] =
{
-9, 3, 1, -9, -2, -9, -9, -9, 4, 5,
-1, -9, -9, -9, -9, -8, 7, 9, 6, -9,
-9, -9, -3, 2, -9, 8, 10, -9, -9, -9,
-9, -9, 11, 12, -4, 13, -5, 14, -9, -9,
-9
-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
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-9, -9, -9, -9, -9, -6, -9, 15, -9, -9,
-9, -9, -9
-10, -10, -10, -10, -10, -6, -10, 17, -10, -10,
-10, -10, -10
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -557,13 +558,13 @@ static const yytype_int8 yypgoto[] =
static const yytype_uint8 yytable[] =
{
4, 9, 12, 3, 4, 23, 24, 4, 9, 10,
6, 16, 15, 11, 17, 19, 27, 18, 20, 39,
25, 35, 26, 37, 32, 0, 0, 0, 0, 0,
33, 0, 34, 0, 36, 38, 40, 28
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
};
#define yypact_value_is_default(yystate) \
((yystate) == (-9))
((yystate) == (-10))
#define yytable_value_is_error(yytable_value) \
YYID (0)
@@ -571,20 +572,20 @@ static const yytype_uint8 yytable[] =
static const yytype_int8 yycheck[] =
{
3, 4, 8, 0, 3, 8, 9, 3, 4, 5,
12, 12, 7, 9, 22, 6, 22, 10, 12, 24,
23, 10, 25, 27, 22, -1, -1, -1, -1, -1,
22, -1, 22, -1, 22, 22, 22, 22
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
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 29, 30, 0, 3, 33, 12, 34, 31, 4,
5, 9, 33, 35, 38, 7, 12, 22, 10, 6,
12, 36, 32, 8, 9, 23, 25, 33, 35, 37,
39, 40, 22, 22, 22, 10, 22, 27, 22, 24,
22
0, 30, 31, 0, 3, 34, 12, 35, 32, 4,
5, 9, 34, 36, 39, 7, 12, 23, 10, 6,
12, 37, 33, 8, 9, 24, 26, 34, 36, 38,
40, 41, 23, 23, 23, 10, 23, 28, 23, 25,
23
};
#define yyerrok (yyerrstatus = 0)