mips: Remove mips
* As per the ML discussions. Bumps MIPS to tier 3. * We've reached a unanimous descision that MIPS doesn't target any real / valid hardware Haiku wants to pursue at the moment. In the event that anyone wants to pursue MIPS, feel free to fork Haiku into your own repository (and we'll even link to it on the website ports page) * If someone develops a viable plan for MIPS (and gets the port working, it can be readded at a later date)
This commit is contained in:
parent
39d7cced9f
commit
1b38c3412c
|
@ -334,12 +334,6 @@ rule KernelArchitectureSetup architecture
|
|||
HAIKU_CONTAINER_STRIP_EXECUTABLES on
|
||||
$(HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME) = 1 ;
|
||||
|
||||
case mipsel :
|
||||
# RouterBOARD firmware (ELF image over TFTP)
|
||||
HAIKU_BOOT_PLATFORM = routerboard_mipsel ;
|
||||
# offset in floppy image (>= sizeof(haiku_loader))
|
||||
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB
|
||||
|
||||
case * :
|
||||
Exit "Currently unsupported target CPU:" $(cpu) ;
|
||||
}
|
||||
|
@ -467,9 +461,6 @@ rule ArchitectureSetupWarnings architecture
|
|||
case m68k :
|
||||
return ;
|
||||
# we use #warning as placeholders for things to write...
|
||||
case mipsel :
|
||||
return ;
|
||||
# we use #warning as placeholders for things to write...
|
||||
}
|
||||
|
||||
# enable -Werror for certain parts of the source tree
|
||||
|
|
|
@ -194,10 +194,9 @@ switch $(HOST_GCC_MACHINE) {
|
|||
|
||||
# the following are rather unlikely as hosts ...
|
||||
case arm-* : HAIKU_HOST_IS_BIG_ENDIAN = 0 ;
|
||||
case armv7l-* : HAIKU_HOST_IS_BIG_ENDIAN = 0 ;
|
||||
case armv7b-* : HAIKU_HOST_IS_BIG_ENDIAN = 1 ;
|
||||
case armv7l-* : HAIKU_HOST_IS_BIG_ENDIAN = 0 ;
|
||||
case armv7b-* : HAIKU_HOST_IS_BIG_ENDIAN = 1 ;
|
||||
case m68k-* : HAIKU_HOST_IS_BIG_ENDIAN = 1 ;
|
||||
case mipsel-* : HAIKU_HOST_IS_BIG_ENDIAN = 0 ;
|
||||
case * : Exit "Unsupported gcc host machine:" $(HOST_GCC_MACHINE) ;
|
||||
}
|
||||
|
||||
|
@ -509,8 +508,6 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
|
|||
HOST_DEFINES += __POWERPC__ ;
|
||||
} else if $(HOST_CPU) = m68k {
|
||||
HOST_DEFINES += __M68K__ ;
|
||||
} else if $(HOST_CPU) = mipsel {
|
||||
HOST_DEFINES += __MIPSEL__ ;
|
||||
}
|
||||
|
||||
# Supposing this is a glibc platform, let's try to get features like large
|
||||
|
|
|
@ -29,8 +29,7 @@ options:
|
|||
directory under "cross-tools". The HAIKU_* tools
|
||||
variables will be set accordingly.
|
||||
<arch> specifies the target architecture, either
|
||||
"x86_gcc2", "x86", "x86_64", "ppc", "m68k", "arm",
|
||||
or "mipsel".
|
||||
"x86_gcc2", "x86", "x86_64", "ppc", "m68k", "arm"
|
||||
This option and --cross-tools-prefix can be
|
||||
specified multiple times. The first cross tools
|
||||
specify the primary tools, the subsequent ones the
|
||||
|
@ -221,7 +220,6 @@ standard_gcc_settings()
|
|||
arm-*) targetCpu=arm;;
|
||||
i?86-*) targetCpu=x86;;
|
||||
m68k-*) targetCpu=m68k;;
|
||||
mipsel-*) targetCpu=mipsel;;
|
||||
powerpc-*) targetCpu=ppc;;
|
||||
x86_64-*) targetCpu=x86_64;;
|
||||
*)
|
||||
|
@ -507,7 +505,6 @@ export haikuRequiredLegacyGCCVersion
|
|||
supportedTargetArchs="
|
||||
arm
|
||||
m68k
|
||||
mipsel
|
||||
ppc
|
||||
x86
|
||||
x86_64
|
||||
|
@ -572,7 +569,6 @@ while [ $# -gt 0 ] ; do
|
|||
ppc) targetMachine=powerpc-apple-haiku;;
|
||||
m68k) targetMachine=m68k-unknown-haiku;;
|
||||
arm) targetMachine=arm-unknown-haiku;;
|
||||
mipsel) targetMachine=mipsel-unknown-haiku;;
|
||||
*)
|
||||
echo "Unsupported target architecture: $2" >&2
|
||||
exit 1
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
SubDir HAIKU_TOP src system boot arch mipsel ;
|
||||
|
||||
DEFINES += _BOOT_MODE ;
|
||||
|
||||
local kernelLibArchObjects =
|
||||
<src!system!kernel!lib!arch!$(TARGET_ARCH)>byteorder.o
|
||||
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memcpy.o
|
||||
<src!system!kernel!lib!arch!$(TARGET_ARCH)>memset.o
|
||||
;
|
||||
|
||||
BootMergeObject boot_arch_$(TARGET_KERNEL_ARCH).o :
|
||||
arch_elf.cpp
|
||||
: # additional flags
|
||||
:
|
||||
$(kernelArchObjects)
|
||||
$(kernelLibArchObjects)
|
||||
;
|
||||
|
||||
SEARCH on [ FGristFiles arch_elf.cpp ]
|
||||
= [ FDirName $(HAIKU_TOP) src system kernel arch $(TARGET_KERNEL_ARCH) ] ;
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
SubDir HAIKU_TOP src system boot platform routerboard_mipsel ;
|
||||
|
||||
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform $(TARGET_BOOT_PLATFORM) ;
|
||||
|
||||
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||
UsePrivateHeaders [ FDirName graphics common ] ;
|
||||
UsePrivateHeaders [ FDirName graphics vesa ] ;
|
||||
UsePrivateHeaders [ FDirName storage ] ;
|
||||
|
||||
{
|
||||
local defines = _BOOT_MODE ;
|
||||
|
||||
defines = [ FDefines $(defines) ] ;
|
||||
SubDirCcFlags $(defines) ;
|
||||
SubDirC++Flags $(defines) -fno-rtti ;
|
||||
}
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||
|
||||
local genericPlatformSources =
|
||||
text_menu.cpp
|
||||
# video_blit.cpp
|
||||
# video_splash.cpp
|
||||
;
|
||||
|
||||
BootMergeObject boot_platform_routerboard_mipsel.o :
|
||||
console.cpp
|
||||
cpu.cpp
|
||||
debug.c
|
||||
devices.cpp
|
||||
keyboard.cpp
|
||||
menu.cpp
|
||||
mmu.cpp
|
||||
serial.cpp
|
||||
start.c
|
||||
video.cpp
|
||||
|
||||
$(genericPlatformSources)
|
||||
|
||||
: -fno-pic -G0
|
||||
;
|
||||
|
||||
SEARCH on [ FGristFiles $(genericPlatformSources) ]
|
||||
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
|
||||
|
||||
# Tell the build system to where stage1.bin can be found, so it can be used
|
||||
# elsewhere.
|
||||
SEARCH on stage1.bin = $(SUBDIR) ;
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "console.h"
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#include "keyboard.h"
|
||||
|
||||
|
||||
class Console : public ConsoleNode {
|
||||
public:
|
||||
Console();
|
||||
|
||||
virtual ssize_t ReadAt(void* cookie, off_t pos, void* buffer,
|
||||
size_t bufferSize);
|
||||
virtual ssize_t WriteAt(void* cookie, off_t pos,
|
||||
const void* buffer, size_t bufferSize);
|
||||
};
|
||||
|
||||
static uint32 sScreenWidth = 80;
|
||||
static uint32 sScreenHeight = 25;
|
||||
static uint32 sScreenOffset = 0;
|
||||
static uint16 sColor = 0x0f00;
|
||||
|
||||
static Console sInput, sOutput;
|
||||
|
||||
FILE* stdin;
|
||||
FILE* stdout;
|
||||
FILE* stderr;
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
Console::Console()
|
||||
: ConsoleNode()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ssize_t
|
||||
Console::ReadAt(void* cookie, off_t pos, void* buffer, size_t bufferSize)
|
||||
{
|
||||
#warning IMPLEMENT ReadAt
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ssize_t
|
||||
Console::WriteAt(void* cookie, off_t /*pos*/, const void* buffer, size_t bufferSize)
|
||||
{
|
||||
#warning IMPLEMENT WriteAt
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
void
|
||||
console_clear_screen(void)
|
||||
{
|
||||
#warning IMPLEMENT console_clear_screen
|
||||
}
|
||||
|
||||
|
||||
int32
|
||||
console_width(void)
|
||||
{
|
||||
#warning IMPLEMENT console_width
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int32
|
||||
console_height(void)
|
||||
{
|
||||
#warning IMPLEMENT console_height
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
console_set_cursor(int32 x, int32 y)
|
||||
{
|
||||
#warning IMPLEMENT console_set_cursor
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
console_set_color(int32 foreground, int32 background)
|
||||
{
|
||||
#warning IMPLEMENT console_set_color
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
console_wait_for_key(void)
|
||||
{
|
||||
#warning IMPLEMENT console_wait_for_key
|
||||
union key key;
|
||||
return key.code.ascii;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
console_init(void)
|
||||
{
|
||||
#warning IMPLEMENT console_init
|
||||
return B_OK;
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_CONSOLE_H
|
||||
#define _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_CONSOLE_H
|
||||
|
||||
#include <boot/platform/generic/text_console.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern status_t console_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_CONSOLE_H */
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "cpu.h"
|
||||
|
||||
#include <OS.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <arch_kernel.h>
|
||||
#include <arch_system_info.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
static status_t
|
||||
check_cpu_features()
|
||||
{
|
||||
#warning IMPLEMENT check_cpu_features
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
extern "C" void
|
||||
spin(bigtime_t microseconds)
|
||||
{
|
||||
#warning IMPLEMENT spin
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
cpu_init()
|
||||
{
|
||||
#warning IMPLEMENT cpu_init
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_CPU_H
|
||||
#define _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_CPU_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void cpu_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_CPU_H */
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <boot/platform.h>
|
||||
#include <boot/stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
void
|
||||
panic(const char* format, ...)
|
||||
{
|
||||
#warning IMPLEMENT panic
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
dprintf(const char* format, ...)
|
||||
{
|
||||
#warning IMPLEMENT dprintf
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
platform_debug_get_log_buffer(size_t* _size)
|
||||
{
|
||||
return NULL;
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
#include <boot/platform.h>
|
||||
#include <boot/partitions.h>
|
||||
#include <boot/stdio.h>
|
||||
#include <boot/stage2.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
status_t
|
||||
platform_add_boot_device(struct stage2_args* args, NodeList* devicesList)
|
||||
{
|
||||
#warning IMPLEMENT platform_add_boot_device
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
platform_get_boot_partition(struct stage2_args* args, Node* bootDevice,
|
||||
NodeList* list, boot::Partition** _partition)
|
||||
{
|
||||
#warning IMPLEMENT platform_get_boot_partition
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
platform_add_block_devices(stage2_args* args, NodeList* devicesList)
|
||||
{
|
||||
#warning IMPLEMENT platform_add_block_devices
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
platform_register_boot_device(Node* device)
|
||||
{
|
||||
#warning IMPLEMENT platform_register_boot_device
|
||||
return B_ERROR;
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "keyboard.h"
|
||||
|
||||
#include <boot/platform.h>
|
||||
|
||||
|
||||
static uint16
|
||||
check_for_key(void)
|
||||
{
|
||||
#warning IMPLEMENT check_for_key
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
clear_key_buffer(void)
|
||||
{
|
||||
#warning IMPLEMENT clear_key_buffer
|
||||
while (check_for_key() != 0)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
extern "C" union key
|
||||
wait_for_key(void)
|
||||
{
|
||||
#warning IMPLEMENT wait_for_key
|
||||
union key key;
|
||||
return key;
|
||||
}
|
||||
|
||||
|
||||
extern "C" uint32
|
||||
check_for_boot_keys(void)
|
||||
{
|
||||
#warning IMPLEMENT check_for_boot_keys
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_KEYBOARD_H
|
||||
#define _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_KEYBOARD_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
union key {
|
||||
uint16 ax;
|
||||
struct {
|
||||
uint8 ascii;
|
||||
uint8 bios;
|
||||
} code;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void clear_key_buffer(void);
|
||||
extern union key wait_for_key(void);
|
||||
extern uint32 check_for_boot_keys(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_KEYBOARD_H */
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <boot/menu.h>
|
||||
#include <boot/platform/generic/text_menu.h>
|
||||
|
||||
|
||||
void
|
||||
platform_add_menus(Menu* menu)
|
||||
{
|
||||
MenuItem* item;
|
||||
|
||||
switch (menu->Type()) {
|
||||
case MAIN_MENU:
|
||||
case SAFE_MODE_MENU:
|
||||
menu->AddItem(item = new(nothrow) MenuItem("A menu item"));
|
||||
item->SetType(MENU_ITEM_MARKABLE);
|
||||
item->SetData(0);
|
||||
item->SetHelpText("A helpful text.");
|
||||
|
||||
menu->AddItem(item = new(nothrow) MenuItem("Another menu item"));
|
||||
item->SetHelpText("Some more helpful text.");
|
||||
item->SetType(MENU_ITEM_MARKABLE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
platform_update_menu_item(Menu* menu, MenuItem* item)
|
||||
{
|
||||
platform_generic_update_text_menu_item(menu, item);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
platform_run_menu(Menu* menu)
|
||||
{
|
||||
platform_generic_run_text_menu(menu);
|
||||
}
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "mmu.h"
|
||||
|
||||
#include <boot/platform.h>
|
||||
#include <boot/stdio.h>
|
||||
#include <boot/kernel_args.h>
|
||||
#include <boot/stage2.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <arch_kernel.h>
|
||||
#include <kernel.h>
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
extern "C" addr_t
|
||||
mmu_map_physical_memory(addr_t physicalAddress, size_t size, uint32 flags)
|
||||
{
|
||||
#warning IMPLEMENT mmu_map_physical_memory
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
extern "C" void*
|
||||
mmu_allocate(void* virtualAddress, size_t size)
|
||||
{
|
||||
#warning IMPLEMENT mmu_allocate
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
mmu_free(void* virtualAddress, size_t size)
|
||||
{
|
||||
#warning IMPLEMENT mmu_free
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
mmu_init_for_kernel(void)
|
||||
{
|
||||
#warning IMPLEMENT mmu_init_for_kernel
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
mmu_init(void)
|
||||
{
|
||||
#warning IMPLEMENT mmu_init
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
extern "C" status_t
|
||||
platform_allocate_region(void** _address, size_t size, uint8 protection,
|
||||
bool /*exactAddress*/)
|
||||
{
|
||||
#warning IMPLEMENT platform_allocate_region
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
extern "C" status_t
|
||||
platform_free_region(void* address, size_t size)
|
||||
{
|
||||
#warning IMPLEMENT platform_free_region
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
platform_release_heap(struct stage2_args* args, void* base)
|
||||
{
|
||||
#warning IMPLEMENT platform_release_heap
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
platform_init_heap(struct stage2_args* args, void** _base, void** _top)
|
||||
{
|
||||
#warning IMPLEMENT platform_init_heap
|
||||
return B_ERROR;
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_MMU_H
|
||||
#define _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_MMU_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void mmu_init(void);
|
||||
extern void mmu_init_for_kernel(void);
|
||||
|
||||
extern addr_t mmu_map_physical_memory(addr_t physicalAddress, size_t size,
|
||||
uint32 flags);
|
||||
|
||||
extern void* mmu_allocate(void* virtualAddress, size_t size);
|
||||
extern void mmu_free(void* virtualAddress, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_MMU_H */
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "serial.h"
|
||||
|
||||
#include <boot/platform.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <boot/stage2.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
static void
|
||||
serial_putc(char c)
|
||||
{
|
||||
#warning IMPLEMENT serial_putc
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
serial_puts(const char* string, size_t size)
|
||||
{
|
||||
#warning IMPLEMENT serial_puts
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
serial_disable(void)
|
||||
{
|
||||
#warning IMPLEMENT serial_disable
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
serial_enable(void)
|
||||
{
|
||||
#warning IMPLEMENT serial_enable
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
serial_cleanup(void)
|
||||
{
|
||||
#warning IMPLEMENT serial_cleanup
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
serial_init(void)
|
||||
{
|
||||
#warning IMPLEMENT serial_init
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_SERIAL_H
|
||||
#define _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_SERIAL_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void serial_init(void);
|
||||
extern void serial_cleanup(void);
|
||||
extern void serial_puts(const char *string, size_t size);
|
||||
extern void serial_disable(void);
|
||||
extern void serial_enable(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYSTEM_BOOT_PLATFORM_ROUTERBOARD_MIPSEL_SERIAL_H */
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2003-2008 Axel Dörfler, axeld@pinc-software.de
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "serial.h"
|
||||
#include "console.h"
|
||||
#include "cpu.h"
|
||||
#include "mmu.h"
|
||||
#include "keyboard.h"
|
||||
|
||||
#include <KernelExport.h>
|
||||
#include <boot/platform.h>
|
||||
#include <boot/heap.h>
|
||||
#include <boot/stage2.h>
|
||||
#include <arch/cpu.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#define HEAP_SIZE 65536
|
||||
|
||||
|
||||
// GCC defined globals
|
||||
extern void (*__ctor_list)(void);
|
||||
extern void (*__ctor_end)(void);
|
||||
extern uint8 __bss_start;
|
||||
extern uint8 _end;
|
||||
|
||||
extern int main(stage2_args *args);
|
||||
void _start(void);
|
||||
|
||||
|
||||
static void
|
||||
clear_bss(void)
|
||||
{
|
||||
/* TODO: fix boot_loader_routerboard_mipsel.ld
|
||||
* so this code works, or find a workaround.
|
||||
*/
|
||||
/*
|
||||
memset(&__bss_start, 0, &_end - &__bss_start);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
call_ctors(void)
|
||||
{
|
||||
/* TODO: fix boot_loader_routerboard_mipsel.ld
|
||||
* so this code works, or find a workaround.
|
||||
*/
|
||||
/*
|
||||
void (**f)(void);
|
||||
|
||||
for (f = &__ctor_list; f < &__ctor_end; f++) {
|
||||
(**f)();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
uint32
|
||||
platform_boot_options(void)
|
||||
{
|
||||
#warning IMPLEMENT platform_boot_options
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
platform_start_kernel(void)
|
||||
{
|
||||
#warning IMPLEMENT platform_start_kernel
|
||||
panic("kernel returned!\n");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
platform_exit(void)
|
||||
{
|
||||
#warning IMPLEMENT platform_exit
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_start(void)
|
||||
{
|
||||
#warning IMPLEMENT _start
|
||||
stage2_args args;
|
||||
|
||||
clear_bss();
|
||||
call_ctors();
|
||||
|
||||
cpu_init();
|
||||
mmu_init();
|
||||
serial_init();
|
||||
console_init();
|
||||
serial_enable();
|
||||
|
||||
args.heap_size = HEAP_SIZE;
|
||||
args.arguments = NULL;
|
||||
|
||||
main(&args);
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
extern "C" void
|
||||
platform_set_palette(const uint8* palette)
|
||||
{
|
||||
#warning IMPLEMENT platform_set_palette
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
platform_switch_to_logo(void)
|
||||
{
|
||||
#warning IMPLEMENT platform_switch_to_logo
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
platform_switch_to_text_mode(void)
|
||||
{
|
||||
#warning IMPLEMENT platform_switch_to_text_mode
|
||||
}
|
||||
|
||||
|
||||
extern "C" status_t
|
||||
platform_init_video(void)
|
||||
{
|
||||
#warning IMPLEMENT platform_init_video
|
||||
return B_ERROR;
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
SubDir HAIKU_TOP src system glue arch mipsel ;
|
||||
|
||||
local architectureObject ;
|
||||
for architectureObject in [ MultiArchSubDirSetup mipsel ] {
|
||||
on $(architectureObject) {
|
||||
Objects
|
||||
crti.S
|
||||
crtn.S
|
||||
;
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Axel Dörfler, axeld@pinc-software.de
|
||||
* Jonas Sundström, jonas@kirilla.se
|
||||
*/
|
||||
|
||||
/** This file contains the first part of the ".init" and ".fini" sections in
|
||||
* the ELF executable.
|
||||
* The functions defined here will be called during initialization/termination
|
||||
* of the loaded executable/library. The ".init" and ".fini" sections are
|
||||
* stacked together like this:
|
||||
*
|
||||
* crti.S entry point
|
||||
* call to _init_before/_term_before
|
||||
* crtbegin.S GCC specific: constructors/destructors are called, ...
|
||||
* crtend.S
|
||||
* crtn.S call to _init_after/_term_after
|
||||
* exit
|
||||
*/
|
||||
|
||||
#define FUNCTION(x) .global x; .type x,@function; x
|
||||
|
||||
#warning MIPSEL: fixme
|
||||
|
||||
.section .init
|
||||
FUNCTION(_init):
|
||||
.set noreorder
|
||||
jal __haiku_init_before
|
||||
nop
|
||||
.set reorder
|
||||
// crtbegin.o stuff comes here
|
||||
|
||||
.section .fini
|
||||
FUNCTION(_fini):
|
||||
.set noreorder
|
||||
jal __haiku_term_before
|
||||
nop
|
||||
.set reorder
|
||||
// crtbegin.o stuff comes here
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Axel Dörfler, axeld@pinc-software.de
|
||||
* Jonas Sundström, jonas@kirilla.se
|
||||
*/
|
||||
|
||||
/** This file contains the final part of the ".init" and ".fini" sections in
|
||||
* the ELF executable. It is tightly connected to crti.S.
|
||||
* Have a look at crti.S to find a description of what happens here.
|
||||
*/
|
||||
|
||||
#warning MIPSEL: fixme
|
||||
|
||||
.section .init
|
||||
// the image ID and program args are still on the stack
|
||||
.set noreorder
|
||||
jal __haiku_init_after
|
||||
nop
|
||||
.set reorder
|
||||
|
||||
.section .fini
|
||||
// the image ID and program args are still on the stack
|
||||
.set noreorder
|
||||
jal __haiku_term_after
|
||||
nop
|
||||
.set reorder
|
|
@ -1,34 +0,0 @@
|
|||
SubDir HAIKU_TOP src system kernel arch mipsel ;
|
||||
|
||||
SubDirHdrs $(SUBDIR) $(DOTDOT) generic ;
|
||||
UsePrivateKernelHeaders ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
|
||||
|
||||
|
||||
KernelMergeObject kernel_arch_mipsel.o :
|
||||
arch_asm.S
|
||||
arch_atomic.cpp
|
||||
arch_commpage.cpp
|
||||
arch_cpu.cpp
|
||||
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.cpp
|
||||
arch_system_info.cpp
|
||||
arch_thread.cpp
|
||||
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
|
||||
;
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* 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 <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)
|
||||
|
||||
/* void mipsel_context_switch(addr_t* old_sp, addr_t new_sp); */
|
||||
FUNCTION(mipsel_context_switch):
|
||||
nop
|
||||
FUNCTION_END(mipsel_context_switch)
|
||||
|
|
@ -1,238 +0,0 @@
|
|||
/*
|
||||
* Copyright 2003, Marcus Overhagen. All rights reserved.
|
||||
* Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <kernel.h>
|
||||
#include <user_atomic.h>
|
||||
|
||||
/*
|
||||
* Emulation of 64 bit atomic functions.
|
||||
* Slow, using spinlocks...
|
||||
*/
|
||||
|
||||
static spinlock atomic_lock = 0;
|
||||
|
||||
int64
|
||||
atomic_set64(vint64 *value, int64 newValue)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
*value = newValue;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
int64
|
||||
atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
if (oldValue == testAgainst)
|
||||
*value = newValue;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
int64
|
||||
atomic_add64(vint64 *value, int64 addValue)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
*value += addValue;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
int64
|
||||
atomic_and64(vint64 *value, int64 andValue)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
*value &= andValue;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
int64
|
||||
atomic_or64(vint64 *value, int64 orValue)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
*value |= orValue;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
int64
|
||||
atomic_get64(vint64 *value)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
int64
|
||||
_user_atomic_set64(vint64 *value, int64 newValue)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
if (!IS_USER_ADDRESS(value)
|
||||
|| lock_memory((void *)value, 8, B_READ_DEVICE) != B_OK)
|
||||
goto access_violation;
|
||||
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
*value = newValue;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
unlock_memory((void *)value, 8, B_READ_DEVICE);
|
||||
return oldValue;
|
||||
|
||||
access_violation:
|
||||
// XXX kill application
|
||||
return -1;
|
||||
}
|
||||
|
||||
int64
|
||||
_user_atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
if (!IS_USER_ADDRESS(value)
|
||||
|| lock_memory((void *)value, 8, B_READ_DEVICE) != B_OK)
|
||||
goto access_violation;
|
||||
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
if (oldValue == testAgainst)
|
||||
*value = newValue;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
unlock_memory((void *)value, 8, B_READ_DEVICE);
|
||||
return oldValue;
|
||||
|
||||
access_violation:
|
||||
// XXX kill application
|
||||
return -1;
|
||||
}
|
||||
|
||||
int64
|
||||
_user_atomic_add64(vint64 *value, int64 addValue)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
if (!IS_USER_ADDRESS(value)
|
||||
|| lock_memory((void *)value, 8, B_READ_DEVICE) != B_OK)
|
||||
goto access_violation;
|
||||
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
*value += addValue;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
unlock_memory((void *)value, 8, B_READ_DEVICE);
|
||||
return oldValue;
|
||||
|
||||
access_violation:
|
||||
// XXX kill application
|
||||
return -1;
|
||||
}
|
||||
|
||||
int64
|
||||
_user_atomic_and64(vint64 *value, int64 andValue)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
if (!IS_USER_ADDRESS(value)
|
||||
|| lock_memory((void *)value, 8, B_READ_DEVICE) != B_OK)
|
||||
goto access_violation;
|
||||
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
*value &= andValue;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
unlock_memory((void *)value, 8, B_READ_DEVICE);
|
||||
return oldValue;
|
||||
|
||||
access_violation:
|
||||
// XXX kill application
|
||||
return -1;
|
||||
}
|
||||
|
||||
int64
|
||||
_user_atomic_or64(vint64 *value, int64 orValue)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
if (!IS_USER_ADDRESS(value)
|
||||
|| lock_memory((void *)value, 8, B_READ_DEVICE) != B_OK)
|
||||
goto access_violation;
|
||||
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
*value |= orValue;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
unlock_memory((void *)value, 8, B_READ_DEVICE);
|
||||
return oldValue;
|
||||
access_violation:
|
||||
// XXX kill application
|
||||
return -1;
|
||||
}
|
||||
|
||||
int64
|
||||
_user_atomic_get64(vint64 *value)
|
||||
{
|
||||
cpu_status status;
|
||||
int64 oldValue;
|
||||
if (!IS_USER_ADDRESS(value)
|
||||
|| lock_memory((void *)value, 8, B_READ_DEVICE) != B_OK)
|
||||
goto access_violation;
|
||||
|
||||
status = disable_interrupts();
|
||||
acquire_spinlock(&atomic_lock);
|
||||
oldValue = *value;
|
||||
release_spinlock(&atomic_lock);
|
||||
restore_interrupts(status);
|
||||
unlock_memory((void *)value, 8, B_READ_DEVICE);
|
||||
return oldValue;
|
||||
|
||||
access_violation:
|
||||
// XXX kill application
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* 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;
|
||||
}
|
||||
|
|
@ -1,190 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* 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_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
|
||||
}
|
||||
|
||||
// The purpose of this function is to trick the compiler. When setting the
|
||||
// page_handler to a label that is obviously (to the compiler) never used,
|
||||
// it may reorganize the control flow, so that the labeled part is optimized
|
||||
// away.
|
||||
// By invoking the function like this
|
||||
//
|
||||
// if (mipsel_set_fault_handler(faultHandler, (addr_t)&&error))
|
||||
// goto error;
|
||||
//
|
||||
// the compiler has to keep the labeled code, since it can't guess the return
|
||||
// value of this (non-inlinable) function. At least in my tests it worked that
|
||||
// way, and I hope it will continue to work like this in the future.
|
||||
//
|
||||
bool
|
||||
mipsel_set_fault_handler(addr_t *handlerLocation, addr_t handler)
|
||||
{
|
||||
// TODO: This doesn't work correctly with gcc 4 anymore!
|
||||
*handlerLocation = handler;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
/*
|
||||
* Copyright 2003-201, Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* 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(struct arch_debug_registers* registers)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_save_registers
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
arch_debug_contains_call(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, uint32 flags)
|
||||
{
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
ssize_t
|
||||
arch_debug_gdb_get_registers(char* buffer, size_t bufferSize)
|
||||
{
|
||||
// TODO: Implement!
|
||||
return B_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* 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/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
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_debug_blue_screen_try_getchar(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_blue_screen_try_getchar
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
char
|
||||
arch_debug_blue_screen_getchar(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_blue_screen_getchar
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
arch_debug_serial_try_getchar(void)
|
||||
{
|
||||
#warning IMPLEMENT arch_debug_serial_try_getchar
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
/*
|
||||
* 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_elf32_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_elf32_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;
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Haiku Inc.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <asm_defs.h>
|
||||
|
||||
|
||||
FUNCTION(__mipsel_exception_noop):
|
||||
nop
|
||||
FUNCTION_END(__mipsel_exception_noop)
|
||||
|
||||
|
||||
FUNCTION(__mipsel_exception_common):
|
||||
nop
|
||||
FUNCTION_END(__mipsel_exception_common)
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
/*
|
||||
* Copyright 2003-2010, Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* 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/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/vm.h>
|
||||
#include <vm/vm_priv.h>
|
||||
#include <vm/VMAddressSpace.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_io(kernel_args* args)
|
||||
{
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mipsel_get_current_cpu_exception_context(
|
||||
struct mipsel_cpu_exception_context *context)
|
||||
{
|
||||
#warning mipsel_get_current_cpu_exception_context
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mipsel_set_current_cpu_exception_context(
|
||||
struct mipsel_cpu_exception_context *context)
|
||||
{
|
||||
#warning mipsel_set_current_cpu_exception_context
|
||||
}
|
||||
|
|
@ -1,192 +0,0 @@
|
|||
/*
|
||||
* 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 <boot/kernel_args.h>
|
||||
#include <real_time_clock.h>
|
||||
#include <util/kernel_cpp.h>
|
||||
|
||||
|
||||
static MipselPlatform *sMipselPlatform;
|
||||
|
||||
|
||||
MipselPlatform::MipselPlatform(mipsel_platform_type platformType)
|
||||
:
|
||||
fPlatformType(platformType)
|
||||
{
|
||||
#warning IMPLEMENT MipselPlatform
|
||||
}
|
||||
|
||||
MipselPlatform::~MipselPlatform()
|
||||
{
|
||||
#warning IMPLEMENT ~MipselPlatform
|
||||
}
|
||||
|
||||
MipselPlatform*
|
||||
MipselPlatform::Default()
|
||||
{
|
||||
return sMipselPlatform;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - Routerboard
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
class Routerboard : public MipselPlatform {
|
||||
public:
|
||||
Routerboard();
|
||||
virtual ~Routerboard();
|
||||
|
||||
virtual status_t Init(struct kernel_args *kernelArgs);
|
||||
virtual status_t InitSerialDebug(struct kernel_args *kernelArgs);
|
||||
virtual status_t InitPostVM(struct kernel_args *kernelArgs);
|
||||
virtual status_t InitRTC(struct kernel_args *kernelArgs,
|
||||
struct real_time_data *data);
|
||||
|
||||
virtual char SerialDebugGetChar();
|
||||
virtual void SerialDebugPutChar(char c);
|
||||
|
||||
virtual void SetHardwareRTC(uint32 seconds);
|
||||
virtual uint32 GetHardwareRTC();
|
||||
|
||||
virtual void ShutDown(bool reboot);
|
||||
|
||||
private:
|
||||
int fInput;
|
||||
int fOutput;
|
||||
int fRTC;
|
||||
};
|
||||
|
||||
} // namespace BPrivate
|
||||
|
||||
using BPrivate::Routerboard;
|
||||
|
||||
|
||||
Routerboard::Routerboard()
|
||||
: MipselPlatform(MIPSEL_PLATFORM_ROUTERBOARD),
|
||||
fInput(-1),
|
||||
fOutput(-1),
|
||||
fRTC(-1)
|
||||
{
|
||||
#warning IMPLEMENT Routerboard
|
||||
}
|
||||
|
||||
|
||||
Routerboard::~Routerboard()
|
||||
{
|
||||
#warning IMPLEMENT ~Routerboard
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Routerboard::Init(struct kernel_args *kernelArgs)
|
||||
{
|
||||
#warning IMPLEMENT Init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Routerboard::InitSerialDebug(struct kernel_args *kernelArgs)
|
||||
{
|
||||
#warning IMPLEMENT InitSerialDebug
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Routerboard::InitPostVM(struct kernel_args *kernelArgs)
|
||||
{
|
||||
#warning IMPLEMENT InitPostVM
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
Routerboard::InitRTC(struct kernel_args *kernelArgs,
|
||||
struct real_time_data *data)
|
||||
{
|
||||
#warning IMPLEMENT InitRTC
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
char
|
||||
Routerboard::SerialDebugGetChar()
|
||||
{
|
||||
#warning IMPLEMENT SerialDebugGetChar
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Routerboard::SerialDebugPutChar(char c)
|
||||
{
|
||||
#warning IMPLEMENT SerialDebugPutChar
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Routerboard::SetHardwareRTC(uint32 seconds)
|
||||
{
|
||||
#warning IMPLEMENT SetHardwareRTC
|
||||
}
|
||||
|
||||
|
||||
uint32
|
||||
Routerboard::GetHardwareRTC()
|
||||
{
|
||||
#warning IMPLEMENT GetHardwareRTC
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Routerboard::ShutDown(bool reboot)
|
||||
{
|
||||
#warning IMPLEMENT ShutDown
|
||||
}
|
||||
|
||||
|
||||
// # pragma mark -
|
||||
|
||||
|
||||
// static buffer for constructing the actual MipselPlatform
|
||||
static char *sMipselPlatformBuffer[sizeof(Routerboard)];
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* 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 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;
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
* 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");
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* 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>
|
||||
|
||||
|
||||
status_t
|
||||
arch_get_system_info(system_info *info, size_t size)
|
||||
{
|
||||
#warning IMPLEMENT arch_get_system_info
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_system_info_init(struct kernel_args *args)
|
||||
{
|
||||
#warning IMPLEMENT arch_system_info_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
/*
|
||||
* Copyright 2003-2011, Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* 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/vm_types.h>
|
||||
#include <vm/VMAddressSpace.h>
|
||||
#include <arch_vm.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
static struct arch_thread sInitialState;
|
||||
|
||||
|
||||
void
|
||||
mipsel_push_iframe(struct iframe_stack *stack, struct iframe *frame)
|
||||
{
|
||||
#warning IMPLEMENT mipsel_push_iframe
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mipsel_pop_iframe(struct iframe_stack *stack)
|
||||
{
|
||||
#warning IMPLEMENT mipsel_pop_iframe
|
||||
}
|
||||
|
||||
|
||||
static struct iframe *
|
||||
mipsel_get_current_iframe(void)
|
||||
{
|
||||
#warning IMPLEMENT mipsel_get_current_iframe
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
struct iframe *
|
||||
mipsel_get_user_iframe(void)
|
||||
{
|
||||
#warning IMPLEMENT mipsel_get_user_iframe
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
status_t
|
||||
arch_thread_init(struct kernel_args *args)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_init
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_team_init_team_struct(Team *team, bool kernel)
|
||||
{
|
||||
#warning IMPLEMENT arch_team_init_team_struct
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_thread_init_thread_struct(Thread *thread)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_init_thread_struct
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_thread_init_kthread_stack(Thread* thread, void* _stack, void* _stackTop,
|
||||
void (*function)(void*), const void* data)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_init_kthread_stack
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_thread_init_tls(Thread *thread)
|
||||
{
|
||||
#warning IMPLEMENT arch_thread_init_tls
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_thread_context_switch(Thread *from, 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(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(Thread *thread)
|
||||
{
|
||||
#warning IMPLEMENT arch_on_signal_stack
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_setup_signal_frame(Thread *thread, struct sigaction *sa,
|
||||
struct signal_frame_data *signalFrameData)
|
||||
{
|
||||
#warning IMPLEMENT arch_setup_signal_frame
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
int64
|
||||
arch_restore_signal_frame(struct signal_frame_data* signalFrameData)
|
||||
{
|
||||
#warning IMPLEMENT arch_restore_signal_frame
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_check_syscall_restart(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
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* 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;
|
||||
}
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* 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(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;
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* 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/vm.h>
|
||||
#include <vm/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 VMAddressSpace* from, struct VMAddressSpace* 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(VMArea* area)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_unset_memory_type
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_vm_set_memory_type(VMArea* area, phys_addr_t physicalBase, uint32 type)
|
||||
{
|
||||
#warning IMPLEMENT arch_vm_set_memory_type
|
||||
return B_ERROR;
|
||||
}
|
||||
|
|
@ -1,121 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2007 François Revol, revol@free.fr
|
||||
* 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/vm.h>
|
||||
#include <vm/vm_priv.h>
|
||||
#include <vm/VMAddressSpace.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,
|
||||
phys_addr_t physicalAddress, uint8 attributes,
|
||||
phys_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, phys_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;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
status_t
|
||||
mipsel_map_address_range(addr_t virtualAddress, phys_addr_t physicalAddress,
|
||||
size_t size)
|
||||
{
|
||||
#warning IMPLEMENT mipsel_map_address_range
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mipsel_unmap_address_range(addr_t virtualAddress, size_t size)
|
||||
{
|
||||
#warning IMPLEMENT mipsel_unmap_address_range
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
mipsel_remap_address_range(addr_t *_virtualAddress, size_t size, bool unmap)
|
||||
{
|
||||
#warning IMPLEMENT mipsel_remap_address_range
|
||||
return B_OK;
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
SubDir HAIKU_TOP src system kernel lib arch mipsel ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
|
||||
|
||||
local librootSources = [ FDirName $(HAIKU_TOP) src system libroot ] ;
|
||||
local posixSources = [ FDirName $(librootSources) posix ] ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(librootSources) os arch $(TARGET_ARCH) ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(librootSources) os arch generic ] ;
|
||||
|
||||
KernelMergeObject kernel_os_arch_$(TARGET_ARCH).o :
|
||||
atomic.S
|
||||
byteorder.S
|
||||
system_time_asm.S
|
||||
system_time.c
|
||||
|
||||
generic_system_time_nsecs.cpp
|
||||
|
||||
: $(TARGET_KERNEL_PIC_CCFLAGS)
|
||||
;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(posixSources) arch $(TARGET_ARCH) ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(posixSources) string arch generic ] ;
|
||||
|
||||
KernelMergeObject kernel_lib_posix_arch_$(TARGET_ARCH).o :
|
||||
siglongjmp.S
|
||||
sigsetjmp.S
|
||||
kernel_longjmp_return.c
|
||||
kernel_setjmp_save_sigs.c
|
||||
|
||||
memcpy.c
|
||||
memset.c
|
||||
|
||||
: $(TARGET_KERNEL_PIC_CCFLAGS)
|
||||
;
|
|
@ -1,9 +0,0 @@
|
|||
SubDir HAIKU_TOP src system kernel platform routerboard_mipsel ;
|
||||
|
||||
SubDirCcFlags $(TARGET_KERNEL_PIC_CCFLAGS) ;
|
||||
SubDirC++Flags $(TARGET_KERNEL_PIC_CCFLAGS) ;
|
||||
|
||||
KernelMergeObject kernel_platform_routerboard_mipsel.o :
|
||||
platform.cpp
|
||||
;
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
/*
|
||||
Just a dummy. No BIOS services are required in the kernel.
|
||||
*/
|
|
@ -1,31 +0,0 @@
|
|||
SubDir HAIKU_TOP src system libroot os arch mipsel ;
|
||||
|
||||
local architectureObject ;
|
||||
for architectureObject in [ MultiArchSubDirSetup mipsel ] {
|
||||
on $(architectureObject) {
|
||||
local architecture = $(TARGET_PACKAGING_ARCH) ;
|
||||
|
||||
UsePrivateKernelHeaders ;
|
||||
# TODO: Replace by "UsePrivateHeaders libroot" after resolving the
|
||||
# TODO in time.c!
|
||||
UsePrivateSystemHeaders ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
|
||||
|
||||
MergeObject <$(architecture)>os_arch_$(TARGET_ARCH).o :
|
||||
atomic.S
|
||||
byteorder.S
|
||||
compatibility.c # only here until the places where those functions
|
||||
# are used are fixed
|
||||
stack_frame.c
|
||||
# systeminfo.c
|
||||
system_time.c
|
||||
system_time_asm.S
|
||||
thread.c
|
||||
time.c
|
||||
tls.c
|
||||
|
||||
generic_system_time_nsecs.cpp
|
||||
;
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* Copyright 2003-2009, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#define FUNCTION(x) .global x; .type x,@function; x
|
||||
|
||||
#warning MIPSEL: fixme
|
||||
|
||||
.text
|
||||
|
||||
/* int atomic_add(int *value, int increment)
|
||||
* (r3) r3 r4
|
||||
*/
|
||||
FUNCTION(atomic_add):
|
||||
lost1: jr $ra
|
||||
|
||||
/* int atomic_and(int *value, int andValue)
|
||||
* (r3) r3 r4
|
||||
*/
|
||||
FUNCTION(atomic_and):
|
||||
lost2: jr $ra
|
||||
|
||||
/* int atomic_or(int *value, int orValue)
|
||||
* (r3) r3 r4
|
||||
*/
|
||||
FUNCTION(atomic_or):
|
||||
lost3: jr $ra
|
||||
|
||||
/* int atomic_set(int *value, int setTo)
|
||||
* (r3) r3 r4
|
||||
*/
|
||||
FUNCTION(atomic_set):
|
||||
lost4: jr $ra
|
||||
|
||||
/* int atomic_test_and_set(int *value, int setTo, int testValue)
|
||||
* (r3) r3 r4 r5
|
||||
*/
|
||||
FUNCTION(atomic_test_and_set):
|
||||
lost5: jr $ra
|
||||
|
||||
/* int atomic_get(int *value)
|
||||
* (r3) r3
|
||||
*/
|
||||
FUNCTION(atomic_get):
|
||||
lost6: jr $ra
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
#define FUNCTION(x) .global x; .type x,@function; x
|
||||
|
||||
#warning MIPSEL: fixme
|
||||
|
||||
.text
|
||||
|
||||
/* uint16 __swap_int16(uint16 value)
|
||||
* r3
|
||||
*/
|
||||
FUNCTION(__swap_int16):
|
||||
jr $ra
|
||||
|
||||
|
||||
/* uint32 __swap_int32(uint32 value)
|
||||
* r3
|
||||
*/
|
||||
FUNCTION(__swap_int32):
|
||||
jr $ra
|
||||
|
||||
|
||||
/* uint64 __swap_int64(uint64 value)
|
||||
* r3/r4
|
||||
*/
|
||||
FUNCTION(__swap_int64):
|
||||
jr $ra
|
||||
|
||||
|
||||
/* TODO: The following functions can surely be optimized. A simple optimization
|
||||
* would be to define macros with the contents of the __swap_int{32,64}
|
||||
* functions and use those instead of calling the functions.
|
||||
*/
|
||||
|
||||
/* float __swap_float(float value)
|
||||
* f1
|
||||
*/
|
||||
FUNCTION(__swap_float):
|
||||
jr $ra
|
||||
|
||||
/* double __swap_double(double value)
|
||||
* f1
|
||||
*/
|
||||
FUNCTION(__swap_double):
|
||||
jr $ra
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
// This file includes some known R5 syscalls
|
||||
// ToDo: maybe they should indeed do something...
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
int _kset_mon_limit_(int num);
|
||||
int _kset_fd_limit_(int num);
|
||||
int _kget_cpu_state_(int cpuNum);
|
||||
int _kset_cpu_state_(int cpuNum, int state);
|
||||
|
||||
|
||||
int
|
||||
_kset_mon_limit_(int num)
|
||||
{
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
_kset_fd_limit_(int num)
|
||||
{
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
_kget_cpu_state_(int cpuNum)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
_kset_cpu_state_(int cpuNum, int state)
|
||||
{
|
||||
return state ? B_OK : B_ERROR;
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#include <libroot_private.h>
|
||||
|
||||
|
||||
void*
|
||||
get_stack_frame(void)
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
__arch_get_caller(void)
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
/*
|
||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#define SYSCALL0(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL1(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL2(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL3(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL4(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL5(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL6(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL7(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL8(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL9(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL10(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL11(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL12(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
||||
#define SYSCALL13(name, n) \
|
||||
.globl name; \
|
||||
.type name,@function; \
|
||||
.align 4; \
|
||||
name:
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* 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 <libroot_private.h>
|
||||
#include <real_time_data.h>
|
||||
|
||||
|
||||
static vint32 *sConversionFactor;
|
||||
|
||||
void
|
||||
__mipsel_setup_system_time(vint32 *cvFactor)
|
||||
{
|
||||
sConversionFactor = cvFactor;
|
||||
}
|
||||
|
||||
|
||||
bigtime_t
|
||||
system_time(void)
|
||||
{
|
||||
uint64 timeBase = __mipsel_get_time_base();
|
||||
|
||||
uint32 cv = *sConversionFactor;
|
||||
return (timeBase >> 32) * cv + (((timeBase & 0xffffffff) * cv) >> 32);
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
/*
|
||||
* Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
#define FUNCTION(x) .global x; .type x,@function; x
|
||||
|
||||
#warning MIPSEL: fixme
|
||||
|
||||
.text
|
||||
|
||||
/* int64 __mipsel_get_time_base(void)
|
||||
* r3/r4
|
||||
*/
|
||||
FUNCTION(__mipsel_get_time_base):
|
||||
/* get TB (time base) register */
|
||||
carry: jr $ra
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#include <OS.h>
|
||||
#include "syscalls.h"
|
||||
|
||||
|
||||
thread_id
|
||||
find_thread(const char *name)
|
||||
{
|
||||
return _kern_find_thread(name);
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <arch_cpu.h>
|
||||
#include <libroot_private.h>
|
||||
#include <real_time_data.h>
|
||||
|
||||
|
||||
static struct arch_real_time_data *sRealTimeData;
|
||||
|
||||
void
|
||||
__arch_init_time(struct real_time_data *data, bool setDefaults)
|
||||
{
|
||||
sRealTimeData = &data->arch_data;
|
||||
|
||||
if (setDefaults) {
|
||||
sRealTimeData->data[0].system_time_offset = 0;
|
||||
sRealTimeData->system_time_conversion_factor = 1000000000LL;
|
||||
sRealTimeData->version = 0;
|
||||
}
|
||||
|
||||
__mipsel_setup_system_time(&sRealTimeData->system_time_conversion_factor);
|
||||
}
|
||||
|
||||
|
||||
bigtime_t
|
||||
__arch_get_system_time_offset(struct real_time_data *data)
|
||||
{
|
||||
int32 version;
|
||||
bigtime_t offset;
|
||||
do {
|
||||
version = sRealTimeData->version;
|
||||
offset = sRealTimeData->data[version % 2].system_time_offset;
|
||||
} while (version != sRealTimeData->version);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
// ToDo: this is a dummy implementation - I've not yet gained enough knowledge
|
||||
// to decide how this should be done, so it's just broken now (okay for single
|
||||
// threaded apps, though).
|
||||
|
||||
// we don't want to have the inline assembly included here
|
||||
#ifndef _NO_INLINE_ASM
|
||||
# define _NO_INLINE_ASM 1
|
||||
#endif
|
||||
|
||||
#include "support/TLS.h"
|
||||
#include "tls.h"
|
||||
|
||||
|
||||
static int32 gNextSlot = TLS_FIRST_FREE_SLOT;
|
||||
static void *gSlots[TLS_MAX_KEYS];
|
||||
|
||||
|
||||
int32
|
||||
tls_allocate(void)
|
||||
{
|
||||
int32 next = atomic_add(&gNextSlot, 1);
|
||||
if (next >= TLS_MAX_KEYS)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
return next;
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
tls_get(int32 index)
|
||||
{
|
||||
return gSlots[index];
|
||||
}
|
||||
|
||||
|
||||
void **
|
||||
tls_address(int32 index)
|
||||
{
|
||||
return &gSlots[index];
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
tls_set(int32 index, void *value)
|
||||
{
|
||||
gSlots[index] = value;
|
||||
}
|
||||
|
|
@ -16,12 +16,6 @@
|
|||
#ifdef ARCH_sparc64
|
||||
# include "arch/sparc64/syscalls.inc"
|
||||
#endif
|
||||
#ifdef ARCH_mips
|
||||
# include "arch/mips/syscalls.inc"
|
||||
#endif
|
||||
#ifdef ARCH_mipsel
|
||||
# include "arch/mipsel/syscalls.inc"
|
||||
#endif
|
||||
#ifdef ARCH_ppc
|
||||
# include "arch/ppc/syscalls.inc"
|
||||
#endif
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
SubDir HAIKU_TOP src system libroot posix arch mipsel ;
|
||||
|
||||
local architectureObject ;
|
||||
for architectureObject in [ MultiArchSubDirSetup mipsel ] {
|
||||
on $(architectureObject) {
|
||||
local architecture = $(TARGET_PACKAGING_ARCH) ;
|
||||
|
||||
UsePrivateSystemHeaders ;
|
||||
|
||||
local genericSources =
|
||||
setjmp_save_sigs.c
|
||||
longjmp_return.c
|
||||
;
|
||||
|
||||
MergeObject posix_arch_$(TARGET_ARCH).o :
|
||||
sigsetjmp.S
|
||||
siglongjmp.S
|
||||
|
||||
$(genericSources)
|
||||
;
|
||||
|
||||
SEARCH on [ FGristFiles $(genericSources) ]
|
||||
= [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2005 Ingo Weinhold, bonefish@cs.tu-berlin.de
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef SETJMP_INTERNAL_H
|
||||
#define SETJMP_INTERNAL_H
|
||||
|
||||
/* These are the fields of the __jmp_regs structure */
|
||||
#define JMP_REGS_R1 0
|
||||
#define JMP_REGS_R2 4
|
||||
#define JMP_REGS_R3 8
|
||||
|
||||
|
||||
#warning DEFINE JMP_REGS
|
||||
|
||||
|
||||
#define FUNCTION(x) .global x; .type x,@function; x
|
||||
|
||||
#endif /* SETJMP_INTERNAL_H */
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2005 Ingo Weinhold, bonefish@cs.tu-berlin.de
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include "setjmp_internal.h"
|
||||
|
||||
/* int __siglongjmp(jmp_buf buffer, int value) */
|
||||
FUNCTION(siglongjmp):
|
||||
FUNCTION(longjmp):
|
||||
FUNCTION(_longjmp):
|
||||
// restore non-volatile general purpose registers
|
||||
nop
|
||||
|
||||
// restore special registers (link, condition)
|
||||
nop
|
||||
|
||||
#pragma weak longjmp=siglongjmp
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Jonas Sundström, jonas@kirilla.com
|
||||
* Copyright 2005 Ingo Weinhold, bonefish@cs.tu-berlin.de
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include <asm_defs.h>
|
||||
|
||||
#include "setjmp_internal.h"
|
||||
|
||||
/* int sigsetjmp(jmp_buf buffer, int saveMask) */
|
||||
FUNCTION(__sigsetjmp):
|
||||
FUNCTION(sigsetjmp):
|
||||
nop
|
||||
FUNCTION_END(__sigsetjmp)
|
||||
FUNCTION_END(sigsetjmp)
|
||||
|
||||
|
||||
/* int setjmp(jmp_buf buffer) */
|
||||
FUNCTION(setjmp):
|
||||
nop
|
||||
FUNCTION_END(setjmp)
|
||||
|
||||
#pragma weak _setjmp=setjmp
|
|
@ -1,17 +0,0 @@
|
|||
SubDir HAIKU_TOP src system libroot posix string arch mipsel ;
|
||||
|
||||
local architectureObject ;
|
||||
for architectureObject in [ MultiArchSubDirSetup mipsel ] {
|
||||
on $(architectureObject) {
|
||||
local architecture = $(TARGET_PACKAGING_ARCH) ;
|
||||
|
||||
UsePrivateSystemHeaders ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
|
||||
|
||||
MergeObject <$(architecture)>posix_string_arch_$(TARGET_ARCH).o :
|
||||
memcpy.c
|
||||
memset.c
|
||||
;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue