Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MLeVl-0004Gw-7C for mharc-grub-devel@gnu.org; Tue, 30 Jun 2009 10:40:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MLeVi-0004DH-GV for grub-devel@gnu.org; Tue, 30 Jun 2009 10:40:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MLeVd-00044t-4C for grub-devel@gnu.org; Tue, 30 Jun 2009 10:40:37 -0400 Received: from [199.232.76.173] (port=38090 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MLeVc-00044Z-Sv for grub-devel@gnu.org; Tue, 30 Jun 2009 10:40:32 -0400 Received: from mx20.gnu.org ([199.232.41.8]:23800) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MLeVc-00046E-BA for grub-devel@gnu.org; Tue, 30 Jun 2009 10:40:32 -0400 Received: from aybabtu.com ([69.60.117.155]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MLeVa-0004ha-Re for grub-devel@gnu.org; Tue, 30 Jun 2009 10:40:31 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MLdRk-0007MI-Pu; Tue, 30 Jun 2009 15:32:29 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MLeVO-0006OD-JO; Tue, 30 Jun 2009 16:40:18 +0200 Date: Tue, 30 Jun 2009 16:40:18 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20090630144018.GA24555@thorin> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: Arthur Marsh Subject: Linux instrumentation for new loader X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2009 14:40:38 -0000 --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline These patches might be helpful in case someone runs in trouble with the new loader. They instrument Linux to obtain a screen_info structure dump, which can be used to compare the output of "linux16" vs "linux". -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." --/9DWx/yDrRhgMJTb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="linux_dump_in_i8086.diff" diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c index 140172b..8cb5195 100644 --- a/arch/x86/boot/main.c +++ b/arch/x86/boot/main.c @@ -172,6 +172,30 @@ void main(void) if (cmdline_find_option_bool("quiet")) boot_params.hdr.loadflags |= QUIET_FLAG; + puts ("screen_info dump:\n"); + printf ("orig_x = 0x%x, orig_y = 0x%x\n", boot_params.screen_info.orig_x, boot_params.screen_info.orig_y); + printf ("ext_mem_k = 0x%x\n", boot_params.screen_info.ext_mem_k); + printf ("orig_video_page = 0x%x\n", boot_params.screen_info.orig_video_page); + printf ("orig_video_mode = 0x%x\n", boot_params.screen_info.orig_video_mode); + printf ("orig_video_cols = 0x%x\n", boot_params.screen_info.orig_video_cols); + printf ("orig_video_ega_bx = 0x%x\n", boot_params.screen_info.orig_video_ega_bx); + printf ("orig_video_lines = 0x%x\n", boot_params.screen_info.orig_video_lines); + printf ("orig_video_isVGA = 0x%x\n", boot_params.screen_info.orig_video_isVGA); + printf ("orig_video_points = 0x%x\n", boot_params.screen_info.orig_video_points); + printf ("lfb_width / lfb_height / lfb_depth = %dx%dx%d\n", boot_params.screen_info.lfb_width, boot_params.screen_info.lfb_height, boot_params.screen_info.lfb_depth); + printf ("lfb_base = 0x%x, lfb_size = 0x%x\n", boot_params.screen_info.lfb_base, boot_params.screen_info.lfb_size); + printf ("cl_magic = 0x%x, cl_offset = 0x%x\n", boot_params.screen_info.cl_magic, boot_params.screen_info.cl_offset); + printf ("lfb_linelength = 0x%x\n", boot_params.screen_info.lfb_linelength); + printf ("red_size = 0x%x, red_pos = 0x%x\n", boot_params.screen_info.red_size, boot_params.screen_info.red_pos); + printf ("green_size = 0x%x, green_pos = 0x%x\n", boot_params.screen_info.green_size, boot_params.screen_info.green_pos); + printf ("blue_size = 0x%x, blue_pos = 0x%x\n", boot_params.screen_info.blue_size, boot_params.screen_info.blue_pos); + printf ("rsvd_size = 0x%x, rsvd_pos = 0x%x\n", boot_params.screen_info.rsvd_size, boot_params.screen_info.rsvd_pos); + printf ("vesapm = 0x%x:0x%x\n", boot_params.screen_info.vesapm_seg, boot_params.screen_info.vesapm_off); + printf ("pages = 0x%x\n", boot_params.screen_info.pages); + printf ("vesa_attributes = 0x%x\n", boot_params.screen_info.vesa_attributes); + printf ("capabilities = 0x%x\n", boot_params.screen_info.capabilities); + die (); + /* Do the last things and invoke protected mode */ go_to_protected_mode(); } --/9DWx/yDrRhgMJTb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="linux_dump_in_pe.diff" diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index bd37ee1..52a27e7 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c @@ -465,6 +465,32 @@ static int __init vesafb_probe(struct platform_device *dev) fb_dealloc_cmap(&info->cmap); goto err; } + + printk(KERN_INFO "screen_info dump:\n"); + printk(KERN_INFO "orig_x = 0x%x, orig_y = 0x%x\n", screen_info.orig_x, screen_info.orig_y); + printk(KERN_INFO "ext_mem_k = 0x%x\n", screen_info.ext_mem_k); + printk(KERN_INFO "orig_video_page = 0x%x\n", screen_info.orig_video_page); + printk(KERN_INFO "orig_video_mode = 0x%x\n", screen_info.orig_video_mode); + printk(KERN_INFO "orig_video_cols = 0x%x\n", screen_info.orig_video_cols); + printk(KERN_INFO "orig_video_ega_bx = 0x%x\n", screen_info.orig_video_ega_bx); + printk(KERN_INFO "orig_video_lines = 0x%x\n", screen_info.orig_video_lines); + printk(KERN_INFO "orig_video_isVGA = 0x%x\n", screen_info.orig_video_isVGA); + printk(KERN_INFO "orig_video_points = 0x%x\n", screen_info.orig_video_points); + printk(KERN_INFO "lfb_width / lfb_height / lfb_depth = %dx%dx%d\n", screen_info.lfb_width, screen_info.lfb_height, screen_info.lfb_depth); + printk(KERN_INFO "lfb_base = 0x%x, lfb_size = 0x%x\n", screen_info.lfb_base, screen_info.lfb_size); + printk(KERN_INFO "cl_magic = 0x%x, cl_offset = 0x%x\n", screen_info.cl_magic, screen_info.cl_offset); + printk(KERN_INFO "lfb_linelength = 0x%x\n", screen_info.lfb_linelength); + printk(KERN_INFO "red_size = 0x%x, red_pos = 0x%x\n", screen_info.red_size, screen_info.red_pos); + printk(KERN_INFO "green_size = 0x%x, green_pos = 0x%x\n", screen_info.green_size, screen_info.green_pos); + printk(KERN_INFO "blue_size = 0x%x, blue_pos = 0x%x\n", screen_info.blue_size, screen_info.blue_pos); + printk(KERN_INFO "rsvd_size = 0x%x, rsvd_pos = 0x%x\n", screen_info.rsvd_size, screen_info.rsvd_pos); + printk(KERN_INFO "vesapm = 0x%x:0x%x\n", screen_info.vesapm_seg, screen_info.vesapm_off); + printk(KERN_INFO "pages = 0x%x\n", screen_info.pages); + printk(KERN_INFO "vesa_attributes = 0x%x\n", screen_info.vesa_attributes); + printk(KERN_INFO "capabilities = 0x%x\n", screen_info.capabilities); + + while (1); + printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id); return 0; --/9DWx/yDrRhgMJTb--