阅读内容

Linux内核参数“vga=”是怎样影响显示模式

Linux内核参数"vga="是怎样影响显示模式

[日期:2007-04-27] 来源:Linux公社  作者:Linux


哪没有输出vesafb信息,是在那一步中断的呢?逐步跟踪,终于眼前一亮:
if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB)
return -ENODEV;
据我所知,screen_info是与“vga=”参数有密切关系的!查看VIDEO_TYPE_VLFB定义
#define VIDEO_TYPE_VLFB 0x23 /* VESA VGA in graphic mode */

正是想要的。

进一步验证,screen_info的元素orig_video_isVGA位于距起点“0x0f”处。继续往回找,
有screen_info = SCREEN_INFO;

#define PARAM (boot_params)
#define SCREEN_INFO (*(struct screen_info *) (PARAM+0))
在/arch/i386/kernel/head.s文件中找到这么一段
/*
* Copy bootup parameters out of the way.
* Note: %esi still has the pointer to the real-mode data.
* With the kexec as boot loader, parameter segment might be loaded beyond
* kernel image and might not even be addressable by early boot page tables.
* (kexec on panic case). Hence copy out the parameters before initializing
* page tables.
*/
movl $(boot_params - __PAGE_OFFSET),%edi
movl $(PARAM_SIZE/4),%ecx
cld
rep
movsl
注释意思说,将启动参数拷贝到boot_params指向的地方。在vedio.s中,有相关代码处理vesa驱动。
mopar_gr:
leaw modelist+1024, %di
movb $0x23, %fs:(PARAM_HAVE_VGA)
。。。。。。
而PARAM_HAVE_VGA定义为
#define PARAM_HAVE_VGA 0x0f
上一页1234下一页  GO
【内容导航】
第1页:Linux内核参数"vga="是怎样影响显示模式 第2页:Linux内核参数"vga="是怎样影响显示模式
第3页:Linux内核参数"vga="是怎样影响显示模式 第4页:Linux内核参数"vga="是怎样影响显示模式



相关资讯       Linux 
本文评论       全部评论
发表评论
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款


点评: 字数
姓名:

L
I
N
U
X


GOOGLE搜索
Google