diff -u lshw-02.16/debian/changelog lshw-02.16/debian/changelog --- lshw-02.16/debian/changelog +++ lshw-02.16/debian/changelog @@ -1,3 +1,9 @@ +lshw (02.16-2ubuntu1.3) trusty-proposed; urgency=medium + + * Backport cpuinfo support for aarch64 (LP: #1485086) + + -- dann frazier Fri, 28 Aug 2015 15:00:23 -0600 + lshw (02.16-2ubuntu1.2) trusty-proposed; urgency=medium * Support multiple NICs sharing the same PCI function (LP: #1379591) diff -u lshw-02.16/debian/patches/series lshw-02.16/debian/patches/series --- lshw-02.16/debian/patches/series +++ lshw-02.16/debian/patches/series @@ -18,0 +19 @@ +cpuinfo-arm-aarch64-support.patch only in patch2: unchanged: --- lshw-02.16.orig/debian/patches/cpuinfo-arm-aarch64-support.patch +++ lshw-02.16/debian/patches/cpuinfo-arm-aarch64-support.patch @@ -0,0 +1,88 @@ +Description: Backport cpuinfo support for aarch64 + On certain platforms lshw does not print the correct CPU infomation. + This patch backports support for this architecture from upstream svn source. +Origin: backport, http://ezix.org/source/packages/lshw/development +Forwarded: not-needed +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/core/cpuinfo.cc ++++ b/src/core/cpuinfo.cc +@@ -47,6 +47,68 @@ + return NULL; + } + ++#ifdef __aarch64__ ++static vector aarch64_features; ++static string aarch64_processor_name; ++static void cpuinfo_aarch64(hwNode & node, ++ string id, ++ string value) ++{ ++ ++ /* ++ * If we already have CPU info extracted from SMBIOS, ignore /proc/cpuinfo ++ * entirely. This is because the kernel's /proc/cpuinfo output on aarch64 ++ * does not distinguish between cores and physical processors (every core is ++ * treated as a separate processor) so we may end up creating too many CPU ++ * nodes. ++ */ ++ if (getcpu(node)->getHandle().compare(0, 4, "DMI:") == 0) ++ return; ++ ++ if (id.substr(0, string("processor").size())=="processor") ++ currentcpu++; ++ ++ if (id.substr(0, string("Processor").size())=="Processor") ++ aarch64_processor_name = value; ++ ++ if (id == "Features") ++ { ++ while (value.length() > 0) ++ { ++ size_t pos = value.find(' '); ++ string capability = (pos==string::npos)?value:value.substr(0, pos); ++ aarch64_features.push_back(capability); ++ if (pos == string::npos) ++ value = ""; ++ else ++ value = hw::strip(value.substr(pos)); ++ } ++ for(int i=0; i<=currentcpu; i++) ++ { ++ hwNode *cpu = getcpu(node, i); ++ if (cpu) ++ { ++ cpu->addHint("logo", string("aarch64")); ++ if (node.getDescription() == "") ++ node.setDescription(aarch64_processor_name); ++ cpu->claim(true); ++ for(int i=0; i < aarch64_features.size(); i++) ++ { ++ cpu->addCapability(aarch64_features[i]); ++ cpu->describeCapability("fp", "Floating point instructions"); ++ cpu->describeCapability("asimd", "Advanced SIMD"); ++ cpu->describeCapability("evtstrm", "Event stream"); ++ cpu->describeCapability("aes", "AES instructions"); ++ cpu->describeCapability("pmull", "PMULL instruction"); ++ cpu->describeCapability("sha1", "SHA1 instructions"); ++ cpu->describeCapability("sha2", "SHA2 instructions"); ++ cpu->describeCapability("crc32", "CRC extension"); ++ } ++ } ++ } ++ } ++} ++#endif + + #ifdef __powerpc__ + static void cpuinfo_ppc(hwNode & node, +@@ -432,6 +494,9 @@ + #ifdef __ia64__ + cpuinfo_ia64(n, id, value); + #endif ++#ifdef __aarch64__ ++ cpuinfo_aarch64(n, id, value); ++#endif + } + } + }