From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::243; helo=mail-io0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9C0C92216D8FB for ; Sat, 23 Dec 2017 08:04:03 -0800 (PST) Received: by mail-io0-x243.google.com with SMTP id v186so27409778iod.7 for ; Sat, 23 Dec 2017 08:08:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8jpM0VO+oPbtAe+OdOk7FC47IuVCiZ7SuLdpXFJJ2h8=; b=TjXw2ZPgk0PW7pkirolyJTtpaW2alAwnVBnn+uHpp26YHVJosYaxSAt/n07LfgPnm5 8EFdKBheobEuDYfwvanMkxqm+m8VCDzvv7Iy9v3ULiynzAEwbdOpyZQfr6edoI5BSsm3 bI9a5anDXARMvpZuoRnqTWQoTkFe5HWpaY5Xc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8jpM0VO+oPbtAe+OdOk7FC47IuVCiZ7SuLdpXFJJ2h8=; b=TFfDKF0mYfKQQ7rD0mosnzXFR65iaxrhSHHGjk5QAr2wR6HbJhRMKM9jY3VUqUkBkQ LUx2KxFQ8tcnyY0VpYMVxj9TdfLK1u2GGOgZcEW/5aNeKRyTP1P7OVMvd3YtramG9cD4 69fNeCV5hgqClzr33zvvs2ITPNYPV8I4vTNEwrG0aki/wfQaeojnoHh6dav34kJ7/39U wWF6NLiIYxMyJ0dd+dltIGRxYkXe6KVo8BTDViwousOZMbSwBz1qXUNN1s7gBYwloY/Z pwxGtqzIo+sDka0EG0qiOrbrcwYoCva5qpd0OvyjZ87GGopbNFQRTuQY822b6zn/3yE4 mVJA== X-Gm-Message-State: AKGB3mIVjj0fnjnnNtyypgM8diMd18xJqwBdHk1DO4ci/8YDXuMCcVAs 93ths0WxXAaXz183/DS/bPCWfvqZQQbVQFTTDiQtELoKAxw= X-Google-Smtp-Source: ACJfBovD7RFuaCAr880dn7M8ZclKF6LtTPmPv2StN7OrZFzhof2cd7E33NG9uecgGbnjHQyGimyWvHqWH0F9PxHtuA0= X-Received: by 10.107.151.142 with SMTP id z136mr23292619iod.248.1514045334164; Sat, 23 Dec 2017 08:08:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.52.14 with HTTP; Sat, 23 Dec 2017 08:08:53 -0800 (PST) In-Reply-To: <20171222190821.12440-17-evan.lloyd@arm.com> References: <20171222190821.12440-1-evan.lloyd@arm.com> <20171222190821.12440-17-evan.lloyd@arm.com> From: Ard Biesheuvel Date: Sat, 23 Dec 2017 16:08:53 +0000 Message-ID: To: Evan Lloyd Cc: "edk2-devel@lists.01.org" , Arvind Chauhan , Daniil Egranov , Thomas Panakamattam Abraham , <"ard.biesheuvel@linaro.org"@arm.com>, <"leif.lindholm@linaro.org"@arm.com>, <"Matteo.Carlini@arm.com"@arm.com>, <"nd@arm.com"@arm.com> Subject: Re: [PATCH edk2-platforms v2 16/18] ARM/JunoPkg: Mapping Non-Trused SRAM as device memory X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Dec 2017 16:04:04 -0000 Content-Type: text/plain; charset="UTF-8" On 22 December 2017 at 19:08, wrote: > From: Girish Pathak > > This fix changes the cache attribute of Non-Trusted SRAM on the Juno > platform to device memory. This change is required to avoid coherency > problems as Non-Trusted SRAM is used as a shared memory between the > application processor and the SCP for communication. This change is a > prerequisite for upcoming SCMI driver for the Juno platform. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Girish Pathak Evan, this needs your signoff as well I think? Reviewed-by: Ard Biesheuvel > --- > Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJunoMem.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJunoMem.c b/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJunoMem.c > index aa8d7d9c3b0d41e62d1849e6e88760e3066617f7..afb2db0050c65b0d1b2b69c9038e168755c152c1 100644 > --- a/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJunoMem.c > +++ b/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJunoMem.c > @@ -1,6 +1,6 @@ > /** @file > * > -* Copyright (c) 2013-2015, ARM Limited. All rights reserved. > +* Copyright (c) 2013-2017, ARM Limited. All rights reserved. > * > * This program and the accompanying materials > * are licensed and made available under the terms and conditions of the BSD License > @@ -111,7 +111,9 @@ ArmPlatformGetVirtualMemoryMap ( > VirtualMemoryTable[++Index].PhysicalBase = ARM_JUNO_NON_SECURE_SRAM_BASE; > VirtualMemoryTable[Index].VirtualBase = ARM_JUNO_NON_SECURE_SRAM_BASE; > VirtualMemoryTable[Index].Length = ARM_JUNO_NON_SECURE_SRAM_SZ; > - VirtualMemoryTable[Index].Attributes = CacheAttributes; > + // This memory is shared between the application processor > + // and the SCP. To avoid coherency problems, map it as device memory. > + VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; > > // PCI Root Complex > VirtualMemoryTable[++Index].PhysicalBase = PcdGet64 (PcdPcieControlBaseAddress); > -- > Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") >