From 84bf29f97b5ff5f1ace8dfee48d035cba0b4fb75 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Fri, 6 Jul 2012 14:17:48 +0100 Subject: [PATCH] Compile in arch_platform.cpp for x86_64. The apm_init call is disabled for x86_64, APM is 32-bit only. --- headers/private/kernel/arch/x86/apm.h | 2 ++ src/system/kernel/arch/x86/64/stubs.cpp | 22 -------------------- src/system/kernel/arch/x86/Jamfile | 2 +- src/system/kernel/arch/x86/arch_platform.cpp | 3 +++ 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/headers/private/kernel/arch/x86/apm.h b/headers/private/kernel/arch/x86/apm.h index 675ed5a6be..cc557efeb2 100644 --- a/headers/private/kernel/arch/x86/apm.h +++ b/headers/private/kernel/arch/x86/apm.h @@ -50,6 +50,7 @@ typedef struct apm_info { #ifndef _BOOT_MODE +#ifndef __x86_64__ #ifdef __cplusplus extern "C" { #endif @@ -60,6 +61,7 @@ status_t apm_init(struct kernel_args *args); #ifdef __cplusplus } #endif +#endif // !__x86_64__ #endif // !_BOOT_MODE #endif /* KERNEL_APM_H */ diff --git a/src/system/kernel/arch/x86/64/stubs.cpp b/src/system/kernel/arch/x86/64/stubs.cpp index fe6b42b829..d98116faaf 100644 --- a/src/system/kernel/arch/x86/64/stubs.cpp +++ b/src/system/kernel/arch/x86/64/stubs.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -244,27 +243,6 @@ arch_debug_call_with_fault_handler(cpu_ent* cpu, jmp_buf jumpBuffer, } -status_t -arch_platform_init(struct kernel_args *args) -{ - return B_OK; -} - - -status_t -arch_platform_init_post_vm(struct kernel_args *args) -{ - return B_OK; -} - - -status_t -arch_platform_init_post_thread(struct kernel_args *args) -{ - return B_OK; -} - - status_t arch_rtc_init(struct kernel_args *args, struct real_time_data *data) { diff --git a/src/system/kernel/arch/x86/Jamfile b/src/system/kernel/arch/x86/Jamfile index c45f2d1f12..207abb9287 100644 --- a/src/system/kernel/arch/x86/Jamfile +++ b/src/system/kernel/arch/x86/Jamfile @@ -47,7 +47,6 @@ if $(TARGET_ARCH) = x86_64 { arch_commpage.cpp arch_debug.cpp arch_elf.cpp - arch_platform.cpp arch_real_time_clock.cpp arch_smp.cpp arch_thread.cpp @@ -90,6 +89,7 @@ local archGenericSources = arch_cpu.cpp arch_debug_console.cpp arch_int.cpp + arch_platform.cpp arch_vm.cpp arch_vm_translation_map.cpp pic.cpp diff --git a/src/system/kernel/arch/x86/arch_platform.cpp b/src/system/kernel/arch/x86/arch_platform.cpp index 9dc40abf7d..d967139701 100644 --- a/src/system/kernel/arch/x86/arch_platform.cpp +++ b/src/system/kernel/arch/x86/arch_platform.cpp @@ -29,7 +29,10 @@ arch_platform_init_post_vm(struct kernel_args *args) status_t arch_platform_init_post_thread(struct kernel_args *args) { + // APM is not supported on x86_64. +#ifndef __x86_64__ apm_init(args); +#endif return B_OK; }