*/
#include <sys/types.h>
#include <mach/vm_param.h>
+#include <machine/machine_routines.h>
#include <pexpert/protos.h>
#include <pexpert/pexpert.h>
#include <pexpert/boot.h>
case kPEEnableScreen:
initialize_screen(info, op);
+ if (info) PE_state.video = *info;
kprintf("kPEEnableScreen %d\n", last_console);
if( last_console != -1)
switch_to_old_console( last_console);
break;
+ case kPEBaseAddressChange:
+ if (info) PE_state.video = *info;
+ /* fall thru */
+
default:
initialize_screen(info, op);
break;
boolean_t norootInitialized = FALSE;
DTEntry entry;
unsigned int size;
- void ** map;
+ uint32_t *map;
boot_progress_element *bootPict;
PE_init_kprintf(TRUE);
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)) {
- bootPict = (boot_progress_element *) map[0];
+ bootPict = (boot_progress_element *) ml_static_ptovirt(map[0]);
default_noroot.width = bootPict->width;
default_noroot.height = bootPict->height;
default_noroot.dx = 0;
// New EFI-style
PE_state.bootArgs = _args;
- 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;
}
if (!vm_initialized) {
- /* Hack! FIXME.. */
- outb(0x21, 0xff); /* Maskout all interrupts Pic1 */
- outb(0xa1, 0xff); /* Maskout all interrupts Pic2 */
-
+
if (PE_state.deviceTreeHead) {
DTInit(PE_state.deviceTreeHead);
- }
+ }
pe_identify_machine(args);
} else {
pe_init_debug();
}
+
}
void PE_create_console( void )
int (*PE_poll_input)(unsigned int options, char * c)
= PE_stub_poll_input;
-
-
+boolean_t
+PE_reboot_on_panic(void)
+{
+ return FALSE;
+}