"omap/omap44xx_id",
"omap/omap44xx_usbconf",
"omap/omap44xx_mmu",
+ "omap/ohci",
+ "omap/ehci"
+ "omap/omap44xx_ctrlmod",
+ "omap/omap44xx_cam_prm",
+ "omap/omap44xx_cam_cm2",
+ "omap/omap44xx_fdif",
+ "omap/omap44xx_sr_mpu",
+ "omap/omap44xx_device_prm",
+ "omap/omap44xx_mmchs",
+ "omap/omap44xx_l3init_cm2",
+ "omap/omap44xx_ckgen_cm2",
+ "omap/omap44xx_l4per_cm2",
+ "omap/omap44xx_sysctrl_padconf_core"
], arch <- allArchitectures
] ++
"pl011_uart",
"rck"
], arch <- allArchitectures
--]
++]
return KALUGA_ERR_DRIVER_NOT_AUTO;
}
- err = spawn_program(where, mi->path, mi->argv + 1, environ, 0, &mi->did);
+ // Construct additional command line arguments containing pci-id.
+ // We need one extra entry for the new argument.
+ uint64_t vendor_id, device_id;
+ char **argv = mi->argv;
+ bool cleanup = false;
+ err = oct_read(record, "_ { vendor: %d, device_id: %d }",
+ &vendor_id, &device_id);
+ if (err_is_ok(err)) {
+ // We assume that we're starting a device if the query above succeeds
+ // and therefore append the pci vendor and device id to the argument
+ // list.
+ argv = malloc((mi->argc+1) * sizeof(char *));
+ memcpy(argv, mi->argv, mi->argc * sizeof(char *));
+ char *pci_id = malloc(10);
+ // Make sure pci vendor and device id fit into our argument
+ assert(vendor_id < 0x9999 && device_id < 0x9999);
+ snprintf(pci_id, 10, "%04"PRIx64":%04"PRIx64, vendor_id, device_id);
+ argv[mi->argc] = pci_id;
+ mi->argc += 1;
+ argv[mi->argc] = NULL;
+ cleanup = true;
+ }
+ err = spawn_program(where, mi->path, argv,
+ environ, 0, &mi->did);
++
if (err_is_fail(err)) {
DEBUG_ERR(err, "Spawning %s failed.", mi->path);
}
errval_t start_networking(coreid_t, struct module_info*, char*);
errval_t start_usb_manager(void);
-errval_t start_sdcard(void);
+
#endif /* DRIVER_STARTUP_H_ */
errval_t err;
- coreid_t my_core_id = disp_get_core_id();
+ my_core_id = disp_get_core_id();
parse_arguments(argc, argv);
+ err = oct_init();
+ if (err_is_fail(err)) {
+ USER_PANIC_ERR(err, "Initialize octopus service.");
+ }
+
++ printf("Kaluga: parse boot modules...\n");
++
+ err = init_boot_modules();
+ if (err_is_fail(err)) {
+ USER_PANIC_ERR(err, "Parse boot modules.");
+ }
+ add_start_function_overrides();
-
+ #ifdef __x86__
// We need to run on core 0
// (we are responsible for booting all the other cores)
assert(my_core_id == BSP_CORE_ID);