From: Wolfgang Denk <wd@denx.de>
To: Stefan Roese <sr@denx.de>
Cc: u-boot@lists.denx.de, sjg@chromium.org, trini@konsulko.com,
Heinrich Schuchardt <xypron.glpk@gmx.de>
Subject: Re: [PATCH v1 1/5] lib/string: Add memset_simple()
Date: Fri, 06 Aug 2021 17:36:25 +0200 [thread overview]
Message-ID: <273341.1628264185@gemini.denx.de> (raw)
In-Reply-To: <20210806133843.3642916-2-sr@denx.de>
Dear Stefan,
In message <20210806133843.3642916-2-sr@denx.de> you wrote:
> The optimized memset() ARM64 implementation cannot be used very early
> on, since caches need to be enabled for this function to work. Otherwise
> an exception occurs (only printed with very early DEBUG_UART enabled).
>
> This patch now implements a very simple memset() version, which will be
> used in a few selected places in the ARM64 early boot process.
...
We have already implementations of memset() elsewhere, for example in
lib/string.c [hey, that's even the file you are modifying...], then
again in lib/efi/efi_stub.c and also in
lib/efi_loader/efi_freestanding.c - so do we really need another
implementation?
BTW: lib/efi_loader/efi_freestanding.c looks completely useless to
me. Can we dump this? [Adding Heinich to Cc:]
> +void *memset_simple(void *s, int c, size_t count)
> +{
> + char *s8 = (char *)s;
> +
> + while (count--)
> + *s8++ = c;
> +
> + return s;
> +}
In which way is this different from memset() as defined in the same
file (further up) with CONFIG_TINY_MEMSET enabled? And even without
this option the memset() implementation here should work. Or does
it not?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
: ... and it's got weird formatting - Notepad, Write, Works 3 can't
: decipher it, and it's too big to go in DOS Edit. Help!
Install an operating system. :-) -- Tom Christiansen
next prev parent reply other threads:[~2021-08-06 15:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-06 13:38 [PATCH v1 0/5] arm64: Add optimized memset/memcpy functions Stefan Roese
2021-08-06 13:38 ` [PATCH v1 1/5] lib/string: Add memset_simple() Stefan Roese
2021-08-06 15:36 ` Wolfgang Denk [this message]
2021-08-06 16:13 ` Heinrich Schuchardt
2021-08-07 15:18 ` Wolfgang Denk
2021-08-07 15:34 ` Tom Rini
2021-08-06 13:38 ` [PATCH v1 2/5] board_init: Use memset_simple() in board_init_f_init_reserve() Stefan Roese
2021-08-09 7:52 ` Rasmus Villemoes
2021-08-09 13:17 ` Stefan Roese
2021-08-06 13:38 ` [PATCH v1 3/5] arm64: cache_v8: Use memset_simple() in create_table() Stefan Roese
2021-08-06 13:38 ` [PATCH v1 4/5] arm64: arch/arm/lib: Add optimized memset/memcpy functions Stefan Roese
2021-08-06 14:43 ` Tom Rini
2021-08-06 14:45 ` Stefan Roese
2021-08-06 15:41 ` Wolfgang Denk
2021-08-06 13:38 ` [PATCH v1 5/5] arm64: Kconfig: Enable usage of optimized memset/memcpy Stefan Roese
2021-08-06 14:24 ` [PATCH v1 0/5] arm64: Add optimized memset/memcpy functions Tom Rini
2021-08-06 14:44 ` Stefan Roese
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=273341.1628264185@gemini.denx.de \
--to=wd@denx.de \
--cc=sjg@chromium.org \
--cc=sr@denx.de \
--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