- strcat(rdValue, kap->bootFile);
- gRootpathProp.length = strlen(rdValue) + 1;
-
- platformValue = kalloc(kMaxBootVar);
- if ( ! PE_parse_boot_arg("platform", platformValue) ) {
- strcpy(platformValue, kDefaultPlatformName);
- }
- gCompatibleProp.address = platformValue;
- gCompatibleProp.length = strlen(platformValue) + 1;
-
- dt = (long *) createdt( fakePPCDeviceTree,
- &((boot_args*)PE_state.fakePPCBootArgs)->deviceTreeLength );
-
- kfree(rdValue, kMaxBootVar);
- kfree(platformValue, kMaxBootVar);
-
-
- if ( dt )
- {
- DriversPackageProp * prop = (DriversPackageProp *) gDriversProp.address;
-
- /* Copy driver info in kernBootStruct to fake device tree */
-
- for ( i = 0; i < kap->numBootDrivers; i++, prop++ )
- {
- switch ( kap->driverConfig[i].type )
- {
- case kBootDriverTypeKEXT:
- sprintf(prop->name, "Driver-%lx", kap->driverConfig[i].address);
- break;
-
- case kBootDriverTypeMKEXT:
- sprintf(prop->name, "DriversPackage-%lx", kap->driverConfig[i].address);
- break;
-
- default:
- sprintf(prop->name, "DriverBogus-%lx", kap->driverConfig[i].address);
- break;
- }
- prop->length = sizeof(prop->value);
- prop->value[0] = kap->driverConfig[i].address;
- prop->value[1] = kap->driverConfig[i].size;
- }
-
- *((long *)gMemoryMapNode.address) = kap->numBootDrivers + 1;
- }
-
- /* Setup powermac_info and powermac_machine_info structures */
-
- ((boot_args*)PE_state.fakePPCBootArgs)->deviceTreeP = (unsigned long *) dt;
- ((boot_args*)PE_state.fakePPCBootArgs)->topOfKernelData = (unsigned long) kalloc(0x2000);
-
- /*
- * Setup the OpenFirmware Device Tree routines
- * so the console can be found and the right I/O space
- * can be used..
- */
- DTInit(dt);