Changeset de3db94a in mainline
- Timestamp:
- 2012-03-02T15:12:01Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 71232af
- Parents:
- dabbe28
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/ppc32.c
rdabbe28 rde3db94a 173 173 ofw_tree_walk_by_device_type("display", display_register, NULL); 174 174 #endif 175 /* Map OFW information into sysinfo */ 176 ofw_sysinfo_map(); 175 177 176 178 /* Initialize IRQ routing */ -
kernel/arch/sparc64/src/sun4u/sparc64.c
rdabbe28 rde3db94a 94 94 { 95 95 if (config.cpu_active == 1) { 96 /* Map OFW information into sysinfo */ 97 ofw_sysinfo_map(); 98 96 99 /* 97 100 * We have 2^11 different interrupt vectors. -
kernel/arch/sparc64/src/sun4v/sparc64.c
rdabbe28 rde3db94a 92 92 { 93 93 if (config.cpu_active == 1) { 94 /* Map OFW information into sysinfo */ 95 ofw_sysinfo_map(); 96 94 97 /* 95 98 * We have 2^11 different interrupt vectors. -
kernel/genarch/include/ofw/ofw_tree.h
rdabbe28 rde3db94a 68 68 extern void ofw_tree_init(ofw_tree_node_t *); 69 69 extern void ofw_tree_print(void); 70 extern void ofw_sysinfo_map(void); 70 71 71 72 extern const char *ofw_tree_node_name(const ofw_tree_node_t *); -
kernel/genarch/src/ofw/ofw_tree.c
rdabbe28 rde3db94a 38 38 #include <genarch/ofw/ofw_tree.h> 39 39 #include <mm/slab.h> 40 #include <sysinfo/sysinfo.h> 40 41 #include <memstr.h> 41 42 #include <str.h> … … 355 356 } 356 357 358 /** Map OpenFirmware device subtree rooted in a node into sysinfo. 359 * 360 * Child nodes are processed recursively and peer nodes are processed 361 * iteratively in order to avoid stack overflow. 362 * 363 * @param node Root of the subtree. 364 * @param path Current path, NULL for the very root of the entire tree. 365 * 366 */ 367 static void ofw_tree_node_sysinfo(ofw_tree_node_t *node, const char *path) 368 { 369 char *cur_path = (char *) malloc(PATH_MAX_LEN, 0); 370 371 for (ofw_tree_node_t *cur = node; cur; cur = cur->peer) { 372 if ((cur->parent) && (path)) 373 snprintf(cur_path, PATH_MAX_LEN, "%s.%s", path, cur->da_name); 374 else 375 snprintf(cur_path, PATH_MAX_LEN, "firmware.%s", cur->da_name); 376 377 sysinfo_set_item_undefined(cur_path, NULL); 378 379 if (cur->child) 380 ofw_tree_node_sysinfo(cur->child, cur_path); 381 } 382 383 free(cur_path); 384 } 385 386 /** Map the OpenFirmware device tree into sysinfo. */ 387 void ofw_sysinfo_map(void) 388 { 389 ofw_tree_node_sysinfo(ofw_root, NULL); 390 } 391 357 392 /** @} 358 393 */
Note:
See TracChangeset
for help on using the changeset viewer.