All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Newreloc and intwrap merges
Date: Mon, 30 Aug 2010 23:25:32 +0200	[thread overview]
Message-ID: <4C7C21CC.4060602@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2142 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

                 reply	other threads:[~2010-08-30 21:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C7C21CC.4060602@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.