#include <pexpert/protos.h>
#include <pexpert/pexpert.h>
#include <pexpert/boot.h>
#include <pexpert/protos.h>
#include <pexpert/pexpert.h>
#include <pexpert/boot.h>
kprintf("kPEEnableScreen %d\n", last_console);
if( last_console != -1)
switch_to_old_console( last_console);
kprintf("kPEEnableScreen %d\n", last_console);
if( last_console != -1)
switch_to_old_console( last_console);
if( kSuccess == DTLookupEntry(NULL, "/chosen/memory-map", &entry)) {
if( kSuccess == DTGetProperty(entry, "BootCLUT", (void **) &map, &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;
- }
+ if (sizeof(appleClut8) <= map[1]) {
+ bcopy( (void *)ml_static_ptovirt(map[0]), appleClut8, sizeof(appleClut8) );
+ bootClutInitialized = TRUE;
+ }
+ }
if( kSuccess == DTGetProperty(entry, "Pict-FailedBoot", (void **) &map, &size)) {
if( kSuccess == DTGetProperty(entry, "Pict-FailedBoot", (void **) &map, &size)) {
- PE_state.deviceTreeHead = (void *) args->deviceTreeP;
- PE_state.video.v_baseAddr = args->Video.v_baseAddr;
+ PE_state.deviceTreeHead = (void *) ml_static_ptovirt(args->deviceTreeP);
+ PE_state.video.v_baseAddr = args->Video.v_baseAddr; // remains physical address
PE_state.video.v_rowBytes = args->Video.v_rowBytes;
PE_state.video.v_width = args->Video.v_width;
PE_state.video.v_height = args->Video.v_height;
PE_state.video.v_rowBytes = args->Video.v_rowBytes;
PE_state.video.v_width = args->Video.v_width;
PE_state.video.v_height = args->Video.v_height;
/* Hack! FIXME.. */
outb(0x21, 0xff); /* Maskout all interrupts Pic1 */
outb(0xa1, 0xff); /* Maskout all interrupts Pic2 */
/* Hack! FIXME.. */
outb(0x21, 0xff); /* Maskout all interrupts Pic1 */
outb(0xa1, 0xff); /* Maskout all interrupts Pic2 */