Updated core/arch/ppc section to be up-to-date again. Note, this only let
it build again; it doesn't work yet at all (pretty similar to NewOS change 1772). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3161 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
eda9fea884
commit
c182223b6e
19
src/kernel/core/arch/ppc/Jamfile
Normal file
19
src/kernel/core/arch/ppc/Jamfile
Normal file
@ -0,0 +1,19 @@
|
||||
SubDir OBOS_TOP src kernel core arch ppc ;
|
||||
|
||||
KernelStaticLibrary libppc :
|
||||
<$(SOURCE_GRIST)>arch_cpu.c
|
||||
<$(SOURCE_GRIST)>arch_dbg_console.c
|
||||
<$(SOURCE_GRIST)>arch_debug.c
|
||||
<$(SOURCE_GRIST)>arch_elf.c
|
||||
<$(SOURCE_GRIST)>arch_faults.c
|
||||
<$(SOURCE_GRIST)>arch_int.c
|
||||
<$(SOURCE_GRIST)>arch_smp.c
|
||||
<$(SOURCE_GRIST)>arch_thread.c
|
||||
<$(SOURCE_GRIST)>arch_timer.c
|
||||
<$(SOURCE_GRIST)>arch_vm.c
|
||||
<$(SOURCE_GRIST)>arch_vm_translation_map.c
|
||||
<$(SOURCE_GRIST)>arch_asm.S
|
||||
# <$(SOURCE_GRIST)>arch_interrupts.S
|
||||
:
|
||||
-fno-pic -Wno-unused
|
||||
;
|
@ -3,8 +3,9 @@
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
#include <kernel/kernel.h>
|
||||
#include <kernel/arch/cpu.h>
|
||||
|
||||
#include <kernel.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <boot/stage2.h>
|
||||
|
||||
|
||||
@ -59,11 +60,11 @@ arch_cpu_user_memcpy(void *to, const void *from, size_t size, addr *fault_handle
|
||||
*tmp++ = *s++;
|
||||
|
||||
*fault_handler = 0;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
*fault_handler = 0;
|
||||
return ERR_VM_BAD_USER_MEMORY;
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
|
||||
@ -76,11 +77,11 @@ arch_cpu_user_strcpy(char *to, const char *from, addr *fault_handler)
|
||||
;
|
||||
|
||||
*fault_handler = 0;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
*fault_handler = 0;
|
||||
return ERR_VM_BAD_USER_MEMORY;
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
|
||||
@ -93,11 +94,11 @@ arch_cpu_user_strncpy(char *to, const char *from, size_t size, addr *fault_handl
|
||||
;
|
||||
|
||||
*fault_handler = 0;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
*fault_handler = 0;
|
||||
return ERR_VM_BAD_USER_MEMORY;
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
|
||||
@ -112,11 +113,11 @@ arch_cpu_user_memset(void *s, char c, size_t count, addr *fault_handler)
|
||||
*xs++ = c;
|
||||
|
||||
*fault_handler = 0;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
*fault_handler = 0;
|
||||
return ERR_VM_BAD_USER_MEMORY;
|
||||
return B_BAD_ADDRESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,29 +2,43 @@
|
||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#include <kernel/kernel.h>
|
||||
|
||||
|
||||
#include <kernel.h>
|
||||
#include <boot/stage2.h>
|
||||
|
||||
int arch_dbg_con_init(kernel_args *ka)
|
||||
#include <arch/dbg_console.h>
|
||||
|
||||
|
||||
int
|
||||
arch_dbg_con_init(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
char arch_dbg_con_read()
|
||||
|
||||
char
|
||||
arch_dbg_con_read()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void _arch_dbg_con_putch(const char c)
|
||||
|
||||
static void
|
||||
_arch_dbg_con_putch(const char c)
|
||||
{
|
||||
}
|
||||
|
||||
char arch_dbg_con_putch(const char c)
|
||||
|
||||
char
|
||||
arch_dbg_con_putch(const char c)
|
||||
{
|
||||
return c;
|
||||
}
|
||||
|
||||
void arch_dbg_con_puts(const char *s)
|
||||
|
||||
void
|
||||
arch_dbg_con_puts(const char *s)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,11 @@
|
||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#include <kernel/kernel.h>
|
||||
#include <kernel/debug.h>
|
||||
#include <kernel/arch/debug.h>
|
||||
|
||||
|
||||
#include <kernel.h>
|
||||
#include <debug.h>
|
||||
#include <arch/debug.h>
|
||||
|
||||
|
||||
// XXX will put stack trace and disassembly routines here
|
||||
|
36
src/kernel/core/arch/ppc/arch_elf.c
Normal file
36
src/kernel/core/arch/ppc/arch_elf.c
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <elf_priv.h>
|
||||
#include <arch/elf.h>
|
||||
|
||||
#define ELF_TRACE 0
|
||||
#if ELF_TRACE
|
||||
# define TRACE(x) dprintf x
|
||||
#else
|
||||
# define TRACE(x) ;
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
arch_elf_relocate_rel(struct elf_image_info *image, const char *sym_prepend,
|
||||
struct elf_image_info *resolve_image, struct Elf32_Rel *rel, int rel_len)
|
||||
{
|
||||
dprintf("arch_elf_relocate_rel: not supported on PPC\n");
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_elf_relocate_rela(struct elf_image_info *image, const char *sym_prepend,
|
||||
struct elf_image_info *resolve_image, struct Elf32_Rela *rel, int rel_len)
|
||||
{
|
||||
dprintf("arch_elf_relocate_rela: not supported on PPC\n");
|
||||
return B_ERROR;
|
||||
}
|
||||
|
@ -2,9 +2,13 @@
|
||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <boot/stage2.h>
|
||||
|
||||
int arch_faults_init(kernel_args *ka)
|
||||
|
||||
int
|
||||
arch_faults_init(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -2,31 +2,42 @@
|
||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <boot/stage2.h>
|
||||
#include <int.h>
|
||||
|
||||
#include <kernel/int.h>
|
||||
|
||||
bool arch_int_is_interrupts_enabled(void)
|
||||
bool
|
||||
arch_int_is_interrupts_enabled(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void arch_int_enable_io_interrupt(int irq)
|
||||
|
||||
void
|
||||
arch_int_enable_io_interrupt(int irq)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void arch_int_disable_io_interrupt(int irq)
|
||||
|
||||
void
|
||||
arch_int_disable_io_interrupt(int irq)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int arch_int_init(kernel_args *ka)
|
||||
|
||||
int
|
||||
arch_int_init(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_int_init2(kernel_args *ka)
|
||||
|
||||
int
|
||||
arch_int_init2(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -2,26 +2,31 @@
|
||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <boot/stage2.h>
|
||||
#include <kernel/debug.h>
|
||||
#include <kernel/arch/smp.h>
|
||||
#include <arch/smp.h>
|
||||
#include <debug.h>
|
||||
|
||||
int arch_smp_init(kernel_args *ka)
|
||||
|
||||
int
|
||||
arch_smp_init(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_smp_get_current_cpu()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void arch_smp_send_ici(int target_cpu)
|
||||
void
|
||||
arch_smp_send_ici(int target_cpu)
|
||||
{
|
||||
panic("called arch_smp_send_ici!\n");
|
||||
}
|
||||
|
||||
void arch_smp_send_broadcast_ici()
|
||||
|
||||
void
|
||||
arch_smp_send_broadcast_ici()
|
||||
{
|
||||
panic("called arch_smp_send_broadcast_ici\n");
|
||||
}
|
||||
|
@ -2,38 +2,54 @@
|
||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#include <kernel/kernel.h>
|
||||
#include <kernel/thread.h>
|
||||
|
||||
|
||||
#include <kernel.h>
|
||||
#include <thread.h>
|
||||
#include <boot/stage2.h>
|
||||
|
||||
int arch_proc_init_proc_struct(struct proc *p, bool kernel)
|
||||
|
||||
int
|
||||
arch_team_init_team_struct(struct team *team, bool kernel)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_thread_init_thread_struct(struct thread *t)
|
||||
|
||||
int
|
||||
arch_thread_init_thread_struct(struct thread *t)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_thread_initialize_kthread_stack(struct thread *t, int (*start_func)(void), void (*entry_func)(void), void (*exit_func)(void))
|
||||
|
||||
int
|
||||
arch_thread_init_kthread_stack(struct thread *t, int (*start_func)(void), void (*entry_func)(void), void (*exit_func)(void))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void arch_thread_switch_kstack_and_call(struct thread *t, addr new_kstack, void (*func)(void *), void *arg)
|
||||
|
||||
void
|
||||
arch_thread_switch_kstack_and_call(struct thread *t, addr new_kstack, void (*func)(void *), void *arg)
|
||||
{
|
||||
}
|
||||
|
||||
void arch_thread_context_switch(struct thread *t_from, struct thread *t_to)
|
||||
|
||||
void
|
||||
arch_thread_context_switch(struct thread *t_from, struct thread *t_to)
|
||||
{
|
||||
}
|
||||
|
||||
void arch_thread_dump_info(void *info)
|
||||
|
||||
void
|
||||
arch_thread_dump_info(void *info)
|
||||
{
|
||||
}
|
||||
|
||||
void arch_thread_enter_uspace(addr entry, addr ustack_top)
|
||||
|
||||
void
|
||||
arch_thread_enter_uspace(struct thread *thread, addr entry, void *arg1, void *arg2)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -2,20 +2,27 @@
|
||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <boot/stage2.h>
|
||||
#include <kernel/kernel.h>
|
||||
#include <kernel.h>
|
||||
#include <arch/timer.h>
|
||||
|
||||
#include <kernel/timer.h>
|
||||
|
||||
void arch_timer_set_hardware_timer(time_t timeout)
|
||||
void
|
||||
arch_timer_set_hardware_timer(bigtime_t timeout)
|
||||
{
|
||||
}
|
||||
|
||||
void arch_timer_clear_hardware_timer()
|
||||
|
||||
void
|
||||
arch_timer_clear_hardware_timer()
|
||||
{
|
||||
}
|
||||
|
||||
int arch_init_timer(kernel_args *ka)
|
||||
|
||||
int
|
||||
arch_init_timer(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -2,21 +2,36 @@
|
||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#include <kernel/kernel.h>
|
||||
|
||||
|
||||
#include <kernel.h>
|
||||
#include <boot/stage2.h>
|
||||
#include <arch/vm.h>
|
||||
|
||||
int arch_vm_init(kernel_args *ka)
|
||||
|
||||
int
|
||||
arch_vm_init(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_vm_init2(kernel_args *ka)
|
||||
|
||||
int
|
||||
arch_vm_init2(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_vm_init_endvm(kernel_args *ka)
|
||||
|
||||
int
|
||||
arch_vm_init_endvm(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_vm_aspace_swap(vm_address_space *aspace)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -2,10 +2,13 @@
|
||||
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#include <kernel/kernel.h>
|
||||
#include <kernel/arch/vm_translation_map.h>
|
||||
|
||||
|
||||
#include <kernel.h>
|
||||
#include <arch/vm_translation_map.h>
|
||||
#include <boot/stage2.h>
|
||||
|
||||
|
||||
static int lock_tmap(vm_translation_map *map)
|
||||
{
|
||||
return 0;
|
||||
@ -46,16 +49,34 @@ static int protect_tmap(vm_translation_map *map, addr base, addr top, unsigned i
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int get_physical_page_tmap(addr pa, addr *va, int flags)
|
||||
|
||||
static int
|
||||
clear_flags_tmap(vm_translation_map *map, addr va, unsigned int flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int put_physical_page_tmap(addr va)
|
||||
|
||||
static void
|
||||
flush_tmap(vm_translation_map *map)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
get_physical_page_tmap(addr pa, addr *va, int flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
put_physical_page_tmap(addr va)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static vm_translation_map_ops tmap_ops = {
|
||||
destroy_tmap,
|
||||
lock_tmap,
|
||||
@ -65,26 +86,35 @@ static vm_translation_map_ops tmap_ops = {
|
||||
query_tmap,
|
||||
get_mapped_size_tmap,
|
||||
protect_tmap,
|
||||
clear_flags_tmap,
|
||||
flush_tmap,
|
||||
get_physical_page_tmap,
|
||||
put_physical_page_tmap
|
||||
};
|
||||
|
||||
int vm_translation_map_create(vm_translation_map *new_map, bool kernel)
|
||||
|
||||
int
|
||||
vm_translation_map_create(vm_translation_map *new_map, bool kernel)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int vm_translation_map_module_init(kernel_args *ka)
|
||||
|
||||
int
|
||||
vm_translation_map_module_init(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void vm_translation_map_module_init_post_sem(kernel_args *ka)
|
||||
|
||||
void
|
||||
vm_translation_map_module_init_post_sem(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int vm_translation_map_module_init2(kernel_args *ka)
|
||||
|
||||
int
|
||||
vm_translation_map_module_init2(kernel_args *ka)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -7,12 +7,35 @@ SECTIONS
|
||||
{
|
||||
. = 0x80000000 + SIZEOF_HEADERS;
|
||||
|
||||
/* text/read-only data */
|
||||
.text : { *(.text .gnu.linkonce.t.*) }
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.rel.text : { *(.rel.text) *(.rel.gnu.linkonce.t*) }
|
||||
.rela.text : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
|
||||
.rel.data : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
|
||||
.rela.data : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
|
||||
.rel.rodata : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
|
||||
.rela.rodata : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.init : { *(.rel.init) }
|
||||
.rela.init : { *(.rela.init) }
|
||||
.rel.fini : { *(.rel.fini) }
|
||||
.rela.fini : { *(.rela.fini) }
|
||||
.rel.bss : { *(.rel.bss) }
|
||||
.rela.bss : { *(.rela.bss) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.init : { *(.init) } =0x9090
|
||||
.plt : { *(.plt) }
|
||||
|
||||
__ctor_list = .;
|
||||
.ctors : { *(.ctors) }
|
||||
__ctor_end = .;
|
||||
/* text/read-only data */
|
||||
.text : { *(.text .gnu.linkonce.t.*) } =0x9090
|
||||
|
||||
.rodata : { *(.rodata) }
|
||||
|
||||
@ -21,6 +44,15 @@ SECTIONS
|
||||
__data_start = .;
|
||||
.data : { *(.data .gnu.linkonce.d.*) }
|
||||
|
||||
__ctor_list = .;
|
||||
.ctors : { *(.ctors) }
|
||||
__ctor_end = .;
|
||||
__dtor_list = .;
|
||||
.dtors : { *(.dtors) }
|
||||
__dtor_end = .;
|
||||
.got : { *(.got.plt) *(.got) }
|
||||
.dynamic : { *(.dynamic) }
|
||||
|
||||
/* unintialized data (in same segment as writable data) */
|
||||
__bss_start = .;
|
||||
.bss : { *(.bss) }
|
||||
@ -29,5 +61,5 @@ SECTIONS
|
||||
_end = . ;
|
||||
|
||||
/* Strip unnecessary stuff */
|
||||
/DISCARD/ : { *(.comment .note .eh_frame .dtors) }
|
||||
/DISCARD/ : { *(.comment .note .eh_frame) }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user