From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mx.groups.io with SMTP id smtpd.web11.50845.1680256912598537112 for ; Fri, 31 Mar 2023 03:01:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=7FxSvE/Y; spf=pass (domain: rivosinc.com, ip: 209.85.214.171, mailfrom: dhaval@rivosinc.com) Received: by mail-pl1-f171.google.com with SMTP id o2so20774138plg.4 for ; Fri, 31 Mar 2023 03:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1680256912; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=FuT2FUf2vwBf6J6dGwjDosvf9Fx6+FMGRkdmUpMKxtI=; b=7FxSvE/YqyBFhvcXoUJ+Ar25Nx/ltj7jmFulhZqDU3qG0n6UaJIQolf1HK+82GUP9i W4X7XAPmnCZqPeAjOXdTWWa+8YjRuzLEDBo1JYRRLzDR9g7MjswPk1+Rn/y129kNgL5w i4k0syh/HFG7u0Y0OOXaR6bhNP7dkpvOOhswb6ojYQszamW6O/mbPc3pYRMhP6l9tiIx mtkc7vXvKdKoNrfQL3wLhpVMGUMuYa74wvPfS6MxYM24C7NHst8YvtsOf+bqrDWL5MiP LfsHnpq1V9nAEKQ74H26IiN/FA++0CiY74jaIzTuqD7fedG/hgOw2hzoZIfLYFMcz1Lr 7CZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680256912; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FuT2FUf2vwBf6J6dGwjDosvf9Fx6+FMGRkdmUpMKxtI=; b=L5W8EAIb6weuIJL9FAgZuj8w/kElfoQc9s8Lrkn7dzv4P/+CDH4kVXAp9ioXmpWheN QgPwYUQN5tIyug96bZC6vea/LgnEBmQYCL5Guw50wQVHJ0zdiapcLZfuXddr3SljG4wA 3pEsFAahHaPkzQ1DohatD2JWyfc2tAIOILnrBRIv0X7C6jpK0wFmln/+tppyb9sBI/41 I93wIyRYN4NT/h98arpt5rTaLy++xrFqMTtLWkji0sZ5W+8fI8bZMueHcbl4Aj1wNoLB spK268kampp2+qTDCFMRcHzPt3Vi70F98DwYbqjZi2VK6QYTafVInlbUji9haJePHElI 2zNw== X-Gm-Message-State: AO0yUKU6GV7w8tX6+QwqTwXFRHmb0iOEoSjQ+Z72xpXmZBGBR8oj2VuS xhbslL6+arQZf8R3Dvr/vV7SJr5VWPfQgl+yCdM= X-Google-Smtp-Source: AK7set8fPzf26lk6lSK1VIIOMScNlbBc7npuKAdIQs+EUy8h+r/aAENWz1xBJ0OQjgwFpwDkxAkXuw== X-Received: by 2002:a05:6a20:2921:b0:c2:f930:45e8 with SMTP id t33-20020a056a20292100b000c2f93045e8mr20876281pzf.46.1680256911564; Fri, 31 Mar 2023 03:01:51 -0700 (PDT) Return-Path: Received: from dhaval.. ([2402:3a80:8ff:2244:e77a:2b3c:51a8:11da]) by smtp.gmail.com with ESMTPSA id s25-20020aa78d59000000b0059442ec49a2sm1107411pfe.146.2023.03.31.03.01.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 03:01:51 -0700 (PDT) From: "Dhaval Sharma" To: devel@edk2.groups.io Subject: [PATCH v2 0/2] WIP: Enable CMO support for RiscV64 Date: Fri, 31 Mar 2023 15:31:44 +0530 Message-Id: <20230331100146.242814-1-dhaval@rivosinc.com> X-Mailer: git-send-email 2.40.0.rc0.57.g454dfcbddf MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Current implementation for cache management (instruction/data flush/invd) depends on fence.i instruction. All RV platforms may not use the same method for cache management. Instead RV defines CMO Cache management operations specification which consits of cbo.x instructions for cache management. However it requires GCC12+ to enable the same. Need to decide how cbo based implementation coexists with ifence based implementation with GCC version dependency. This patchset is primarily to review the same and decide path forward. review branch: https://github.com/rivosinc/edk2/tree/dev_rv_cmo_v3 Dhaval Sharma (2): WIP: MdePkg/RiscVCMOCacheMaintenanceLib:Enable RISCV CMO OvmfPkg/RiscVVirt: Enable CMO support MdePkg/MdePkg.dsc | 1 + OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 9 + MdePkg/Library/RiscVCMOCacheMaintenanceLib/RiscVCMOCacheMaintenanceLib.inf | 30 ++ MdePkg/Library/RiscVCMOCacheMaintenanceLib/RiscVCMOCache.c | 377 ++++++++++++++++++++ MdePkg/Library/RiscVCMOCacheMaintenanceLib/RiscVCMOCacheMaintenanceLib.uni | 11 + MdePkg/Library/RiscVCMOCacheMaintenanceLib/RiscVCpuCMOCache.S | 23 ++ 6 files changed, 451 insertions(+) create mode 100644 MdePkg/Library/RiscVCMOCacheMaintenanceLib/RiscVCMOCacheMaintenanceLib.inf create mode 100644 MdePkg/Library/RiscVCMOCacheMaintenanceLib/RiscVCMOCache.c create mode 100644 MdePkg/Library/RiscVCMOCacheMaintenanceLib/RiscVCMOCacheMaintenanceLib.uni create mode 100644 MdePkg/Library/RiscVCMOCacheMaintenanceLib/RiscVCpuCMOCache.S -- 2.40.0.rc0.57.g454dfcbddf