Renamed some more init2 routines to init_post_vm() to make it clearer when
and why they are called. Introduced a cpu_init_post_vm() that will now call arch_init_post_vm() instead of letting main() doing it. Fixed some return types (mostly from int to status_t). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9438 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -9,8 +9,7 @@
|
||||
#define _KERNEL_ARCH_CPU_H
|
||||
|
||||
|
||||
#include <kernel.h>
|
||||
#include <ktypes.h>
|
||||
#include <OS.h>
|
||||
#include <boot/kernel_args.h>
|
||||
|
||||
|
||||
@@ -20,18 +19,18 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int arch_cpu_preboot_init(kernel_args *ka);
|
||||
int arch_cpu_init(kernel_args *ka);
|
||||
int arch_cpu_init2(kernel_args *ka);
|
||||
status_t arch_cpu_preboot_init(kernel_args *args);
|
||||
status_t arch_cpu_init(kernel_args *args);
|
||||
status_t arch_cpu_init_post_vm(kernel_args *args);
|
||||
void reboot(void);
|
||||
|
||||
void arch_cpu_invalidate_TLB_range(addr_t start, addr_t end);
|
||||
void arch_cpu_invalidate_TLB_list(addr_t pages[], int num_pages);
|
||||
void arch_cpu_global_TLB_invalidate(void);
|
||||
|
||||
int arch_cpu_user_memcpy(void *to, const void *from, size_t size, addr_t *faultHandler);
|
||||
int arch_cpu_user_strlcpy(char *to, const char *from, size_t size, addr_t *faultHandler);
|
||||
int arch_cpu_user_memset(void *s, char c, size_t count, addr_t *faultHandler);
|
||||
status_t arch_cpu_user_memcpy(void *to, const void *from, size_t size, addr_t *faultHandler);
|
||||
ssize_t arch_cpu_user_strlcpy(char *to, const char *from, size_t size, addr_t *faultHandler);
|
||||
status_t arch_cpu_user_memset(void *s, char c, size_t count, addr_t *faultHandler);
|
||||
|
||||
void arch_cpu_idle(void);
|
||||
void arch_cpu_sync_icache(void *address, size_t length);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/*
|
||||
** Copyright 2002-2004, The Haiku Team. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
**
|
||||
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
@@ -13,8 +16,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int arch_int_init(kernel_args *ka);
|
||||
int arch_int_init2(kernel_args *ka);
|
||||
status_t arch_int_init(kernel_args *args);
|
||||
status_t arch_int_init_post_vm(kernel_args *args);
|
||||
|
||||
void arch_int_enable_interrupts(void);
|
||||
int arch_int_disable_interrupts(void);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/*
|
||||
** Copyright 2002-2004, The Haiku Team. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
**
|
||||
** Copyright 2002, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
@@ -29,12 +32,15 @@ typedef union cpu_ent {
|
||||
*/
|
||||
extern cpu_ent cpu[MAX_BOOT_CPUS];
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int cpu_preboot_init(struct kernel_args *ka);
|
||||
int cpu_init(struct kernel_args *ka);
|
||||
status_t cpu_preboot_init(struct kernel_args *args);
|
||||
status_t cpu_init(struct kernel_args *args);
|
||||
status_t cpu_init_post_vm(struct kernel_args *args);
|
||||
|
||||
cpu_ent *get_cpu_struct(void);
|
||||
|
||||
extern inline cpu_ent *get_cpu_struct(void) { return &cpu[smp_get_current_cpu()]; }
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/*
|
||||
** Copyright 2002-2004, The Haiku Team. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
**
|
||||
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
@@ -25,10 +28,10 @@ extern int dbg_register_file[B_MAX_CPU_COUNT][14];
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int dbg_init(struct kernel_args *ka);
|
||||
extern int dbg_init2(struct kernel_args *ka);
|
||||
extern char dbg_putch(char c);
|
||||
extern void dbg_puts(const char *s);
|
||||
extern status_t debug_init(struct kernel_args *args);
|
||||
extern status_t debug_init_post_vm(struct kernel_args *args);
|
||||
extern char dbg_putch(char c);
|
||||
extern void dbg_puts(const char *s);
|
||||
|
||||
extern void _user_debug_output(const char *userString);
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ extern bool kernel_startup;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int int_init(struct kernel_args *ka);
|
||||
int int_init2(struct kernel_args *ka);
|
||||
int int_io_interrupt_handler(int vector);
|
||||
status_t int_init(struct kernel_args *args);
|
||||
status_t int_init_post_vm(struct kernel_args *args);
|
||||
int int_io_interrupt_handler(int vector);
|
||||
long install_interrupt_handler(long, interrupt_handler, void *);
|
||||
long remove_interrupt_handler (long, interrupt_handler, void *);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user