Change statictree emit function to emit path correctly for cpus.
Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/coreboot-v3@931 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
434a3816e0
commit
8b2f6c4c4a
1 changed files with 5 additions and 4 deletions
|
|
@ -572,14 +572,15 @@ static void coreboot_emit_special(FILE *e, struct node *tree)
|
|||
fprintf(f, "\t.path = { .type = DEVICE_PATH_ROOT },\n");
|
||||
}
|
||||
|
||||
/* special case -- cpus don't have an @ */
|
||||
if (tree->name && !strncmp(tree->name, "cpus", 4)){
|
||||
fprintf(f, "\t.path = {.type=DEVICE_PATH_CPU},\n");
|
||||
}
|
||||
|
||||
/* from the node names (tree->name) we derive the path */
|
||||
path = index(tree->name, '@');
|
||||
if (path && path[1]) {
|
||||
path++;
|
||||
if (!strncmp(tree->name, "cpu", 3)){
|
||||
fprintf(f, "\t.path = {.type=DEVICE_PATH_CPU,{.cpu={ .id = 0x%s }}},\n",
|
||||
path);
|
||||
}
|
||||
if (!strncmp(tree->name, "bus", 3)){
|
||||
fprintf(f, "\t.path = {.type=DEVICE_PATH_PCI_BUS,{.pci_bus={ .bus = 0x%s }}},\n",
|
||||
path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue