Message ID | 1540290136-31422-1-git-send-email-ivan.hu@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | mcfg: fix MMIO config space checking | expand |
On 2018-10-23 6:22 p.m., Ivan Hu wrote: > On the newer kernel, string "reserved" from /sys/firmware/memmap/x/type is > changed with capital "R", this causes the mcfg test got the false alarm result: > Low failures: 1 > mcfg: MCFG MMIO config space at 0xe0000000 is not reserved in the memory map table > > Modify with checking both "reserved" and "Reserve" > > Signed-off-by: Ivan Hu <ivan.hu@canonical.com> > --- > src/lib/src/fwts_memorymap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/lib/src/fwts_memorymap.c b/src/lib/src/fwts_memorymap.c > index 26750bd..8c96f9d 100644 > --- a/src/lib/src/fwts_memorymap.c > +++ b/src/lib/src/fwts_memorymap.c > @@ -56,7 +56,7 @@ static int fwts_memory_map_str_to_type(const char *str) > > if (strstr(str, "System RAM")) > return FWTS_MEMORY_MAP_USABLE; > - if (strstr(str, "reserved")) > + if (strstr(str, "reserved") || strstr(str, "Reserved")) > return FWTS_MEMORY_MAP_RESERVED; > if (strstr(str, "ACPI Non-volatile Storage")) > return FWTS_MEMORY_MAP_ACPI; > @@ -81,7 +81,7 @@ static char *fwts_memory_map_type_to_str(const int type) > { > switch (type) { > case FWTS_MEMORY_MAP_RESERVED: > - return "(reserved)"; > + return "(Reserved)"; > case FWTS_MEMORY_MAP_ACPI: > return "(ACPI Non-volatile Storage)"; > case FWTS_MEMORY_MAP_USABLE: > Acked-by: Alex Hung <alex.hung@canonical.com>
On 23/10/2018 11:22, Ivan Hu wrote: > On the newer kernel, string "reserved" from /sys/firmware/memmap/x/type is > changed with capital "R", this causes the mcfg test got the false alarm result: > Low failures: 1 > mcfg: MCFG MMIO config space at 0xe0000000 is not reserved in the memory map table > > Modify with checking both "reserved" and "Reserve" > > Signed-off-by: Ivan Hu <ivan.hu@canonical.com> > --- > src/lib/src/fwts_memorymap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/lib/src/fwts_memorymap.c b/src/lib/src/fwts_memorymap.c > index 26750bd..8c96f9d 100644 > --- a/src/lib/src/fwts_memorymap.c > +++ b/src/lib/src/fwts_memorymap.c > @@ -56,7 +56,7 @@ static int fwts_memory_map_str_to_type(const char *str) > > if (strstr(str, "System RAM")) > return FWTS_MEMORY_MAP_USABLE; > - if (strstr(str, "reserved")) > + if (strstr(str, "reserved") || strstr(str, "Reserved")) > return FWTS_MEMORY_MAP_RESERVED; > if (strstr(str, "ACPI Non-volatile Storage")) > return FWTS_MEMORY_MAP_ACPI; > @@ -81,7 +81,7 @@ static char *fwts_memory_map_type_to_str(const int type) > { > switch (type) { > case FWTS_MEMORY_MAP_RESERVED: > - return "(reserved)"; > + return "(Reserved)"; > case FWTS_MEMORY_MAP_ACPI: > return "(ACPI Non-volatile Storage)"; > case FWTS_MEMORY_MAP_USABLE: > Thanks Ivan. Acked-by: Colin Ian King <colin.king@canonical.com>
diff --git a/src/lib/src/fwts_memorymap.c b/src/lib/src/fwts_memorymap.c index 26750bd..8c96f9d 100644 --- a/src/lib/src/fwts_memorymap.c +++ b/src/lib/src/fwts_memorymap.c @@ -56,7 +56,7 @@ static int fwts_memory_map_str_to_type(const char *str) if (strstr(str, "System RAM")) return FWTS_MEMORY_MAP_USABLE; - if (strstr(str, "reserved")) + if (strstr(str, "reserved") || strstr(str, "Reserved")) return FWTS_MEMORY_MAP_RESERVED; if (strstr(str, "ACPI Non-volatile Storage")) return FWTS_MEMORY_MAP_ACPI; @@ -81,7 +81,7 @@ static char *fwts_memory_map_type_to_str(const int type) { switch (type) { case FWTS_MEMORY_MAP_RESERVED: - return "(reserved)"; + return "(Reserved)"; case FWTS_MEMORY_MAP_ACPI: return "(ACPI Non-volatile Storage)"; case FWTS_MEMORY_MAP_USABLE:
On the newer kernel, string "reserved" from /sys/firmware/memmap/x/type is changed with capital "R", this causes the mcfg test got the false alarm result: Low failures: 1 mcfg: MCFG MMIO config space at 0xe0000000 is not reserved in the memory map table Modify with checking both "reserved" and "Reserve" Signed-off-by: Ivan Hu <ivan.hu@canonical.com> --- src/lib/src/fwts_memorymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)