社区
Linux_Kernel
帖子详情
关于cpu_gdt_table[GDT_ENTRIES]的问题
orclc
2005-08-03 03:23:15
我在程序了作了如下声明:
extern struct desc_struct cpu_gdt_table[GDT_ENTRIES];
编译时出错,错误信息为:
array type has incomplete element type
这是为什么啊?
...全文
78
回复
打赏
收藏
关于cpu_gdt_table[GDT_ENTRIES]的问题
我在程序了作了如下声明: extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; 编译时出错,错误信息为: array type has incomplete element type 这是为什么啊?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
freebsdprotmode底层文档.7z
A guide to how the FreeBSD kernel manages the IA32 processors in Protected Mode (c) 2004, Arne Vidstrom, http://vidstrom.net Version 1.0 : 2004-06-17 Table of contents 1. P REREQUISITE KNOWLEDGE ....................................................................................2 2. I NFORMATION SOURCES ..........................................................................................2 3. T HE I NTERRUPT D ESCRIPTOR T ABLE (IDT)............................................................2 3.1 The IDT definition............................................................................................2 3.2 Setting entries in the IDT.................................................................................3 3.3 A look inside the IDT with KernView ..............................................................4 3.4 Making the IDT active .....................................................................................5 4. S YSCALL HANDLING ...............................................................................................6 4.1 The INT 0x80 interrupt handler.......................................................................6 4.2 Syscall dispatching...........................................................................................8 4.3 The copyin() function.....................................................................................10 5. T HE G LOBAL D ESCRIPTOR T ABLE (GDT).............................................................12 5.1 The GDT definition........................................................................................12 5.2 Setting up the descriptors in the GDT............................................................13 5.3 Making the GDT active..................................................................................16 5.4 A look inside the GDT with KernView...........................................................17 5.5 Segment selector values in an ordinary user mode program ........................21 6. T ASK SWITCHING ..................................................................................................22 6.1 The cpu_switch() function..............................................................................22 7. V IRTUAL PAGING ..................................................................................................29 7.1 The page fault handler...................................................................................29 7.2 Virtual paging and task switching.................................................................32 8 T HE L OCAL D ESCRIPTOR T ABLE (LDT).................................................................32 8.1 A quick glance at the LDT .............................................................................32 9. M ISCELLANEOUS ..................................................................................................34 9.1 The uiomove() function..................................................................................34 1. Prerequisite knowledge This guide assumes that the reader is familiar with how the IA32 processors work in Protected Mode, with the C programming language, and with AT&T syntax IA32 assembler programming. It also assumes some knowledge about user mode system programming for FreeBSD and some general knowledge about the internal workings of the kernel. 2. Information sources The primary source of information used when writing this guide has been the FreeBSD kernel source code itself. The FreeBSD Kernel Cross-Reference at http://fxr.watson.org/ has been very valuable for doing easy searches in the kernel source code, but the source code snippets in the text comes from the /usr/src directory tree on a FreeBSD 4.9 installation. Also, the book The Design and Implementation of the 4.4 BSD Operating System, by McKusick / Bostic / Karels / Quarterman, was very useful as a general kernel overview. The references used for IA32 information are the IA-32 Intel Architecture Software Developer’s Manual from Intel, and the book Protected Mode Software Architecture
x86架构下Linux初始化流程中GDT、IDT建立和切换
x86架构下Linux初始化流程中GDT建立和切换 1、代码流:_start()–>start_of_setup()–>main()–>go_to_protected_mode()–>protected_mode_jump(); 函数所属文件: arch/x86/boot/head.S: _start()/start_of_setup(); //注:16位引导协议入口点...
用不到200行代码设计x86保护模式下的操作系统
本课程为学习Linux 0.11内核源码,以及《设计自己的x86 Linux操作系统》课程的前置课程。课程通过不到200行代码(其中汇编不到100行),演示了如何使用80386的硬件机制来创建一个32位简单的双任务切换的超小型操作系统。课程重点讲解80386保护模式下的编程,涉及的内容包括:1、计算机启动流程的介绍2、实模式和保护模式区别,进入保护模式下的方法3、GDT/IDT/LDT表介绍以及使用方法4、利用TSS来实现任务的切换5、利用8253定时器中断实现任务下下文切换6、利用调用门增加系统调用接口。学习本课程只需要你有8086汇编的基础(简单用过即可,不需要精通,我也不精通),熟悉C语言编程即可。在学习完本课程后,将为分析Linux 0.11源码、设计自己的操作系统打下坚实的硬件知识储备。可以点击我的课程主页,了解更多相关课程。
CPU: Intel cpu features,历史; boot_cpu_has
Intel CPU 历史,及功能识别
Xen中的异常和中断(系统调用)、gdt、ldt
HYPERVISOR_set_gdt static void xen_load_gdt(const struct desc_ptr *dtr) /* * load_gdt for early boot, when the gdt is only mapped once */ static void __init xen_load_gdt_boot(const struct desc_...
Linux_Kernel
4,441
社区成员
17,460
社区内容
发帖
与我相关
我的任务
Linux_Kernel
Linux/Unix社区 内核源代码研究区
复制链接
扫一扫
分享
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章