All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
	u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>
Subject: Re: [PATCH 03/16] image: Take entry point as an output of setup_booti
Date: Tue, 11 Jun 2024 08:09:41 -0600	[thread overview]
Message-ID: <20240611140941.GE68077@bill-the-cat> (raw)
In-Reply-To: <cdb2ba34-09c0-47f3-b72c-4099b48a6946@app.fastmail.com>

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

On Tue, Jun 11, 2024 at 03:01:00PM +0100, Jiaxun Yang wrote:
> 
> 
> 在2024年6月11日六月 下午2:52,Tom Rini写道:
> > On Tue, Jun 11, 2024 at 02:29:38PM +0100, Jiaxun Yang wrote:
> >> 
> >> 
> >> 在2024年6月11日六月 下午2:02,Heinrich Schuchardt写道:
> >> > On 22.05.24 17:34, Jiaxun Yang wrote:
> >> >> For LoongArch the start of the image is not the entry
> >> >> point to the image.
> >> >
> >> > Looking at arch/loongarch/kernel/head.S there seem to be two cases:
> >> >
> >> > * The kernel has an EFI stub (CONFIG_EFI_STUB=y).
> >> >    The legacy physical entry point is available at offset 0x08 of the
> >> > header.
> >> > * The kernel has no EFI stub.
> >> >    The kernel entry point matches the start of the image.
> >> >
> >> > Where do you differentiate between the cases?
> >> 
> >> Hi Heinrich,
> >> 
> >> In case there is no EFI stub LoongArch would use elf format vmlinux, there
> >> is no real "raw" image for us.
> >> 
> >> bootelf can't be used at the moment as it doesn't setup FDT and other environments
> >> properly.
> >> 
> >> I'm planning to implement a bootlinuxelf command for this case, as MIPS, LoongArch,
> >> xtensa are all using ELF as default kernel image format.
> >
> > Please note that we have CONFIG_CMD_ELF_FDT_SETUP already, so adjusting
> > things so that bootelf works for this case should be doable without a
> > new command.
> 
> This is a little bit broken as then you'll need to bring architecture specific
> functions to bootelf to setup boot registers, initrd etc. It's fine for Arm64 which
> you just need to throw fdt into a location in memory but for MIPS and LoongArch 
> you have to setup a good deal of other stuff.
> 
> Ideally those setups should be done with bootm_run_states as what we've done at
> booti, but that would be a semantic to bootelf command. I know many existing
> MIPS bare-metal applications rely on argc/argv style bootelf and I don't want to
> break them, thus I think a new command is necessary.

We should discuss this in its own thread, yeah. It's been a long while
since I had to bootelf something non-trivial and one of the issues is
that yes, a bunch of quiesce the system functionality wasn't done. Maybe
it's just a matter of adding a flag to bootelf to say we're booting an
OS rather than simple app and so call the normal boot os prep function
chain.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2024-06-11 14:09 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22 15:34 [PATCH 00/16] LoongArch initial support Jiaxun Yang
2024-05-22 15:34 ` [PATCH 01/16] lib: fdtdec: Handle multiple memory nodes Jiaxun Yang
2024-06-11 12:26   ` Heinrich Schuchardt
2024-06-11 13:47     ` Jiaxun Yang
2024-06-11 18:51       ` Simon Glass
2024-06-12  5:55         ` Heinrich Schuchardt
2024-05-22 15:34 ` [PATCH 02/16] linux/io.h: Use map_physmem to implement ioremap Jiaxun Yang
2024-05-22 15:34 ` [PATCH 03/16] image: Take entry point as an output of setup_booti Jiaxun Yang
2024-06-11 13:02   ` Heinrich Schuchardt
2024-06-11 13:29     ` Jiaxun Yang
2024-06-11 13:52       ` Tom Rini
2024-06-11 14:01         ` Jiaxun Yang
2024-06-11 14:09           ` Tom Rini [this message]
2024-05-22 15:34 ` [PATCH 04/16] elf.h Define LoongArch bits Jiaxun Yang
2024-06-16 10:34   ` Heinrich Schuchardt
2024-05-22 15:34 ` [PATCH 05/16] image: Define IH_ARCH_LOONGARCH Jiaxun Yang
2024-06-16 10:37   ` Heinrich Schuchardt
2024-05-22 15:34 ` [PATCH 06/16] LoongArch: skeleton and headers Jiaxun Yang
2024-05-23 15:15   ` Heinrich Schuchardt
2024-05-22 15:34 ` [PATCH 07/16] LoongArch: lib: General routines Jiaxun Yang
2024-06-16 11:01   ` Heinrich Schuchardt
2024-06-16 13:06     ` Jiaxun Yang
2024-06-16 16:00       ` Heinrich Schuchardt
2024-06-18 14:19         ` Jiaxun Yang
2024-05-22 15:34 ` [PATCH 08/16] LoongArch: CPU assembly routines Jiaxun Yang
2024-05-22 15:34 ` [PATCH 09/16] LoongArch: Exception handling Jiaxun Yang
2024-05-22 15:34 ` [PATCH 10/16] LoongArch: Boot Image bits Jiaxun Yang
2024-05-22 15:34 ` [PATCH 11/16] LoongArch: Generic CPU type Jiaxun Yang
2024-05-22 15:34 ` [PATCH 12/16] cpu: Add loongarch_cpu driver Jiaxun Yang
2024-05-22 15:34 ` [PATCH 13/16] timer: Add loongarch_timer driver Jiaxun Yang
2024-05-22 15:34 ` [PATCH 14/16] board: emulation: Add qemu-loongarch Jiaxun Yang
2024-05-22 15:34 ` [PATCH 15/16] efi: LoongArch: Define LoongArch bits everywhere Jiaxun Yang
2024-05-23 16:14   ` Heinrich Schuchardt
2024-05-23 16:25     ` Jiaxun Yang
2024-05-22 15:34 ` [PATCH 16/16] efi: LoongArch: Implement everything Jiaxun Yang
2024-05-23 16:26   ` Heinrich Schuchardt
2024-05-23 16:46     ` Jiaxun Yang
2024-05-23 15:25 ` [PATCH 00/16] LoongArch initial support Tom Rini
2024-05-23 15:38   ` Jiaxun Yang
2024-05-23 15:43     ` Tom Rini
2024-06-04 10:50       ` Jiaxun Yang
2024-06-04 17:09         ` Tom Rini
2024-05-23 15:47     ` Peter Robinson

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=20240611140941.GE68077@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /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.