From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.137.112, mailfrom: prvs=01784fa02f=abner.chang@hpe.com) Received: from mx0b-002e3702.pphosted.com (mx0b-002e3702.pphosted.com [148.163.137.112]) by groups.io with SMTP; Tue, 01 Oct 2019 18:30:16 -0700 Received: from pps.filterd (m0171838.ppops.net [127.0.0.1]) by mx0b-002e3702.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x921U7RM004680; Wed, 2 Oct 2019 01:30:15 GMT Received: from g9t1613g.houston.hpe.com (g9t1613g.houston.hpe.com [15.241.32.99]) by mx0b-002e3702.pphosted.com with ESMTP id 2v9yj1h1a9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Oct 2019 01:30:14 +0000 Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by g9t1613g.houston.hpe.com (Postfix) with ESMTPS id 2165B624A3; Wed, 2 Oct 2019 01:30:14 +0000 (UTC) Received: from G9W9210.americas.hpqcorp.net (g9w9210.houston.hpecorp.net [16.220.66.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2353.austin.hpe.com (Postfix) with ESMTPS id B278D82; Wed, 2 Oct 2019 01:30:13 +0000 (UTC) Received: from G4W10204.americas.hpqcorp.net (2002:10cf:5210::10cf:5210) by G9W9210.americas.hpqcorp.net (2002:10dc:429b::10dc:429b) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 2 Oct 2019 01:30:13 +0000 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (15.241.52.13) by G4W10204.americas.hpqcorp.net (16.207.82.16) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 2 Oct 2019 01:30:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kjIFNcilSMSEMMXz+aFk6VNxzM0XE3jN3HHFJArIpHYZs3LPxC0zwH4UytzRif5OTT+OGeYX7aiU9fAIncy4J1LxYpL5NGTlTmcNzjUV1Ro34RXzn5MHfhwCJn2zI1RIXMhG/itbr2XU56fvoHEuQJuBt9JCbMNVUmbLFjdI4U+JJcqy4u2Lbil5S3SXDLMnnQVq4UNl2ii/5HSLtDuqbUNM/w1eeFEl58jgbGMjE9U7PLHkLIhlQml8PV9KShOjnabrKi4eiRAp6joDyiicyECZDTddqL7Y9XpLItejTcNGg8ljA5JI0dIgEeV+ioY85V1pMQ1W4H2LjGRkaBSFDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oAfGDOHdsJ8L/AMHmu8bzK/jk/GtSc9hRo1namr+LOI=; b=lfRsH8EB1WyabeK1MEbYYevxaHUtLUZW3FPYystvmw46aXCCb1crMdytdeHUB6WPgUaAg37zonVSfai4PNVpmeRfONNpLkv9aPxqcwVsh6d+iQlHPuijM7w18Q7yvQcX2o1V89kUGyNeQVdlYFtI7seWrmKedio/+Hu7lk0cBO2bOJmh0l4/YqugcCUxa54EofkDuDykQnI+eH5Zjj8XFc33XyzbhTE7YK3ql43oBFgXCSOPg9cRBnOA2fGWOiE0EqlydWIXAI1NdZ200efjKBNapl+FbtcfZmcYnCqWCTOJaBO6otCvwczI+OiN1oMlYUGTbaIiAKlK41VTnFBe1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from DF4PR8401MB1195.NAMPRD84.PROD.OUTLOOK.COM (10.169.87.15) by DF4PR8401MB0940.NAMPRD84.PROD.OUTLOOK.COM (10.169.85.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.20; Wed, 2 Oct 2019 01:30:12 +0000 Received: from DF4PR8401MB1195.NAMPRD84.PROD.OUTLOOK.COM ([fe80::f540:ada0:c8e4:a0c1]) by DF4PR8401MB1195.NAMPRD84.PROD.OUTLOOK.COM ([fe80::f540:ada0:c8e4:a0c1%11]) with mapi id 15.20.2305.022; Wed, 2 Oct 2019 01:30:12 +0000 From: "Abner Chang" To: "devel@edk2.groups.io" , "leif.lindholm@linaro.org" , =?iso-8859-1?Q?Philippe_Mathieu-Daud=E9?= Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 09/29] MdePkg/BaseIoLibIntrinsic: RISC-V I/O intrinsic functions. Thread-Topic: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 09/29] MdePkg/BaseIoLibIntrinsic: RISC-V I/O intrinsic functions. Thread-Index: AQHVcaqiBkSqxWRnL0+yEAnqc2QjJac+o/AAgAbjCwCAAAThAIABC+Jg Date: Wed, 2 Oct 2019 01:30:12 +0000 Message-ID: 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> <20191001090705.GQ25504@bivouac.eciton.net> In-Reply-To: <20191001090705.GQ25504@bivouac.eciton.net> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.242.247.131] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: baa96e62-6230-4b5d-00cd-08d746d811d0 x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: DF4PR8401MB0940: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:651; x-forefront-prvs: 0178184651 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6029001)(346002)(366004)(396003)(39860400002)(136003)(376002)(13464003)(189003)(199004)(5660300002)(486006)(3846002)(476003)(26005)(25786009)(6116002)(446003)(11346002)(186003)(76176011)(102836004)(99286004)(76116006)(66946007)(52536014)(14454004)(2906002)(7696005)(53546011)(6506007)(478600001)(966005)(66446008)(86362001)(64756008)(66556008)(66476007)(7736002)(74316002)(305945005)(110136005)(33656002)(9686003)(229853002)(55016002)(316002)(6436002)(6306002)(71200400001)(8936002)(71190400001)(8676002)(81156014)(6246003)(2501003)(81166006)(66066001)(256004)(19627235002);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR8401MB0940;H:DF4PR8401MB1195.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HVQczT4T5pEcyxG3xdbSJoBBrDqXkIc1cks/Q1glxjABZeI0AKfJKTL+N05aVGRiNdenC60L9zSQqEB9uAaKI5BFG/z2NSoo2whBjkRM5+iPiNVlRWL3CUtrtHQPNSrAiB7j1gJ0kPlDALR73zgySqs+zd+07wH7qpErVxcuekN4vFcRUq5ylvjyt3/awuMNSFEuLY7t75rkAKlni/tTI4mzuFWN52ltOcyWmPliurZnt0RuL/P8F3eS2IpPHV0pO8jLqTixhVv9qGbXx2Uj7UmhabpGws2zcqzlZp1gqsiNwZAkWFxEgD/z4WnRp31lsfb5PYywkoQ9xI4tiLpZSkEVcxerQFj+LTS1bz4puPYyLa9pCsn0V2PeyQC73rlM9qGyQq+JwkKzkVyBme8u/Ga4joxYzqhu/QayNtzQgMgLrkaGtq3GT0Vk1CBmvdK9/qBtJ6KNV+QGSdE6QtN+1A== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: baa96e62-6230-4b5d-00cd-08d746d811d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Oct 2019 01:30:12.0519 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2gFOM2kyZvU9NUNWNaLwxUcy1VcOADrTgIIRo8acZQ+CKH3kuvDlyYn4DDJbKOvI22g52jjMhYZqCvbo1kpAig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0940 X-OriginatorOrg: hpe.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-02_01:2019-10-01,2019-10-02 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 spamscore=0 clxscore=1011 priorityscore=1501 adultscore=0 malwarescore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1910020011 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Leif Lindholm > Sent: Tuesday, October 1, 2019 5:07 PM > To: Philippe Mathieu-Daud=E9 > Cc: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) > > Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 09/29] > MdePkg/BaseIoLibIntrinsic: RISC-V I/O intrinsic functions. >=20 > On Tue, Oct 01, 2019 at 10:49:38AM +0200, Philippe Mathieu-Daud=E9 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 :/ >=20 > This has been discussed before, only the current situation "works", so s= orting > it out never takes priority (I know it doesn't for me). >=20 > There should be exactly one variant of IoLib.c. Well, these days we need= a > separate one for ARM/AARCH64 under hw virtualization. >=20 > IoLibArm, IoLibEbc and IoLibRiscV have *exactly* the same requirements. > And now x86 uses NASM regardless of build platform, I think it would mak= e > sense to move the contents of IoLibGcc and IoLibMsc into assembler. That looks weird and doesn't make sense to use Arm code for RISC-V even th= e functionality is exactly the same to IoLibRiscV. I will still keep it as = IoLibRiscV.c until there is a generic IoLib for different arch. . >=20 > / > Leif >=20 > > > > 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 >=20 >=20