BBS水木清华站∶精华区
发信人: mephisto (梦菲斯特*大宝宝), 信区: Linux
标 题: Re: 源码分析的问题
发信站: BBS 水木清华站 (Tue Dec 12 18:02:12 2000)
这个地方不是setup.S写的,
是bootloader 写的. 例如lilo和 loadlin, 用来放启动的linux的信息的.
看 arch/i386/boot/bootsect.S bsetup.s
! bootsect.s is loaded at 0x7c00 by the bios-startup routines, and moves
! itself out of the way to address 0x90000, and jumps there.
!
! bde - should not jump blindly, there may be systems with only 512K low
! memory. Use int 0x12 to get the top of memory, etc.
!
! It then loads 'setup' directly after itself (0x90200), and the system
! at 0x10000, using BIOS interrupts.
!
--------------------
! Signature words to ensure LILO loaded us right
^^^^^
INITSEG = 0x9000 ! 0x9000, we move boot here - out of the way
SYSSEG = 0x1000 ! 0x1000, system loaded at 0x10000 (65536).
SETUPSEG = 0x9020 ! 0x9020, this is the current segment
! ... and the former contents of CS
DELTA_INITSEG = SETUPSEG - INITSEG ! 0x0020
【 在 sonicbb (风间苍月) 的大作中提到: 】
∶ 小弟在分析linux内河源代码的Head.S时,遇到如下语句
∶ cmpw $(CL_MAGIC),CL_MAGIC_ADDR
∶ 前面有定义:CL_MAGIC=0xa33f CL_MAGIC_ADDR=0x90020
∶ 请问setup.S在0x90020处写入了一个什么东东?我老是找不到setup.S中的相关部分.
∶ 谢谢!
--
约塞连怀疑地摇了摇头,拒绝接受丹比的劝告."当我抬起来时,我看到人们全在设法赚钱.我
看不见天堂,看不见圣人,也看不见天使.我只看见人们利用每一次正当的冲动和每一场人类
的悲剧大把大把地捞钱."
※ 来源:·BBS 水木清华站 smth.org·[FROM: 211.99.240.21]
BBS水木清华站∶精华区