From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=H8yjnfrN; spf=pass (domain: linaro.org, ip: 209.85.128.65, mailfrom: leif.lindholm@linaro.org) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by groups.io with SMTP; Tue, 01 Oct 2019 02:07:10 -0700 Received: by mail-wm1-f65.google.com with SMTP id 7so2422708wme.1 for ; Tue, 01 Oct 2019 02:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=CuQR3iw5V6TwzcIJX58YvmLt5nD7cyPmNjjU6DoGGkA=; b=H8yjnfrNlp0esAH4Sp/O8gPY86VYYF3t5KbJm1sI926E5njnvxHPb5mfSpasnQm88K yCJcTKlFiDQuRP0wghPq1wHO1LZ0tNMiSLgSyRb0Vhr4lRJ0i9eTBO0UV3jxbw22Y565 EEmmNGVDfceG5spmIHpuTzGJf+U2pyosZada4iHNNWxU58ZH1zZ8w4D5WtUeWJyuvWOM qY01+k/7e3UEcsmDBV1eeUZL+nUxykSgweAcmGIINpUrKv6gf4CZ54Onmjf0MRL8hEFO NDcRLgEKY5eVv461brDGJts8c6FK5cF2DGkUq6RYIAns8uH7QCHWah4JG8Dpz9COURzQ VEiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=CuQR3iw5V6TwzcIJX58YvmLt5nD7cyPmNjjU6DoGGkA=; b=AmAVw6wcr6gRZpWCiD9Std4OfRfahf0X8okrv6YZHIQHtZOXF+AJ7lsuT+lqWnNgKO I8kofSG8a0g/DmxQaZX5/YEGDWkLE7GSWF6lSMcLAgxjfYxWKzWNcsO9FAoEUum2PDzU 8o/TF30hEMpQg0BN9zdb/uagUuYPkTXt44FhFqa3GBchGMBoZG5/81c2WvugLtX80Gkd 0Ykr5gb+2bCfszyDN8gOUafscBI25xJ3mKOIpRxOxUxDGdQD53KQotyi/PlmwNpSs783 jUolliKI6ylZuJiuzspUqQoFmE7DRG3zYKrkN8fkhxVFiOFWs80exVM/hlBcpWT7d14B uuNw== X-Gm-Message-State: APjAAAUQ+4kM1Jo1yFsmYSgyAhXkLfWKX6Nut3VJhaWjUFIqKzXPWGGx tY+NOA3YlLtSS7x+lDUBK69Azw== X-Google-Smtp-Source: APXvYqwdM540y/lSh2jljxpxj2A6Mr2Dt4E8kTxfmvYbTr3VU1FjGRVnPU9Wjb/uLeyVFEsfBjsyYg== X-Received: by 2002:a1c:7f4f:: with SMTP id a76mr2749442wmd.117.1569920828588; Tue, 01 Oct 2019 02:07:08 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id u25sm2164650wml.4.2019.10.01.02.07.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2019 02:07:07 -0700 (PDT) Date: Tue, 1 Oct 2019 10:07:06 +0100 From: "Leif Lindholm" To: Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Cc: devel@edk2.groups.io, abner.chang@hpe.com Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 09/29] MdePkg/BaseIoLibIntrinsic: RISC-V I/O intrinsic functions. Message-ID: <20191001090705.GQ25504@bivouac.eciton.net> References: <1569198715-31552-1-git-send-email-abner.chang@hpe.com> <1569198715-31552-11-git-send-email-abner.chang@hpe.com> <20190926233928.GL25504@bivouac.eciton.net> <90c04adf-79b1-2d89-1683-c916444126c7@redhat.com> MIME-Version: 1.0 In-Reply-To: <90c04adf-79b1-2d89-1683-c916444126c7@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Tue, Oct 01, 2019 at 10:49:38AM +0200, Philippe Mathieu-Daudé wrote: > Hi Leif, > > On 9/27/19 1:39 AM, Leif Lindholm wrote: > > On Mon, Sep 23, 2019 at 08:31:35AM +0800, Abner Chang wrote: > > > RISC-V MMIO library instance. RISC-V only supports memory map I/O. > > > > We need fewer, not more, C implementations of MMIO accessors. > > While this set doesn't need to wait for upstream to get sorted, please > > just use IoLibArm.c which should be completely equivalent to what you > > have implemented here. > > This shows this file name is misleading. However I can't come with a clever > one :/ This has been discussed before, only the current situation "works", so sorting it out never takes priority (I know it doesn't for me). There should be exactly one variant of IoLib.c. Well, these days we need a separate one for ARM/AARCH64 under hw virtualization. IoLibArm, IoLibEbc and IoLibRiscV have *exactly* the same requirements. And now x86 uses NASM regardless of build platform, I think it would make sense to move the contents of IoLibGcc and IoLibMsc into assembler. / Leif > > > Signed-off-by: Abner Chang > > > --- > > > .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf | 8 +- > > > MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c | 601 +++++++++++++++++++++ > > > 2 files changed, 607 insertions(+), 2 deletions(-) > > > create mode 100644 MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c