All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: "Vladimir coder\/phcoder' Serbinenko" <phcoder@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Would a cleanup+extending of docs/multiboot.h be acceptable?
Date: Fri, 08 Apr 2011 16:43:22 +0200	[thread overview]
Message-ID: <87mxk0ls6t.fsf@frosties.localnet> (raw)
In-Reply-To: <4D9DF982.3010505@gmail.com> (Vladimir Serbinenko's message of "Thu, 07 Apr 2011 19:50:58 +0200")

"Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com> writes:

> On 07.04.2011 19:32, Goswin von Brederlow wrote:
>> I see that you have added 32bit MIPS support. No 64bit x86_64 support
>> though. So my trampoline + 64bit kernel stuff would still be interesting
>> to people.
> We already have the needed infrastructure to load in 64-bit mode. Have a
> look at loader/i386/bsd.c. Mostly you just need to use
> grub_relocator64_boot and not grub_relocator32_boot. The main issue is
> clear specification of intended behaviour.

I'm adding an implementation of this to kvm, proof of concept kind of
way. For that I'm assuming the following changes to the specs:

// Why is this in steps of 4?
#define MULTIBOOT_ARCHITECTURE_X86_64  8
#define MULTIBOOT_ARCHITECTURE_MIPS64  12

All structures remain as they are. That means that addresses must be
below 4GB (maybe even 2GB or sign extention screws things up) unless
they are defined as 64bit (memory mappings use 64bit, entry point only
32bit). The kernel + modules must be loaded below 4GB (2GB?).

The system state when leaving the bootloader is like in 32bit but
modified as follows:

- PAE is enabled
- Paging is enabled
- Long mode is enabled
- Long mode is active
- CS contains a 64bit code segment
- the lower 4GB of memory are mapped 1:1 accessible R/W to Ring 0 and in
  2MB granularity

I'm tempted to add 2 new info tags: multiboot_tag_gpt and
multiboot_tag_page_tables. The later would contain the number of tables
and an array of pointers to the pages. But that might be too i386/x86
specific.

MfG
        Goswin



  reply	other threads:[~2011-04-08 14:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 12:09 Would a cleanup+extending of docs/multiboot.h be acceptable? Goswin von Brederlow
2011-04-07 12:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-07 14:50   ` Goswin von Brederlow
2011-04-07 14:57     ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-07 17:32       ` Goswin von Brederlow
2011-04-07 17:50         ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-08 14:43           ` Goswin von Brederlow [this message]
2011-04-08 14:53             ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-08 17:18               ` Goswin von Brederlow
2011-04-18 19:49               ` Goswin von Brederlow

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=87mxk0ls6t.fsf@frosties.localnet \
    --to=goswin-v-b@web.de \
    --cc=grub-devel@gnu.org \
    --cc=phcoder@gmail.com \
    /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.