- gDriversProp.length = kap->numBootDrivers * sizeof(DriversPackageProp);
- gMemoryMapNode.length = 2 * sizeof(long);
-
- rdValue = kalloc(kMaxBootVar);
- if ( PE_parse_boot_arg("rd", rdValue) ) {
- if (*rdValue == '*') {
- gRootpathProp.address = (rdValue + 1);
- } else {
- gRootpathProp.address = rdValue;
- }
- strcat(rdValue, ",");
- } else {
- gRootpathProp.address = rdValue;
- rdValue[0] = '\0';
- }
- 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;
+ if( kSuccess == DTLookupEntry(NULL, "/chosen/memory-map", &entry)) {
+ if( kSuccess == DTGetProperty(entry, "BootCLUT", (void **) &map, &size)) {
+ bcopy( map[0], appleClut8, sizeof(appleClut8) );
+ bootClutInitialized = TRUE;