grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newreloc and intwrap merges


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Newreloc and intwrap merges
Date: Mon, 30 Aug 2010 23:25:32 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100805 Icedove/3.0.6

Hello, I'm happy to announce the newreloc and intwrap. First branch
abstract the problems of putting right image into right place. It
handles such issues as self-overwriting and firmware allocation. This
allows to write loaders by just specifying the address requirements for
chunks, loading data into them and specifying the initial register
state. As immediate benefits all the helpers and trampolines are gone,
core size decreased, functions moved where they should be instead of
being constrained to kernel. Only BIOS chainloader helper is still
present and still in the core because it has to redisable A20. Also all
x86 loaders except heavily firmware-dependent (linux16, chainloaders and
appleloader) are available on all x86 platforms. The target kernels may
however have issues themselves when being loaded on unexpected platform
(more info is in documentation). Also to check all these platform-target
pairs I added bootchecks (more info is in docs).
intwrap is another concept. Previously all BIOS calls were done in
kernel from asm helpers. Now we have an unified helper
grub_bios_interrupt which receives an interrupt number and cpu state and
fills cpu state structure with new data. Now you don't have to know asm
to do BIOS calls, C knowledge is enough, functions are at their logical
places and core is smaller. Some console functions, get_rtc, grub_exit
and pxe_call remain in startup.S (in addition to the stuff which is
really for startup, chainloader helper and unified helper). Moving first
3 categories won't save any space since these functions are required to
be in kernel and must have a pointer to them (so no inlining), however
they may be moved to C for maintenance reasons in the future.
grub_pxe_call shouldn't be in kernel but it's different from interrupt
helper so it's easier to keep this helper as is (yes, I know about PM
interface but it's difficult to say which one is less buggy).
Both merges together allowed me to greatly reduce the tags representing
an arbitrary grouping of platforms and unify a lot of code.

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]