From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A34EAC4338F for ; Fri, 6 Aug 2021 15:36:38 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9957C61165 for ; Fri, 6 Aug 2021 15:36:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9957C61165 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38A1A83131; Fri, 6 Aug 2021 17:36:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628264195; bh=JVAlzNfvlzFbioHNib3DbPhm5HPpqo25DL8rjLsLluc=; h=To:cc:From:Subject:In-reply-to:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jcJjTPM/jsSpy9g6REZxmEDjxUwxwLgl3cVkH+3WjPRgntsDVA/EkuVWcfYT/6VQJ 7Vcl3JqxJBeIjrIBD6RGs4K31xCyRtzG/1ZRs3HS+704KQpjRKBMgxF7vg8+E4LRL0 nUMfPssJ1X3YsS5WVOe/8kps0JvRM82qpA4AKLGSQV/+FLeaST+NOGMEIplkqsAceT L/wNqy6NQxeGqh2IUVTQFrzGkWSv84t9e5g/xEUJjRXc/1+KjnVITpr5DkufvblH0E XlAItHUj/x0pp48+wLgJGI1tNqMP5K8vbBjwhEXZ2Ev23DGLw7+Eit76QQUbHPQ75F p2j/b/jY5jdlA== Received: from janitor.denx.de (unknown [62.91.23.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: noc@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id A3AF282A15 for ; Fri, 6 Aug 2021 17:36:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1628264193; bh=JVAlzNfvlzFbioHNib3DbPhm5HPpqo25DL8rjLsLluc=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=wt9XRwJqqVJqWaZAvksAB8ytA/eFruRyb8hf8ebZIMEzcCUE5sW+lSZJQmm1PcVRJ 14AkFlbdpGBlbaY6FQW7aV/hbO0X8V1mDXxoVB032a99sWeNnTk3NlwD9zCWNnU+78 U+hZNl5qLagr+fFwNOOberzTw7IFNWJFGNue/BfJraTxt8JcdfJ9GwMkgrt3CvWLIC 3Gae3uRTjJ9W+jT7wwx/AqFdm+1RfDij92UYf6KqjchCBUZyPiuA30vKzUntaMleu2 32h60BlocFZbLoNQ1iBiwpj5ewCMA9UffgcLYnp53Nx5z45dpvzmr04e/z4eG56SsD kKJ0ND/tGI0ag== Received: by janitor.denx.de (Postfix, from userid 108) id 56577A0227; Fri, 6 Aug 2021 17:36:33 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.4.0.2]) by janitor.denx.de (Postfix) with ESMTPS id D2A8DA0069; Fri, 6 Aug 2021 17:36:25 +0200 (CEST) Received: from gemini.denx.de (localhost [IPv6:::1]) by gemini.denx.de (Postfix) with ESMTP id 766971E2304; Fri, 6 Aug 2021 17:36:25 +0200 (CEST) To: Stefan Roese cc: u-boot@lists.denx.de, sjg@chromium.org, trini@konsulko.com, Heinrich Schuchardt From: Wolfgang Denk Subject: Re: [PATCH v1 1/5] lib/string: Add memset_simple() MIME-Version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8bit In-reply-to: <20210806133843.3642916-2-sr@denx.de> References: <20210806133843.3642916-1-sr@denx.de> <20210806133843.3642916-2-sr@denx.de> Comments: In-reply-to Stefan Roese message dated "Fri, 06 Aug 2021 15:38:39 +0200." Date: Fri, 06 Aug 2021 17:36:25 +0200 Message-ID: <273341.1628264185@gemini.denx.de> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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