Message ID | 20190208032314.15215-6-alex.hung@canonical.com |
---|---|
State | Superseded |
Headers | show |
Series | Updates for ACPI 6.2b and 6.3 | expand |
On 08/02/2019 03:23, Alex Hung wrote: > Signed-off-by: Alex Hung <alex.hung@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
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",
Signed-off-by: Alex Hung <alex.hung@canonical.com> --- src/acpi/nfit/nfit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)