From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mx.groups.io with SMTP id smtpd.web11.32520.1678485030531434740 for ; Fri, 10 Mar 2023 13:50:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=d3Dd6iSc; spf=pass (domain: ventanamicro.com, ip: 209.85.215.177, mailfrom: tphan@ventanamicro.com) Received: by mail-pg1-f177.google.com with SMTP id q23so3874248pgt.7 for ; Fri, 10 Mar 2023 13:50:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1678485029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L32T743+YNIKLgHGI4kuEN3H/YDfnC1bojFlaGoj7Fk=; b=d3Dd6iScA9nuold0s+4U1KSPFPjmEj5xk8ZfuceCk4iSlumnxcsAMEcN8quhblEDhq Jn8QWeLfYdzoVOTsKD3Q4xL0OY1OhjnN9E/gohhZqPgwZfNUv0zDSVu6LTGREfGv6kKC 3xS6qh/5acAWAiH5pL4qIgw4jvnQgjb/ZHKqHnf0RhOghP0cu+21F/SjrAnWPo+5gJca Q7Te+Su3LMq0VumsKI81VH41A7c2iVTZx3E2bJmpkHc2+hy+ivw2tF7NdIvRPb1aauyP HQtUfx1bvKCMpl81MQ9HdPx7OYec9gzgrJPXW5E1sOw69sZ2Ah7OtBdSPuZ484De9TzW GAFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678485029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L32T743+YNIKLgHGI4kuEN3H/YDfnC1bojFlaGoj7Fk=; b=xHLkbVDj/i7qFRLk6KT77k00IIsy7yLgrkv6aaFNeJlriKgvzfChwv1Kjlx4/2Cw88 MsSO50iWo0xDYJ6BZoe0zA1bN/0TJItyfRXR5ci1OOla8CWuSc6c2PQmHwQtg0Tl1ltR aMGdi7dNHdn+T8cWMYK++bm9D94y2EZQcUWCZ/NWJhwUbKNLL97czduKhNcYd+UOE3Bd +FL1KOPIvp5SOd6QWHw7OK9jXVryt/3a7iA0XkW8kynCiA8dZEWK3AOb4UykLQ4h6+rv miLhzeXZ2nHesT7WRA3xib3o6E2r/zxJghCri1Y9+YrJ6U4K4WG/OuppMJVj2Q6pkbkL yNQQ== X-Gm-Message-State: AO0yUKVFgIZM821FDcjDXqt7jSocojiCRxtHrd+MCwIxJ8xpMkcz3eCB bBQmLhrLy3xU9IaSs3iWme5zrEeiHxFJwu1t9Gv56A== X-Google-Smtp-Source: AK7set/xrbufAmdncv9a+KyxpuAc8NpIkHbjUQb3wmX5XmTarYPbjqyadCyOdIRjnm/3CaGRTna+MA== X-Received: by 2002:a62:79ca:0:b0:593:da8:6f34 with SMTP id u193-20020a6279ca000000b005930da86f34mr8153091pfc.5.1678485029394; Fri, 10 Mar 2023 13:50:29 -0800 (PST) Return-Path: Received: from localhost.localdomain (c-174-50-177-95.hsd1.ca.comcast.net. [174.50.177.95]) by smtp.gmail.com with ESMTPSA id e21-20020aa78255000000b00593adee79efsm267427pfn.55.2023.03.10.13.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 13:50:28 -0800 (PST) From: "Tuan Phan" To: devel@edk2.groups.io Cc: michael.d.kinney@intel.com, gaoliming@byosoft.com.cn, zhiguang.liu@intel.com, sunilvl@ventanamicro.com, git@danielschaefer.me, andrei.warkentin@intel.com, Tuan Phan Subject: [PATCH v2] MdePkg/BaseCacheMaintenanceLib: RISC-V: Fix instruction cache not been invalidated Date: Fri, 10 Mar 2023 13:50:19 -0800 Message-Id: <20230310215019.29783-1-tphan@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable When the range instruction cache invalidating not supported, the whole instruction cache should be invalidated instead. Signed-off-by: Tuan Phan --- V2: - Format with uncrustify. MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg/L= ibrary/BaseCacheMaintenanceLib/RiscVCache.c index 67a3387ff3c6..09de53fb5687 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c @@ -76,7 +76,12 @@ InvalidateInstructionCacheRange ( IN UINTN Length=0D )=0D {=0D - DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__))= ;=0D + DEBUG (=0D + (DEBUG_WARN,=0D + "%a:RISC-V unsupported function.\n"=0D + "Invalidating the whole instruction cache instead.\n", __func__)= =0D + );=0D + InvalidateInstructionCache ();=0D return Address;=0D }=0D =0D --=20 2.25.1