xref: /haiku/src/system/libroot/os/arch/x86_64/system_info.cpp (revision a3e794ae459fec76826407f8ba8c94cd3535f128)
1 /*
2  * Copyright 2014, Paweł Dziepak, pdziepak@quarnos.org.
3  * Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de.
4  * Distributed under the terms of the MIT License.
5  */
6 
7 
8 #include <OS.h>
9 #include <syscalls.h>
10 
11 
12 status_t
13 get_cpuid(cpuid_info* info, uint32 eaxRegister, uint32 cpuNum)
14 {
15 	__asm__("cpuid"
16 		: "=a" (info->regs.eax), "=b" (info->regs.ebx), "=c" (info->regs.ecx),
17 			"=d" (info->regs.edx)
18 		: "a" (eaxRegister), "c" (0));
19 	return B_OK;
20 }
21 
22