From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x22e.google.com (mail-wr0-x22e.google.com [IPv6:2a00:1450:400c:c0c::22e]) (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 68C6C208F7A35 for ; Thu, 6 Apr 2017 12:06:14 -0700 (PDT) Received: by mail-wr0-x22e.google.com with SMTP id t20so76884090wra.1 for ; Thu, 06 Apr 2017 12:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MiPrA7ZraLfQAjZ+mmLj3QzbD4QZ+6OLzanUf3BHwNk=; b=gJmqcU01hKgmXkqlrLgDoXhW12QRqE7lqATKWB7jW5rVClZ8dDGwmfpjC5eBibHzjO aloFqiP59Q5EeLC7sBNuGqNSysd+ueepnsOhMzdjK+HyTNF1MOZU08MHAkAEtsXr6s1R dbolyuhLvbEWUw7+uJKYsnueLjrLr1Eh9hmrw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MiPrA7ZraLfQAjZ+mmLj3QzbD4QZ+6OLzanUf3BHwNk=; b=QrVM6fDIQFFWI4quH+AENwEqE0CqDNSyn4HwDXjQOV9DibGDMiWC97SYbbEXzlmjhs yHhg/TqSOlk5Sxr5iMOfuRoZGz+zxPslOGhGIAju7wjisc5A/DLYet9vvfGevntu91MW +4AyE7U1C5umGsU17cfgcWgXFfCIG2sowhCWoQf7fzfrmOUjN2td+fbBReQsUhBGsURj 5Yc/gQKSAeAys4001X9kirB2QsixFBDo5+01ODo3GU5ob+z6qkHHLSrViTXlZ2uH5Mce rPNcl8z7xb9Eyx/S28XoWcIVT/gWIXf84vyaocTQ2pbOMfylqcHoHBmWDetJQvfBkWwT QqyQ== X-Gm-Message-State: AFeK/H3UZz21fNalfYQnu44S2DTvW3vgOOR0hutJlnMjIgzOkntFbovc QQB8uAzEvZ4SZxEOVP/LNA== X-Received: by 10.28.216.141 with SMTP id p135mr25979765wmg.71.1491505573056; Thu, 06 Apr 2017 12:06:13 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id b42sm3171498wra.10.2017.04.06.12.06.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Apr 2017 12:06:12 -0700 (PDT) Date: Thu, 6 Apr 2017 20:06:10 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: "edk2-devel@lists.01.org" , Ryan Harkin , Evan Lloyd , Jeremy Linton Message-ID: <20170406190610.GP25239@bivouac.eciton.net> References: <20170406131551.3322-1-ard.biesheuvel@linaro.org> <20170406131551.3322-2-ard.biesheuvel@linaro.org> <20170406182648.GK25239@bivouac.eciton.net> <20170406184507.GO25239@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH v2 1/5] ArmPlatformPkg/FVP: map motherboard VRAM as uncached memory X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 19:06:14 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Apr 06, 2017 at 07:46:50PM +0100, Ard Biesheuvel wrote: > >> >> + // VRAM > >> >> + VirtualMemoryTable[++Index].PhysicalBase = PL111_CLCD_VRAM_MOTHERBOARD_BASE; > >> >> + VirtualMemoryTable[Index].VirtualBase = PL111_CLCD_VRAM_MOTHERBOARD_BASE; > >> >> + VirtualMemoryTable[Index].Length = PL111_CLCD_VRAM_MOTHERBOARD_SIZE; > >> >> + VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_UNCACHED_UNBUFFERED; > >> > > >> > Hmm, looking at this made me a bit confused though. Normal uncached > >> > memory is certainly bufferable (that's basically what write-combining > >> > means). > >> > > >> > >> It maps to MAIR attribute encoding 0x44, which translates as > >> > >> Normal Memory, Outer Non-Cacheable, Inner Non-Cacheable > > > > Exactly - which is definitely "buffered". > > > >> > This looks like a naming hangover from ARMv5 translation table format. > >> > Is it about time we clean this up? > >> > >> The whole 'ARM_MEMORY_REGION_xxxx' intermediate namespace should be > >> removed, I think. > > > > That sounds like a good idea to me. > > There's also _NONSECURE crud in there. > > > > Yes. But I hope you're not saying you want that to be done first > before this patch can go in? No, but it may mean it makes sense to add a comment regarding the Attributes line, since it looks like it's doing the opposite of what is actually being done. / Leif