From 7add4179868f741959a5fd37880ce8f97cdae7cc Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Thu, 14 Mar 2019 21:00:03 +0100 Subject: [PATCH] stuff --- kaleid/include/kernel/cpu.h | 6 ++++++ kaleid/kernel/cpu/cpuid.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/kaleid/include/kernel/cpu.h b/kaleid/include/kernel/cpu.h index 3a26310..f347d99 100644 --- a/kaleid/include/kernel/cpu.h +++ b/kaleid/include/kernel/cpu.h @@ -21,3 +21,9 @@ // You should have received a copy of the GNU General Public License // // along with OS/K. If not, see . // //----------------------------------------------------------------------------// + +#define cpuid(in, a, b, c, d) asm("cpuid" \ + : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ + : "a" (in) \ + ); + diff --git a/kaleid/kernel/cpu/cpuid.c b/kaleid/kernel/cpu/cpuid.c index 1728396..7cab5a5 100644 --- a/kaleid/kernel/cpu/cpuid.c +++ b/kaleid/kernel/cpu/cpuid.c @@ -21,3 +21,5 @@ // You should have received a copy of the GNU General Public License // // along with OS/K. If not, see . // //----------------------------------------------------------------------------// + +