From fa0848780c33281f9659e910bbbc5f2e913f2f83 Mon Sep 17 00:00:00 2001 From: wangjiahua Date: Tue, 14 Dec 2021 13:55:00 +0800 Subject: [PATCH 1/2] fixup ddr5 clock overflow in some architecture --- src/core/dmi.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/dmi.cc b/src/core/dmi.cc index a364ac06..c5bd8002 100644 --- a/src/core/dmi.cc +++ b/src/core/dmi.cc @@ -1589,7 +1589,7 @@ int dmiversionrev) char buffer[80]; u = data[0x16] << 8 | data[0x15]; // speed - clock = u * 1000000; // u is a frequency in MHz + clock = u * 1000000ULL; // u is a frequency in MHz if (u == 0) strcpy(buffer, ""); else From e141fb3e496d4da5e65f6c58864e279dc8da1c8e Mon Sep 17 00:00:00 2001 From: wangjiahua Date: Wed, 15 Dec 2021 16:56:25 +0800 Subject: [PATCH 2/2] fixup cannot find memory type bug in alpha architecture, do not ignore multiple nodes. --- src/core/dmi.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/dmi.cc b/src/core/dmi.cc index c5bd8002..6f33d2af 100644 --- a/src/core/dmi.cc +++ b/src/core/dmi.cc @@ -1465,14 +1465,16 @@ int dmiversionrev) description = _("Cache Memory"); memory_icon = true; break; + case 0x08: + description = _("System memory"); + memory_icon = true; + break; default: description = _("Generic Memory"); memory_icon = true; } if (id == "memory" && hardwarenode->getChild("memory")) { - // we don't want multiple "System memory" nodes, - // so just ignore this one break; } hwNode newnode(id, hw::memory);