public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH v3 09/12] x86: Enable SSE in 64-bit mode
Date: Mon, 13 Nov 2023 09:06:47 -0500	[thread overview]
Message-ID: <20231113140647.GI6601@bill-the-cat> (raw)
In-Reply-To: <CAEUhbmUvfD5AOouDXivzrzMQFgirgicsJwBJKW_zMOPL+k7PMw@mail.gmail.com>

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

On Mon, Nov 13, 2023 at 09:01:02PM +0800, Bin Meng wrote:
> Hi Simon,
> 
> On Mon, Nov 13, 2023 at 4:02 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Bin,
> >
> > On Mon, 6 Nov 2023 at 08:36, Tom Rini <trini@konsulko.com> wrote:
> > >
> > > On Mon, Nov 06, 2023 at 06:26:15PM +0800, Bin Meng wrote:
> > > > + Tom,
> > > >
> > > > Hi Simon,
> > > >
> > > > On Mon, Nov 6, 2023 at 12:29 AM Simon Glass <sjg@chromium.org> wrote:
> > > > >
> > > > > Hi Bin,
> > > > >
> > > > > On Sun, 5 Nov 2023 at 14:05, Bin Meng <bmeng.cn@gmail.com> wrote:
> > > > > >
> > > > > > Hi Simon,
> > > > > >
> > > > > > On Mon, Oct 2, 2023 at 9:15 AM Simon Glass <sjg@chromium.org> wrote:
> > > > > > >
> > > > > > > This is needed to support Truetype fonts. In any case, the compiler
> > > > > > > expects SSE to be available in 64-bit mode. Enable it.
> > > > > > >
> > > > > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > > > > Suggested-by: Bin Meng <bmeng.cn@gmail.com>
> > > > > > > ---
> > > > > > >
> > > > > > > (no changes since v1)
> > > > > > >
> > > > > > >  arch/x86/config.mk        |  1 -
> > > > > > >  arch/x86/cpu/x86_64/cpu.c | 11 +++++++++++
> > > > > > >  2 files changed, 11 insertions(+), 1 deletion(-)
> > > > > > >
> > > > > >
> > > > > > I didn't suggest we enable SSE for x86. This is the wrong approach.
> > > > > >
> > > > > > We should rewrite the Truetype support codes to avoid using float/double types.
> > > > > >
> > > > > > This way the Truetype codes can be used on any other architectures
> > > > > > without the need for the compiler to emit explicit floating
> > > > > > instructions.
> > > > >
> > > > > I am not aware of any such library. At present, enabling truetype on
> > > > > coreboot64 causes a hang.
> > > > >
> > > >
> > > > If that's the case, we will have to either:
> > > >
> > > > - Switch all U-Boot builds' to use software float (e.g. -msoft-float)
> > > > which unfortunately depends on the compiler runtime intrinsics.
> > > > - Introduce a Kconfig option for hard float enabling and let each
> > > > architecture to decide whether it implements it or not, and update
> > > > Truetype to depend on the hard float.
> > >
> > > We generally do -msoft-float already, so introducing that for x86, and
> > > some Kconfig logic to ensure that no one else steps on this particular
> > > bug sounds reasonable.
> >
> > Yes soft float seems to be not-much-used on x86. For 64-bit chips the
> > compiler seems to assume that hardfp is available.
> 
> We have compiler flags to ensure the compiler does not generate SSE
> instructions. Yes, I know SSE is in almost every x86 processor we see
> nowadays.
> 
> >
> > So perhaps the best thing is to introduce a HARDFP option to x86 only.
> 
> This option should be global as some other arches also don't have
> hardware fp, like RISC-V whose fp extension is optional.

RISC-V should take the ARM approach (and what I was suggesting for x86)
and enforce soft-float for everyone.

-- 
Tom

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

  parent reply	other threads:[~2023-11-13 14:06 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02  1:14 [PATCH v3 00/12] Resolve issues with booting distros on x86 Simon Glass
2023-10-02  1:14 ` [PATCH v3 01/12] efi: Correct handling of frame buffer Simon Glass
2023-11-05 14:06   ` Bin Meng
2023-11-15 13:17     ` Simon Glass
2023-10-02  1:14 ` [PATCH v3 02/12] bootstd: Refactor mmc prep to allow a different scan Simon Glass
2023-11-15 13:17   ` Simon Glass
2023-10-02  1:14 ` [PATCH v3 03/12] bootstd: Add a return code to bootflow menu Simon Glass
2023-11-15 13:17   ` Simon Glass
2023-10-02  1:14 ` [PATCH v3 04/12] x86: coreboot: Add a boot script Simon Glass
2023-11-05 14:06   ` Bin Meng
2023-10-02  1:14 ` [PATCH v3 05/12] usb: Avoid unbinding devices in use by bootflows Simon Glass
2023-10-02  1:14 ` [PATCH v3 06/12] expo: Correct background colour Simon Glass
2023-11-05 14:06   ` Bin Meng
2023-11-15 13:17     ` Simon Glass
2023-10-02  1:14 ` [PATCH v3 07/12] video: Correct setting of cursor position Simon Glass
2023-11-12 20:01   ` Simon Glass
2023-11-12 20:27     ` Anatolij Gustschin
2023-11-12 20:25   ` Anatolij Gustschin
2023-10-02  1:14 ` [PATCH v3 08/12] video: Drop unnecessary truetype operations from SPL Simon Glass
2023-11-05 14:06   ` Bin Meng
2023-10-02  1:14 ` [PATCH v3 09/12] x86: Enable SSE in 64-bit mode Simon Glass
2023-11-05 14:05   ` Bin Meng
2023-11-05 16:29     ` Simon Glass
2023-11-06 10:26       ` Bin Meng
2023-11-06 15:36         ` Tom Rini
2023-11-12 20:01           ` Simon Glass
2023-11-13 13:01             ` Bin Meng
2023-11-13 14:00               ` Simon Glass
2023-11-13 14:06               ` Tom Rini [this message]
2023-11-13 14:11                 ` Simon Glass
2023-10-02  1:14 ` [PATCH v3 10/12] x86: coreboot: Enable truetype fonts Simon Glass
2023-10-02  1:14 ` [PATCH v3 11/12] x86: qemu: Expand ROM size Simon Glass
2023-10-02  1:14 ` [PATCH v3 12/12] x86: qemu: Enable truetype fonts Simon Glass

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=20231113140647.GI6601@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=bmeng.cn@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.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