public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba•org>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: linuxppc-dev@lists•ozlabs.org, paulus@samba•org, amodra@gmail•com
Subject: Re: [PATCH 1/3] powerpc: Relocate prom_init.c on 64bit
Date: Wed, 5 Dec 2012 11:07:23 +1100	[thread overview]
Message-ID: <20121205110723.68839261@kryten> (raw)
In-Reply-To: <1353993743.2179.28.camel@pasglop>


Hi Ben,

> My only potential objection was that it might have been cleaner to
> actually build prom_init.c as a separate binary alltogether and piggy
> back it...

Yeah, I went through a number of options before settling on this one.


Move prom_init.c into arch/powerpc/boot

Pros:
- 32 bit environment fits well with 32 bit OF interface
- Clear separation enforced between prom_init.c and rest of kernel
- Can build boot wrapper -mrelocatable, similar to ppc32 kernel

Cons:
- tools that assume we can boot a vmlinux will break.
  - distro bootloader tools
  - provisioning and test environments 
- profiling and debugging tools that currently use a vmlinux will break
  - oprofile, perf
- Places more pressure on already fragile early memory map
  - have to uncompress the zImage somewhere in the RMO
- prom_init.c needs to pull in quite a lot of kernel headers
  - seemed difficult to force them to build 32 bit
- Increased simulator boot times due to uncompress stage


Build prom_init.c 32 bit and attach the vmlinux as a binary blob.

This means a vmlinux will be bootable, but profiling tools still wont
work.


Build prom_init.c 32 bit, tack it onto the end of the vmlinux and
add a trampoline at the start of the vmlinux.

This means a vmlinux will be bootable and profiling tools will work
against it. Even so it feels gross to me.

Anton

  reply	other threads:[~2012-12-05  0:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  3:39 [PATCH 1/3] powerpc: Relocate prom_init.c on 64bit Anton Blanchard
2012-11-27  3:40 ` [PATCH 2/3] powerpc: Remove RELOC() macro Anton Blanchard
2012-11-27  3:41 ` [PATCH 3/3] powerpc: Build kernel with -mcmodel=medium Anton Blanchard
2012-11-27  5:22 ` [PATCH 1/3] powerpc: Relocate prom_init.c on 64bit Benjamin Herrenschmidt
2012-12-05  0:07   ` Anton Blanchard [this message]
2012-12-05  7:20     ` Benjamin Herrenschmidt

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=20121205110723.68839261@kryten \
    --to=anton@samba$(echo .)org \
    --cc=amodra@gmail$(echo .)com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox