2005-04-27 05:08:35 +04:00
|
|
|
/*
|
2006-01-09 06:30:52 +03:00
|
|
|
* Copyright 2005-2006, Haiku Inc. All rights reserved.
|
2005-04-27 05:08:35 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
2006-01-09 06:30:52 +03:00
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Axel Dörfler <axeld@pinc-software.de>
|
|
|
|
* Ingo Weinhold <bonefish@cs.tu-berlin.de>
|
2005-04-27 05:08:35 +04:00
|
|
|
*/
|
|
|
|
#ifndef _KERNEL_ARCH_PPC_INT_H
|
|
|
|
#define _KERNEL_ARCH_PPC_INT_H
|
|
|
|
|
2006-01-09 06:30:52 +03:00
|
|
|
#include <SupportDefs.h>
|
2005-04-27 05:08:35 +04:00
|
|
|
|
|
|
|
#define NUM_IO_VECTORS 256
|
|
|
|
|
2006-01-09 06:30:52 +03:00
|
|
|
/* The sprg0 register of each CPU points to the physical address of such
|
|
|
|
a structure. So it is at hand in the early exception handling code.
|
|
|
|
*/
|
|
|
|
struct ppc_cpu_exception_context {
|
|
|
|
void *kernel_handle_exception; // exception handler routine in the
|
|
|
|
// kernel
|
|
|
|
void *exception_context; // the virtual address of this
|
|
|
|
// structure
|
|
|
|
void *kernel_stack; // kernel stack for the current thread
|
|
|
|
|
|
|
|
uint32 scratch[8]; // scratch memory for free use in the
|
|
|
|
// early exception handling code
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
struct ppc_cpu_exception_context *ppc_get_cpu_exception_context(int cpu);
|
|
|
|
|
|
|
|
void ppc_set_current_cpu_exception_context(
|
|
|
|
struct ppc_cpu_exception_context *context);
|
|
|
|
// only called once per CPU
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2005-04-27 05:08:35 +04:00
|
|
|
|
|
|
|
#endif /* _KERNEL_ARCH_PPC_INT_H */
|