]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/console/video_console.c
xnu-2050.22.13.tar.gz
[apple/xnu.git] / osfmk / console / video_console.c
index 0afd153b73379e2b031bc0be9c285eaa2acb0eae..32446eb350ba3179acaca254b62a3ee79a03cf4e 100644 (file)
  */
 
 struct vc_info vinfo;
-/* if panicDialogDesired is true then we use the panic dialog when its */
-/* allowed otherwise we won't use the panic dialog even if it is allowed */
-boolean_t panicDialogDesired;
 
 void noroot_icon_test(void);
 
@@ -1281,6 +1278,8 @@ gc_show_cursor(unsigned int xx, unsigned int yy)
 static void
 gc_update_color(int color, boolean_t fore)
 {
+       assert(gc_ops.update_color);
+
        gc_color_code = COLOR_CODE_SET(gc_color_code, color, fore);
        gc_ops.update_color(color, fore);
 }
@@ -2465,8 +2464,6 @@ vc_progress_task(__unused void *arg0, __unused void *arg)
 
     if( vc_progress_enable) {
 
-       KERNEL_DEBUG_CONSTANT(0x7020008, vc_progress_count, 0, 0, 0, 0);
-
         vc_progress_count++;
         if( vc_progress_count >= vc_progress->count) {
             vc_progress_count = 0;
@@ -2579,7 +2576,14 @@ initialize_screen(PE_Video * boot_vinfo, unsigned int op)
 #else
                    new_vinfo.v_type = 0;
 #endif
-                   new_vinfo.v_scale = boot_vinfo->v_scale;
+            unsigned int scale   = (unsigned int)boot_vinfo->v_scale;
+            if (scale == kPEScaleFactor1x )
+                new_vinfo.v_scale = kPEScaleFactor1x;
+            else if (scale == kPEScaleFactor2x)
+                new_vinfo.v_scale = kPEScaleFactor2x;
+            else /* Scale factor not set, default to 1x */
+                new_vinfo.v_scale = kPEScaleFactor1x;
+
                }
      
                if (!lastVideoMapped)
@@ -2693,13 +2697,11 @@ initialize_screen(PE_Video * boot_vinfo, unsigned int op)
        switch ( op )
        {
                case kPEGraphicsMode:
-                       panicDialogDesired = TRUE;
                        gc_graphics_boot = TRUE;
                        gc_desire_text = FALSE;
                        break;
 
                case kPETextMode:
-                       panicDialogDesired = FALSE;
                        disable_debug_output = FALSE;
                        gc_graphics_boot = FALSE;
                        break;
@@ -2729,7 +2731,6 @@ initialize_screen(PE_Video * boot_vinfo, unsigned int op)
                case kPETextScreen:
                        if ( console_is_serial() ) break;
 
-                       panicDialogDesired = FALSE;
                        disable_debug_output = FALSE;
                        if ( gc_acquired == FALSE )
                        {
@@ -2749,6 +2750,8 @@ initialize_screen(PE_Video * boot_vinfo, unsigned int op)
                        gc_acquired = FALSE;
                        gc_desire_text = FALSE;
                        gc_enable( FALSE );
+                       if ( gc_graphics_boot == FALSE ) break;
+
                        vc_progress_set( FALSE, 0 );
 #if !CONFIG_EMBEDDED
                        vc_enable_progressmeter( FALSE );