⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1127.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 5 页
字号:
01FC/2  ALL     root_dev        Default root device number<br>
01FE/2  ALL     boot_flag       0xAA55 magic number<br>
*/<br>
.org 497<br>
setup_sects:<br>
.byte SETUPSECS<br>
root_flags:<br>
.word CONFIG_ROOT_RDONLY<br>
syssize:<br>
.word SYSSIZE<br>
swap_dev:<br>
.word SWAP_DEV<br>
ram_size:<br>
.word RAMDISK<br>
vid_mode:<br>
.word SVGA_MODE<br>
root_dev:<br>
.word ROOT_DEV<br>
boot_flag:<br>
.word 0xAA55<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////<br>
// end of file<br>
<br>
<br>
<br>
<br>
[这个贴子最后由e4gle在 2002/08/25 06:30pm 编辑]<br>
<br>
////////////////////////////////////////////////////////////////////<br>
// head.txt<br>
// Copyright(C) 2001, Feiyun Wang<br>
////////////////////////////////////////////////////////////////////<br>
// analysis on linux/arch/i386/kernel/head.S (for linux 2.2.17)<br>
////////////////////////////////////////////////////////////////////<br>
<br>
////////////////////////////////////////////////////////////////////<br>
startup_32()<br>
__KERNEL_DS = 0x18;<br>
CL_MAGIC = 0xA33F;<br>
CL_MAGIC_ADDR = 0x90020;<br>
CL_BASE_ADDR = 0x90000;<br>
CL_OFFSET = 0x90022;<br>
{<br>
cld;<br>
DS = ES = FS = GS = __KERNEL_DS (= 0x18);<br>
<br>
#ifdef __SMP__<br>
if (BX) {<br>
CR4 |= mmu_cr4_features-__PAGE_OFFSET;<br>
// mmu_cr4_features defined in arch/i386/mm/init.c<br>
// __PAGE_OFFSET defined in include/asm-i386/page.h<br>
}<br>
#endif<br>
<br>
CR3 = 0x101000;// page table pointer<br>
CR0 |= 0x80000000;// set PG bit<br>
<br>
SS:ESP = stack_start;<br>
<br>
#ifdef __SMP__<br>
if (BX) {<br>
EFLAG = 0;<br>
goto checkCPUtype;<br>
}<br>
#endif<br>
<br>
clear BSS (__bss_start .. _end);<br>
setup_idt();<br>
EFLAGS = 0;<br>
move 0x90000 to empty_zero_page (i.e. 0x5000) (2 KByte);<br>
clear empty_zero_page+2K (2 KByte);<br>
<br>
if (CL_MAGIC==*(CL_MAGIC_ADDR)) {<br>
move *(CL_OFFSET)+CL_BASE_ADDR to empty_zero_page+2K (2 KByte);<br>
}<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////<br>
checkCPUtype()<br>
global variables: ready<br>
// see include/asm-i386/processor.h struct cpuinfo_x86<br>
// boot_cpu_data defined in arch/i386/kernel/setup.c<br>
struct cpuinfo_x86 boot_cpu_data;<br>
__KERNEL_DS = 0x18;<br>
{<br>
X86_CPUID = -1;<br>
<br>
X86 = 3;<br>
save original EFLAGS;<br>
check AC bit in EFLAGS;<br>
if (AC bit not changed) goto is386;<br>
<br>
X86 = 4;<br>
check ID bit in EFLAGS;<br>
restore original EFLAGS;<br>
if (ID bit not changed) goto is486;<br>
<br>
// get CPU info,<br>
// &lt;&gt; Vol.2 P.3-110<br>
CPUID(EAX=0);<br>
X86_CPUID = EAX;<br>
X86_VENDOR_ID = EBX;<br>
*((&X86_VENDOR_ID)+4) = ECX;<br>
*((&X86_VENDOR_ID)+8) = EDX;<br>
if (!EAX) goto is486;<br>
<br>
CPUID(EAX=1);<br>
CL = AL;<br>
X86 = AH & 0x0f;// family<br>
X86_MODEL = (AL & 0xf0) &gt;&gt; 4;// model<br>
X86_MASK = AL & 0x0f;// stepping id<br>
X86_CAPABILITY = EDX;// feature<br>
<br>
is486:<br>
// save PG, PE & ET, set AM, WP, NE & MP<br>
EAX = (CR0 & 0x80000011) | 0x50022;<br>
goto 2f;<br>
is386:<br>
restore original EFLAGS;<br>
// save PG, PE & ET, set MP<br>
EAX = (CR0 & 0x80000011) | 0x02;<br>
2f:<br>
CR0 = EAX;<br>
check_x87();<br>
<br>
#ifdef __SMP__<br>
if (ready) {<br>
CR4 |= 0x10;// set PSE, turn on 4 MByte pages<br>
CR3 = CR3;<br>
}<br>
ready++;<br>
#endif;<br>
<br>
lgdt gdt_descr;<br>
lidt idt_descr;<br>
DS = ES = FS = GS = __KERNEL_DS (= 0x18);<br>
<br>
#ifdef __SMP__<br>
SS = __KERNEL_DS (= 0x18);<br>
#else<br>
SS:ESP = stack_start;<br>
#endif<br>
<br>
lldt 0;<br>
cld;<br>
start_kernel();<br>
halt;<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////<br>
{<br>
#ifdef __SMP__<br>
ready:.byte 0;<br>
#endif<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////<br>
check_x87()<br>
{<br>
X86_HARD_MATH = 0;<br>
clts;<br>
fninit;<br>
fstsw ax;<br>
if (al) {<br>
// no coprocessor, set EM;<br>
// TODO; why not use |=?<br>
cr0 ^= 0x04;<br>
}<br>
else {<br>
X86_HARD_MATH = 1;<br>
fsetpm;// 0xDB, 0xE4<br>
}<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////<br>
setup_idt()<br>
{<br>
edx = &ignore_int;<br>
eax = __KERNEL_CS &lt;&lt; 16;<br>
ax = dx;<br>
dx = 0x8E00;// interrupt gate, dpl = 0, present<br>
<br>
set all entries in idt_table to eax:edx;// 256*8 Bytes<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////<br>
{<br>
stack_start:<br>
.long init_task_union+8192;<br>
.long __KERNEL_DS;<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////<br>
ignore_init()<br>
{<br>
printk("Unknown interrupt");<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////<br>
{<br>
NR_TASKS = 512;// defined in include/linux/tasks.h<br>
IDT_ENTRIES = 256;<br>
GDT_ENTRIES = 12+2*NR_TASKS;<br>
<br>
.word 0;<br>
idt_descr:<br>
.word IDT_ENTRIES*8-1;<br>
idt:<br>
.long idt_table;<br>
<br>
.word 0;<br>
gdt_descr:<br>
.word GDT_ENTRIES*8-1;<br>
gdt:<br>
.long gdt_table;<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////<br>
{<br>
.org 0x1000;<br>
swapper_pg_dir:<br>
.long 0x00102007;<br>
.fill __USER_PGD_PTRS-1, 4, 0;// 767 entries<br>
.long 0x00102007;<br>
.fill __KERNEL_PGD_PTRS-1, 4, 0;// 255 entries<br>
<br>
.org 0x2000;<br>
pg0:<br>
// ...<br>
<br>
.org 0x3000;<br>
empty_bad_page:<br>
<br>
.org 0x4000;<br>
empty_bad_page_table:<br>
<br>
.org 0x5000;<br>
empty_zero_page:<br>
<br>
.org 0x6000;<br>
.data<br>
gdt_table:<br>
.quad 0x0000000000000000;// null<br>
.quad 0x0000000000000000;// not used<br>
.quad 0x00cf9a000000ffff;// 0x10 kernel 4GB code at 0x00000000<br>
.quad 0x00cf92000000ffff;// 0x18 kernel 4GB data at 0x00000000<br>
.quad 0x00cffa000000ffff;// 0x20 user 4GB code at 0x00000000<br>
.quad 0x00cff2000000ffff;// 0x28 user 4GB data at 0x00000000<br>
.quad 0x0000000000000000;// not used<br>
.quad 0x0000000000000000;// not used<br>
<br>
.quad 0x0040920000000000;// 0x40 APM setup for bad BIOS<br>
.quad 0x00409a0000000000;// 0x48 APM CS code<br>
.quad 0x00009a0000000000;// 0x50 APM CS 16 code (16 bit)<br>
.quad 0x0040920000000000;// 0x58 APM DS data<br>
.fill 2*NR_TASKS, 8, 0;<br>
<br>
.section .text.lock<br>
stext_lock:<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////<br>
// end of file<br>
<br>
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -