Adding placeholder machine dependent kernel code for arch mipsel. Copied from src/system/kernel/arch/arm and gutted.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32480 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5c31e9b97f
commit
c175f2a63e
|
@ -0,0 +1,35 @@
|
|||
SubDir HAIKU_TOP src system kernel arch mipsel ;
|
||||
|
||||
SubDirHdrs $(SUBDIR) $(DOTDOT) generic ;
|
||||
UsePrivateKernelHeaders ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
|
||||
|
||||
|
||||
KernelMergeObject kernel_arch_arm.o :
|
||||
arch_asm.S
|
||||
# arch_atomic.c
|
||||
arch_commpage.cpp
|
||||
arch_cpu.cpp
|
||||
# arch_cpu_asm.S
|
||||
arch_debug_console.cpp
|
||||
arch_debug.cpp
|
||||
arch_elf.cpp
|
||||
# arch_exceptions.S
|
||||
arch_int.cpp
|
||||
arch_platform.cpp
|
||||
arch_real_time_clock.cpp
|
||||
arch_smp.c
|
||||
arch_system_info.cpp
|
||||
arch_thread.c
|
||||
arch_timer.cpp
|
||||
arch_user_debugger.cpp
|
||||
arch_vm.cpp
|
||||
arch_vm_translation_map.cpp
|
||||
|
||||
generic_vm_physical_page_mapper.cpp
|
||||
generic_vm_physical_page_ops.cpp
|
||||
:
|
||||
$(TARGET_KERNEL_PIC_CCFLAGS) -Wno-unused
|
||||
;
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2009 Wischert, johanneswi@gmail.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2003, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
#include <arch/mipsel/arch_cpu.h>
|
||||
|
||||
#include <asm_defs.h>
|
||||
|
||||
.text
|
||||
|
||||
|
||||
/* void arch_int_enable_interrupts(void) */
|
||||
FUNCTION(arch_int_enable_interrupts):
|
||||
nop
|
||||
FUNCTION_END(arch_int_enable_interrupts)
|
||||
|
||||
|
||||
/* int arch_int_disable_interrupts(void)
|
||||
*/
|
||||
FUNCTION(arch_int_disable_interrupts):
|
||||
nop
|
||||
FUNCTION_END(arch_int_disable_interrupts)
|
||||
|
||||
|
||||
/* void arch_int_restore_interrupts(int oldState)
|
||||
*/
|
||||
FUNCTION(arch_int_restore_interrupts):
|
||||
nop
|
||||
FUNCTION_END(arch_int_restore_interrupts)
|
||||
|
||||
|
||||
/* bool arch_int_are_interrupts_enabled(void) */
|
||||
FUNCTION(arch_int_are_interrupts_enabled):
|
||||
nop
|
||||
FUNCTION_END(arch_int_are_interrupts_enabled)
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2009 Johannes Wischert, johanneswi@gmail.com
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <commpage.h>
|
||||
|
||||
|
||||
status_t
|
||||
arch_commpage_init(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_commpage_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_commpage_init_post_cpus(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_commpage_init_post_cpus
|
||||
return B_ERROR;
|
||||
}
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* Copyright 2003-2005 Axel Dörfler, axeld@pinc-software.de
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
//#include <arch_platform.h>
|
||||
#include <arch_thread.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <boot/kernel_args.h>
|
||||
#include <commpage.h>
|
||||
#include <elf.h>
|
||||
|
||||
|
||||
int arch_cpu_type;
|
||||
int arch_fpu_type;
|
||||
int arch_mmu_type;
|
||||
int arch_platform;
|
||||
|
||||
status_t
|
||||
arch_cpu_preboot_init_percpu(kernel_args* args, int curr_cpu)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_preboot_init_percpu
|
||||
|
||||
// The current thread must be NULL for all CPUs till we have threads.
|
||||
// Some boot code relies on this.
|
||||
arch_thread_set_current_thread(NULL);
|
||||
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_cpu_init_percpu(kernel_args* args, int curr_cpu)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_init_percpu
|
||||
//detect_cpu(curr_cpu);
|
||||
|
||||
// we only support one anyway...
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_cpu_init(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_init
|
||||
arch_cpu_type = args->arch_args.cpu_type;
|
||||
arch_fpu_type = args->arch_args.fpu_type;
|
||||
arch_mmu_type = args->arch_args.mmu_type;
|
||||
arch_platform = args->arch_args.platform;
|
||||
arch_platform = args->arch_args.machine;
|
||||
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_cpu_init_post_vm(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_init_post_vm
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_cpu_init_post_modules(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_init_post_modules
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_cpu_sync_icache(void* address, size_t len)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_sync_icache
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_cpu_memory_read_barrier(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_memory_read_barrier
|
||||
asm volatile ("nop;" : : : "memory");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_cpu_memory_write_barrier(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_memory_write_barrier
|
||||
asm volatile ("nop;" : : : "memory");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_cpu_invalidate_TLB_range(addr_t start, addr_t end)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_invalidate_TLB_range
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_cpu_invalidate_TLB_list(addr_t pages[], int num_pages)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_invalidate_TLB_list
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_cpu_global_TLB_invalidate(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_global_TLB_invalidate
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_cpu_user_TLB_invalidate(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_user_TLB_invalidate
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_cpu_user_memcpy(void* to, const void* from, size_t size,
|
||||
addr_t* faultHandler)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_user_memcpy
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
|
||||
ssize_t
|
||||
arch_cpu_user_strlcpy(char* to, const char* from, size_t size,
|
||||
addr_t* faultHandler)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_user_strlcpy
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_cpu_user_memset(void* s, char c, size_t count, addr_t* faultHandler)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_user_memset
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_cpu_shutdown(bool reboot)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_shutdown
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_cpu_idle(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_cpu_idle
|
||||
}
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* Copyright 2003-2009, Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Axel Dörfler <axeld@pinc-software.de>
|
||||
* Ingo Weinhold <bonefish@cs.tu-berlin.de>
|
||||
* François Revol <revol@free.fr>
|
||||
* Jonas Sundström <jonas@kirilla.com>
|
||||
*/
|
||||
|
||||
|
||||
#include <arch/debug.h>
|
||||
|
||||
#include <arch_cpu.h>
|
||||
#include <debug.h>
|
||||
#include <elf.h>
|
||||
#include <kernel.h>
|
||||
#include <kimage.h>
|
||||
#include <thread.h>
|
||||
|
||||
|
||||
struct stack_frame {
|
||||
struct stack_frame *previous;
|
||||
addr_t return_address;
|
||||
};
|
||||
|
||||
|
||||
#define NUM_PREVIOUS_LOCATIONS 32
|
||||
|
||||
|
||||
extern struct iframe_stack gBootFrameStack;
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
void
|
||||
arch_debug_save_registers(int* regs)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_save_registers
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
arch_debug_contains_call(struct thread* thread, const char* symbol,
|
||||
addr_t start, addr_t end)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_contains_call
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
arch_debug_get_caller(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_get_caller
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
int32
|
||||
arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
||||
int32 skipIframes, int32 skipFrames, bool userOnly)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_get_stack_trace
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
arch_debug_get_interrupt_pc(bool* _isSyscall)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_get_interrupt_pc
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
arch_is_debug_variable_defined(const char* variableName)
|
||||
{
|
||||
#warning IMPLEMENT arch_is_debug_variable_defined
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_set_debug_variable(const char* variableName, uint64 value)
|
||||
{
|
||||
#warning IMPLEMENT arch_set_debug_variable
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_get_debug_variable(const char* variableName, uint64* value)
|
||||
{
|
||||
#warning IMPLEMENT arch_get_debug_variable
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_debug_init(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_call_with_fault_handler(cpu_ent* cpu, jmp_buf jumpBuffer,
|
||||
void (*function)(void*), void* parameter)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_call_with_fault_handler
|
||||
longjmp(jumpBuffer, 1);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_unset_current_thread(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_unset_current_thread
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* Copyright 2003-2006 Axel Dörfler, axeld@pinc-software.de
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
//#include <arch_platform.h>
|
||||
#include <arch/debug_console.h>
|
||||
#include <boot/kernel_args.h>
|
||||
#include <kernel.h>
|
||||
#include <vm.h>
|
||||
#include <arch/arm/uart.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
void
|
||||
arch_debug_remove_interrupt_handler(uint32 line)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_remove_interrupt_handler
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_install_interrupt_handlers(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_install_interrupt_handlers
|
||||
}
|
||||
|
||||
|
||||
char
|
||||
arch_debug_blue_screen_getchar(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_blue_screen_getchar
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
char
|
||||
arch_debug_serial_getchar(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_serial_getchar
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_serial_putchar(const char c)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_serial_putchar
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_serial_puts(const char* s)
|
||||
{
|
||||
while (*s != '\0') {
|
||||
arch_debug_serial_putchar(*s);
|
||||
s++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_serial_early_boot_message(const char* string)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_serial_early_boot_message
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_debug_console_init(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_console_init
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_debug_console_init_settings(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_console_init_settings
|
||||
return B_ERROR;
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2009 Johannes Wischert, johanneswi@gmail.com
|
||||
* Copyright 2005 Ingo Weinhold bonefish@cs.tu-berlin.de
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2002, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
#ifdef _BOOT_MODE
|
||||
#include <boot/arch.h>
|
||||
#endif
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <elf_priv.h>
|
||||
#include <arch/elf.h>
|
||||
|
||||
|
||||
#define CHATTY 0
|
||||
|
||||
#ifdef _BOOT_MODE
|
||||
status_t
|
||||
boot_arch_elf_relocate_rel(struct preloaded_image *image,
|
||||
struct Elf32_Rel *rel, int rel_len)
|
||||
#else
|
||||
int
|
||||
arch_elf_relocate_rel(struct elf_image_info *image,
|
||||
struct elf_image_info *resolve_image, struct Elf32_Rel *rel, int rel_len)
|
||||
#endif
|
||||
{
|
||||
#warning IMPLEMENT arch_elf_relocate_rel
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
write_32(addr_t P, Elf32_Word value)
|
||||
{
|
||||
*(Elf32_Word*)P = value;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
write_16(addr_t P, Elf32_Word value)
|
||||
{
|
||||
// bits 16:29
|
||||
*(Elf32_Half*)P = (Elf32_Half)value;
|
||||
}
|
||||
|
||||
|
||||
static inline bool
|
||||
write_16_check(addr_t P, Elf32_Word value)
|
||||
{
|
||||
// bits 15:0
|
||||
if ((value & 0xffff0000) && (~value & 0xffff8000))
|
||||
return false;
|
||||
*(Elf32_Half*)P = (Elf32_Half)value;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static inline bool
|
||||
write_8(addr_t P, Elf32_Word value)
|
||||
{
|
||||
// bits 7:0
|
||||
*(uint8 *)P = (uint8)value;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static inline bool
|
||||
write_8_check(addr_t P, Elf32_Word value)
|
||||
{
|
||||
// bits 7:0
|
||||
if ((value & 0xffffff00) && (~value & 0xffffff80))
|
||||
return false;
|
||||
*(uint8 *)P = (uint8)value;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _BOOT_MODE
|
||||
status_t
|
||||
boot_arch_elf_relocate_rela(struct preloaded_image *image,
|
||||
struct Elf32_Rela *rel, int rel_len)
|
||||
#else
|
||||
int
|
||||
arch_elf_relocate_rela(struct elf_image_info *image,
|
||||
struct elf_image_info *resolve_image, struct Elf32_Rela *rel, int rel_len)
|
||||
#endif
|
||||
{
|
||||
#warning IMPLEMENT arch_elf_relocate_rela
|
||||
return B_ERROR;
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Copyright 2003-2009, Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Axel Dörfler <axeld@pinc-software.de>
|
||||
* Ingo Weinhold <bonefish@cs.tu-berlin.de>
|
||||
* François Revol <revol@free.fr>
|
||||
* Jonas Sundström <jonas@kirilla.com>
|
||||
*
|
||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
#include <int.h>
|
||||
|
||||
//#include <arch_platform.h>
|
||||
#include <arch/smp.h>
|
||||
#include <boot/kernel_args.h>
|
||||
#include <device_manager.h>
|
||||
#include <kscheduler.h>
|
||||
#include <interrupt_controller.h>
|
||||
#include <smp.h>
|
||||
#include <thread.h>
|
||||
#include <timer.h>
|
||||
#include <util/DoublyLinkedList.h>
|
||||
#include <util/kernel_cpp.h>
|
||||
#include <vm.h>
|
||||
#include <vm_address_space.h>
|
||||
#include <vm_priv.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
// defined in arch_exceptions.S
|
||||
extern int __irqvec_start;
|
||||
extern int __irqvec_end;
|
||||
|
||||
// current fault handler
|
||||
addr_t gFaultHandler;
|
||||
|
||||
// An iframe stack used in the early boot process when we don't have
|
||||
// threads yet.
|
||||
struct iframe_stack gBootFrameStack;
|
||||
|
||||
|
||||
void
|
||||
arch_int_enable_io_interrupt(int irq)
|
||||
{
|
||||
#warning IMPLEMENT arch_int_enable_io_interrupt
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_int_disable_io_interrupt(int irq)
|
||||
{
|
||||
#warning IMPLEMENT arch_int_disable_io_interrupt
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
print_iframe(struct iframe* frame)
|
||||
{
|
||||
#warning IMPLEMENT print_iframe
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_int_init(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_int_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_int_init_post_vm(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_int_init_post_vm
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_int_init_post_device_manager(struct kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_int_init_post_device_manager
|
||||
panic("arch_int_init_post_device_manager()");
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* Copyright 2006 Ingo Weinhold, bonefish@cs.tu-berlin.de
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
//#include <arch_platform.h>
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <KernelExport.h>
|
||||
#include <arch/platform.h>
|
||||
#include <boot/kernel_args.h>
|
||||
#include <real_time_clock.h>
|
||||
#include <util/kernel_cpp.h>
|
||||
|
||||
|
||||
status_t
|
||||
arch_platform_init(struct kernel_args* kernelArgs)
|
||||
{
|
||||
#warning IMPLEMENT arch_platform_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_platform_init_post_vm(struct kernel_args* kernelArgs)
|
||||
{
|
||||
#warning IMPLEMENT arch_platform_init_post_vm
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_platform_init_post_thread(struct kernel_args* kernelArgs)
|
||||
{
|
||||
#warning IMPLEMENT arch_platform_init_post_thread
|
||||
return B_ERROR;
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr.
|
||||
* Copyright 2006 Ingo Weinhold bonefish@cs.tu-berlin.de. All rights reserved.
|
||||
* Copyright 2005-2007 Axel Dörfler, axeld@pinc-software.de
|
||||
* Copyright 2003 Jeff Ward, jeff@r2d2.stcloudstate.edu. All rights reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include <arch/real_time_clock.h>
|
||||
|
||||
|
||||
status_t
|
||||
arch_rtc_init(kernel_args* args, struct real_time_data* data)
|
||||
{
|
||||
#warning IMPLEMENT arch_rtc_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
uint32
|
||||
arch_rtc_get_hw_time(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_rtc_get_hw_time
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_rtc_set_hw_time(uint32 seconds)
|
||||
{
|
||||
#warning IMPLEMENT arch_rtc_set_hw_time
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_rtc_set_system_time_offset(struct real_time_data* data, bigtime_t offset)
|
||||
{
|
||||
#warning IMPLEMENT arch_rtc_set_system_time_offset
|
||||
}
|
||||
|
||||
|
||||
bigtime_t
|
||||
arch_rtc_get_system_time_offset(struct real_time_data* data)
|
||||
{
|
||||
#warning IMPLEMENT arch_rtc_get_system_time_offset
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright 2007-2009, Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* François Revol <revol@free.fr>
|
||||
* Jonas Sundström <jonas@kirilla.com>
|
||||
*
|
||||
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de
|
||||
* Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <boot/stage2.h>
|
||||
#include <arch/smp.h>
|
||||
#include <debug.h>
|
||||
|
||||
|
||||
status_t
|
||||
arch_smp_init(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_smp_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_smp_per_cpu_init(kernel_args* args, int32 cpu)
|
||||
{
|
||||
#warning IMPLEMENT arch_smp_per_cpu_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_smp_send_ici(int32 target_cpu)
|
||||
{
|
||||
#warning IMPLEMENT arch_smp_send_ici
|
||||
panic("called arch_smp_send_ici!\n");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_smp_send_broadcast_ici()
|
||||
{
|
||||
#warning IMPLEMENT arch_smp_send_broadcast_ici
|
||||
panic("called arch_smp_send_broadcast_ici\n");
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright 2007-2009, Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* François Revol <revol@free.fr>
|
||||
* Jonas Sundström <jonas@kirilla.com>
|
||||
*
|
||||
* Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <arch_cpu.h>
|
||||
#include <arch/system_info.h>
|
||||
#include <boot/kernel_args.h>
|
||||
|
||||
|
||||
static uint64 sCPUClockFrequency;
|
||||
static uint64 sBusClockFrequency;
|
||||
static enum cpu_types sCPUType;
|
||||
static uint16 sCPURevision;
|
||||
|
||||
status_t
|
||||
arch_get_system_info(system_info *info, size_t size)
|
||||
{
|
||||
info->cpu_type = sCPUType;
|
||||
info->cpu_revision = sCPURevision;
|
||||
|
||||
info->cpu_clock_speed = sCPUClockFrequency;
|
||||
info->bus_clock_speed = sBusClockFrequency;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_system_info_init(struct kernel_args *args)
|
||||
{
|
||||
sCPUClockFrequency = args->arch_args.cpu_frequency;
|
||||
sBusClockFrequency = args->arch_args.bus_frequency;
|
||||
sCPUType = args->arch_args.cpu_type;
|
||||
sCPURevision = args->arch_args.cpu_revision;
|
||||
|
||||
return B_OK;
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
* Copyright 2003-2009 Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Axel Dörfler <axeld@pinc-software.de>
|
||||
* Ingo Weinhold <bonefish@cs.tu-berlin.de>
|
||||
* François Revol <revol@free.fr>
|
||||
* Jonas Sundström <jonas@kirilla.com
|
||||
*
|
||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
#include <arch_thread.h>
|
||||
|
||||
#include <arch_cpu.h>
|
||||
#include <arch/thread.h>
|
||||
#include <boot/stage2.h>
|
||||
#include <kernel.h>
|
||||
#include <thread.h>
|
||||
#include <vm_address_space.h>
|
||||
#include <vm_types.h>
|
||||
#include <arch_vm.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
static struct arch_thread sInitialState;
|
||||
|
||||
|
||||
status_t
|
||||
arch_thread_init(struct kernel_args *args)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_team_init_team_struct(struct team *team, bool kernel)
|
||||
{
|
||||
#warning IMPLEMENT arch_team_init_team_struct
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_thread_init_thread_struct(struct thread *thread)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_init_thread_struct
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_thread_init_kthread_stack(struct thread *t, int (*start_func)(void),
|
||||
void (*entry_func)(void), void (*exit_func)(void))
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_init_kthread_stack
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_thread_init_tls(struct thread *thread)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_init_tls
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_thread_switch_kstack_and_call(struct thread *t, addr_t newKstack,
|
||||
void (*func)(void *), void *arg)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_switch_kstack_and_call
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_thread_context_switch(struct thread *from, struct thread *to)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_context_switch
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_thread_dump_info(void *info)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_dump_info
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_thread_enter_userspace(struct thread *thread, addr_t entry, void *arg1,
|
||||
void *arg2)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_enter_userspace
|
||||
panic("arch_thread_enter_uspace(): not yet implemented\n");
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
arch_on_signal_stack(struct thread *thread)
|
||||
{
|
||||
#warning IMPLEMENT arch_on_signal_stack
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_setup_signal_frame(struct thread *thread, struct sigaction *sa, int sig,
|
||||
int sigMask)
|
||||
{
|
||||
#warning IMPLEMENT arch_setup_signal_frame
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
int64
|
||||
arch_restore_signal_frame(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_restore_signal_frame
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_check_syscall_restart(struct thread *thread)
|
||||
{
|
||||
#warning IMPLEMENT arch_check_syscall_restart
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_store_fork_frame(struct arch_fork_arg *arg)
|
||||
{
|
||||
#warning IMPLEMENT arch_store_fork_frame
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_restore_fork_frame(struct arch_fork_arg *arg)
|
||||
{
|
||||
#warning IMPLEMENT arch_restore_fork_frame
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright 2007-2009 Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* François Revol <revol@free.fr>
|
||||
* Jonas Sundström <jonas@kirilla.com>
|
||||
*
|
||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <boot/stage2.h>
|
||||
#include <kernel.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <timer.h>
|
||||
#include <arch/timer.h>
|
||||
|
||||
|
||||
void
|
||||
arch_timer_set_hardware_timer(bigtime_t timeout)
|
||||
{
|
||||
#warning IMPLEMENT arch_timer_set_hardware_timer
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_timer_clear_hardware_timer()
|
||||
{
|
||||
#warning IMPLEMENT arch_timer_clear_hardware_timer
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_init_timer(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_init_timer
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* Copyright 2005 Axel Dörfler, axeld@pinc-softare.de
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <debugger.h>
|
||||
#include <int.h>
|
||||
#include <thread.h>
|
||||
#include <arch/user_debugger.h>
|
||||
|
||||
|
||||
void
|
||||
arch_clear_team_debug_info(struct arch_team_debug_info* info)
|
||||
{
|
||||
#warning IMPLEMENT arch_clear_team_debug_info
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_destroy_team_debug_info(struct arch_team_debug_info* info)
|
||||
{
|
||||
arch_clear_team_debug_info(info);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_clear_thread_debug_info(struct arch_thread_debug_info* info)
|
||||
{
|
||||
#warning IMPLEMENT arch_clear_thread_debug_info
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_destroy_thread_debug_info(struct arch_thread_debug_info* info)
|
||||
{
|
||||
arch_clear_thread_debug_info(info);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_update_thread_single_step()
|
||||
{
|
||||
#warning IMPLEMENT arch_update_thread_single_step
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_set_debug_cpu_state(const debug_cpu_state* cpuState)
|
||||
{
|
||||
#warning IMPLEMENT arch_set_debug_cpu_state
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_get_debug_cpu_state(debug_cpu_state* cpuState)
|
||||
{
|
||||
#warning IMPLEMENT arch_get_debug_cpu_state
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_get_thread_debug_cpu_state(struct thread* thread,
|
||||
debug_cpu_state* cpuState)
|
||||
{
|
||||
#warning IMPLEMENT arch_get_thread_debug_cpu_state
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_set_breakpoint(void* address)
|
||||
{
|
||||
#warning IMPLEMENT arch_set_breakpoint
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_clear_breakpoint(void* address)
|
||||
{
|
||||
#warning IMPLEMENT arch_clear_breakpoint
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_set_watchpoint(void* address, uint32 type, int32 length)
|
||||
{
|
||||
#warning IMPLEMENT arch_set_watchpoint
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_clear_watchpoint(void* address)
|
||||
{
|
||||
#warning IMPLEMENT arch_clear_watchpoint
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
arch_has_breakpoints(struct arch_team_debug_info* info)
|
||||
{
|
||||
#warning IMPLEMENT arch_has_breakpoints
|
||||
return false;
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* Copyright 2003-2005 Axel Dörfler, axeld@pinc-software.de
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <kernel.h>
|
||||
#include <boot/kernel_args.h>
|
||||
|
||||
#include <vm.h>
|
||||
#include <vm_types.h>
|
||||
#include <arch/vm.h>
|
||||
|
||||
|
||||
//#define TRACE_ARCH_VM
|
||||
#ifdef TRACE_ARCH_VM
|
||||
# define TRACE(x) dprintf x
|
||||
#else
|
||||
# define TRACE(x) ;
|
||||
#endif
|
||||
|
||||
status_t
|
||||
arch_vm_init(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_init2(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_init2
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_init_post_area(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_init_post_area
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_init_end(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_init_end
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_init_post_modules(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_init_post_modules
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_vm_aspace_swap(struct vm_address_space* from, struct vm_address_space* to)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_aspace_swap
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
arch_vm_supports_protection(uint32 protection)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_supports_protection
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_vm_unset_memory_type(vm_area* area)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_unset_memory_type
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_set_memory_type(vm_area* area, addr_t physicalBase, uint32 type)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_set_memory_type
|
||||
return B_ERROR;
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* Copyright 2003-2007 Axel Dörfler, axeld@pinc-software.de
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
#include <KernelExport.h>
|
||||
#include <kernel.h>
|
||||
#include <vm.h>
|
||||
#include <vm_address_space.h>
|
||||
#include <vm_priv.h>
|
||||
#include <int.h>
|
||||
#include <boot/kernel_args.h>
|
||||
#include <arch/vm_translation_map.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "generic_vm_physical_page_mapper.h"
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
// VM API
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_translation_map_init_map(vm_translation_map* map, bool kernel)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_translation_map_init_map
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_translation_map_init_kernel_map_post_sem(vm_translation_map* map)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_translation_map_init_kernel_map_post_sem
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_translation_map_init(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_translation_map_init
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_translation_map_init_post_area(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_translation_map_init_post_area
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_translation_map_init_post_sem(kernel_args* args)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_translation_map_init_post_sem
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_translation_map_early_map(kernel_args* ka, addr_t virtualAddress,
|
||||
addr_t physicalAddress, uint8 attributes,
|
||||
addr_t (*get_free_page)(kernel_args* ))
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_translation_map_early_map
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_translation_map_early_query(addr_t va, addr_t* out_physical)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_translation_map_early_query
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
arch_vm_translation_map_is_kernel_page_accessible(addr_t virtualAddress,
|
||||
uint32 protection)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_translation_map_is_kernel_page_accessible
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue