From: Yao Zi <me@ziyao.cc>
To: Simon Glass <sjg@chromium.org>, me@ziyao.cc
Cc: Tom Rini <trini@konsulko.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
u-boot@lists.denx.de
Subject: Re: [PATCH v2 15/16] efi: LoongArch: Define LoongArch bits everywhere
Date: Tue, 14 Jul 2026 17:20:17 +0000 [thread overview]
Message-ID: <alZv0aZPHb-xed4F@pie> (raw)
In-Reply-To: <CAFLszTihFKatBwxu6YeQDJZvXcbp6_s07Xtgb5STPREGU8K8LA@mail.gmail.com>
On Thu, Jul 02, 2026 at 11:27:36AM +0100, Simon Glass wrote:
> Hi Yao,
>
> On 2026-07-01T11:17:53, Yao Zi <me@ziyao.cc> wrote:
> > efi: LoongArch: Define LoongArch bits everywhere
> >
> > They are all coming from UEFI specification, PE-COFF specification,
> > or IANA websites.
> >
> > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> > Signed-off-by: Yao Zi <me@ziyao.cc>
> >
> > include/asm-generic/pe.h | 2 ++
> > include/config_distro_bootcmd.h | 5 +++++
> > include/pe.h | 1 +
> > lib/efi_loader/efi_helper.c | 4 ++++
> > lib/efi_loader/efi_image_loader.c | 7 +++++++
> > lib/efi_loader/efi_runtime.c | 4 ++++
> > lib/efi_selftest/efi_selftest_miniapp_exception.c | 3 +++
> > 7 files changed, 26 insertions(+)
>
> > They are all coming from UEFI specification, PE-COFF specification,
> > or IANA websites.
...
> > diff --git a/lib/efi_selftest/efi_selftest_miniapp_exception.c b/lib/efi_selftest/efi_selftest_miniapp_exception.c
> > @@ -35,6 +35,9 @@ efi_status_t EFIAPI efi_main(efi_handle_t handle,
> > +#elif defined(CONFIG_LOONGARCH)
> > + /* ud 31 */
> > + asm volatile (".word 0x386007ff\n");
>
> The rest of the series keys off CONFIG_ARCH_LA64. Please pick one
> and use it consistently - otherwise a future LA32 build will
> trigger this ud but be missing all the other bits. Given Tom's
> suggestion on patch 6 to move to CONFIG_LOONGARCH, that is probably
> the way to unify it.
It's intended to use CONFIG_LOONGARCH instead of CONFIG_ARCH_LA64 here,
since this UD works for both LA32 and LA64. Could you please explain
what's wrong with having only this UD defined for the future LA32 port?
> > diff --git a/include/pe.h b/include/pe.h
> > @@ -194,6 +194,7 @@ typedef struct _IMAGE_RELOCATION
> > +#define IMAGE_REL_BASED_LOONGARCH64_MARK_LA 8 /* yes, 8 too */
>
> The PE-COFF spec also defines IMAGE_REL_BASED_LOONGARCH32_MARK_LA
> (=8). Since __loongarch_grlen == 32 is handled in efi_image_loader.c
> below, it would be tidier to add both here even if only the 64-bit
> one is wired up today.
Okay.
> Regards,
> Simon
next prev parent reply other threads:[~2026-07-14 17:20 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 11:17 [PATCH v2 00/16] LoongArch initial support Yao Zi
2026-07-01 11:17 ` [PATCH v2 01/16] lib: fdtdec: Handle multiple memory nodes Yao Zi
2026-07-02 10:22 ` Simon Glass
2026-07-02 20:39 ` Yao Zi
2026-07-01 11:17 ` [PATCH v2 02/16] linux/io.h: Use map_physmem to implement ioremap Yao Zi
2026-07-02 10:21 ` Simon Glass
2026-07-01 11:17 ` [PATCH v2 03/16] image: Take entry point as an output of setup_booti Yao Zi
2026-07-01 17:39 ` Tom Rini
2026-07-02 20:39 ` Yao Zi
2026-07-02 20:55 ` Tom Rini
2026-07-02 21:10 ` Yao Zi
2026-07-02 9:46 ` Simon Glass
2026-07-01 11:17 ` [PATCH v2 04/16] elf: Define LoongArch bits Yao Zi
2026-07-02 10:24 ` Simon Glass
2026-07-01 11:17 ` [PATCH v2 05/16] image: Define IH_ARCH_LOONGARCH Yao Zi
2026-07-02 9:44 ` Simon Glass
2026-07-01 11:17 ` [PATCH v2 06/16] LoongArch: skeleton and headers Yao Zi
2026-07-01 17:47 ` Tom Rini
2026-07-02 20:40 ` Yao Zi
2026-07-02 20:57 ` Tom Rini
2026-07-02 10:28 ` Simon Glass
2026-07-02 21:22 ` Yao Zi
2026-07-01 11:17 ` [PATCH v2 07/16] LoongArch: lib: General routines Yao Zi
2026-07-01 17:49 ` Tom Rini
2026-07-02 9:24 ` Jiaxun Yang
2026-07-02 10:54 ` Simon Glass
2026-07-02 14:07 ` Tom Rini
2026-07-02 20:56 ` Yao Zi
2026-07-02 20:58 ` Tom Rini
2026-07-02 10:28 ` Simon Glass
2026-07-02 21:46 ` Yao Zi
2026-07-01 11:18 ` [PATCH v2 08/16] LoongArch: CPU assembly routines Yao Zi
2026-07-02 10:25 ` Simon Glass
2026-07-03 20:12 ` Yao Zi
2026-07-04 11:22 ` Jiaxun Yang
2026-07-01 11:18 ` [PATCH v2 09/16] LoongArch: Exception handling Yao Zi
2026-07-02 10:25 ` Simon Glass
2026-07-01 11:18 ` [PATCH v2 10/16] LoongArch: Boot Image bits Yao Zi
2026-07-01 17:53 ` Tom Rini
2026-07-02 10:26 ` Simon Glass
2026-07-14 16:57 ` Yao Zi
2026-07-01 11:18 ` [PATCH v2 11/16] LoongArch: Generic CPU type Yao Zi
2026-07-01 17:55 ` Tom Rini
2026-07-14 17:08 ` Yao Zi
2026-07-14 17:20 ` Tom Rini
2026-07-02 10:26 ` Simon Glass
2026-07-01 11:18 ` [PATCH v2 12/16] cpu: Add loongarch_cpu driver Yao Zi
2026-07-02 10:26 ` Simon Glass
2026-07-01 11:18 ` [PATCH v2 13/16] timer: Add loongarch_timer driver Yao Zi
2026-07-02 10:27 ` Simon Glass
2026-07-14 17:15 ` Yao Zi
2026-07-01 11:18 ` [PATCH v2 14/16] board: emulation: Add qemu-loongarch Yao Zi
2026-07-02 10:27 ` Simon Glass
2026-07-01 11:18 ` [PATCH v2 15/16] efi: LoongArch: Define LoongArch bits everywhere Yao Zi
2026-07-02 10:27 ` Simon Glass
2026-07-14 17:20 ` Yao Zi [this message]
2026-07-01 11:18 ` [PATCH v2 16/16] efi: LoongArch: Implement everything Yao Zi
2026-07-02 10:29 ` Simon Glass
2026-07-01 15:53 ` [PATCH v2 00/16] LoongArch initial support Jiaxun Yang
2026-07-01 17:59 ` Tom Rini
2026-07-14 17:26 ` Yao Zi
2026-07-14 17:38 ` Tom Rini
2026-07-02 10:31 ` [v2,00/16] " Simon Glass
2026-07-14 17:33 ` Yao Zi
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=alZv0aZPHb-xed4F@pie \
--to=me@ziyao.cc \
--cc=ilias.apalodimas@linaro.org \
--cc=jiaxun.yang@flygoat.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox