From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web11.39048.1679931743176986154 for ; Mon, 27 Mar 2023 08:42:23 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=fB6A6rMu; spf=pass (domain: ventanamicro.com, ip: 209.85.210.172, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pf1-f172.google.com with SMTP id dw14so5969858pfb.6 for ; Mon, 27 Mar 2023 08:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1679931742; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kkhM6Sh5Ollt6ISupJ4Yd5ixhpE0z6EylWl562ac8JM=; b=fB6A6rMuNHmwVQHw1dNxRdhNH+LZhqyUzET+dDlM98VRTzv4f17Uoo82TQ6L8PCz7l yjCB2soxZ63C8smEDQZVAVzRN9Bv0j43pzzWSP0H2cws4NDqoNDrGMZ0x+EyrZBZfMCn aunPv4BHMXJZyIjaXHF8w7sVDW7gsKcZRgJ5zeFdVZJUqnHyZpsqiMvPEljDTSYYT7N1 7J5Xnx3RC30mINGnYXVrF5Qm7j9+A9Bvh7gnf+rr9vn8aaLto3kkTW9U6jpuDwVuTdy1 mpLgm2uDD9rAudGW7kUvTgmDV14Zc6gXC/ePX7orr3bHJXUQCLjxwpqMzZRxvtlDlLTz U+pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679931742; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kkhM6Sh5Ollt6ISupJ4Yd5ixhpE0z6EylWl562ac8JM=; b=6OYqAm5uWUAYqM8unrdOnvaK8dEst1U/8LXpuQfgpl7zAcLUlbiVIat9jLSu/7rm8A bLcmb25bKubXDUY1dpEcRK2n3Bp1Sz/KpnfN4aLqlk2JPcO/RQJi0BwvDRSFP6yZnL3C BxSD5+f0vNOxXuLpZ1W7uZfvxUUvHat2gb9mOSlaGtiErx82OXVnckhlsCOqxOecyxMe wmsJEJq3CONagC/ILFUI0yDlnWlcRWIh8zxejXyGEytrhH7DPrFc8B1GTmDCf2at/no7 38BHvMfRzb+R9QH0ygr4Bc1/Uav0liM/SV4nh288jTXR0TS0zvS5L+0iK2IfmVGDxGk/ b4eQ== X-Gm-Message-State: AAQBX9dvEP7YRatOo/dUmpwgQN+ScBiRRtDKAdA2ALe5+ZXbHrssA3Tx IH9BPrvZE3cRMdqn9UV976IjWg== X-Google-Smtp-Source: AKy350bk3uRH1nFEw+LaW2riyJAQPIAewrQ+1fsk9ZpIN/NDJ8JmIBc6d7v9WK18bLWfqr0mdaAbMg== X-Received: by 2002:a62:84c8:0:b0:626:18da:1afe with SMTP id k191-20020a6284c8000000b0062618da1afemr11957999pfd.33.1679931742658; Mon, 27 Mar 2023 08:42:22 -0700 (PDT) Return-Path: Received: from sunil-laptop ([106.51.187.127]) by smtp.gmail.com with ESMTPSA id e17-20020a62ee11000000b0062ce765b7afsm4442589pfi.162.2023.03.27.08.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 08:42:22 -0700 (PDT) Date: Mon, 27 Mar 2023 21:12:17 +0530 From: "Sunil V L" To: Dhaval Sharma Cc: devel@edk2.groups.io, Andrei Warkentin , Daniel Schaefer Subject: Re: [PATCH v1 1/2] MdePkg/BaseCacheMaintenanceLib: Enable RISCV CMO Message-ID: References: <20230324154342.180062-1-dhaval@rivosinc.com> <20230324154342.180062-2-dhaval@rivosinc.com> MIME-Version: 1.0 In-Reply-To: <20230324154342.180062-2-dhaval@rivosinc.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dhaval, Thank you for looking at CMO support! General comments first: 1) Please have a cover letter patch and move some part of the commit message to cover letter. Please CC all maintainers in the cover letter also. 2) Please run BaseTools/Scripts/GetMaintainer.py and CC all maintainers. 3) Follow https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-Process Have you run CI tests? On Fri, Mar 24, 2023 at 09:13:41PM +0530, Dhaval Sharma wrote: > Adding code to support Cache Management Operations > (CMO) defined by RV spec https://github.com/riscv/riscv-CMOs > Notes: > 1. CMO only supports block based Operations. Meaning complete > cache flush/invd/clean Operations are not available > 2. Current implementation uses ifence instructions but it > maybe platform specific. Many platforms may not support cache > Operations based on ifence. fence.i? IMO, it is better to add a new library such as BaseRiscV64CMOLib and included conditionally in the DSC for the platforms which support CMO. BaseCacheMaintenanceLib will continue to have default fence.i implementation. Is there an issue with this? > 3. For now adding CMO on top of ifence as it is not considered > harmful. > 4. This requires support for GCC12.2 onwards. > Yeah, this is another challenge like zifencei_zicsr which we could workaround and support both older and newer tool chain. But for CMO, I don't see any option but to support only GCC12.2+. Thanks, Sunil