fiasco: remove remains of once supported ARM port

ref #989
This commit is contained in:
Martin Stein 2014-01-06 20:07:46 +01:00 committed by Norman Feske
parent b6626607f0
commit 12f560dc0e
8 changed files with 0 additions and 313 deletions

View File

@ -1,39 +0,0 @@
/*
* \brief Atomic operations for ARM
* \author Norman Feske
* \date 2007-04-28
*/
/*
* Copyright (C) 2007-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__ARM__CPU__ATOMIC_H_
#define _INCLUDE__ARM__CPU__ATOMIC_H_
namespace Genode {
extern "C" long int
l4_atomic_cmpxchg(volatile long int*, long int, long int);
/**
* Atomic compare and exchange
*
* This function compares the value at dest with cmp_val.
* If both values are equal, dest is set to new_val. If
* both values are different, the value at dest remains
* unchanged.
*
* \return 1 if the value was successfully changed to new_val,
* 0 if cmp_val and the value at dest differ.
*/
inline int cmpxchg(volatile int *dest, int cmp_val, int new_val)
{
return l4_atomic_cmpxchg((volatile long int *)dest, cmp_val, new_val);
}
}
#endif /* _INCLUDE__ARM__CPU__ATOMIC_H_ */

View File

@ -1,6 +0,0 @@
#
# Configuration for L4 build system (for kernel-bindings, sigma0, bootstrap).
#
L4_CONFIG = $(REP_DIR)/config/l4env-config.x86
include $(REP_DIR)/lib/mk/platform.inc

View File

@ -1,50 +0,0 @@
#
# Specifics for Fiasco on ARM
#
# The following variables must be defined by a platform spec file:
#
# L4SYS_ARM_CPU - Platform identifiert used for constructing l4sys path
# names corresponding to the ARM platform. For example,
# specify 'arm_int' for the ARM integrator board.
# RAM_BASE - Start address of physical memory. If not specified,
# the start adress 0x0 is used.
#
SPECS += arm fiasco 32bit
#
# ARM-specific L4/sys headers
#
L4_INC_DIR += $(L4_BUILD_DIR)/include/arm/l4v2 \
$(L4_BUILD_DIR)/include/arm
#
# Support for Fiasco's ARM-specific extensions of L4
# and ARM-specific utility functions.
#
REP_INC_DIR += include/arm
#
# Defines for L4/sys headers
#
CC_OPT += -DSYSTEM_$(L4SYS_ARM_CPU)_l4v2
CC_OPT += -DCONFIG_L4_CALL_SYSCALLS -DL4API_l4v2 -DARCH_arm
CC_OPT += -msoft-float -fomit-frame-pointer
AS_OPT += -mfpu=softfpa
#
# Linker options that are specific for L4 on ARM
#
RAM_BASE ?= 0x0
LD_TEXT_ADDR ?= $(shell printf "0x%x" $$(($(RAM_BASE) + 0x00078000)))
CXX_LINK_OPT += -Wl,-Ttext=$(LINK_TEXT_ADDR)
CXX_LINK_OPT += -L$(L4_BUILD_DIR)/lib/$(L4SYS_ARM_CPU)/l4v2
EXT_OBJECTS += -ll4sys
#
# Also include less-specific configuration last
#
include $(call select_from_repositories,mk/spec-32bit.mk)
include $(call select_from_repositories,mk/spec-fiasco.mk)
INC_DIR += $(L4_INC_DIR)

View File

@ -1,24 +0,0 @@
/*
* \brief Platform support specific to ARM
* \author Norman Feske
* \date 2007-10-13
*/
/*
* Copyright (C) 2007-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#include "platform.h"
using namespace Genode;
void Platform::_setup_io_port_alloc()
{
/*
* This is just a dummy init function for the I/O port allocator.
* ARM does not I/O port support.
*/
}

View File

@ -1,8 +0,0 @@
include $(PRG_DIR)/../target.inc
REQUIRES += arm
SRC_CC += platform_arm.cc
vpath io_port_session_component.cc $(GEN_CORE_DIR)/arm
vpath platform_services.cc $(GEN_CORE_DIR)

View File

@ -1,25 +0,0 @@
SRC = ../x86/genode.ld
TARGET = genode.ld
all:
@echo "--- available targets ---"
@echo " genode.ld - generate $(TARGET) from $(SRC)"
@echo " cleanall - remove generated file"
#
# NOTE: We change the start address to 0x60000, which
# is the same address as used by the original
# roottask.
#
# On L4x0, the thread ID type is only 32bit instead of 64bit
# for L4v2. Therefore, we have to adapt the place holder for
# thread ID part of the parent capability.
#
genode.ld:
cp $(SRC) $@
sed -i "s/= 0x[0-9]\+;/= 0x00060000;/" $@
sed -i "54s/^.*$$/\t\tLONG(0xffffffff);/" $@
clean cleanall:
rm -f $(TARGET)

View File

@ -1,124 +0,0 @@
/**
* \brief Startup code for Fiasco/ARM
* \author Norman Feske
* \date 2007-04-30
*
* Call constructors for static objects before calling main().
*/
/*
* Copyright (C) 2007-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
namespace Fiasco {
#include <l4/sys/kdebug.h>
}
/* Genode */
#include <base/crt0.h>
#include <base/env.h>
#include <base/sleep.h>
#include <base/printf.h>
namespace Genode {
/**
* Return constructed parent capability
*/
Parent_capability parent_cap()
{
Fiasco::l4_threadid_t tid = *(Fiasco::l4_threadid_t *)&_parent_cap_thread_id;
return Parent_capability(Native_capability(tid, _parent_cap_local_name));
}
}
using namespace Genode;
/***************
** C++ stuff **
***************/
/*
* This symbol must be defined when exception
* headers are defined in the linker script.
*/
extern "C" __attribute__((weak)) void *__gxx_personality_v0(void)
{
Fiasco::outstring("What a surprise! This function is really used? Sorry - not implemented\n");
return 0;
}
/**
* Resolve symbols needed by libsupc++ to make
* the linker happy.
*
* FIXME: implement us!
*/
extern "C" __attribute__((weak)) int atexit(void) {
Fiasco::outstring("atexit() called - not implemented!\n");
return 0;
};
extern "C" __attribute__((weak)) int memcmp(void) {
Fiasco::outstring("memcmp() called - not implemented!\n");
return 0;
};
extern "C" __attribute__((weak)) int strncmp(void) {
Fiasco::outstring("strncmp() called - not implemented!\n");
return 0;
};
extern int main(int argc, char **argv);
extern void init_exception_handling(); /* implemented in base/cxx */
/* FIXME no support for commandline
* ask parent for argc and argv */
static char argv0[] = { '_', 'm', 'a', 'i', 'n'};
static char *argv[1] = { argv0 };
/*
* Define 'environ' pointer that is supposed to be exported by
* the startup code and relied on by any libC. Because we have no
* UNIX environment, however, we set this pointer to NULL.
*/
__attribute__((weak)) char **environ = (char **)0;
/**
* C entry function called by the crt0 startup code
*/
extern "C" int _main()
{
/* call constructors for static objects */
void (**func)();
for (func = &_ctors_end; func != &_ctors_start; (*--func)());
/* initialize exception handling */
init_exception_handling();
/* completely map program image by touching all pages read-only */
volatile const char *beg, *end;
beg = (const char *)(((unsigned)&_prog_img_beg) & L4_PAGEMASK);
end = (const char *)&_prog_img_end;
for ( ; beg < end; beg += L4_PAGESIZE) (void)(*beg);
/* call real main function */
/* XXX no support for commandline */
int ret = main(1, argv);
/* inform parent about program exit */
env()->parent()->exit(ret);
PDBG("main() returned %d", ret);
sleep_forever();
return ret;
}

View File

@ -1,37 +0,0 @@
/**
* \brief Startup code for Genode applications on ARM
* \author Norman Feske
* \date 2007-04-28
*/
/*
* Copyright (C) 2007-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
/*--- .text (program code) -------------------------*/
.text
.globl _start
_start:
ldr sp, .initial_sp
b _main
.initial_sp: .word _stack_high
.globl __dso_handle
__dso_handle:
.long 0
/*--- .bss (non-initialized data) ------------------*/
.section ".bss"
.globl _stack_low
_stack_low:
.space 64*1024
.globl _stack_high
_stack_high: