Linux boot

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Silverhawk

Linux boot

Post by Silverhawk »

Does someone know why the linux boot reallocates itself from 0x7c00 to 0x90000 ?

I really don't understand...

thanks !
Silverhawk

Linux boot : another one !

Post by Silverhawk »

Now, I have another question !

This is a quote frome the linux bootsect.S :

! ok, we've written the message, now
! we want to load the system (at 0x10000)

   mov   ax,#SYSSEG
   mov   es,ax   ! segment of 0x010000
   call   read_it
   call   kill_motor
   call   print_nl

We aren't in Pmode !!! How is it possible to load the system at physical address 0x100000 ???

I really don't understand too...
Therx

Re:Linux boot

Post by Therx »

it isn't 0x100000 but 0x10000
Silverhawk

Re:Linux boot

Post by Silverhawk »

Yes, but a segment of 0x10000 gives a physical address of 0x100000 ??
Therx

Re:Linux boot

Post by Therx »

Sorry I may be wrong as I havn't done much in real mode addressing but the solution may be this:-

I know that somehow 16bit addresses allow you to access just over 1mb (look through the boot sector topics from a while ago) and if the code copied there is small then it may work.

Just a guess ;)

Pete
Silverhawk

Re:Linux boot

Post by Silverhawk »

Thanks Pete !

I will look after it...
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Linux boot

Post by Pype.Clicker »

Silverhawk wrote: Yes, but a segment of 0x10000 gives a physical address of 0x100000 ??
you may not have a segment of 0x10000 as the ES register is only 16bits wide.

Code: Select all

@asm-i386/boot.h:
#define DEF_SYSSEG      0x1000

@boot/setup.S
SYSSEG   = DEF_SYSSEG           # 0x1000, system loaded at 0x10000 (65536).
so the actual ES value is 0x1000, which means the logical address 0x10000 will be used.

for sure linux comments could be less confuse here.
Silverhawk

Re:Linux boot

Post by Silverhawk »

OK you're right !
I've read the code with more attention, and indeed, we're at physical address 0x10000...

I 've believe what the comments...

Thanks Pype.Cliker
Post Reply