ACK: [PATCH 05/14] acpi: nfit: update memory mapping attributes (mantis 1873 for ACPI 6.3)

Colin Ian King colin.king at canonical.com
Fri Feb 8 11:45:57 UTC 2019


On 08/02/2019 03:23, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/acpi/nfit/nfit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpi/nfit/nfit.c b/src/acpi/nfit/nfit.c
> index 491ac1b2..4d478f12 100644
> --- a/src/acpi/nfit/nfit.c
> +++ b/src/acpi/nfit/nfit.c
> @@ -231,7 +231,7 @@ static int nfit_test1(fwts_framework *fw)
>  
>  			/* TODO check Proximity Domain with SRAT table */
>  
> -			if (nfit_struct->memory_mapping & ~0x01F01F) {
> +			if (nfit_struct->memory_mapping & ~0x07F01F) {
>  				passed = false;
>  				fwts_failed(fw, LOG_LEVEL_HIGH,
>  					"NFITBadMemoryMappingAttribute",
> 

This is OK for now, but I think we need to add #defines for this
sometime soon as this magic mask is not immediately obvious.

#define EFI_MEMORY_UC 0x00000001
#define EFI_MEMORY_WC 0x00000002
#define EFI_MEMORY_WT 0x00000004
...
etc
...
#define EFI_MEMORY_SP 0x00040000

#define EFI_MEMORY_ALL (EFI_MEMORY_UC | EFI_MEMORY_WC | ... | EFI_MEMORY_SP)

and then

	if (nfit_struct->memory_mapping & ~EFI_MEMORY_ALL) {
		...

Colin



More information about the fwts-devel mailing list