I'm not an expert, but let me try to explain how I understand the code....
On Fri, 6 Apr 2001 [EMAIL PROTECTED] wrote:
> I know that the CX register contains the count for the following movesw
> instruction .
> I want to know what is the exatly number of CX .
> In bootsect.S , we know 0x9000:[497] is the sector number of setup code . I
> have seen that it is 4.
>
> Than "sub bx,#4 ! LILO loads 4 sectors of setup "
> bx=0???? What and where is the rest of setup???
> Those following codes are executed when there is "bad_sig" .
> LILO loads 4 sectors of setup ??? Is the sectors numbers of setup.S is big
> than 4 ?? In bootset.c , it is defined as 4.
If LILO is not used:
bootsect.S which is 1 sector big gets loaded from BIOS to 7c00 and
execution starts at 7c00. bootsect.S copies itself from 7c00 to 0x90000.
bootsect.S loads setup.S which is 4 sector big to 0x90200 after
bootsect.S (0x200 = 512bytes = 1 sector)
>
> When we use lilo ,lilo load its bootsect ( lilo's bootsect ) and setup.S
> ,does the lilo load all the sector of the sect.S ????
> When the task of lilo is completed , it give the control to setup.S or the
> kernel start code ?????
AFAIK, LILO loads setup.S to 0x10000. In this case, setup.S relocates
itself to 0x90200. LILO gives control to setup.S.
> Is the kernel Image including the code of bootsect.S and setup.S ????
No, not when LILO has not been used. The kernel image gets loaded during
bootsect.S execution. If LILO is used, bootsect.S is not executed and
hence (I guess) LILO loads the kernel image.
> Thank you all .
>
> The codes in setup.S that confuse me are the following :
I guess, what this code does it checks if LILO has loaded setup.S at
0x10000 since 0x9020 didn't had a valid signature because setup.S didn't
get loaded by bootsect.S to 0x9020.
As I said, this is my understanding and it might not be correct.
Werner
> ..........
> ! We now have to find the rest of the setup code/data
> bad_sig:
> mov ax,cs ! aka #SETUPSEG
> sub ax,#DELTA_INITSEG ! aka #INITSEG
> mov ds,ax
> xor bh,bh
> mov bl,[497] ! get setup sects from boot sector
> sub bx,#4 ! LILO loads 4 sectors of setup
> shl bx,#8 ! convert to words
> mov cx,bx
> shr bx,#3 ! convert to segment
> add bx,#SYSSEG
> seg cs
> mov start_sys_seg,bx
>
> ! Move rest of setup code/data to here !
> mov di,#2048 ! four sectors loaded by LILO !
> sub si,si
> mov ax,cs ! aka #SETUPSEG
> mov es,ax
> mov ax,#SYSSEG
> mov ds,ax
> rep
> movsw
> ..............
>
>
>
>
>
> _______________________________________________
> Redhat-devel-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-devel-list
>
_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list