lkml.org 
[lkml]   [2015]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()
On 07/22/2015 05:59 AM, Jonathan (Zhixiong) Zhang wrote:
> From: "Jonathan (Zhixiong) Zhang" <zjzhang@codeaurora.org>
>
> If the physical address has memory attributes defined by EFI
> memmap as EFI_MEMORY_UC, the page protection type is
> PROT_DEVICE_nGnRE. Otherwise, the page protection type is
> PAGE_KERNEL.

...

[...]
> +#ifdef CONFIG_ACPI_APEI
> +/*
> + * According to "Table 8 Map: EFI memory types to AArch64 memory types"
> + * of UEFI 2.5 section 2.3.6.1, each EFI memory type is mapped to
> + * corresponding MAIR attribute encoding.
> + */
> +static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr)
> +{
> + pgprot_t prot;
> +
> + prot = efi_mem_attributes(addr);
> + if (prot & EFI_MEMORY_UC)
> + return PROT_DEVICE_nGnRnE;
> + if (prot & EFI_MEMORY_WC)
> + return PROT_NORMAL_NC;
> + if (prot & EFI_MEMORY_WT)
> + return PROT_NORMAL_WT;
> + return PAGE_KERNEL;
> +}

The change log is not matching the code here, and the PROT_DEVICE_nGnRE
in the change log is wrong, if you fix that,

Acked-by: Hanjun Guo <hanjun.guo@linaro.org>

Thanks
Hanjun



\
 
 \ /
  Last update: 2015-07-24 05:21    [W:0.560 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site