[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] split realmode and loader routines out of startup.S
From: |
Robert Millan |
Subject: |
Re: [PATCH] split realmode and loader routines out of startup.S |
Date: |
Wed, 17 Oct 2007 10:50:52 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Wed, Oct 17, 2007 at 10:32:28AM +0200, Marco Gerards wrote:
> > * kern/i386/pc/startup.S (grub_linux_prot_size): Moved to ...
> > * kern/i386/loader.S (grub_linux_prot_size): ... here.
>
> I would say:
>
> (...): Moved from here...
> (...): ... to here.
>
> Can you change that?
Ok (ACKed also for the next patch I already sent).
> > * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved to ...
> > * kern/i386/loader.S (grub_linux_tmp_addr): ... here.
> > * kern/i386/pc/startup.S (grub_linux_real_addr): Moved to ...
> > * kern/i386/loader.S (grub_linux_real_addr): ... here.
> > * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved to ...
> > * kern/i386/loader.S (grub_linux_boot_zimage): ... here.
> > * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved to ...
> > * kern/i386/loader.S (grub_linux_boot_bzimage): ... here.
> > * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved to ...
> > * kern/i386/loader.S (grub_multiboot_real_boot): ... here.
> > * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved to ...
> > * kern/i386/loader.S (grub_multiboot2_real_boot): ... here.
> >
> > * kern/i386/realmode.S: New file.
> >
> > * kern/i386/pc/startup.S (protstack): Moved to ...
> > * kern/i386/realmode.S (protstack): ... here.
> > * kern/i386/pc/startup.S (gdt): Moved to ...
> > * kern/i386/realmode.S (gdt): ... here.
> > * kern/i386/pc/startup.S (prot_to_real): Moved to ...
> > * kern/i386/realmode.S (prot_to_real): ... here.
> >
> > * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
> > `kern/i386/realmode.S'.
>
> Why include? Can't it be linked? That's what a linker is for :-)
Linking required wrapping a lot of references with EXT_C() macro, so I opted
for #include (note this is done for lzo1x.S already).
Also, #including stuff from the wrong [1] place caused cpu faults in my tests.
With my current patch, code doesn't change much its location (real mode stuff
at the beginning, loader stuff at the end).
[1] Sorry, I'm not sure what wrong means here. Maybe it has to do with GAS
syntax magic affecting cross-include borders or with a weird hardcoded
reference to a specific memory layout.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)