diff -u lshw-02.17/debian/changelog lshw-02.17/debian/changelog --- lshw-02.17/debian/changelog +++ lshw-02.17/debian/changelog @@ -1,3 +1,11 @@ +lshw (02.17-1.1ubuntu3.6) xenial; urgency=medium + + * d/p/lshw-reports-wrong-memory-size.patch: + - Implement DMI memory reporting when DIMM + size is >32GiB (LP: #1777131) + + -- Eric Desrochers Mon, 29 Apr 2019 20:00:59 +0000 + lshw (02.17-1.1ubuntu3.5) xenial; urgency=medium * AArch64: cpuinfo: Remove redundant cpu caps loop (LP: #1582181) diff -u lshw-02.17/debian/patches/series lshw-02.17/debian/patches/series --- lshw-02.17/debian/patches/series +++ lshw-02.17/debian/patches/series @@ -23,0 +24 @@ +lshw-reports-wrong-memory-size.patch only in patch2: unchanged: --- lshw-02.17.orig/debian/patches/lshw-reports-wrong-memory-size.patch +++ lshw-02.17/debian/patches/lshw-reports-wrong-memory-size.patch @@ -0,0 +1,21 @@ +Description: implement DMI memory reporting when >32GiB + lshw reports wrong memory size +Author: Lyonel Vincent +Origin: upstream, https://ezix.org/src/pkg/lshw/commit/6406159 +Bug: https://ezix.org/project/ticket/662 +Bug-Ubuntu: https://launchpad.net/bugs/1777131 +--- a/src/core/dmi.cc ++++ b/src/core/dmi.cc +@@ -1449,6 +1449,12 @@ + + // size + u = data[13] << 8 | data[12]; ++ if(u == 0x7fff) { ++ unsigned long long extendsize = (data[0x1f] << 24) | (data[0x1e] << 16) | (data[0x1d] << 8) | data[0x1c]; ++ extendsize &= 0x7fffffffUL; ++ size = extendsize * 1024ULL * 1024ULL; ++ } ++ else + if (u != 0xffff) + size = (1024ULL * (u & 0x7fff) * ((u & 0x8000) ? 1 : 1024ULL)); + description += string(dmi_memory_device_form_factor(data[14]));