diff --git a/src/backend/cpu/platform/BasicCpuInfo.cpp b/src/backend/cpu/platform/BasicCpuInfo.cpp index b7a428c0f..2d2367fbb 100644 --- a/src/backend/cpu/platform/BasicCpuInfo.cpp +++ b/src/backend/cpu/platform/BasicCpuInfo.cpp @@ -262,7 +262,7 @@ rapidjson::Value xmrig::BasicCpuInfo::toJSON(rapidjson::Document &doc) const out.AddMember("brand", StringRef(brand()), allocator); out.AddMember("aes", hasAES(), allocator); out.AddMember("avx2", hasAVX2(), allocator); - out.AddMember("x64", ICpuInfo::isX64(), allocator); + out.AddMember("x64", isX64(), allocator); out.AddMember("l2", static_cast(L2()), allocator); out.AddMember("l3", static_cast(L3()), allocator); out.AddMember("cores", static_cast(cores()), allocator); diff --git a/src/backend/cpu/platform/BasicCpuInfo_arm.cpp b/src/backend/cpu/platform/BasicCpuInfo_arm.cpp index 8c4bb63a4..9191a2b72 100644 --- a/src/backend/cpu/platform/BasicCpuInfo_arm.cpp +++ b/src/backend/cpu/platform/BasicCpuInfo_arm.cpp @@ -5,8 +5,8 @@ * Copyright 2014-2016 Wolf9466 * Copyright 2016 Jay D Dee * Copyright 2017-2019 XMR-Stak , - * Copyright 2018-2019 SChernykh - * Copyright 2016-2019 XMRig + * Copyright 2018-2020 SChernykh + * Copyright 2016-2020 XMRig * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ * along with this program. If not, see . */ +#include #include #include @@ -33,6 +34,10 @@ #include "backend/cpu/platform/BasicCpuInfo.h" +#include "3rdparty/rapidjson/document.h" + + +std::bitset xmrig::BasicCpuInfo::m_flags; xmrig::BasicCpuInfo::BasicCpuInfo() : @@ -56,7 +61,7 @@ xmrig::BasicCpuInfo::BasicCpuInfo() : const char *xmrig::BasicCpuInfo::backend() const { - return "basic_arm"; + return "basic/1"; } @@ -64,3 +69,36 @@ xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &, uint32_t) cons { return CpuThreads(threads()); } + + +rapidjson::Value xmrig::BasicCpuInfo::toJSON(rapidjson::Document &doc) const +{ + using namespace rapidjson; + auto &allocator = doc.GetAllocator(); + + Value out(kObjectType); + + out.AddMember("brand", StringRef(brand()), allocator); + out.AddMember("aes", hasAES(), allocator); + out.AddMember("avx2", false, allocator); + out.AddMember("x64", isX64(), allocator); + out.AddMember("l2", static_cast(L2()), allocator); + out.AddMember("l3", static_cast(L3()), allocator); + out.AddMember("cores", static_cast(cores()), allocator); + out.AddMember("threads", static_cast(threads()), allocator); + out.AddMember("packages", static_cast(packages()), allocator); + out.AddMember("nodes", static_cast(nodes()), allocator); + out.AddMember("backend", StringRef(backend()), allocator); + out.AddMember("msr", "none", allocator); + out.AddMember("assembly", "none", allocator); + + Value flags(kArrayType); + + if (hasAES()) { + flags.PushBack("aes", allocator); + } + + out.AddMember("flags", flags, allocator); + + return out; +}