From 659bacac269ec0992603008ef436ee20505bd67f Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Wed, 11 Jul 2012 14:43:44 +0100 Subject: [PATCH] Compile arch_real_time_clock.cpp and arch_system_info.cpp for x86_64. --- .../system/arch/x86_64/arch_cpu_defs.h | 12 +++++ headers/private/system/syscalls.h | 2 +- src/system/kernel/arch/x86/64/stubs.cpp | 49 ------------------- src/system/kernel/arch/x86/Jamfile | 4 +- 4 files changed, 15 insertions(+), 52 deletions(-) create mode 100644 headers/private/system/arch/x86_64/arch_cpu_defs.h diff --git a/headers/private/system/arch/x86_64/arch_cpu_defs.h b/headers/private/system/arch/x86_64/arch_cpu_defs.h new file mode 100644 index 0000000000..e10ef985d4 --- /dev/null +++ b/headers/private/system/arch/x86_64/arch_cpu_defs.h @@ -0,0 +1,12 @@ +/* + * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de. + * Distributed under the terms of the MIT License. + */ +#ifndef _SYSTEM_ARCH_X86_DEFS_H +#define _SYSTEM_ARCH_X86_DEFS_H + + +#define SPINLOCK_PAUSE() asm volatile("pause;") + + +#endif /* _SYSTEM_ARCH_X86_DEFS_H */ diff --git a/headers/private/system/syscalls.h b/headers/private/system/syscalls.h index 81cd20c10e..17f9b73d79 100644 --- a/headers/private/system/syscalls.h +++ b/headers/private/system/syscalls.h @@ -534,7 +534,7 @@ extern void _kern_clear_caches(void *address, size_t length, extern bool _kern_cpu_enabled(int32 cpu); extern status_t _kern_set_cpu_enabled(int32 cpu, bool enabled); -#ifdef __INTEL__ +#if defined(__INTEL__) || defined(__x86_64__) // our only x86 only syscall extern status_t _kern_get_cpuid(cpuid_info *info, uint32 eax, uint32 cpu); #endif diff --git a/src/system/kernel/arch/x86/64/stubs.cpp b/src/system/kernel/arch/x86/64/stubs.cpp index e4a02c973a..813e00c77e 100644 --- a/src/system/kernel/arch/x86/64/stubs.cpp +++ b/src/system/kernel/arch/x86/64/stubs.cpp @@ -270,41 +270,6 @@ arch_debug_call_with_fault_handler(cpu_ent* cpu, jmp_buf jumpBuffer, } -status_t -arch_rtc_init(struct kernel_args *args, struct real_time_data *data) -{ - return B_OK; -} - - -uint32 -arch_rtc_get_hw_time(void) -{ - return 0; -} - - -void -arch_rtc_set_hw_time(uint32 seconds) -{ - -} - - -void -arch_rtc_set_system_time_offset(struct real_time_data *data, bigtime_t offset) -{ - -} - - -bigtime_t -arch_rtc_get_system_time_offset(struct real_time_data *data) -{ - return 0; -} - - status_t arch_smp_init(kernel_args *args) { @@ -333,20 +298,6 @@ arch_smp_send_ici(int32 target_cpu) } -status_t -arch_get_system_info(system_info *info, size_t size) -{ - return B_OK; -} - - -status_t -arch_system_info_init(struct kernel_args *args) -{ - return B_OK; -} - - // The software breakpoint instruction (int3). const uint8 kX86SoftwareBreakpoint[1] = { 0xcc }; diff --git a/src/system/kernel/arch/x86/Jamfile b/src/system/kernel/arch/x86/Jamfile index 0fac1a03aa..014c7135eb 100644 --- a/src/system/kernel/arch/x86/Jamfile +++ b/src/system/kernel/arch/x86/Jamfile @@ -48,9 +48,7 @@ if $(TARGET_ARCH) = x86_64 { arch_commpage.cpp arch_debug.cpp - arch_real_time_clock.cpp arch_smp.cpp - arch_system_info.cpp arch_user_debugger.cpp apm.cpp bios.cpp @@ -84,6 +82,8 @@ local archGenericSources = arch_elf.cpp arch_int.cpp arch_platform.cpp + arch_real_time_clock.cpp + arch_system_info.cpp arch_thread.cpp arch_timer.cpp arch_vm.cpp