mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
Implement minimal sysinfo for AArch64 platforms.
Implement the bare minimal sysinfo for AArch64 platforms by reading the CPU models from /proc/cpuinfo. Signed-off-by: Anup Patel <anup.patel@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
This commit is contained in:
parent
950127620d
commit
2f064f35d5
@ -244,7 +244,7 @@ no_memory:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#elif defined(__arm__)
|
||||
#elif defined(__arm__) || defined(__aarch64__)
|
||||
static int
|
||||
virSysinfoParseSystem(const char *base, virSysinfoDefPtr ret)
|
||||
{
|
||||
@ -505,6 +505,7 @@ no_memory:
|
||||
defined(__i386__) || \
|
||||
defined(__amd64__) || \
|
||||
defined(__arm__) || \
|
||||
defined(__aarch64__) || \
|
||||
defined(__powerpc__))
|
||||
virSysinfoDefPtr
|
||||
virSysinfoRead(void) {
|
||||
|
10
tests/sysinfodata/aarch64cpuinfo.data
Normal file
10
tests/sysinfodata/aarch64cpuinfo.data
Normal file
@ -0,0 +1,10 @@
|
||||
Processor : AArch64 Processor rev 0 (aarch64)
|
||||
BogoMIPS : 100.00
|
||||
|
||||
Features : fp asimd
|
||||
CPU architecture: AArch64
|
||||
CPU variant : 0x0
|
||||
CPU part : 0x000
|
||||
CPU revision : 0
|
||||
|
||||
Hardware : Generic AArch64
|
10
tests/sysinfodata/aarch64sysinfo.expect
Normal file
10
tests/sysinfodata/aarch64sysinfo.expect
Normal file
@ -0,0 +1,10 @@
|
||||
<sysinfo type='smbios'>
|
||||
<processor>
|
||||
<entry name='socket_destination'>0</entry>
|
||||
<entry name='type'>AArch64 Processor rev 0 (aarch64) </entry>
|
||||
</processor>
|
||||
<processor>
|
||||
<entry name='socket_destination'>1</entry>
|
||||
<entry name='type'>AArch64 Processor rev 0 (aarch64)</entry>
|
||||
</processor>
|
||||
</sysinfo>
|
@ -43,7 +43,7 @@
|
||||
# if defined(__s390__) || defined(__s390x__) || \
|
||||
defined(__powerpc__) || defined(__powerpc64__) || \
|
||||
defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || \
|
||||
defined(__arm__)
|
||||
defined(__arm__) || defined(__aarch64__)
|
||||
|
||||
/* from sysinfo.c */
|
||||
void virSysinfoSetup(const char *decoder,
|
||||
@ -179,6 +179,18 @@ test_arm(void)
|
||||
}
|
||||
|
||||
VIRT_TEST_MAIN(test_arm)
|
||||
# elif defined(__aarch64__)
|
||||
static int
|
||||
test_aarch64(void)
|
||||
{
|
||||
return sysinfotest_run("aarch64 sysinfo",
|
||||
NULL,
|
||||
NULL,
|
||||
"/sysinfodata/aarch64cpuinfo.data",
|
||||
"/sysinfodata/aarch64sysinfo.expect");
|
||||
}
|
||||
|
||||
VIRT_TEST_MAIN(test_aarch64)
|
||||
# else
|
||||
int
|
||||
main(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user