[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/7] RFC: Use correct addresses, eliminate manual relocations
From: |
Pavel Roskin |
Subject: |
Re: [PATCH 7/7] RFC: Use correct addresses, eliminate manual relocations |
Date: |
Wed, 15 Jul 2009 11:33:22 -0400 |
On Tue, 2009-07-14 at 21:00 -0400, Pavel Roskin wrote:
> ChangeLog:
>
> * boot/i386/pc/boot.S: Declare 0x0-0x7c00 as a discardable .bss
> segment. Eliminate ABS, rely on the assembler knowing correct
> addresses. Eliminate .bss segment for the kernel, use direct
> jump to the kernel address.
I managed to install a Darwin cross-compiler, and it turn out it won't
accept .bss in assembler files. Using real addresses would be very,
very nice, but we'll need to find a portable way. Maybe grub-macho2img
should be taught to cut away sections filled with zeroes.
So patches 5 and 7 are dropped for now. Patches 1-4 and 6 have been
applied. Installation on FAT32 is safe now. The "Hard Disk" message
has been preserved, so it can be shortened later if the real need
arises.
That said, using direct jump to 0x8000 would save 3 bytes, and then we
can save 2 bytes by taking an unconditional jump from the "disk check"
code and reverting the logic. And maybe we could save 1 byte by yanking
"cli" as writing to %ss disables interrupts until the next instruction.
While testing the patches in qemu, I've seen some error messages and
found that they should be followed by a new line, as qemu adds its own
error message.
--
Regards,
Pavel Roskin
- [PATCH 1/7] Make boot/i386/pc/boot.S safer to modify, Pavel Roskin, 2009/07/14
- [PATCH 2/7] Remove unused version information from boot/i386/pc/boot.S, Pavel Roskin, 2009/07/14
- [PATCH 3/7] Eliminate kernel_segment, Pavel Roskin, 2009/07/14
- [PATCH 4/7] Eliminate kernel_address, Pavel Roskin, 2009/07/14
- [PATCH 5/7] Add newline after "Error" in bootsector, Pavel Roskin, 2009/07/14
- [PATCH 6/7] Increase BPB size to accommodate FAT32., Pavel Roskin, 2009/07/14
- [PATCH 7/7] RFC: Use correct addresses, eliminate manual relocations, Pavel Roskin, 2009/07/14
- Re: [PATCH 7/7] RFC: Use correct addresses, eliminate manual relocations,
Pavel Roskin <=
- Re: [PATCH 7/7] RFC: Use correct addresses, eliminate manual relocations, Vladimir 'phcoder' Serbinenko, 2009/07/15
- Re: [PATCH 7/7] RFC: Use correct addresses, eliminate manual relocations, Pavel Roskin, 2009/07/15
- Re: [PATCH 7/7] RFC: Use correct addresses, eliminate manual relocations, Pavel Roskin, 2009/07/15
- Re: [PATCH 7/7] RFC: Use correct addresses, eliminate manual relocations, Vladimir 'phcoder' Serbinenko, 2009/07/16
Re: [PATCH 1/7] Make boot/i386/pc/boot.S safer to modify, Robert Millan, 2009/07/16