From b385f97e3e6031eeaed026973de4064dee5b9c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 1 Dec 2004 03:54:23 +0000 Subject: [PATCH] Added our first x86-only syscall for get_cpuid(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10323 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/arch/system_info.h | 2 ++ .../kernel/arch/x86/arch_system_info.h | 23 +++++++++++++++++++ headers/private/kernel/syscalls.h | 5 ++++ 3 files changed, 30 insertions(+) create mode 100644 headers/private/kernel/arch/x86/arch_system_info.h diff --git a/headers/private/kernel/arch/system_info.h b/headers/private/kernel/arch/system_info.h index afd73c4b65..3a5fb24c8e 100644 --- a/headers/private/kernel/arch/system_info.h +++ b/headers/private/kernel/arch/system_info.h @@ -7,6 +7,8 @@ #include +#include + struct kernel_args; diff --git a/headers/private/kernel/arch/x86/arch_system_info.h b/headers/private/kernel/arch/x86/arch_system_info.h new file mode 100644 index 0000000000..c49bae5afa --- /dev/null +++ b/headers/private/kernel/arch/x86/arch_system_info.h @@ -0,0 +1,23 @@ +/* + * Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _KERNEL_ARCH_x86_SYSTEM_INFO_H +#define _KERNEL_ARCH_x86_SYSTEM_INFO_H + + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +status_t get_current_cpuid(cpuid_info *info, uint32 eax); +status_t _user_get_cpuid(cpuid_info *info, uint32 eax, uint32 cpu); + +#ifdef __cplusplus +} +#endif + +#endif /* _KRENEL_ARCH_x86_SYSTEM_INFO_H */ diff --git a/headers/private/kernel/syscalls.h b/headers/private/kernel/syscalls.h index 8eaeb5113e..7920969bcb 100644 --- a/headers/private/kernel/syscalls.h +++ b/headers/private/kernel/syscalls.h @@ -252,6 +252,11 @@ extern status_t _kern_get_system_info(system_info *info, size_t size); void _kern_debug_output(const char *message); +#ifdef __INTEL__ +// our only x86 only syscall +status_t _kern_get_cpuid(cpuid_info *info, uint32 eax, uint32 cpu); +#endif + /* This is a real BSD'ism :) Basically it returns the size of the * descriptor table for the current process as an integer. */