ARM: Some header cleanup in preperation of more CPU support code...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40948 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2,25 +2,15 @@
|
||||
** Copyright 2003-2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
*/
|
||||
#ifndef _KERNEL_ARCH_M68K_CPU_H
|
||||
#define _KERNEL_ARCH_M68K_CPU_H
|
||||
#ifndef _KERNEL_ARCH_ARM_CPU_H
|
||||
#define _KERNEL_ARCH_ARM_CPU_H
|
||||
|
||||
#ifndef _ASSEMBLER
|
||||
|
||||
#include <arch/arm/arch_thread_types.h>
|
||||
#include <kernel.h>
|
||||
|
||||
#endif // !_ASSEMBLER
|
||||
|
||||
|
||||
|
||||
#ifndef _ASSEMBLER
|
||||
|
||||
/* raw exception frames */
|
||||
|
||||
|
||||
|
||||
#warning ARM: check for missing regs/movem
|
||||
struct iframe {
|
||||
uint32 r0;
|
||||
uint32 r1;
|
||||
@@ -41,55 +31,9 @@ struct iframe {
|
||||
uint32 cpsr;
|
||||
} _PACKED;
|
||||
|
||||
|
||||
typedef struct arch_cpu_info {
|
||||
int null;
|
||||
} arch_cpu_info;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
//extern void sethid0(unsigned int val);
|
||||
//extern unsigned int getl2cr(void);
|
||||
//extern void setl2cr(unsigned int val);
|
||||
extern long long get_time_base(void);
|
||||
|
||||
//void __m68k_setup_system_time(vint32 *cvFactor);
|
||||
// defined in libroot: os/arch/system_time.c
|
||||
//int64 __m68k_get_time_base(void);
|
||||
// defined in libroot: os/arch/system_time_asm.S
|
||||
|
||||
extern void arm_context_switch(void **_oldStackPointer, void *newStackPointer);
|
||||
|
||||
extern bool arm_set_fault_handler(addr_t *handlerLocation, addr_t handler)
|
||||
__attribute__((noinline));
|
||||
|
||||
//extern bool m68k_is_hw_register_readable(addr_t address);
|
||||
//extern bool m68k_is_hw_register_writable(addr_t address, uint16 value);
|
||||
// defined in kernel: arch/m68k/cpu_asm.S
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
struct arm_cpu_ops {
|
||||
void (*flush_insn_pipeline)(void);
|
||||
void (*flush_atc_all)(void);
|
||||
void (*flush_atc_user)(void);
|
||||
void (*flush_atc_addr)(addr_t addr);
|
||||
void (*flush_dcache)(addr_t address, size_t len);
|
||||
void (*flush_icache)(addr_t address, size_t len);
|
||||
void (*idle)(void);
|
||||
};
|
||||
#warning ARM:check cpu_ops
|
||||
extern struct arm_cpu_ops cpu_ops;
|
||||
|
||||
//#define
|
||||
|
||||
|
||||
extern int arch_cpu_type;
|
||||
extern int arch_fpu_type;
|
||||
extern int arch_mmu_type;
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* Ingo Weinhold <[email protected]>
|
||||
* Johannes Wischert <[email protected]>
|
||||
*/
|
||||
#ifndef _KERNEL_ARCH_M68K_INT_H
|
||||
#define _KERNEL_ARCH_M68K_INT_H
|
||||
#ifndef _KERNEL_ARCH_ARM_INT_H
|
||||
#define _KERNEL_ARCH_ARM_INT_H
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#define NUM_IO_VECTORS 256
|
||||
#warning "ARM: fix numm io vectors..."
|
||||
#endif /* _KERNEL_ARCH_M68K_INT_H */
|
||||
|
||||
#endif /* _KERNEL_ARCH_ARM_INT_H */
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
#define _KERNEL_ARCH_ARM_KERNEL_H
|
||||
|
||||
#include <arch/cpu.h>
|
||||
|
||||
// memory layout
|
||||
#define KERNEL_BASE 0x80000000
|
||||
#define KERNEL_SIZE 0x80000000
|
||||
#define KERNEL_TOP (KERNEL_BASE + (KERNEL_SIZE - 1))
|
||||
#define KERNEL_BASE 0x80000000
|
||||
#define KERNEL_SIZE 0x80000000
|
||||
#define KERNEL_TOP (KERNEL_BASE + (KERNEL_SIZE - 1))
|
||||
|
||||
/*
|
||||
** User space layout is a little special:
|
||||
@@ -19,13 +20,13 @@
|
||||
** region wont be placed there. The 64kb region assures a user space thread cannot pass
|
||||
** a buffer into the kernel as part of a syscall that would cross into kernel space.
|
||||
*/
|
||||
#define USER_BASE 0x100000
|
||||
#define USER_BASE_ANY USER_BASE
|
||||
#define USER_SIZE (0x80000000 - (0x10000 + 0x100000))
|
||||
#define USER_TOP (USER_BASE + USER_SIZE)
|
||||
#define USER_BASE 0x100000
|
||||
#define USER_BASE_ANY USER_BASE
|
||||
#define USER_SIZE (0x80000000 - (0x10000 + 0x100000))
|
||||
#define USER_TOP (USER_BASE + USER_SIZE)
|
||||
|
||||
#define KERNEL_USER_DATA_BASE 0x6fff0000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define USER_STACK_REGION_SIZE (USER_TOP - USER_STACK_REGION)
|
||||
#define KERNEL_USER_DATA_BASE 0x6fff0000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define USER_STACK_REGION_SIZE (USER_TOP - USER_STACK_REGION)
|
||||
|
||||
#endif /* _KERNEL_ARCH_ARM_KERNEL_H */
|
||||
|
||||
@@ -9,21 +9,15 @@
|
||||
# error This file is included from <boot/kernel_args.h> only
|
||||
#endif
|
||||
|
||||
#define _PACKED __attribute__((packed))
|
||||
|
||||
//#define MAX_VIRTUAL_RANGES_TO_KEEP 32
|
||||
|
||||
// kernel args
|
||||
typedef struct {
|
||||
int cpu_type;
|
||||
int fpu_type;
|
||||
int mmu_type;
|
||||
int platform;
|
||||
int machine; // platform specific machine type
|
||||
int cpu_type;
|
||||
int fpu_type;
|
||||
int mmu_type;
|
||||
int platform;
|
||||
int machine; // platform specific machine type
|
||||
|
||||
// architecture specific
|
||||
uint64 cpu_frequency;
|
||||
uint64 bus_frequency;
|
||||
uint64 time_base_frequency;
|
||||
uint32 phys_pgdir;
|
||||
uint32 vir_pgdir;
|
||||
} arch_kernel_args;
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
* Copyright 2005, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_ARCH_M68K_SYSTEM_INFO_H
|
||||
#define _KERNEL_ARCH_M68K_SYSTEM_INFO_H
|
||||
|
||||
#ifndef _KERNEL_ARCH_ARM_SYSTEM_INFO_H
|
||||
#define _KERNEL_ARCH_ARM_SYSTEM_INFO_H
|
||||
|
||||
/* nothing to be seen here yet */
|
||||
|
||||
|
||||
#endif /* _KRENEL_ARCH_M68K_SYSTEM_INFO_H */
|
||||
|
||||
@@ -20,8 +20,7 @@ void arm_push_iframe(struct iframe_stack *stack, struct iframe *frame);
|
||||
void arm_pop_iframe(struct iframe_stack *stack);
|
||||
struct iframe *arm_get_user_iframe(void);
|
||||
|
||||
/* as we won't support SMP on arm (yet?) we can use a global here */
|
||||
/*TODO SMP-ARMS are comming..*/
|
||||
/* TODO fix this global once we support SMP ARM... */
|
||||
extern Thread *gCurrentThread;
|
||||
|
||||
extern inline Thread *
|
||||
|
||||
@@ -37,4 +37,4 @@ struct arch_fork_arg {
|
||||
char dummy;
|
||||
};
|
||||
|
||||
#endif /* KERNEL_ARCH_M68K_THREAD_TYPES_H */
|
||||
#endif /* KERNEL_ARCH_ARM_THREAD_TYPES_H */
|
||||
|
||||
@@ -2,16 +2,13 @@
|
||||
* Copyright 2005, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_ARCH_M68K_USER_DEBUGGER_H
|
||||
#define _KERNEL_ARCH_M68K_USER_DEBUGGER_H
|
||||
|
||||
#ifndef _KERNEL_ARCH_ARM_USER_DEBUGGER_H
|
||||
#define _KERNEL_ARCH_ARM_USER_DEBUGGER_H
|
||||
|
||||
struct arch_team_debug_info {
|
||||
uint32 dummy;
|
||||
};
|
||||
|
||||
struct arch_thread_debug_info {
|
||||
uint32 dummy;
|
||||
};
|
||||
|
||||
#endif // _KERNEL_ARCH_M68K_USER_DEBUGGER_H
|
||||
#endif // _KERNEL_ARCH_ARM_USER_DEBUGGER_H
|
||||
|
||||
@@ -5,40 +5,7 @@
|
||||
#ifndef ARCH_ARM_VM_H
|
||||
#define ARCH_ARM_VM_H
|
||||
|
||||
//#include <vm/vm_translation_map.h>
|
||||
|
||||
/* This many pages will be read/written on I/O if possible */
|
||||
#define PAGE_SHIFT 12
|
||||
|
||||
#define NUM_IO_PAGES 4
|
||||
/* 16 kB */
|
||||
|
||||
#define PAGE_SHIFT 12
|
||||
|
||||
|
||||
struct arm_vm_ops {
|
||||
// void *(*arm_translation_map_get_pgdir)(vm_translation_map *map);
|
||||
/* status_t (*arch_vm_translation_map_init_map)(vm_translation_map *map, bool kernel);
|
||||
status_t (*arch_vm_translation_map_init_kernel_map_post_sem)(vm_translation_map *map);
|
||||
status_t (*arch_vm_translation_map_init)(kernel_args *args);
|
||||
status_t (*arch_vm_translation_map_init_post_area)(kernel_args *args);
|
||||
status_t (*arch_vm_translation_map_init_post_sem)(kernel_args *args);
|
||||
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 *));
|
||||
status_t (*arch_vm_translation_map_early_query)(addr_t va, addr_t *out_physical);*/
|
||||
// void (*m68k_set_pgdir)(void *);
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct arm_vm_ops *get_vm_ops();
|
||||
|
||||
//extern void *arm_translation_map_get_pgdir(vm_translation_map *map);
|
||||
//extern void arm_set_pgdir(void *rt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ARCH_M68K_VM_H */
|
||||
#endif /* ARCH_ARM_VM_H */
|
||||
|
||||
Reference in New Issue
Block a user