diff --git a/config/sysdepend/app_h83052/utk_config_depend.h b/config/sysdepend/app_h83052/utk_config_depend.h new file mode 100644 index 0000000..18eb0f8 --- /dev/null +++ b/config/sysdepend/app_h83052/utk_config_depend.h @@ -0,0 +1,107 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * utk_config_depend.h (h83052) + * System Configuration Definition + */ + +/* ROMINFO */ +#define SYSTEMAREA_TOP 0x00ffe100 /* RAM system area top */ +#define SYSTEMAREA_END 0x00fffe50 /* RAM system area end */ + +/* User definition */ +#define RI_USERAREA_TOP 0x00ffff10 /* RAM user area top */ +#define RI_USERINIT NULL /* User initialization program */ + +/* Stacks */ +#define RI_INTSTACK 0x00ffff10 /* Interrupt stack top(internal RAM end) */ + + +/* SYSCONF */ +#define CFN_TIMER_PERIOD 10 +#define CFN_MAX_TSKID 2 +#define CFN_MAX_SEMID 1 +#define CFN_MAX_FLGID 1 +#define CFN_MAX_MBXID 1 +#define CFN_MAX_MTXID 0 +#define CFN_MAX_MBFID 0 +#define CFN_MAX_PORID 0 +#define CFN_MAX_MPLID 0 +#define CFN_MAX_MPFID 0 +#define CFN_MAX_CYCID 0 +#define CFN_MAX_ALMID 0 +#define CFN_MAX_SSYID 0 +#define CFN_MAX_SSYPRI 0 + +#define CFN_MAX_REGDEV (0) +#define CFN_MAX_OPNDEV (0) +#define CFN_MAX_REQDEV (0) +#define CFN_DEVT_MBFSZ0 (-1) +#define CFN_DEVT_MBFSZ1 (-1) + +#define CFN_VER_MAKER 0 +#define CFN_VER_PRID 0 +#define CFN_VER_SPVER 0x6101 +#define CFN_VER_PRVER 0x0101 +#define CFN_VER_PRNO1 0 +#define CFN_VER_PRNO2 0 +#define CFN_VER_PRNO3 0 +#define CFN_VER_PRNO4 0 + +#define CFN_REALMEMEND ((VP)0x00ffff10) + +/* + * Initial task priority + */ +#define INIT_TASK_PRI (MAX_PRI-2) + +/* + * Use non-clear section + */ +#define USE_NOINIT (1) + +/* + * Use dynamic memory allocation + */ +#define USE_IMALLOC (1) + +/* + * Use program trace function (in debugger support) + */ +#define USE_HOOK_TRACE (0) + +/* + * Use clean-up sequence + */ +#define USE_CLEANUP (1) + + +/* + * Use full interrupt vector + */ +#define USE_FULL_VECTOR (1) + +/* + * Use high level programming language support routine + */ +#define USE_HLL_INTHDR (1) + +/* + * Use dynamic interrupt handler change + * USE_FULL_VECTOR must be set to 0 if this macro is set to 0. + */ +#define USE_DYNAMIC_INTHDR (1) + + diff --git a/config/sysdepend/app_h83069/utk_config_depend.h b/config/sysdepend/app_h83069/utk_config_depend.h new file mode 100644 index 0000000..9f57343 --- /dev/null +++ b/config/sysdepend/app_h83069/utk_config_depend.h @@ -0,0 +1,107 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * utk_config_depend.h (h83069) + * System Configuration Definition + */ + +/* ROMINFO */ +#define SYSTEMAREA_TOP 0x00ffc100 /* RAM system area top */ +#define SYSTEMAREA_END 0x00fffe60 /* RAM system area end */ + +/* User definition */ +#define RI_USERAREA_TOP 0x00ffff20 /* RAM user area top */ +#define RI_USERINIT NULL /* User initialization program */ + +/* Stacks */ +#define RI_INTSTACK 0x00ffff20 /* Interrupt stack top(internal RAM end) */ + + +/* SYSCONF */ +#define CFN_TIMER_PERIOD 10 +#define CFN_MAX_TSKID 2 +#define CFN_MAX_SEMID 1 +#define CFN_MAX_FLGID 1 +#define CFN_MAX_MBXID 1 +#define CFN_MAX_MTXID 0 +#define CFN_MAX_MBFID 0 +#define CFN_MAX_PORID 0 +#define CFN_MAX_MPLID 0 +#define CFN_MAX_MPFID 0 +#define CFN_MAX_CYCID 0 +#define CFN_MAX_ALMID 0 +#define CFN_MAX_SSYID 0 +#define CFN_MAX_SSYPRI 0 + +#define CFN_MAX_REGDEV (0) +#define CFN_MAX_OPNDEV (0) +#define CFN_MAX_REQDEV (0) +#define CFN_DEVT_MBFSZ0 (-1) +#define CFN_DEVT_MBFSZ1 (-1) + +#define CFN_VER_MAKER 0 +#define CFN_VER_PRID 0 +#define CFN_VER_SPVER 0x6101 +#define CFN_VER_PRVER 0x0101 +#define CFN_VER_PRNO1 0 +#define CFN_VER_PRNO2 0 +#define CFN_VER_PRNO3 0 +#define CFN_VER_PRNO4 0 + +#define CFN_REALMEMEND ((VP)0x00ffff20) + +/* + * Initial task priority + */ +#define INIT_TASK_PRI (MAX_PRI-2) + +/* + * Use non-clear section + */ +#define USE_NOINIT (1) + +/* + * Use dynamic memory allocation + */ +#define USE_IMALLOC (1) + +/* + * Use program trace function (in debugger support) + */ +#define USE_HOOK_TRACE (0) + +/* + * Use clean-up sequence + */ +#define USE_CLEANUP (1) + + +/* + * Use full interrupt vector + */ +#define USE_FULL_VECTOR (1) + +/* + * Use high level programming language support routine + */ +#define USE_HLL_INTHDR (1) + +/* + * Use dynamic interrupt handler change + * USE_FULL_VECTOR must be set to 0 if this macro is set to 0. + */ +#define USE_DYNAMIC_INTHDR (1) + + diff --git a/config/utk_config.h b/config/utk_config.h index 7159ab0..b028519 100644 --- a/config/utk_config.h +++ b/config/utk_config.h @@ -22,6 +22,14 @@ #include "config.h" +#ifdef _APP_H83052_ +#include "sysdepend/app_h83052/utk_config_depend.h" +#endif + +#ifdef _APP_H83069_ +#include "sysdepend/app_h83069/utk_config_depend.h" +#endif + #ifdef _APP_H8S2212_ #include "sysdepend/app_h8s2212/utk_config_depend.h" #endif diff --git a/etc/backup_copy b/etc/backup_copy old mode 100644 new mode 100755 diff --git a/etc/mkfuncfiles b/etc/mkfuncfiles old mode 100644 new mode 100755 index 5218239..db75019 --- a/etc/mkfuncfiles +++ b/etc/mkfuncfiles @@ -1,4 +1,4 @@ -#! /usr/local/bin/perl +#! /usr/bin/env perl # # ---------------------------------------------------------------------- # micro T-Kernel diff --git a/etc/mkiflib b/etc/mkiflib old mode 100644 new mode 100755 index 47cba9e..e8183d9 --- a/etc/mkiflib +++ b/etc/mkiflib @@ -1,4 +1,4 @@ -#! /usr/local/bin/perl +#! /usr/bin/env perl # # ---------------------------------------------------------------------- # micro T-Kernel @@ -172,8 +172,6 @@ open(FN_H, ">sysdepend/include/$fn_h32") || die "can not open sysdepend/include/ print FN_H <sysdepend/include/$fn_h16") || die "can not open sysdepend/include/ print FN_H < @@ -335,8 +329,6 @@ $int_bitwidth = 16; #int width print IF_H < @@ -387,8 +379,6 @@ for ( $i = 0; $i <= $#syscalls; $i++ ) { print LIB <sysdepend/include/$tb_h") || die "can not open sysdepend/include/$t print TB_H < @@ -245,8 +243,6 @@ for ( $i = 0; $i <= $#syscalls; $i++ ) { print LIB <sysdepend/include/$tb_h") || die "can not open sysdepend/include/$t print TB_H < @@ -245,8 +243,6 @@ for ( $i = 0; $i <= $#syscalls; $i++ ) { print LIB < $@ + +%.map: %.out + $(NM) $(NMFLAGS) $< > $@ + +%.map: %.abs + $(NM) $(NMFLAGS) $< > $@ + +%.map: %.dll + $(NM) $(NMFLAGS) $< > $@ + +### data box ### +DBCPPFLAGS = -D$(_TE_SYSTEM_NAME_) +DB_CPP = $(CPP) -nostdinc -traditional -P $(DATABOX_HEADER:%=-I%) $(DBCPPFLAGS) +DB = $(ETCBIN)/databox +DBFLAGS = +DBSRCFLAGS = -s +DATABOX = $(DB) $(DBFLAGS) + +%.dbx: %.d + $(DB_CPP) $< $@.tmp + $(DATABOX) $@.tmp $@ + $(RM) $@.tmp + +%.fsn: %.f + $(DB_CPP) $< $@.tmp + $(DATABOX) -n $@.tmp $@ + $(RM) $@.tmp + +%.c: %.d + $(DB_CPP) $< $@.tmp + $(DATABOX) -n $(DBSRCFLAGS) $@.tmp $@ + $(RM) $@.tmp + +### other ### +ifndef CPP + CPP = $(GNU_BD)/bin/h8300-elf-cpp +endif +STRIP = $(GNUh8300)/bin/strip --strip-unneeded + +OBJCOPY = $(GNU_BD)/bin/h8300-elf-objcopy +OUTPUT_SREC = -O srec --srec-forceS3 --srec-len 32 diff --git a/etc/sysdepend/app_h83069/makerules.sysdepend b/etc/sysdepend/app_h83069/makerules.sysdepend new file mode 100644 index 0000000..6cc3153 --- /dev/null +++ b/etc/sysdepend/app_h83069/makerules.sysdepend @@ -0,0 +1,245 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# makerules +# for GNU make +# +# default rules - system-dependent (h83069) +# +# MACHINE target CPU +# h83069 : H8/3069 +# +# TETYPE target T-Engine type +# app : T-Engine Appliance +# +# GNUh8300 GNU development tool for H8300 +# + +# command path +PATH = . +ifneq ($(filter "$(origin GNUh8300)", $(TOOL_ORIGIN)), ) + PATH := $(PATH):$(GNUh8300)/bin +endif +ifneq ($(filter "$(origin GNUs)", $(TOOL_ORIGIN)), ) + PATH := $(PATH):$(GNUs)/bin +endif +ifneq ($(filter Linux-%, $(CROSS_ARCH)), ) + PATH := $(PATH):/usr/local/bin:/bin:/usr/bin +endif +ifneq ($(filter OpenBSD-%, $(CROSS_ARCH)), ) + PATH := $(PATH):/usr/local/bin:/bin:/usr/bin +endif + +# ----- T-Engine Appliance H8/3069 --------------------------------- + +# GCC environment +TARGET_ARCH = + +# target type +_CPUTYPE_FLAGS = -mrelax -mh -malign-300 -fomit-frame-pointer -Wall -Werror +_CPUTYPE_FLAGS_AS = +_TE_SYSTEM_NAME_ = _APP_H83069_ + +# code set +_CODESET_FLAGS = + +### build option ### +CFLAGS += +CPPFLAGS += +ASFLAGS += +LDFLAGS += + +### CPU CLOCK (Hz) ### +CFLAGS += -DCPU_CLOCK=20000000UL + +### TRAP ### +ifeq ($(trap), on) + CFLAGS += -DUSE_TRAP + ASFLAGS += -DUSE_TRAP +else + CFLAGS += + ASFLAGS += +endif + +### C ### +CC := $(GNUh8300)/bin/gcc +OUTPUT_OPTION = -o $@ +ifeq ($(mode), debug) + CFLAGS += -g + CPPFLAGS += $(HEADER:%=-I%) -D$(_TE_SYSTEM_NAME_) -DDEBUG +else + CFLAGS += -O2 + CPPFLAGS += $(HEADER:%=-I%) -D$(_TE_SYSTEM_NAME_) +endif + +CFLAGS += $(_CPUTYPE_FLAGS) $(_CODESET_FLAGS) -ffreestanding + +CFLAGS_WARNING = -Wall +CFLAGS_WARNING_FULL = -pedantic -W -Wall + +COMPILE.c = $(CC) $(TARGET_ARCH) $(CFLAGS) $(CPPFLAGS) -c +LINK.c = $(CC) $(TARGET_ARCH) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) + +%.o: %.c + $(COMPILE.c) $< $(OUTPUT_OPTION) + +%.s: %.c + $(CC) $(TARGET_ARCH) $(CFLAGS) $(CPPFLAGS) -S $< + +%.i: %.c + $(CC) $(TARGET_ARCH) $(CFLAGS) $(CPPFLAGS) -E $< $(OUTPUT_OPTION) + +### C++ ### +CXX := $(GNUh8300)/bin/gcc +CXXFLAGS = $(CFLAGS) + +COMPILE.cc = $(CXX) $(TARGET_ARCH) $(CXXFLAGS) $(CPPFLAGS) -c +LINK.cc = $(CXX) $(TARGET_ARCH) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) + +%.o: %.cc + $(COMPILE.cc) $< $(OUTPUT_OPTION) + +%.s: %.cc + $(CXX) $(TARGET_ARCH) $(CXXFLAGS) $(CPPFLAGS) -S $< + +%.i: %.cc + $(CXX) $(TARGET_ARCH) $(CXXFLAGS) $(CPPFLAGS) -E $< $(OUTPUT_OPTION) + +### asm ### +AS = $(GNUh8300)/bin/as +ifeq ($(mode), debug) + ASFLAGS += -Wa,-gdwarf-2 +else + ASFLAGS += +endif + +ASFLAGS += $(_CPUTYPE_FLAGS) $(_CODESET_FLAGS) +ASFLAGS.s = $(_CPUTYPE_FLAGS_AS) $(_CODESET_FLAGS) + +COMPILE.S = $(CC) $(TARGET_ARCH) $(ASFLAGS) $(CPPFLAGS) -c +COMPILE.s = $(AS) $(ASFLAGS.s) + +%.o: %.S + $(COMPILE.S) $< $(OUTPUT_OPTION) + +%.o: %.s + $(COMPILE.s) $< $(OUTPUT_OPTION) + +%.i: %.S + $(CC) $(TARGET_ARCH) $(ASFLAGS) $(CPPFLAGS) -E $< $(OUTPUT_OPTION) + +### linker ### +LD = $(GNUh8300)/bin/ld +ifeq ($(mode), debug) + LDFLAGS += $(LIBDIR:%=-L%) +else + LDFLAGS += $(LIBDIR:%=-L%) +endif + +LDFLAGS += $(_CPUTYPE_FLAGS) $(_CODESET_FLAGS) + +LIBDIR = $(COMMONLIB) +LOADLIBES = +LDOBJS = +LDLIBS = + +# additional linker option +ifneq ($(filter sl, $(options)), ) + LDFLAGS2 = -static +else + # no effect + LDFLAGS2 = -static +endif +LDFLAGS3 = -static -T $(COMMONLIB)/static.lnk +START_ADR = + +# create executable +LINK.o = $(CC) $(TARGET_ARCH) $(LDFLAGS) $(LDFLAGS2) $(START_ADR) + +# link objects +LINK_R.o = $(CC) $(TARGET_ARCH) $(LDFLAGS) -r -nostdlib + +# link objects and libraries +LINK_A.o = $(CC) $(TARGET_ARCH) $(LDFLAGS) -r + +# create executable (location only) +LOCATE.o = $(CC) $(TARGET_ARCH) $(LDFLAGS) -nostdlib $(LDFLAGS3) $(START_ADR) + +%: %.o + $(LINK.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) $(OUTPUT_OPTION) + +%.out: %.o + $(LINK.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) $(OUTPUT_OPTION) + +%.abs: %.o + $(LINK_A.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) -o _$@ + $(LOCATE.o) _$@ $(OUTPUT_OPTION) + $(RM) _$@ + +### library ### +AR = $(GNUh8300)/bin/ar +ARFLAGS = rv +RANLIB = $(GNUh8300)/bin/ranlib + +(%): % + $(AR) $(ARFLAGS) $@ $% + +### create name list ### +NM = $(GNUh8300)/bin/nm +NMFLAGS = -n + +%.map: % + $(NM) $(NMFLAGS) $< > $@ + +%.map: %.out + $(NM) $(NMFLAGS) $< > $@ + +%.map: %.abs + $(NM) $(NMFLAGS) $< > $@ + +%.map: %.dll + $(NM) $(NMFLAGS) $< > $@ + +### data box ### +DBCPPFLAGS = -D$(_TE_SYSTEM_NAME_) +DB_CPP = $(CPP) -nostdinc -traditional -P $(DATABOX_HEADER:%=-I%) $(DBCPPFLAGS) +DB = $(ETCBIN)/databox +DBFLAGS = +DBSRCFLAGS = -s +DATABOX = $(DB) $(DBFLAGS) + +%.dbx: %.d + $(DB_CPP) $< $@.tmp + $(DATABOX) $@.tmp $@ + $(RM) $@.tmp + +%.fsn: %.f + $(DB_CPP) $< $@.tmp + $(DATABOX) -n $@.tmp $@ + $(RM) $@.tmp + +%.c: %.d + $(DB_CPP) $< $@.tmp + $(DATABOX) -n $(DBSRCFLAGS) $@.tmp $@ + $(RM) $@.tmp + +### other ### +ifndef CPP + CPP = $(GNU_BD)/bin/h8300-elf-cpp +endif +STRIP = $(GNUh8300)/bin/strip --strip-unneeded + +OBJCOPY = $(GNU_BD)/bin/h8300-elf-objcopy +OUTPUT_SREC = -O srec --srec-forceS3 --srec-len 32 diff --git a/include/sys/sysdepend/app_h83052/machine_depend.h b/include/sys/sysdepend/app_h83052/machine_depend.h new file mode 100644 index 0000000..b83d6c9 --- /dev/null +++ b/include/sys/sysdepend/app_h83052/machine_depend.h @@ -0,0 +1,50 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)machine_depend.h (sys/H83052) + * + * Machine type definition (system dependent) + */ + +#ifndef __SYS_MACHINE_DEPEND_H__ +#define __SYS_MACHINE_DEPEND_H__ + +/* + * CPU_xxxx CPU type + * ALLOW_MISALIGN 1 if access to misalignment data is allowed + * BIGENDIAN 1 if big endian + * VIRTUAL_ADDRESS 1 if virtual memory + * ALLOCA_NOSPT 1 if alloca() is not supported + */ + +/* ----- T-Engine Appliance H8/3052 definition ----- */ +#undef _APP_H83052_ + +#define _APP_H83052_ 1 +#define CPU_H8300H 1 +#define CPU_H8300 1 +#define CPU_H83052 1 +#define APP_H83052 1 +#define ALLOW_MISALIGN 0 +#define BIGENDIAN 1 +#define VIRTUAL_ADDRESS 0 +#define ALLOCA_NOSPT 0 +#define INT_BITWIDTH 16 + +#ifndef _Csym +#define _Csym 1 +#endif + +#endif /* __SYS_MACHINE_DEPEND_H__ */ diff --git a/include/sys/sysdepend/app_h83052/str_align_depend.h b/include/sys/sysdepend/app_h83052/str_align_depend.h new file mode 100644 index 0000000..cf2d84f --- /dev/null +++ b/include/sys/sysdepend/app_h83052/str_align_depend.h @@ -0,0 +1,36 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + + +/* + * @(#)str_align_depend.h (sys/H83052) + * + * Bit alignment definitions for structure (H8/300H) + */ + +#ifndef __SYS_STR_ALIGN_DEPEND_H__ +#define __SYS_STR_ALIGN_DEPEND_H__ + +/* 32 bit alignment */ +#if BIGENDIAN +# define _pad_b(n) int :n; +# define _pad_l(n) +#else +# define _pad_b(n) +# define _pad_l(n) int :n; +#endif + +#define _align64 + +#endif /* __SYS_STR_ALIGN_DEPEND_H__ */ diff --git a/include/sys/sysdepend/app_h83052/sysinfo_depend.h b/include/sys/sysdepend/app_h83052/sysinfo_depend.h new file mode 100644 index 0000000..fc2a22c --- /dev/null +++ b/include/sys/sysdepend/app_h83052/sysinfo_depend.h @@ -0,0 +1,43 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)sysinfo_depend.h (sys/H83052) + * + * System common information + */ + +#ifndef __SYS_SYSINFO_DEPEND_H__ +#define __SYS_SYSINFO_DEPEND_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _in_asm_source_ + +/* + * System common area info + */ +#define N_INTVEC 64 + +IMPORT FP knl_intvec[]; +IMPORT INT knl_taskindp; + +#endif /* _in_asm_source_ */ + +#ifdef __cplusplus +} +#endif +#endif /* __SYS_SYSINFO_DEPEND_H__ */ diff --git a/include/sys/sysdepend/app_h83069/machine_depend.h b/include/sys/sysdepend/app_h83069/machine_depend.h new file mode 100644 index 0000000..7044ac7 --- /dev/null +++ b/include/sys/sysdepend/app_h83069/machine_depend.h @@ -0,0 +1,50 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)machine_depend.h (sys/H83069) + * + * Machine type definition (system dependent) + */ + +#ifndef __SYS_MACHINE_DEPEND_H__ +#define __SYS_MACHINE_DEPEND_H__ + +/* + * CPU_xxxx CPU type + * ALLOW_MISALIGN 1 if access to misalignment data is allowed + * BIGENDIAN 1 if big endian + * VIRTUAL_ADDRESS 1 if virtual memory + * ALLOCA_NOSPT 1 if alloca() is not supported + */ + +/* ----- T-Engine Appliance H8/3069 definition ----- */ +#undef _APP_H83069_ + +#define _APP_H83069_ 1 +#define CPU_H8300H 1 +#define CPU_H8300 1 +#define CPU_H83069 1 +#define APP_H83069 1 +#define ALLOW_MISALIGN 0 +#define BIGENDIAN 1 +#define VIRTUAL_ADDRESS 0 +#define ALLOCA_NOSPT 0 +#define INT_BITWIDTH 16 + +#ifndef _Csym +#define _Csym 1 +#endif + +#endif /* __SYS_MACHINE_DEPEND_H__ */ diff --git a/include/sys/sysdepend/app_h83069/str_align_depend.h b/include/sys/sysdepend/app_h83069/str_align_depend.h new file mode 100644 index 0000000..8362361 --- /dev/null +++ b/include/sys/sysdepend/app_h83069/str_align_depend.h @@ -0,0 +1,36 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + + +/* + * @(#)str_align_depend.h (sys/H83069) + * + * Bit alignment definitions for structure (H8/300H) + */ + +#ifndef __SYS_STR_ALIGN_DEPEND_H__ +#define __SYS_STR_ALIGN_DEPEND_H__ + +/* 32 bit alignment */ +#if BIGENDIAN +# define _pad_b(n) int :n; +# define _pad_l(n) +#else +# define _pad_b(n) +# define _pad_l(n) int :n; +#endif + +#define _align64 + +#endif /* __SYS_STR_ALIGN_DEPEND_H__ */ diff --git a/include/sys/sysdepend/app_h83069/sysinfo_depend.h b/include/sys/sysdepend/app_h83069/sysinfo_depend.h new file mode 100644 index 0000000..8054160 --- /dev/null +++ b/include/sys/sysdepend/app_h83069/sysinfo_depend.h @@ -0,0 +1,43 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)sysinfo_depend.h (sys/H83069) + * + * System common information + */ + +#ifndef __SYS_SYSINFO_DEPEND_H__ +#define __SYS_SYSINFO_DEPEND_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _in_asm_source_ + +/* + * System common area info + */ +#define N_INTVEC 64 + +IMPORT FP knl_intvec[]; +IMPORT INT knl_taskindp; + +#endif /* _in_asm_source_ */ + +#ifdef __cplusplus +} +#endif +#endif /* __SYS_SYSINFO_DEPEND_H__ */ diff --git a/include/sys/sysdepend/machine_common.h b/include/sys/sysdepend/machine_common.h index a93f4a8..3f335e3 100644 --- a/include/sys/sysdepend/machine_common.h +++ b/include/sys/sysdepend/machine_common.h @@ -25,6 +25,14 @@ # include #endif +#ifdef _APP_H83052_ +# include +#endif + +#ifdef _APP_H83069_ +# include +#endif + #ifdef _APP_H8S2212_ # include #endif diff --git a/include/sys/sysdepend/str_align_common.h b/include/sys/sysdepend/str_align_common.h index 0635d29..ec5a5f8 100644 --- a/include/sys/sysdepend/str_align_common.h +++ b/include/sys/sysdepend/str_align_common.h @@ -25,6 +25,14 @@ # include #endif +#ifdef APP_H83052 +# include +#endif + +#ifdef APP_H83069 +# include +#endif + #ifdef APP_H8S2212 # include #endif diff --git a/include/sys/sysdepend/sysinfo_common.h b/include/sys/sysdepend/sysinfo_common.h index 371daad..b50bd17 100644 --- a/include/sys/sysdepend/sysinfo_common.h +++ b/include/sys/sysdepend/sysinfo_common.h @@ -25,6 +25,14 @@ # include #endif +#ifdef APP_H83052 +# include +#endif + +#ifdef APP_H83069 +# include +#endif + #ifdef APP_H8S2212 # include #endif diff --git a/include/tk/sysdepend/app_h83052/asm_depend.h b/include/tk/sysdepend/app_h83052/asm_depend.h new file mode 100644 index 0000000..d6d9eaa --- /dev/null +++ b/include/tk/sysdepend/app_h83052/asm_depend.h @@ -0,0 +1,42 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)asm_depend.h (tk/H83052) + * + * Assembler Macro for H8/300H + */ + +#ifndef __TK_ASM_DEPEND_H__ +#define __TK_ASM_DEPEND_H__ + +/* + * Exception/Interrupt entry common processing + */ + .macro INT_ENTRY vecno + .global knl_inthdr_entry\vecno +knl_inthdr_entry\vecno: + push.l er0 + push.l er1 + + sub.l er0, er0 + mov.b #\vecno, r0l + mov.l #Csym(knl_intvec), er1 + mov.l @(\vecno * 4, er1), er1 + jmp @er1 + + .endm + + +#endif /* __TK_ASM_DEPEND_H__ */ diff --git a/include/tk/sysdepend/app_h83052/cpuattr.h b/include/tk/sysdepend/app_h83052/cpuattr.h new file mode 100644 index 0000000..7ec0f26 --- /dev/null +++ b/include/tk/sysdepend/app_h83052/cpuattr.h @@ -0,0 +1,30 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)cpuattr.h (tk/H83052) + * + * Type Specific Function + */ + +#ifndef __TK_CPUATTR_H__ +#define __TK_CPUATTR_H__ + +/* + * Global pointer support + * 0: No global pointer support + */ +#define TA_GP 0 /* No global pointer support */ + +#endif /* __TK_CPUATTR_H__ */ diff --git a/include/tk/sysdepend/app_h83052/cpudef.h b/include/tk/sysdepend/app_h83052/cpudef.h new file mode 100644 index 0000000..ee365da --- /dev/null +++ b/include/tk/sysdepend/app_h83052/cpudef.h @@ -0,0 +1,54 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)cpudef.h (tk/H83052) + * + * H8/300H dependent definition + */ + +#ifndef __TK_CPUDEF_H__ +#define __TK_CPUDEF_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * General purpose register tk_get_reg tk_set_reg + */ +typedef struct t_regs { + VW er[7]; /* General purpose register ER0-ER6 */ +} T_REGS; + +/* + * Exception-related register tk_get_reg tk_set_reg + */ +typedef struct t_eit { + VP pc; /* Program counter */ + VB ccr; /* Status register */ +} T_EIT; + +/* + * Control register tk_get_reg tk_set_reg + */ +typedef struct t_cregs { + VP ssp; /* System stack pointer ER7 */ +} T_CREGS; + + +#ifdef __cplusplus +} +#endif +#endif /* __TK_CPUDEF_H__ */ diff --git a/include/tk/sysdepend/app_h83052/dbgspt_depend.h b/include/tk/sysdepend/app_h83052/dbgspt_depend.h new file mode 100644 index 0000000..137a971 --- /dev/null +++ b/include/tk/sysdepend/app_h83052/dbgspt_depend.h @@ -0,0 +1,38 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)dbgspt_depend.h (tk/H83052) + * + * micro T-Kernel Debugger Support System-Dependent Definition (H83052) + */ + +#ifndef __TK_DBGSPT_DEPEND_H__ +#define __TK_DBGSPT_DEPEND_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * System call/extension SVC caller information + */ +typedef struct td_calinf { + VP ssp; /* System stack pointer */ +} TD_CALINF; + +#ifdef __cplusplus +} +#endif +#endif /* __TK_DBGSPT_DEPEND_H__ */ diff --git a/include/tk/sysdepend/app_h83052/sysdef_depend.h b/include/tk/sysdepend/app_h83052/sysdef_depend.h new file mode 100644 index 0000000..206a706 --- /dev/null +++ b/include/tk/sysdepend/app_h83052/sysdef_depend.h @@ -0,0 +1,45 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)sysdef_depend.h (tk/H83052) + * + * Definition about H8/300H + * + * Included also from assembler program. + */ + +#ifndef __TK_SYSDEF_DEPEND_H__ +#define __TK_SYSDEF_DEPEND_H__ + +/* + * Use specify register + */ +#define SP er7 /* Stack pointer */ + +/* + * CCR register + */ +#define CCR_I ( 0x01 << 7 ) /* Interrupt mask (mode 0) */ +#define CCR_EI_MASK ( 0x7f ) /* Interrupt mask (mode 0) */ + + +#define TRAP_DISPATCH 0x0 /* Dispatch */ +#define TRAP_SVC 0x1 /* System call, Extension SVC */ +#define TRAP_RETINT 0x2 /* System call, Extension SVC */ +#define TRAP_DEBUG 0x3 /* Debugger support function */ + +/*----------------------------------------------------------*/ + +#endif /* __TK_SYSDEF_DEPEND_H__ */ diff --git a/include/tk/sysdepend/app_h83052/syslib_depend.h b/include/tk/sysdepend/app_h83052/syslib_depend.h new file mode 100644 index 0000000..71d8efd --- /dev/null +++ b/include/tk/sysdepend/app_h83052/syslib_depend.h @@ -0,0 +1,91 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)syslib_depend.h (tk/H83052) + * + * micro T-Kernel H8/300H Library + */ + +#ifndef __TK_SYSLIB_DEPEND_H__ +#define __TK_SYSLIB_DEPEND_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * CPU interrupt control + * 'intsts' is the value of CCR register in CPU + * disint() Set CCR.I = 1 and return the original CCR to the return value. + * enaint() Set CCR.I = intsts.I. Do not change except for CCR.I. + * Return the original CCR to the return value. + */ +IMPORT UINT disint( void ); +IMPORT UINT enaint( UINT intsts ); +#define DI(intsts) ( (intsts) = disint() ) +#define EI(intsts) ( enaint(intsts) ) +#define isDI(intsts) ( ((intsts) & 0x0080U) != 0 ) + +/* + * Interrupt vector + * The interrupt vector is the index number of the vector table. + */ +typedef UINT INTVEC; + +/* Convert to the interrupt definition number */ +#define DINTNO(intvec) (intvec) + +/* ------------------------------------------------------------------------ */ + +/* + * I/O port access + * Only memory mapped I/O for H8/300H + */ +Inline void out_w( UW port, UW data ) +{ + Asm("mov.l %0, @%1":: "r"(data), "r"(port)); +} +Inline void out_h( UW port, UH data ) +{ + Asm("mov.w %0, @%1":: "r"(data), "r"(port)); +} +Inline void out_b( UW port, UB data ) +{ + Asm("mov.b %0l, @%1":: "r"(data), "r"(port)); +} + +Inline UW in_w( UW port ) +{ + UW data; + Asm("mov.l @%1, %0": "=r"(data): "r"(port)); + return data; +} +Inline UH in_h( UW port ) +{ + UH data; + Asm("mov.w @%1, %0": "=r"(data): "r"(port)); + return data; +} +Inline UB in_b( UW port ) +{ + UB data; + Asm("mov.b @%1, %0l": "=r"(data): "r"(port)); + return data; +} + +#ifdef __cplusplus +} +#endif +#endif /* __TK_SYSLIB_DEPEND_H__ */ diff --git a/include/tk/sysdepend/app_h83069/asm_depend.h b/include/tk/sysdepend/app_h83069/asm_depend.h new file mode 100644 index 0000000..2b04fa0 --- /dev/null +++ b/include/tk/sysdepend/app_h83069/asm_depend.h @@ -0,0 +1,42 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)asm_depend.h (tk/H83069) + * + * Assembler Macro for H8/300H + */ + +#ifndef __TK_ASM_DEPEND_H__ +#define __TK_ASM_DEPEND_H__ + +/* + * Exception/Interrupt entry common processing + */ + .macro INT_ENTRY vecno + .global knl_inthdr_entry\vecno +knl_inthdr_entry\vecno: + push.l er0 + push.l er1 + + sub.l er0, er0 + mov.b #\vecno, r0l + mov.l #Csym(knl_intvec), er1 + mov.l @(\vecno * 4, er1), er1 + jmp @er1 + + .endm + + +#endif /* __TK_ASM_DEPEND_H__ */ diff --git a/include/tk/sysdepend/app_h83069/cpuattr.h b/include/tk/sysdepend/app_h83069/cpuattr.h new file mode 100644 index 0000000..e36ddce --- /dev/null +++ b/include/tk/sysdepend/app_h83069/cpuattr.h @@ -0,0 +1,30 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)cpuattr.h (tk/H83069) + * + * Type Specific Function + */ + +#ifndef __TK_CPUATTR_H__ +#define __TK_CPUATTR_H__ + +/* + * Global pointer support + * 0: No global pointer support + */ +#define TA_GP 0 /* No global pointer support */ + +#endif /* __TK_CPUATTR_H__ */ diff --git a/include/tk/sysdepend/app_h83069/cpudef.h b/include/tk/sysdepend/app_h83069/cpudef.h new file mode 100644 index 0000000..6e1747c --- /dev/null +++ b/include/tk/sysdepend/app_h83069/cpudef.h @@ -0,0 +1,54 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)cpudef.h (tk/H83069) + * + * H8/300H dependent definition + */ + +#ifndef __TK_CPUDEF_H__ +#define __TK_CPUDEF_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * General purpose register tk_get_reg tk_set_reg + */ +typedef struct t_regs { + VW er[7]; /* General purpose register ER0-ER6 */ +} T_REGS; + +/* + * Exception-related register tk_get_reg tk_set_reg + */ +typedef struct t_eit { + VP pc; /* Program counter */ + VB ccr; /* Status register */ +} T_EIT; + +/* + * Control register tk_get_reg tk_set_reg + */ +typedef struct t_cregs { + VP ssp; /* System stack pointer ER7 */ +} T_CREGS; + + +#ifdef __cplusplus +} +#endif +#endif /* __TK_CPUDEF_H__ */ diff --git a/include/tk/sysdepend/app_h83069/dbgspt_depend.h b/include/tk/sysdepend/app_h83069/dbgspt_depend.h new file mode 100644 index 0000000..2d8e9b2 --- /dev/null +++ b/include/tk/sysdepend/app_h83069/dbgspt_depend.h @@ -0,0 +1,38 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)dbgspt_depend.h (tk/H83069) + * + * micro T-Kernel Debugger Support System-Dependent Definition (H83069) + */ + +#ifndef __TK_DBGSPT_DEPEND_H__ +#define __TK_DBGSPT_DEPEND_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * System call/extension SVC caller information + */ +typedef struct td_calinf { + VP ssp; /* System stack pointer */ +} TD_CALINF; + +#ifdef __cplusplus +} +#endif +#endif /* __TK_DBGSPT_DEPEND_H__ */ diff --git a/include/tk/sysdepend/app_h83069/sysdef_depend.h b/include/tk/sysdepend/app_h83069/sysdef_depend.h new file mode 100644 index 0000000..eefd0ec --- /dev/null +++ b/include/tk/sysdepend/app_h83069/sysdef_depend.h @@ -0,0 +1,45 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)sysdef_depend.h (tk/H83069) + * + * Definition about H8/300H + * + * Included also from assembler program. + */ + +#ifndef __TK_SYSDEF_DEPEND_H__ +#define __TK_SYSDEF_DEPEND_H__ + +/* + * Use specify register + */ +#define SP er7 /* Stack pointer */ + +/* + * CCR register + */ +#define CCR_I ( 0x01 << 7 ) /* Interrupt mask (mode 0) */ +#define CCR_EI_MASK ( 0x7f ) /* Interrupt mask (mode 0) */ + + +#define TRAP_DISPATCH 0x0 /* Dispatch */ +#define TRAP_SVC 0x1 /* System call, Extension SVC */ +#define TRAP_RETINT 0x2 /* System call, Extension SVC */ +#define TRAP_DEBUG 0x3 /* Debugger support function */ + +/*----------------------------------------------------------*/ + +#endif /* __TK_SYSDEF_DEPEND_H__ */ diff --git a/include/tk/sysdepend/app_h83069/syslib_depend.h b/include/tk/sysdepend/app_h83069/syslib_depend.h new file mode 100644 index 0000000..9da4046 --- /dev/null +++ b/include/tk/sysdepend/app_h83069/syslib_depend.h @@ -0,0 +1,91 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)syslib_depend.h (tk/H83069) + * + * micro T-Kernel H8/300H Library + */ + +#ifndef __TK_SYSLIB_DEPEND_H__ +#define __TK_SYSLIB_DEPEND_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * CPU interrupt control + * 'intsts' is the value of CCR register in CPU + * disint() Set CCR.I = 1 and return the original CCR to the return value. + * enaint() Set CCR.I = intsts.I. Do not change except for CCR.I. + * Return the original CCR to the return value. + */ +IMPORT UINT disint( void ); +IMPORT UINT enaint( UINT intsts ); +#define DI(intsts) ( (intsts) = disint() ) +#define EI(intsts) ( enaint(intsts) ) +#define isDI(intsts) ( ((intsts) & 0x0080U) != 0 ) + +/* + * Interrupt vector + * The interrupt vector is the index number of the vector table. + */ +typedef UINT INTVEC; + +/* Convert to the interrupt definition number */ +#define DINTNO(intvec) (intvec) + +/* ------------------------------------------------------------------------ */ + +/* + * I/O port access + * Only memory mapped I/O for H8/300H + */ +Inline void out_w( UW port, UW data ) +{ + Asm("mov.l %0, @%1":: "r"(data), "r"(port)); +} +Inline void out_h( UW port, UH data ) +{ + Asm("mov.w %0, @%1":: "r"(data), "r"(port)); +} +Inline void out_b( UW port, UB data ) +{ + Asm("mov.b %0l, @%1":: "r"(data), "r"(port)); +} + +Inline UW in_w( UW port ) +{ + UW data; + Asm("mov.l @%1, %0": "=r"(data): "r"(port)); + return data; +} +Inline UH in_h( UW port ) +{ + UH data; + Asm("mov.w @%1, %0": "=r"(data): "r"(port)); + return data; +} +Inline UB in_b( UW port ) +{ + UB data; + Asm("mov.b @%1, %0l": "=r"(data): "r"(port)); + return data; +} + +#ifdef __cplusplus +} +#endif +#endif /* __TK_SYSLIB_DEPEND_H__ */ diff --git a/include/tk/sysdepend/asm_common.h b/include/tk/sysdepend/asm_common.h index 6345f42..37f6c3f 100644 --- a/include/tk/sysdepend/asm_common.h +++ b/include/tk/sysdepend/asm_common.h @@ -25,6 +25,14 @@ # include #endif +#if APP_H83052 +# include +#endif + +#if APP_H83069 +# include +#endif + #if APP_H8S2212 # include #endif diff --git a/include/tk/sysdepend/dbgspt_common.h b/include/tk/sysdepend/dbgspt_common.h index efda62d..78025c0 100644 --- a/include/tk/sysdepend/dbgspt_common.h +++ b/include/tk/sysdepend/dbgspt_common.h @@ -28,6 +28,14 @@ # include #endif +#if APP_H83052 +# include +#endif + +#if APP_H83069 +# include +#endif + #if APP_H8S2212 # include #endif diff --git a/include/tk/sysdepend/syscall_common.h b/include/tk/sysdepend/syscall_common.h index e7c033e..ae1d1e5 100644 --- a/include/tk/sysdepend/syscall_common.h +++ b/include/tk/sysdepend/syscall_common.h @@ -26,6 +26,16 @@ # include #endif +#if APP_H83052 +# include +# include +#endif + +#if APP_H83069 +# include +# include +#endif + #if APP_H8S2212 # include # include diff --git a/include/tk/sysdepend/sysdef_common.h b/include/tk/sysdepend/sysdef_common.h index be8e27d..92c0137 100644 --- a/include/tk/sysdepend/sysdef_common.h +++ b/include/tk/sysdepend/sysdef_common.h @@ -26,6 +26,14 @@ # include #endif +#if APP_H83052 +# include +#endif + +#if APP_H83069 +# include +#endif + #if APP_H8S2212 # include #endif diff --git a/include/tk/sysdepend/syslib_common.h b/include/tk/sysdepend/syslib_common.h index c99f316..5f17230 100644 --- a/include/tk/sysdepend/syslib_common.h +++ b/include/tk/sysdepend/syslib_common.h @@ -28,6 +28,14 @@ # include #endif +#if APP_H83052 +# include +#endif + +#if APP_H83069 +# include +#endif + #if APP_H8S2212 # include #endif diff --git a/kernel/sysdepend/cpu/h83052/cpu_calls.c b/kernel/sysdepend/cpu/h83052/cpu_calls.c new file mode 100644 index 0000000..9d7294c --- /dev/null +++ b/kernel/sysdepend/cpu/h83052/cpu_calls.c @@ -0,0 +1,308 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_calls.c (H83052) + * CPU-Dependent System Call + */ + +/** [BEGIN Common Definitions] */ +#include "kernel.h" +#include "task.h" +#include "check.h" +#include "cpu_task.h" + +#include +#include +#include "cpu_insn.h" +#include "cpu_calls.h" +/** [END Common Definitions] */ + +#ifdef USE_FUNC_TK_DIS_DSP +/* + * Dispatch enable/disable + */ +SYSCALL ER tk_dis_dsp_impl( void ) +{ + CHECK_CTX(!in_loc()); + + knl_dispatch_disabled = DDS_DISABLE; + + return E_OK; +} +#endif /* USE_FUNC_TK_DIS_DSP */ + +#ifdef USE_FUNC_TK_ENA_DSP +/* + * Dispatch enable + */ +SYSCALL ER tk_ena_dsp_impl( void ) +{ + CHECK_CTX(!in_loc()); + + knl_dispatch_disabled = DDS_ENABLE; + if ( knl_ctxtsk != knl_schedtsk ) { + knl_dispatch(); + } + + return E_OK; +} +#endif /* USE_FUNC_TK_ENA_DSP */ + +/* ------------------------------------------------------------------------ */ + +/* + * High level programming language + */ + +#ifdef USE_FUNC_HLL_INTHDR +/* High level programming language interrupt handler entry */ +Noinit(EXPORT FP knl_hll_inthdr[N_INTVEC]); +#endif /* USE_FUNC_HLL_INTHDR */ + +#ifdef USE_FUNC_TK_DEF_INT +IMPORT FP knl_hll_inthdr[]; + +/* High level programming language-supported routine (General) */ +IMPORT void knl_inthdr_startup(); + +/* + * Interrupt handler definition + */ +SYSCALL ER tk_def_int_impl( UINT dintno, T_DINT *pk_dint ) +{ +#if USE_DYNAMIC_INTHDR + FP inthdr; + + CHECK_PAR(dintno < N_INTVEC); +#if !USE_HLL_INTHDR + CHECK_PAR((pk_dint->intatr & TA_HLNG) == 0); +#endif + + if ( pk_dint != NULL ) { + /* Set interrupt handler */ + CHECK_RSATR(pk_dint->intatr, TA_HLNG); + + inthdr = pk_dint->inthdr; + + BEGIN_CRITICAL_SECTION; +#if USE_HLL_INTHDR + if ( (pk_dint->intatr & TA_HLNG) != 0 ) { + knl_hll_inthdr[dintno] = inthdr; + inthdr = knl_inthdr_startup; + } +#endif + knl_define_inthdr(dintno, inthdr); + END_CRITICAL_SECTION; + } else { + /* Clear interrupt handler */ + switch ( dintno ) { + default: inthdr = NULL; + } + + BEGIN_CRITICAL_SECTION; + knl_define_inthdr(dintno, inthdr); +#if USE_HLL_INTHDR + knl_hll_inthdr[dintno] = NULL; +#endif + END_CRITICAL_SECTION; + } + + return E_OK; +#else + return E_NOSPT; +#endif /* USE_DYNAMIC_INTHDR */ +} +#endif /* USE_FUNC_TK_DEF_INT */ + +/* ------------------------------------------------------------------------ */ + +#ifdef USE_FUNC_SET_REG +/* + * Set task register contents + */ +EXPORT void knl_set_reg( TCB *tcb, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ) +{ + SStackFrame *ssp; + INT i; + + ssp = tcb->tskctxb.ssp; + + if ( cregs != NULL ) { + ssp = cregs->ssp; + } + + if ( regs != NULL ) { + for ( i = 0; i < 7; ++i ) { + ssp->er[i] = regs->er[i]; + } + } + + if ( eit != NULL ) { + ssp->sccr_spc = (UW)eit->pc; + ssp->sccr_spc &= 0x00ffffffUL; /* 24bit */ + ssp->sccr_spc |= (UW)eit->ccr << 24; + } + + if ( cregs != NULL ) { + tcb->tskctxb.ssp = cregs->ssp; + } +} +#endif /* USE_FUNC_SET_REG */ + +#ifdef USE_FUNC_TK_SET_REG +/* + * Set task register contents + */ +SYSCALL ER tk_set_reg_impl( ID tskid, T_REGS *pk_regs, T_EIT *pk_eit, T_CREGS *pk_cregs ) +{ + TCB *tcb; + ER ercd = E_OK; + + CHECK_INTSK(); + CHECK_TSKID(tskid); + CHECK_NONSELF(tskid); + + tcb = get_tcb(tskid); + + BEGIN_CRITICAL_SECTION; + if ( tcb->state == TS_NONEXIST ) { + ercd = E_NOEXS; + } else { + knl_set_reg(tcb, pk_regs, pk_eit, pk_cregs); + } + END_CRITICAL_SECTION; + + return ercd; +} +#endif /* USE_FUNC_TK_SET_REG */ + +#ifdef USE_FUNC_GET_REG +/* + * Get task register contents + */ +EXPORT void knl_get_reg( TCB *tcb, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ) +{ + SStackFrame *ssp; + INT i; + + ssp = tcb->tskctxb.ssp; + + if ( regs != NULL ) { + for ( i = 0; i < 7; ++i ) { + regs->er[i] = ssp->er[i]; + } + } + + if ( eit != NULL ) { + eit->pc = (VP)(ssp->sccr_spc & 0x00ffffffUL); + eit->ccr = (VB)(ssp->sccr_spc >> 24); + } + + if ( cregs != NULL ) { + cregs->ssp = tcb->tskctxb.ssp; + } +} +#endif /* USE_FUNC_GET_REG */ + +#ifdef USE_FUNC_TK_GET_REG +/* + * Get task register contents + */ +SYSCALL ER tk_get_reg_impl( ID tskid, T_REGS *pk_regs, T_EIT *pk_eit, T_CREGS *pk_cregs ) +{ + TCB *tcb; + ER ercd = E_OK; + + CHECK_INTSK(); + CHECK_TSKID(tskid); + CHECK_NONSELF(tskid); + + tcb = get_tcb(tskid); + + BEGIN_CRITICAL_SECTION; + if ( tcb->state == TS_NONEXIST ) { + ercd = E_NOEXS; + } else { + knl_get_reg(tcb, pk_regs, pk_eit, pk_cregs); + } + END_CRITICAL_SECTION; + + return ercd; +} +#endif /* USE_FUNC_TK_GET_REG */ + +/* ------------------------------------------------------------------------ */ +/* + * Debugger support function + */ +#if USE_DBGSPT + +#ifdef USE_FUNC_TD_SET_REG +/* + * Set task register + */ +SYSCALL ER td_set_reg_impl( ID tskid, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ) +{ + TCB *tcb; + ER ercd = E_OK; + + CHECK_TSKID(tskid); + + tcb = get_tcb(tskid); + if ( tcb == knl_ctxtsk ) { + return E_OBJ; + } + + BEGIN_DISABLE_INTERRUPT; + if ( tcb->state == TS_NONEXIST ) { + ercd = E_NOEXS; + } else { + knl_set_reg(tcb, regs, eit, cregs); + } + END_DISABLE_INTERRUPT; + + return ercd; +} +#endif /* USE_FUNC_TD_SET_REG */ + +#ifdef USE_FUNC_TD_GET_REG +/* + * Get task register + */ +SYSCALL ER td_get_reg_impl( ID tskid, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ) +{ + TCB *tcb; + ER ercd = E_OK; + + CHECK_TSKID(tskid); + + tcb = get_tcb(tskid); + if ( tcb == knl_ctxtsk ) { + return E_OBJ; + } + + BEGIN_DISABLE_INTERRUPT; + if ( tcb->state == TS_NONEXIST ) { + ercd = E_NOEXS; + } else { + knl_get_reg(tcb, regs, eit, cregs); + } + END_DISABLE_INTERRUPT; + + return ercd; +} +#endif /* USE_FUNC_TD_GET_REG */ + +#endif /* USE_DBGSPT */ diff --git a/kernel/sysdepend/cpu/h83052/cpu_calls.h b/kernel/sysdepend/cpu/h83052/cpu_calls.h new file mode 100644 index 0000000..226cf82 --- /dev/null +++ b/kernel/sysdepend/cpu/h83052/cpu_calls.h @@ -0,0 +1,26 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_calls.h (H83052) + * CPU-Dependent System Call + */ + +#ifndef _CPU_CALLS_H_ +#define _CPU_CALLS_H_ + +IMPORT void knl_get_reg( TCB *tcb, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ); +IMPORT void knl_set_reg( TCB *tcb, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ); + +#endif diff --git a/kernel/sysdepend/cpu/h83052/cpu_conf.h b/kernel/sysdepend/cpu/h83052/cpu_conf.h new file mode 100644 index 0000000..24ad61a --- /dev/null +++ b/kernel/sysdepend/cpu/h83052/cpu_conf.h @@ -0,0 +1,32 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_conf.h (H83052) + * CPU-Dependent OS Configuration Information + */ + +#ifndef _CPU_CONF_ +#define _CPU_CONF_ + +/* + * Definition of minimum system stack size + * Minimum system stack size when setting the system stack size + * per task by 'tk_cre_tsk().' + * this size must be larger than the size of SStackFrame + */ +#define MIN_SYS_STACK_SIZE 64 + + +#endif /* _CPU_CONF_ */ diff --git a/kernel/sysdepend/cpu/h83052/cpu_init.c b/kernel/sysdepend/cpu/h83052/cpu_init.c new file mode 100644 index 0000000..dcb739e --- /dev/null +++ b/kernel/sysdepend/cpu/h83052/cpu_init.c @@ -0,0 +1,58 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_init.c (H83052) + * CPU-Dependent Initialization/Finalization + */ + +#include "kernel.h" +#include "task.h" +#include "cpu_insn.h" +#include "tkdev_conf.h" + + +EXPORT INT knl_taskindp = 0; + +#if USE_DYNAMIC_INTHDR +Noinit(EXPORT FP knl_intvec[N_INTVEC]); +#endif /* USE_DYNAMIC_INTHDR */ + +EXPORT INT knl_int_nest = 0; + +Noinit(EXPORT UB knl_tmp_stack[TMP_STACK_SZ]); + +/* + * CPU-dependent initialization + */ +EXPORT ER knl_cpu_initialize( void ) +{ + return E_OK; +} + +#if USE_CLEANUP +/* + * CPU-dependent finalization + */ +EXPORT void knl_cpu_shutdown( void ) +{ +} +#endif /* USE_CLEANUP */ + +/*----------------------------------------------------------------------*/ +/* offset data in TCB */ +/*----------------------------------------------------------------------*/ +EXPORT const UW TCB_tskid = offsetof(TCB, tskid); +EXPORT const UW TCB_state = offsetof(TCB, state); +EXPORT const UW CTXB_ssp = offsetof(TCB, tskctxb.ssp); diff --git a/kernel/sysdepend/cpu/h83052/cpu_insn.h b/kernel/sysdepend/cpu/h83052/cpu_insn.h new file mode 100644 index 0000000..473b69c --- /dev/null +++ b/kernel/sysdepend/cpu/h83052/cpu_insn.h @@ -0,0 +1,72 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_insn.h (H83052) + * H83052-Dependent Operation + */ + +#ifndef _CPU_INSN_ +#define _CPU_INSN_ + +#include + + + +/* ------------------------------------------------------------------------ */ +/* + * Control register operation + */ + +/* + * Get CCR + */ +Inline UINT knl_getCCR( void ) +{ + UB ccr; + Asm("stc.b ccr, %0l\n" : "=r"(ccr)); + return ccr; +} + +/* + * Set interrupt handler + */ +Inline void knl_define_inthdr( INT vecno, FP inthdr ) +{ + knl_intvec[vecno] = inthdr; +} + +/* + * If it is the task-independent part, TRUE + */ +Inline BOOL knl_isTaskIndependent( void ) +{ + return ( knl_taskindp > 0 )? TRUE: FALSE; +} + +/* + * Move to/Restore task independent part + */ +Inline void knl_EnterTaskIndependent( void ) +{ + knl_taskindp++; +} +Inline void knl_LeaveTaskIndependent( void ) +{ + knl_taskindp--; +} + +/* ------------------------------------------------------------------------ */ + +#endif /* _CPU_INSN_ */ diff --git a/kernel/sysdepend/cpu/h83052/cpu_status.h b/kernel/sysdepend/cpu/h83052/cpu_status.h new file mode 100644 index 0000000..8e5e94d --- /dev/null +++ b/kernel/sysdepend/cpu/h83052/cpu_status.h @@ -0,0 +1,142 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_status.h (H83052) + * H83052-Dependent Definition + */ + +#ifndef _CPU_STATUS_ +#define _CPU_STATUS_ + +#include +#include +#include "cpu_insn.h" + +/* + * Start/End critical section + */ +#define BEGIN_CRITICAL_SECTION { UINT _sr_ = disint(); +#define END_CRITICAL_SECTION if ( !isDI(_sr_) \ + && knl_ctxtsk != knl_schedtsk \ + && !knl_isTaskIndependent() \ + && !knl_dispatch_disabled ) { \ + knl_dispatch(); \ + } \ + enaint(_sr_); } + +/* + * Start/End interrupt disable section + */ +#define BEGIN_DISABLE_INTERRUPT { UINT _sr_ = disint(); +#define END_DISABLE_INTERRUPT enaint(_sr_); } + +/* + * Interrupt enable/disable + */ +#define ENABLE_INTERRUPT { enaint(0); } +#define DISABLE_INTERRUPT { disint(); } + +/* + * Enable interrupt nesting + * Enable the interrupt that has a higher priority than 'level.' + */ +#define ENABLE_INTERRUPT_UPTO(level) { enaint(0); } + +/* + * Move to/Restore task independent part + */ +#define ENTER_TASK_INDEPENDENT { knl_EnterTaskIndependent(); } +#define LEAVE_TASK_INDEPENDENT { knl_LeaveTaskIndependent(); } + +/* ----------------------------------------------------------------------- */ +/* + * Check system state + */ + +/* + * When a system call is called from the task independent part, TRUE + */ +#define in_indp() ( knl_isTaskIndependent() || knl_ctxtsk == NULL ) + +/* + * When a system call is called during dispatch disable, TRUE + * Also include the task independent part as during dispatch disable. + */ +#define in_ddsp() ( knl_dispatch_disabled \ + || in_indp() \ + || isDI(knl_getCCR()) ) + +/* + * When a system call is called during CPU lock (interrupt disable), TRUE + * Also include the task independent part as during CPU lock. + */ +#define in_loc() ( isDI(knl_getCCR()) \ + || in_indp() ) + +/* + * When a system call is called during executing the quasi task part, TRUE + * Valid only when in_indp() == FALSE because it is not discriminated from + * the task independent part. + */ +#define in_qtsk() ( knl_ctxtsk->sysmode > knl_ctxtsk->isysmode ) + +/* ----------------------------------------------------------------------- */ +/* + * Task dispatcher startup routine + */ + +/* + * Request for task dispatcher startup + * Do nothing at this point because there is no delayed + * interrupt function. + * Perform dispatcher startup with END_CRITICAL_SECTION. + */ +#define knl_dispatch_request() /* */ + +/* + * Throw away the current task context. + * and forcibly dispatch to the task that should be performed next. + * Use at system startup and 'tk_ext_tsk, tk_exd_tsk.' + */ +Inline void knl_force_dispatch( void ) +{ +IMPORT void knl_dispatch_to_schedtsk(); + + Asm(" jmp @%0" :: "r"(&knl_dispatch_to_schedtsk)); +} + +/* + * Start task dispatcher + */ +Inline void knl_dispatch( void ) +{ +#if USE_TRAP + Asm("trapa %0":: "i"(TRAP_DISPATCH)); +#else +IMPORT void knl_dispatch_entry( void ); /* Dispatcher call */ + knl_dispatch_entry(); +#endif +} + +/* ----------------------------------------------------------------------- */ + +/* + * Task context block + */ +typedef struct { + VP ssp; /* System stack pointer */ +} CTXB; + +#endif /* _CPU_STATUS_ */ diff --git a/kernel/sysdepend/cpu/h83052/cpu_support.S b/kernel/sysdepend/cpu/h83052/cpu_support.S new file mode 100644 index 0000000..8c524a9 --- /dev/null +++ b/kernel/sysdepend/cpu/h83052/cpu_support.S @@ -0,0 +1,527 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_support.S (H83052) + * Device-Dependent CPU Operation + */ + +#define _in_asm_source_ + +#include +#include +#include +#include +#include + +#include "config.h" +#include "utk_config.h" +#if USE_TRAP | (USE_DBGSPT & USE_HOOK_TRACE) +#include "isysconf.h" +#endif +#include "tkdev_conf.h" + +#if USE_DBGSPT | USE_HOOK_TRACE +#error not supported +#endif + +/* ------------------------------------------------------------------------ */ +/* + * Dispatcher + * dispatch_to_schedtsk: + * Throw away the current contexts and forcibly dispatch to + * 'schedtsk.' + * Called directly by jump (jmp) but do not return. + * Called on the undefined stack state (undefined 'ssp'). + * Called on the interrupt disable state. + * dispatch_entry: + * Normal dispatch processing. + * _ret_int_dispatch: + * Called when dispatch is required by 'tk_ret_int().' + * + * Contexts to save + * Save registers except for SP to a stack. Save SP to TCB. + * + * High Address +---------------+ + * | SPC(24bit) | + * | | Saved by interrupt entry + * | SCCR(8bit) | routines until here. + * +---------------+ + * | ER0 | + * | ER1 | + * | ER2 | + * | ER3 | + * | ER4 | + * | ER5 | + * Saved to TCB SP => | ER6 | + * Low Address +---------------+ + */ + +/* Temporal stack used when 'dispatch_to_schedtsk' is called */ + + .h8300h + + + .text + .balign 2 + .globl Csym(knl_dispatch_to_schedtsk) + .globl Csym(knl_dispatch_entry) + +Csym(knl_dispatch_to_schedtsk): + /* During interrupt disable CCR.I=1 */ + mov.l #(Csym(knl_tmp_stack) + TMP_STACK_SZ), er7 // Set temporal stack + + sub.w r0, r0 + inc.w #1, r0 // r0 := 1 + mov.w r0, @Csym(knl_dispatch_disabled) // Dispatch disable + + mov.l #Csym(knl_ctxtsk), er6 // er6 := &ctxtsk + sub.l er0, er0 + mov.l er0, @er6 // ctxtsk = NULL + + andc #CCR_EI_MASK, ccr // Interrupt enable + bra l_dispatch0 + +Csym(knl_dispatch_entry): + /* During interrupt disable CCR.I=1 */ +#if USE_TRAP + mov.w @er7, r0 + and.b #CCR_EI_MASK, r0h + mov.w r0, @er7 // SSR compensation (I=0) +#else + mov.w @er7, r0 + stc ccr, r0h + and.b #CCR_EI_MASK, r0h + mov.w r0, @er7 +#endif + +_ret_int_dispatch: + /* During interrupt disable CCR.I=1 */ + + sub.w r0, r0 + inc.w #1, r0 // r0 := 1 + mov.w r0, @Csym(knl_dispatch_disabled) // Dispatch disable + andc #CCR_EI_MASK, ccr // Interrupt enable + + push.l er0 // Context save + push.l er1 + push.l er2 + push.l er3 + push.l er4 + push.l er5 + push.l er6 + + mov.l #Csym(knl_ctxtsk), er6 // er6 := &ctxtsk + mov.l @er6, er1 + mov.l @Csym(CTXB_ssp), er0 + add.l er0, er1 // er1 = &ctxtsk.ssp + mov.l er7, @er1 // Save SSP to TCB + + l_dispatch0: + /* During interrupt enable CCR.I=0 */ + + l_dispatch1: + orc #CCR_I, ccr // Interrupt disable + + mov.l @Csym(knl_schedtsk), er5 // ER5 = schedtsk + // Is there 'schedtsk'? + bne l_dispatch2 + + /* Because there is no task that should be executed, move to the power-saving mode */ + mov.w @Csym(knl_lowpow_discnt), r0 // Is 'low_pow' disabled? + bne l_dispatch11 + + jsr @Csym(knl_low_pow) // call low_pow() + l_dispatch11: + + andc #CCR_EI_MASK, ccr // Interrupt enable + bra l_dispatch1 + + l_dispatch2: // Switch to 'schedtsk' + /* During interrupt disable CCR.I=1 */ + mov.l er5, @er6 // ctxtsk = schedtsk + mov.l @Csym(CTXB_ssp), er1 + add.l er5, er1 + mov.l @er1, er7 // Restore SSP from TCB + + sub.w r1, r1 + mov.w r1, @Csym(knl_dispatch_disabled) // Dispatch enable + + pop.l er6 // Context restore + pop.l er5 + pop.l er4 + pop.l er3 + pop.l er2 + pop.l er1 + pop.l er0 + + rte + +#if USE_HLL_INTHDR +/* ------------------------------------------------------------------------ */ +/* + * High level programming language routine for interrupt handler + * Called by interrupt entry routine on the state saved in the interrupt + * stack as shown below. + * High Address +---------------+ + * | SPC(24bit) | + * | SCCR(8bit) | + * | er0 | + * ISP => | er1 | + * Low Address +---------------+ + * + * er0 = intno + */ + .text + .balign 2 + .globl Csym(knl_inthdr_startup) +Csym(knl_inthdr_startup): + /* During interrupt disable CCR.I=1 */ + push.l er2 // er0-er1 are already saved + push.l er3 + push.l er4 + push.l er5 + push.l er6 + + mov.w @Csym(knl_taskindp), r6 // enter task independent mode + inc.w #1, r6 + mov.w r6, @Csym(knl_taskindp) + + mov.w @Csym(knl_int_nest), r2 // interrupt nest count + mov.w r2, r5 + inc.w #1, r2 + mov.w r2, @Csym(knl_int_nest) + + mov.w r5, r5 + bne l_no_change_sp // multiple interrupt + + mov.l er7, er2 + mov.l #RI_INTSTACK, er7 // change to ISP + mov.l er2, @-er7 // SSP save + l_no_change_sp: + + shll.l er0 // offset = dintno << 2 + shll.l er0 + mov.l @(Csym(knl_hll_inthdr), er0), er3 // call hll_inthdr[n](dintno) + jsr @er3 + + orc.b #CCR_I, ccr // Interrupt disable + + /* During interrupt disable CCR.I=1 */ + mov.w r5, r5 + bne l_no_change_sp2 // multiple interrupt + + mov.l @er7+, er2 // er2 = SSP + mov.l er2, er7 +l_no_change_sp2: + + dec.w #1, r6 + mov.w r6, @Csym(knl_taskindp) + + pop.l er6 + pop.l er5 + pop.l er4 + pop.l er3 + pop.l er2 + +#if USE_TRAP + trapa #TRAP_RETINT // tk_ret_int() +#else + jmp @Csym(tk_ret_int_impl) +#endif + +#endif /* USE_HLL_INTHDR */ + +/* + * _tk_ret_int() + * + * tk_ret_int() processing + * When called, the interrupt stack is configured as shown below. + * High Address +---------------+ + * | SPC(24bit) | Saved when interrupt occur + * | SCCR(8bit) | + * | ER0(32bit) | + * SSP => | ER1(32bit) | + * +---------------+ + * | SPC(24bit) | Save by 'trapa TRAP_RETINT' + * SSP => | SCCR(8bit) | + * Low Address +---------------+ + */ + .text + .balign 2 + .globl Csym(tk_ret_int_impl) +Csym(tk_ret_int_impl): + /* During interrupt disable CCR.I=1 */ +#if USE_TRAP + add.l #4, er7 // Trash parts saved by 'trapa TRAP_RETINT' +#endif + + mov.w @Csym(knl_int_nest), r0 // Is it a nesting interrupt? + dec.w #1, r0 + mov.w r0, @Csym(knl_int_nest) + bne l_nodispatch + + mov.w @(2*4, er7), r0 // CCR when EIT occurs + and.b #CCR_I, r0h // Is it an exception during interrupt disable? + bne l_nodispatch + + mov.w @Csym(knl_dispatch_disabled), r0 // Is it during dispatch disable? + bne l_nodispatch + + mov.l @Csym(knl_ctxtsk), er0 // Is dispatch required? + mov.l @Csym(knl_schedtsk), er1 + cmp er0, er1 + beq l_nodispatch + + pop.l er1 // ER0, ER1 restore + pop.l er0 + jmp _ret_int_dispatch // To dispatch processing + + l_nodispatch: // Dispatch not required + pop.l er1 // ER0, ER1 restore + pop.l er0 + rte + + +/* ------------------------------------------------------------------------ */ + +#if USE_TRAP | USE_DBGSPT | CFN_MAX_SSYID > 0 +/* + * Unsupported system call + */ + .text + .balign 2 + .globl Csym(knl_no_support) +Csym(knl_no_support): + mov.l #E_RSFN, er0 + rts + +/* + * System call entry table + */ +#if USE_TRAP | (USE_DBGSPT & USE_HOOK_TRACE) + .text + .balign 2 +_svctbl: + .long Csym(knl_no_support) +#define tk_ret_int_impl knl_no_support +#include +#undef tk_ret_int_impl +#endif /* USE_TRAP | USE_DBGSPT */ + +/* + * System call entry + * Do not need to save the temporary register. + * The compiler saves the permanent register. + * + * High Address +-------------------+ + * +16 | 5th arg (low) | + * +14 | 5th arg (high) | + * +12 | 4th arg (low) | + * +10 | 4th arg (high) | + * + 8 | PC (low) | + * + 6 | PC (high) | saved by I/F call + * + 4 | R0 | + * + 2 | PC (low) | saved by trapa + * er7, er5 => + 0 | CCR:PC (high) | + * Low Address +-------------------+ + * <-- 16bit width --> + * + * Function code is set in R0 + */ + .text + .balign 2 + .globl Csym(knl_call_entry) +Csym(knl_call_entry): + + push.l er4 // er4, er6 = working register + push.l er5 // er6 is used for pass fncd + push.l er6 // between hook_enter and hook_leave + + mov.l er7, er5 // er5 = frame pointer + +#if USE_TRAP + mov.w @(3*4, er7), r4 // SCCR + ldc r4h, ccr +#else +#if CFN_MAX_SSYID > 0 + mov.w r0, r0 // < 0: System call + // >= 0: Extended SVC + blt l_set_retccr + + mov.w @(3*4, er7), r4 // SCCR + ldc r4h, ccr + bra l_set_end +l_set_retccr: +#endif + mov.w @(3*4, er7), r4 // SCCR + stc ccr, r4h + mov.w r4, @(3*4, er7) +l_set_end: +#endif + + /* The interrupt disable state keeps the caller's state CCR.I=? */ + + mov.w r0, r4 // r4 := Function code + bpl l_esvc_function + +#if USE_TRAP | (USE_DBGSPT & USE_HOOK_TRACE) + /* micro T-Kernel system call */ + and.b #0x0f, r4l // Number of arguments + cmp.b #3, r4l + ble l_nocopy + cmp.b #4, r4l + ble l_copy4 + mov.l @(3*4 + 14, er5), er4 // Copy fifth argument + mov.l er4, @-er7 + l_copy4: + mov.l @(3*4 + 10, er5), er4 // Copy fourth argument + mov.l er4, @-er7 + l_nocopy: + + and.w #0x0ff0, r0 // r0 = function No. << 4 + shlr.w r0 // r0 = function No. << 3 + shlr.w r0 // r0 = function No. << 2 + mov.w r0, r4 + extu.l er4 // er4 = function No. * 4 + mov.w @(3*4 + 4, er5), r0 // restore first argument + mov.l @(_svctbl, er4), er4 + jsr @er4 // micro T-Kernel system call +#else + bra l_illegal_svc +#endif + + l_retsvc: + // Interrupt disable + orc #CCR_I, ccr + + mov.l er5, er7 + pop.l er6 + pop.l er5 + pop.l er4 + rte + + l_illegal_svc: + mov.l #E_RSFN, er0 + bra l_retsvc + + l_esvc_function: +#if CFN_MAX_SSYID > 0 +/* + * High Address +-------------------+ + * +38 | 5th arg (low) | + * +36 | 5th arg (high) | + * +34 | 4th arg (low) | + * +32 | 4th arg (high) | + * +30 | PC (low) | saved by I/F call + * +28 | PC (high) | + * +26 | 2nd arg (low) | + * +24 | 2nd arg (high) | + * +22 | 1st arg (low) | + * pk_para(r1) => +20 | 1st arg (high) | + * +18 | 3rd arg (low) | + * +16 | 3rd arg (high) | + * +14 | PC (low) | saved by trapa + * +12 | CCR:PC (high) | + * +10 | R4 | + * + 8 | E4 | + * + 6 | R5 | + * + 4 | E5 | + * + 2 | R6 | + * er7, er5 => + 0 | E6 | + * Low Address +-------------------+ + * <-- 16bit width --> + * + * Function code is set in R0 + */ + /* Extended SVC */ + mov.l @(28, er7), er4 // save ret-address(I/F) to ER4 + mov.l @(16, er7), er2 // arg3 + mov.l er2, @(28, er7) + mov.l er1, er2 // save ER1 (pk_para) to ER2 + mov.w r0, r1 // R1 = Function code + mov.l er2, er0 // restore pk_para to ER0 + jsr Csym(knl_svc_ientry) // svc_ientry(pk_para, fncd) + + mov.l er4, @(28, er7) // restore ret-address(I/F) + + bra l_retsvc +#else + mov.l #E_SYS, er0 + bra l_retsvc +#endif /* CFN_MAX_SSYID > 0 */ + +#endif /* USE_TRAP | USE_DBGSPT | CFN_MAX_SSYID > 0 */ + +/* ------------------------------------------------------------------------ */ +/* + * High level programming language routine for timer handler + */ + .text + .balign 2 + .globl Csym(knl_timer_handler_startup) +Csym(knl_timer_handler_startup): + /* During interrupt disable CCR.I=1 */ + push.l er0 + push.l er1 + push.l er2 + push.l er3 + push.l er4 + push.l er5 + push.l er6 + + mov.w @Csym(knl_taskindp), r6 // enter task independent mode + inc.w #1, r6 + mov.w r6, @Csym(knl_taskindp) + + mov.w @Csym(knl_int_nest), r2 // interrupt nest count + mov.w r2, r5 + inc.w #1, r2 + mov.w r2, @Csym(knl_int_nest) + + mov.w r5, r5 + bne l_no_change_sp_timerhdr // multiple interrupt + + mov.l er7, er2 + mov.l #RI_INTSTACK, er7 // change to ISP + mov.l er2, @-er7 // SSP save + l_no_change_sp_timerhdr: + + jsr @Csym(knl_timer_handler) // call timer_handler() + + orc.b #CCR_I, ccr // Interrupt disable + + /* During interrupt disable CCR.I=1 */ + mov.w r5, r5 + bne l_no_change_sp2_timerhdr // multiple interrupt + + mov.l @er7+, er2 // ER2 = SSP + mov.l er2, er7 + l_no_change_sp2_timerhdr: + + dec.w #1, r6 + mov.w r6, @Csym(knl_taskindp) + + pop.l er6 + pop.l er5 + pop.l er4 + pop.l er3 + pop.l er2 + +#if USE_TRAP + trapa #TRAP_RETINT // tk_ret_int() +#else + jmp @Csym(tk_ret_int_impl) +#endif + diff --git a/kernel/sysdepend/cpu/h83052/cpu_task.h b/kernel/sysdepend/cpu/h83052/cpu_task.h new file mode 100644 index 0000000..836c3a1 --- /dev/null +++ b/kernel/sysdepend/cpu/h83052/cpu_task.h @@ -0,0 +1,84 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_task.h (H83052) + * CPU-Dependent Task Start Processing + */ + +#ifndef _CPU_TASK_ +#define _CPU_TASK_ + +#include "cpu_insn.h" + +/* + * System stack configuration at task startup + */ +typedef struct { + UW er[7]; /* er6-er0 */ + UW sccr_spc; +} SStackFrame; + + +/* + * Size of system stack area destroyed by 'make_dormant()' + * In other words, the size of area required to write by 'setup_context().' + */ +#define DORMANT_STACK_SIZE ( sizeof(VW) * 1 ) /* To 'sccr_spc' position */ + +/* + * Initial value for task startup + */ +#define INIT_CCR ( 0 ) + +/* + * Create stack frame for task startup + * Call from 'make_dormant()' + */ +Inline void knl_setup_context( TCB *tcb ) +{ + SStackFrame *ssp; + UW ccr; + + ssp = tcb->isstack; + ssp--; + + ccr = INIT_CCR; + + /* CPU context initialization */ + /* Initial CCR */ /* Task startup address */ + ssp->sccr_spc = (ccr << 24) | ((UW)tcb->task & 0x00ffffffUL); + tcb->tskctxb.ssp = ssp; /* System stack */ +} + +/* + * Set task startup code + * Called by 'tk_sta_tsk()' processing. + */ +Inline void knl_setup_stacd( TCB *tcb, INT stacd ) +{ + SStackFrame *ssp = tcb->tskctxb.ssp; + + ssp->er[6] = stacd; /* er0 */ + ssp->er[5] = (VW)tcb->exinf; /* er1 */ +} + +/* + * Delete task contexts + */ +Inline void knl_cleanup_context( TCB *tcb ) +{ +} + +#endif /* _CPU_TASK_ */ diff --git a/kernel/sysdepend/cpu/h83052/func/.dummy b/kernel/sysdepend/cpu/h83052/func/.dummy new file mode 100644 index 0000000..421376d --- /dev/null +++ b/kernel/sysdepend/cpu/h83052/func/.dummy @@ -0,0 +1 @@ +dummy diff --git a/kernel/sysdepend/cpu/h83069/cpu_calls.c b/kernel/sysdepend/cpu/h83069/cpu_calls.c new file mode 100644 index 0000000..6de354d --- /dev/null +++ b/kernel/sysdepend/cpu/h83069/cpu_calls.c @@ -0,0 +1,308 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_calls.c (H83069) + * CPU-Dependent System Call + */ + +/** [BEGIN Common Definitions] */ +#include "kernel.h" +#include "task.h" +#include "check.h" +#include "cpu_task.h" + +#include +#include +#include "cpu_insn.h" +#include "cpu_calls.h" +/** [END Common Definitions] */ + +#ifdef USE_FUNC_TK_DIS_DSP +/* + * Dispatch enable/disable + */ +SYSCALL ER tk_dis_dsp_impl( void ) +{ + CHECK_CTX(!in_loc()); + + knl_dispatch_disabled = DDS_DISABLE; + + return E_OK; +} +#endif /* USE_FUNC_TK_DIS_DSP */ + +#ifdef USE_FUNC_TK_ENA_DSP +/* + * Dispatch enable + */ +SYSCALL ER tk_ena_dsp_impl( void ) +{ + CHECK_CTX(!in_loc()); + + knl_dispatch_disabled = DDS_ENABLE; + if ( knl_ctxtsk != knl_schedtsk ) { + knl_dispatch(); + } + + return E_OK; +} +#endif /* USE_FUNC_TK_ENA_DSP */ + +/* ------------------------------------------------------------------------ */ + +/* + * High level programming language + */ + +#ifdef USE_FUNC_HLL_INTHDR +/* High level programming language interrupt handler entry */ +Noinit(EXPORT FP knl_hll_inthdr[N_INTVEC]); +#endif /* USE_FUNC_HLL_INTHDR */ + +#ifdef USE_FUNC_TK_DEF_INT +IMPORT FP knl_hll_inthdr[]; + +/* High level programming language-supported routine (General) */ +IMPORT void knl_inthdr_startup(); + +/* + * Interrupt handler definition + */ +SYSCALL ER tk_def_int_impl( UINT dintno, T_DINT *pk_dint ) +{ +#if USE_DYNAMIC_INTHDR + FP inthdr; + + CHECK_PAR(dintno < N_INTVEC); +#if !USE_HLL_INTHDR + CHECK_PAR((pk_dint->intatr & TA_HLNG) == 0); +#endif + + if ( pk_dint != NULL ) { + /* Set interrupt handler */ + CHECK_RSATR(pk_dint->intatr, TA_HLNG); + + inthdr = pk_dint->inthdr; + + BEGIN_CRITICAL_SECTION; +#if USE_HLL_INTHDR + if ( (pk_dint->intatr & TA_HLNG) != 0 ) { + knl_hll_inthdr[dintno] = inthdr; + inthdr = knl_inthdr_startup; + } +#endif + knl_define_inthdr(dintno, inthdr); + END_CRITICAL_SECTION; + } else { + /* Clear interrupt handler */ + switch ( dintno ) { + default: inthdr = NULL; + } + + BEGIN_CRITICAL_SECTION; + knl_define_inthdr(dintno, inthdr); +#if USE_HLL_INTHDR + knl_hll_inthdr[dintno] = NULL; +#endif + END_CRITICAL_SECTION; + } + + return E_OK; +#else + return E_NOSPT; +#endif /* USE_DYNAMIC_INTHDR */ +} +#endif /* USE_FUNC_TK_DEF_INT */ + +/* ------------------------------------------------------------------------ */ + +#ifdef USE_FUNC_SET_REG +/* + * Set task register contents + */ +EXPORT void knl_set_reg( TCB *tcb, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ) +{ + SStackFrame *ssp; + INT i; + + ssp = tcb->tskctxb.ssp; + + if ( cregs != NULL ) { + ssp = cregs->ssp; + } + + if ( regs != NULL ) { + for ( i = 0; i < 7; ++i ) { + ssp->er[i] = regs->er[i]; + } + } + + if ( eit != NULL ) { + ssp->sccr_spc = (UW)eit->pc; + ssp->sccr_spc &= 0x00ffffffUL; /* 24bit */ + ssp->sccr_spc |= (UW)eit->ccr << 24; + } + + if ( cregs != NULL ) { + tcb->tskctxb.ssp = cregs->ssp; + } +} +#endif /* USE_FUNC_SET_REG */ + +#ifdef USE_FUNC_TK_SET_REG +/* + * Set task register contents + */ +SYSCALL ER tk_set_reg_impl( ID tskid, T_REGS *pk_regs, T_EIT *pk_eit, T_CREGS *pk_cregs ) +{ + TCB *tcb; + ER ercd = E_OK; + + CHECK_INTSK(); + CHECK_TSKID(tskid); + CHECK_NONSELF(tskid); + + tcb = get_tcb(tskid); + + BEGIN_CRITICAL_SECTION; + if ( tcb->state == TS_NONEXIST ) { + ercd = E_NOEXS; + } else { + knl_set_reg(tcb, pk_regs, pk_eit, pk_cregs); + } + END_CRITICAL_SECTION; + + return ercd; +} +#endif /* USE_FUNC_TK_SET_REG */ + +#ifdef USE_FUNC_GET_REG +/* + * Get task register contents + */ +EXPORT void knl_get_reg( TCB *tcb, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ) +{ + SStackFrame *ssp; + INT i; + + ssp = tcb->tskctxb.ssp; + + if ( regs != NULL ) { + for ( i = 0; i < 7; ++i ) { + regs->er[i] = ssp->er[i]; + } + } + + if ( eit != NULL ) { + eit->pc = (VP)(ssp->sccr_spc & 0x00ffffffUL); + eit->ccr = (VB)(ssp->sccr_spc >> 24); + } + + if ( cregs != NULL ) { + cregs->ssp = tcb->tskctxb.ssp; + } +} +#endif /* USE_FUNC_GET_REG */ + +#ifdef USE_FUNC_TK_GET_REG +/* + * Get task register contents + */ +SYSCALL ER tk_get_reg_impl( ID tskid, T_REGS *pk_regs, T_EIT *pk_eit, T_CREGS *pk_cregs ) +{ + TCB *tcb; + ER ercd = E_OK; + + CHECK_INTSK(); + CHECK_TSKID(tskid); + CHECK_NONSELF(tskid); + + tcb = get_tcb(tskid); + + BEGIN_CRITICAL_SECTION; + if ( tcb->state == TS_NONEXIST ) { + ercd = E_NOEXS; + } else { + knl_get_reg(tcb, pk_regs, pk_eit, pk_cregs); + } + END_CRITICAL_SECTION; + + return ercd; +} +#endif /* USE_FUNC_TK_GET_REG */ + +/* ------------------------------------------------------------------------ */ +/* + * Debugger support function + */ +#if USE_DBGSPT + +#ifdef USE_FUNC_TD_SET_REG +/* + * Set task register + */ +SYSCALL ER td_set_reg_impl( ID tskid, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ) +{ + TCB *tcb; + ER ercd = E_OK; + + CHECK_TSKID(tskid); + + tcb = get_tcb(tskid); + if ( tcb == knl_ctxtsk ) { + return E_OBJ; + } + + BEGIN_DISABLE_INTERRUPT; + if ( tcb->state == TS_NONEXIST ) { + ercd = E_NOEXS; + } else { + knl_set_reg(tcb, regs, eit, cregs); + } + END_DISABLE_INTERRUPT; + + return ercd; +} +#endif /* USE_FUNC_TD_SET_REG */ + +#ifdef USE_FUNC_TD_GET_REG +/* + * Get task register + */ +SYSCALL ER td_get_reg_impl( ID tskid, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ) +{ + TCB *tcb; + ER ercd = E_OK; + + CHECK_TSKID(tskid); + + tcb = get_tcb(tskid); + if ( tcb == knl_ctxtsk ) { + return E_OBJ; + } + + BEGIN_DISABLE_INTERRUPT; + if ( tcb->state == TS_NONEXIST ) { + ercd = E_NOEXS; + } else { + knl_get_reg(tcb, regs, eit, cregs); + } + END_DISABLE_INTERRUPT; + + return ercd; +} +#endif /* USE_FUNC_TD_GET_REG */ + +#endif /* USE_DBGSPT */ diff --git a/kernel/sysdepend/cpu/h83069/cpu_calls.h b/kernel/sysdepend/cpu/h83069/cpu_calls.h new file mode 100644 index 0000000..0d07eaf --- /dev/null +++ b/kernel/sysdepend/cpu/h83069/cpu_calls.h @@ -0,0 +1,26 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_calls.h (H83069) + * CPU-Dependent System Call + */ + +#ifndef _CPU_CALLS_H_ +#define _CPU_CALLS_H_ + +IMPORT void knl_get_reg( TCB *tcb, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ); +IMPORT void knl_set_reg( TCB *tcb, T_REGS *regs, T_EIT *eit, T_CREGS *cregs ); + +#endif diff --git a/kernel/sysdepend/cpu/h83069/cpu_conf.h b/kernel/sysdepend/cpu/h83069/cpu_conf.h new file mode 100644 index 0000000..4affbb9 --- /dev/null +++ b/kernel/sysdepend/cpu/h83069/cpu_conf.h @@ -0,0 +1,32 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_conf.h (H83069) + * CPU-Dependent OS Configuration Information + */ + +#ifndef _CPU_CONF_ +#define _CPU_CONF_ + +/* + * Definition of minimum system stack size + * Minimum system stack size when setting the system stack size + * per task by 'tk_cre_tsk().' + * this size must be larger than the size of SStackFrame + */ +#define MIN_SYS_STACK_SIZE 64 + + +#endif /* _CPU_CONF_ */ diff --git a/kernel/sysdepend/cpu/h83069/cpu_init.c b/kernel/sysdepend/cpu/h83069/cpu_init.c new file mode 100644 index 0000000..5908b6a --- /dev/null +++ b/kernel/sysdepend/cpu/h83069/cpu_init.c @@ -0,0 +1,58 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_init.c (H83069) + * CPU-Dependent Initialization/Finalization + */ + +#include "kernel.h" +#include "task.h" +#include "cpu_insn.h" +#include "tkdev_conf.h" + + +EXPORT INT knl_taskindp = 0; + +#if USE_DYNAMIC_INTHDR +Noinit(EXPORT FP knl_intvec[N_INTVEC]); +#endif /* USE_DYNAMIC_INTHDR */ + +EXPORT INT knl_int_nest = 0; + +Noinit(EXPORT UB knl_tmp_stack[TMP_STACK_SZ]); + +/* + * CPU-dependent initialization + */ +EXPORT ER knl_cpu_initialize( void ) +{ + return E_OK; +} + +#if USE_CLEANUP +/* + * CPU-dependent finalization + */ +EXPORT void knl_cpu_shutdown( void ) +{ +} +#endif /* USE_CLEANUP */ + +/*----------------------------------------------------------------------*/ +/* offset data in TCB */ +/*----------------------------------------------------------------------*/ +EXPORT const UW TCB_tskid = offsetof(TCB, tskid); +EXPORT const UW TCB_state = offsetof(TCB, state); +EXPORT const UW CTXB_ssp = offsetof(TCB, tskctxb.ssp); diff --git a/kernel/sysdepend/cpu/h83069/cpu_insn.h b/kernel/sysdepend/cpu/h83069/cpu_insn.h new file mode 100644 index 0000000..ff76eef --- /dev/null +++ b/kernel/sysdepend/cpu/h83069/cpu_insn.h @@ -0,0 +1,72 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_insn.h (H83069) + * H83069-Dependent Operation + */ + +#ifndef _CPU_INSN_ +#define _CPU_INSN_ + +#include + + + +/* ------------------------------------------------------------------------ */ +/* + * Control register operation + */ + +/* + * Get CCR + */ +Inline UINT knl_getCCR( void ) +{ + UB ccr; + Asm("stc.b ccr, %0l\n" : "=r"(ccr)); + return ccr; +} + +/* + * Set interrupt handler + */ +Inline void knl_define_inthdr( INT vecno, FP inthdr ) +{ + knl_intvec[vecno] = inthdr; +} + +/* + * If it is the task-independent part, TRUE + */ +Inline BOOL knl_isTaskIndependent( void ) +{ + return ( knl_taskindp > 0 )? TRUE: FALSE; +} + +/* + * Move to/Restore task independent part + */ +Inline void knl_EnterTaskIndependent( void ) +{ + knl_taskindp++; +} +Inline void knl_LeaveTaskIndependent( void ) +{ + knl_taskindp--; +} + +/* ------------------------------------------------------------------------ */ + +#endif /* _CPU_INSN_ */ diff --git a/kernel/sysdepend/cpu/h83069/cpu_status.h b/kernel/sysdepend/cpu/h83069/cpu_status.h new file mode 100644 index 0000000..aa0c49f --- /dev/null +++ b/kernel/sysdepend/cpu/h83069/cpu_status.h @@ -0,0 +1,142 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_status.h (H83069) + * H83069-Dependent Definition + */ + +#ifndef _CPU_STATUS_ +#define _CPU_STATUS_ + +#include +#include +#include "cpu_insn.h" + +/* + * Start/End critical section + */ +#define BEGIN_CRITICAL_SECTION { UINT _sr_ = disint(); +#define END_CRITICAL_SECTION if ( !isDI(_sr_) \ + && knl_ctxtsk != knl_schedtsk \ + && !knl_isTaskIndependent() \ + && !knl_dispatch_disabled ) { \ + knl_dispatch(); \ + } \ + enaint(_sr_); } + +/* + * Start/End interrupt disable section + */ +#define BEGIN_DISABLE_INTERRUPT { UINT _sr_ = disint(); +#define END_DISABLE_INTERRUPT enaint(_sr_); } + +/* + * Interrupt enable/disable + */ +#define ENABLE_INTERRUPT { enaint(0); } +#define DISABLE_INTERRUPT { disint(); } + +/* + * Enable interrupt nesting + * Enable the interrupt that has a higher priority than 'level.' + */ +#define ENABLE_INTERRUPT_UPTO(level) { enaint(0); } + +/* + * Move to/Restore task independent part + */ +#define ENTER_TASK_INDEPENDENT { knl_EnterTaskIndependent(); } +#define LEAVE_TASK_INDEPENDENT { knl_LeaveTaskIndependent(); } + +/* ----------------------------------------------------------------------- */ +/* + * Check system state + */ + +/* + * When a system call is called from the task independent part, TRUE + */ +#define in_indp() ( knl_isTaskIndependent() || knl_ctxtsk == NULL ) + +/* + * When a system call is called during dispatch disable, TRUE + * Also include the task independent part as during dispatch disable. + */ +#define in_ddsp() ( knl_dispatch_disabled \ + || in_indp() \ + || isDI(knl_getCCR()) ) + +/* + * When a system call is called during CPU lock (interrupt disable), TRUE + * Also include the task independent part as during CPU lock. + */ +#define in_loc() ( isDI(knl_getCCR()) \ + || in_indp() ) + +/* + * When a system call is called during executing the quasi task part, TRUE + * Valid only when in_indp() == FALSE because it is not discriminated from + * the task independent part. + */ +#define in_qtsk() ( knl_ctxtsk->sysmode > knl_ctxtsk->isysmode ) + +/* ----------------------------------------------------------------------- */ +/* + * Task dispatcher startup routine + */ + +/* + * Request for task dispatcher startup + * Do nothing at this point because there is no delayed + * interrupt function. + * Perform dispatcher startup with END_CRITICAL_SECTION. + */ +#define knl_dispatch_request() /* */ + +/* + * Throw away the current task context. + * and forcibly dispatch to the task that should be performed next. + * Use at system startup and 'tk_ext_tsk, tk_exd_tsk.' + */ +Inline void knl_force_dispatch( void ) +{ +IMPORT void knl_dispatch_to_schedtsk(); + + Asm(" jmp @%0" :: "r"(&knl_dispatch_to_schedtsk)); +} + +/* + * Start task dispatcher + */ +Inline void knl_dispatch( void ) +{ +#if USE_TRAP + Asm("trapa %0":: "i"(TRAP_DISPATCH)); +#else +IMPORT void knl_dispatch_entry( void ); /* Dispatcher call */ + knl_dispatch_entry(); +#endif +} + +/* ----------------------------------------------------------------------- */ + +/* + * Task context block + */ +typedef struct { + VP ssp; /* System stack pointer */ +} CTXB; + +#endif /* _CPU_STATUS_ */ diff --git a/kernel/sysdepend/cpu/h83069/cpu_support.S b/kernel/sysdepend/cpu/h83069/cpu_support.S new file mode 100644 index 0000000..8c524a9 --- /dev/null +++ b/kernel/sysdepend/cpu/h83069/cpu_support.S @@ -0,0 +1,527 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_support.S (H83052) + * Device-Dependent CPU Operation + */ + +#define _in_asm_source_ + +#include +#include +#include +#include +#include + +#include "config.h" +#include "utk_config.h" +#if USE_TRAP | (USE_DBGSPT & USE_HOOK_TRACE) +#include "isysconf.h" +#endif +#include "tkdev_conf.h" + +#if USE_DBGSPT | USE_HOOK_TRACE +#error not supported +#endif + +/* ------------------------------------------------------------------------ */ +/* + * Dispatcher + * dispatch_to_schedtsk: + * Throw away the current contexts and forcibly dispatch to + * 'schedtsk.' + * Called directly by jump (jmp) but do not return. + * Called on the undefined stack state (undefined 'ssp'). + * Called on the interrupt disable state. + * dispatch_entry: + * Normal dispatch processing. + * _ret_int_dispatch: + * Called when dispatch is required by 'tk_ret_int().' + * + * Contexts to save + * Save registers except for SP to a stack. Save SP to TCB. + * + * High Address +---------------+ + * | SPC(24bit) | + * | | Saved by interrupt entry + * | SCCR(8bit) | routines until here. + * +---------------+ + * | ER0 | + * | ER1 | + * | ER2 | + * | ER3 | + * | ER4 | + * | ER5 | + * Saved to TCB SP => | ER6 | + * Low Address +---------------+ + */ + +/* Temporal stack used when 'dispatch_to_schedtsk' is called */ + + .h8300h + + + .text + .balign 2 + .globl Csym(knl_dispatch_to_schedtsk) + .globl Csym(knl_dispatch_entry) + +Csym(knl_dispatch_to_schedtsk): + /* During interrupt disable CCR.I=1 */ + mov.l #(Csym(knl_tmp_stack) + TMP_STACK_SZ), er7 // Set temporal stack + + sub.w r0, r0 + inc.w #1, r0 // r0 := 1 + mov.w r0, @Csym(knl_dispatch_disabled) // Dispatch disable + + mov.l #Csym(knl_ctxtsk), er6 // er6 := &ctxtsk + sub.l er0, er0 + mov.l er0, @er6 // ctxtsk = NULL + + andc #CCR_EI_MASK, ccr // Interrupt enable + bra l_dispatch0 + +Csym(knl_dispatch_entry): + /* During interrupt disable CCR.I=1 */ +#if USE_TRAP + mov.w @er7, r0 + and.b #CCR_EI_MASK, r0h + mov.w r0, @er7 // SSR compensation (I=0) +#else + mov.w @er7, r0 + stc ccr, r0h + and.b #CCR_EI_MASK, r0h + mov.w r0, @er7 +#endif + +_ret_int_dispatch: + /* During interrupt disable CCR.I=1 */ + + sub.w r0, r0 + inc.w #1, r0 // r0 := 1 + mov.w r0, @Csym(knl_dispatch_disabled) // Dispatch disable + andc #CCR_EI_MASK, ccr // Interrupt enable + + push.l er0 // Context save + push.l er1 + push.l er2 + push.l er3 + push.l er4 + push.l er5 + push.l er6 + + mov.l #Csym(knl_ctxtsk), er6 // er6 := &ctxtsk + mov.l @er6, er1 + mov.l @Csym(CTXB_ssp), er0 + add.l er0, er1 // er1 = &ctxtsk.ssp + mov.l er7, @er1 // Save SSP to TCB + + l_dispatch0: + /* During interrupt enable CCR.I=0 */ + + l_dispatch1: + orc #CCR_I, ccr // Interrupt disable + + mov.l @Csym(knl_schedtsk), er5 // ER5 = schedtsk + // Is there 'schedtsk'? + bne l_dispatch2 + + /* Because there is no task that should be executed, move to the power-saving mode */ + mov.w @Csym(knl_lowpow_discnt), r0 // Is 'low_pow' disabled? + bne l_dispatch11 + + jsr @Csym(knl_low_pow) // call low_pow() + l_dispatch11: + + andc #CCR_EI_MASK, ccr // Interrupt enable + bra l_dispatch1 + + l_dispatch2: // Switch to 'schedtsk' + /* During interrupt disable CCR.I=1 */ + mov.l er5, @er6 // ctxtsk = schedtsk + mov.l @Csym(CTXB_ssp), er1 + add.l er5, er1 + mov.l @er1, er7 // Restore SSP from TCB + + sub.w r1, r1 + mov.w r1, @Csym(knl_dispatch_disabled) // Dispatch enable + + pop.l er6 // Context restore + pop.l er5 + pop.l er4 + pop.l er3 + pop.l er2 + pop.l er1 + pop.l er0 + + rte + +#if USE_HLL_INTHDR +/* ------------------------------------------------------------------------ */ +/* + * High level programming language routine for interrupt handler + * Called by interrupt entry routine on the state saved in the interrupt + * stack as shown below. + * High Address +---------------+ + * | SPC(24bit) | + * | SCCR(8bit) | + * | er0 | + * ISP => | er1 | + * Low Address +---------------+ + * + * er0 = intno + */ + .text + .balign 2 + .globl Csym(knl_inthdr_startup) +Csym(knl_inthdr_startup): + /* During interrupt disable CCR.I=1 */ + push.l er2 // er0-er1 are already saved + push.l er3 + push.l er4 + push.l er5 + push.l er6 + + mov.w @Csym(knl_taskindp), r6 // enter task independent mode + inc.w #1, r6 + mov.w r6, @Csym(knl_taskindp) + + mov.w @Csym(knl_int_nest), r2 // interrupt nest count + mov.w r2, r5 + inc.w #1, r2 + mov.w r2, @Csym(knl_int_nest) + + mov.w r5, r5 + bne l_no_change_sp // multiple interrupt + + mov.l er7, er2 + mov.l #RI_INTSTACK, er7 // change to ISP + mov.l er2, @-er7 // SSP save + l_no_change_sp: + + shll.l er0 // offset = dintno << 2 + shll.l er0 + mov.l @(Csym(knl_hll_inthdr), er0), er3 // call hll_inthdr[n](dintno) + jsr @er3 + + orc.b #CCR_I, ccr // Interrupt disable + + /* During interrupt disable CCR.I=1 */ + mov.w r5, r5 + bne l_no_change_sp2 // multiple interrupt + + mov.l @er7+, er2 // er2 = SSP + mov.l er2, er7 +l_no_change_sp2: + + dec.w #1, r6 + mov.w r6, @Csym(knl_taskindp) + + pop.l er6 + pop.l er5 + pop.l er4 + pop.l er3 + pop.l er2 + +#if USE_TRAP + trapa #TRAP_RETINT // tk_ret_int() +#else + jmp @Csym(tk_ret_int_impl) +#endif + +#endif /* USE_HLL_INTHDR */ + +/* + * _tk_ret_int() + * + * tk_ret_int() processing + * When called, the interrupt stack is configured as shown below. + * High Address +---------------+ + * | SPC(24bit) | Saved when interrupt occur + * | SCCR(8bit) | + * | ER0(32bit) | + * SSP => | ER1(32bit) | + * +---------------+ + * | SPC(24bit) | Save by 'trapa TRAP_RETINT' + * SSP => | SCCR(8bit) | + * Low Address +---------------+ + */ + .text + .balign 2 + .globl Csym(tk_ret_int_impl) +Csym(tk_ret_int_impl): + /* During interrupt disable CCR.I=1 */ +#if USE_TRAP + add.l #4, er7 // Trash parts saved by 'trapa TRAP_RETINT' +#endif + + mov.w @Csym(knl_int_nest), r0 // Is it a nesting interrupt? + dec.w #1, r0 + mov.w r0, @Csym(knl_int_nest) + bne l_nodispatch + + mov.w @(2*4, er7), r0 // CCR when EIT occurs + and.b #CCR_I, r0h // Is it an exception during interrupt disable? + bne l_nodispatch + + mov.w @Csym(knl_dispatch_disabled), r0 // Is it during dispatch disable? + bne l_nodispatch + + mov.l @Csym(knl_ctxtsk), er0 // Is dispatch required? + mov.l @Csym(knl_schedtsk), er1 + cmp er0, er1 + beq l_nodispatch + + pop.l er1 // ER0, ER1 restore + pop.l er0 + jmp _ret_int_dispatch // To dispatch processing + + l_nodispatch: // Dispatch not required + pop.l er1 // ER0, ER1 restore + pop.l er0 + rte + + +/* ------------------------------------------------------------------------ */ + +#if USE_TRAP | USE_DBGSPT | CFN_MAX_SSYID > 0 +/* + * Unsupported system call + */ + .text + .balign 2 + .globl Csym(knl_no_support) +Csym(knl_no_support): + mov.l #E_RSFN, er0 + rts + +/* + * System call entry table + */ +#if USE_TRAP | (USE_DBGSPT & USE_HOOK_TRACE) + .text + .balign 2 +_svctbl: + .long Csym(knl_no_support) +#define tk_ret_int_impl knl_no_support +#include +#undef tk_ret_int_impl +#endif /* USE_TRAP | USE_DBGSPT */ + +/* + * System call entry + * Do not need to save the temporary register. + * The compiler saves the permanent register. + * + * High Address +-------------------+ + * +16 | 5th arg (low) | + * +14 | 5th arg (high) | + * +12 | 4th arg (low) | + * +10 | 4th arg (high) | + * + 8 | PC (low) | + * + 6 | PC (high) | saved by I/F call + * + 4 | R0 | + * + 2 | PC (low) | saved by trapa + * er7, er5 => + 0 | CCR:PC (high) | + * Low Address +-------------------+ + * <-- 16bit width --> + * + * Function code is set in R0 + */ + .text + .balign 2 + .globl Csym(knl_call_entry) +Csym(knl_call_entry): + + push.l er4 // er4, er6 = working register + push.l er5 // er6 is used for pass fncd + push.l er6 // between hook_enter and hook_leave + + mov.l er7, er5 // er5 = frame pointer + +#if USE_TRAP + mov.w @(3*4, er7), r4 // SCCR + ldc r4h, ccr +#else +#if CFN_MAX_SSYID > 0 + mov.w r0, r0 // < 0: System call + // >= 0: Extended SVC + blt l_set_retccr + + mov.w @(3*4, er7), r4 // SCCR + ldc r4h, ccr + bra l_set_end +l_set_retccr: +#endif + mov.w @(3*4, er7), r4 // SCCR + stc ccr, r4h + mov.w r4, @(3*4, er7) +l_set_end: +#endif + + /* The interrupt disable state keeps the caller's state CCR.I=? */ + + mov.w r0, r4 // r4 := Function code + bpl l_esvc_function + +#if USE_TRAP | (USE_DBGSPT & USE_HOOK_TRACE) + /* micro T-Kernel system call */ + and.b #0x0f, r4l // Number of arguments + cmp.b #3, r4l + ble l_nocopy + cmp.b #4, r4l + ble l_copy4 + mov.l @(3*4 + 14, er5), er4 // Copy fifth argument + mov.l er4, @-er7 + l_copy4: + mov.l @(3*4 + 10, er5), er4 // Copy fourth argument + mov.l er4, @-er7 + l_nocopy: + + and.w #0x0ff0, r0 // r0 = function No. << 4 + shlr.w r0 // r0 = function No. << 3 + shlr.w r0 // r0 = function No. << 2 + mov.w r0, r4 + extu.l er4 // er4 = function No. * 4 + mov.w @(3*4 + 4, er5), r0 // restore first argument + mov.l @(_svctbl, er4), er4 + jsr @er4 // micro T-Kernel system call +#else + bra l_illegal_svc +#endif + + l_retsvc: + // Interrupt disable + orc #CCR_I, ccr + + mov.l er5, er7 + pop.l er6 + pop.l er5 + pop.l er4 + rte + + l_illegal_svc: + mov.l #E_RSFN, er0 + bra l_retsvc + + l_esvc_function: +#if CFN_MAX_SSYID > 0 +/* + * High Address +-------------------+ + * +38 | 5th arg (low) | + * +36 | 5th arg (high) | + * +34 | 4th arg (low) | + * +32 | 4th arg (high) | + * +30 | PC (low) | saved by I/F call + * +28 | PC (high) | + * +26 | 2nd arg (low) | + * +24 | 2nd arg (high) | + * +22 | 1st arg (low) | + * pk_para(r1) => +20 | 1st arg (high) | + * +18 | 3rd arg (low) | + * +16 | 3rd arg (high) | + * +14 | PC (low) | saved by trapa + * +12 | CCR:PC (high) | + * +10 | R4 | + * + 8 | E4 | + * + 6 | R5 | + * + 4 | E5 | + * + 2 | R6 | + * er7, er5 => + 0 | E6 | + * Low Address +-------------------+ + * <-- 16bit width --> + * + * Function code is set in R0 + */ + /* Extended SVC */ + mov.l @(28, er7), er4 // save ret-address(I/F) to ER4 + mov.l @(16, er7), er2 // arg3 + mov.l er2, @(28, er7) + mov.l er1, er2 // save ER1 (pk_para) to ER2 + mov.w r0, r1 // R1 = Function code + mov.l er2, er0 // restore pk_para to ER0 + jsr Csym(knl_svc_ientry) // svc_ientry(pk_para, fncd) + + mov.l er4, @(28, er7) // restore ret-address(I/F) + + bra l_retsvc +#else + mov.l #E_SYS, er0 + bra l_retsvc +#endif /* CFN_MAX_SSYID > 0 */ + +#endif /* USE_TRAP | USE_DBGSPT | CFN_MAX_SSYID > 0 */ + +/* ------------------------------------------------------------------------ */ +/* + * High level programming language routine for timer handler + */ + .text + .balign 2 + .globl Csym(knl_timer_handler_startup) +Csym(knl_timer_handler_startup): + /* During interrupt disable CCR.I=1 */ + push.l er0 + push.l er1 + push.l er2 + push.l er3 + push.l er4 + push.l er5 + push.l er6 + + mov.w @Csym(knl_taskindp), r6 // enter task independent mode + inc.w #1, r6 + mov.w r6, @Csym(knl_taskindp) + + mov.w @Csym(knl_int_nest), r2 // interrupt nest count + mov.w r2, r5 + inc.w #1, r2 + mov.w r2, @Csym(knl_int_nest) + + mov.w r5, r5 + bne l_no_change_sp_timerhdr // multiple interrupt + + mov.l er7, er2 + mov.l #RI_INTSTACK, er7 // change to ISP + mov.l er2, @-er7 // SSP save + l_no_change_sp_timerhdr: + + jsr @Csym(knl_timer_handler) // call timer_handler() + + orc.b #CCR_I, ccr // Interrupt disable + + /* During interrupt disable CCR.I=1 */ + mov.w r5, r5 + bne l_no_change_sp2_timerhdr // multiple interrupt + + mov.l @er7+, er2 // ER2 = SSP + mov.l er2, er7 + l_no_change_sp2_timerhdr: + + dec.w #1, r6 + mov.w r6, @Csym(knl_taskindp) + + pop.l er6 + pop.l er5 + pop.l er4 + pop.l er3 + pop.l er2 + +#if USE_TRAP + trapa #TRAP_RETINT // tk_ret_int() +#else + jmp @Csym(tk_ret_int_impl) +#endif + diff --git a/kernel/sysdepend/cpu/h83069/cpu_task.h b/kernel/sysdepend/cpu/h83069/cpu_task.h new file mode 100644 index 0000000..f876041 --- /dev/null +++ b/kernel/sysdepend/cpu/h83069/cpu_task.h @@ -0,0 +1,84 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * cpu_task.h (H83069) + * CPU-Dependent Task Start Processing + */ + +#ifndef _CPU_TASK_ +#define _CPU_TASK_ + +#include "cpu_insn.h" + +/* + * System stack configuration at task startup + */ +typedef struct { + UW er[7]; /* er6-er0 */ + UW sccr_spc; +} SStackFrame; + + +/* + * Size of system stack area destroyed by 'make_dormant()' + * In other words, the size of area required to write by 'setup_context().' + */ +#define DORMANT_STACK_SIZE ( sizeof(VW) * 1 ) /* To 'sccr_spc' position */ + +/* + * Initial value for task startup + */ +#define INIT_CCR ( 0 ) + +/* + * Create stack frame for task startup + * Call from 'make_dormant()' + */ +Inline void knl_setup_context( TCB *tcb ) +{ + SStackFrame *ssp; + UW ccr; + + ssp = tcb->isstack; + ssp--; + + ccr = INIT_CCR; + + /* CPU context initialization */ + /* Initial CCR */ /* Task startup address */ + ssp->sccr_spc = (ccr << 24) | ((UW)tcb->task & 0x00ffffffUL); + tcb->tskctxb.ssp = ssp; /* System stack */ +} + +/* + * Set task startup code + * Called by 'tk_sta_tsk()' processing. + */ +Inline void knl_setup_stacd( TCB *tcb, INT stacd ) +{ + SStackFrame *ssp = tcb->tskctxb.ssp; + + ssp->er[6] = stacd; /* er0 */ + ssp->er[5] = (VW)tcb->exinf; /* er1 */ +} + +/* + * Delete task contexts + */ +Inline void knl_cleanup_context( TCB *tcb ) +{ +} + +#endif /* _CPU_TASK_ */ diff --git a/kernel/sysdepend/cpu/h83069/func/.dummy b/kernel/sysdepend/cpu/h83069/func/.dummy new file mode 100644 index 0000000..421376d --- /dev/null +++ b/kernel/sysdepend/cpu/h83069/func/.dummy @@ -0,0 +1 @@ +dummy diff --git a/kernel/sysdepend/device/app_h83052/devinit.c b/kernel/sysdepend/device/app_h83052/devinit.c new file mode 100644 index 0000000..87823ad --- /dev/null +++ b/kernel/sysdepend/device/app_h83052/devinit.c @@ -0,0 +1,101 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * devinit.c (H8/3052) + * Device-Dependent Initialization + */ + +#include "sysinit.h" +#include "kernel.h" +#include +#include +#include + + +/* ------------------------------------------------------------------------ */ + +/* + * Initialization before micro T-Kernel starts + */ +EXPORT ER knl_init_device( void ) +{ + return E_OK; +} + +/* ------------------------------------------------------------------------ */ +/* + * Start processing after T-Kernel starts + * Called from the initial task contexts. + */ +EXPORT ER knl_start_device( void ) +{ + return E_OK; +} + +#if USE_CLEANUP +/* ------------------------------------------------------------------------ */ +/* + * System finalization + * Called just before system shutdown. + * Execute finalization that must be done before system shutdown. + */ +EXPORT ER knl_finish_device( void ) +{ + return E_OK; +} + +/* ------------------------------------------------------------------------ */ +/* + * Re-starting processing + */ + +/* + * Re-starting processing + * mode = -1 Reset and re-start (cold boot) + * mode = -2 Re-start (warm boot) + * mode = -3 Reboot (normal boot) + * mode = 0xFFhhmmss Re-start at hh:mm:ss + * 0 <= hh < 24, 0 <= mm,ss < 60 + */ +EXPORT ER knl_restart_device( W mode ) +{ + if ( mode == -1 ) { + /* Reset and re-start (cold boot) */ +#if USE_KERNEL_MESSAGE + tm_putstring((UB*)"\n<< SYSTEM RESTART >>\n"); +#endif + tm_exit(-1); /* no return */ + return E_OBJ; + } + + if ( mode == -3 ) { +#if USE_KERNEL_MESSAGE + tm_putstring((UB*)"\n<< SYSTEM REBOOT >>\n"); +#endif + return E_NOSPT; + } + + if ( mode == -2 ) { + return E_NOSPT; /* Unsupported */ + } + + if ( (mode & 0xff000000) == 0xff000000 ) { + /* Re-start at specified time */ + return E_NOSPT; /* Unsupported */ + } + + return E_PAR; +} +#endif /* USE_CLEANUP */ diff --git a/kernel/sysdepend/device/app_h83052/icrt0.S b/kernel/sysdepend/device/app_h83052/icrt0.S new file mode 100644 index 0000000..eda739b --- /dev/null +++ b/kernel/sysdepend/device/app_h83052/icrt0.S @@ -0,0 +1,119 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#) icrt0.S + */ + +#include "utk_config.h" + +#include +#include + + .h8300h + +#if USE_IMALLOC + /* Low level memory manager information */ + .comm Csym(knl_lowmem_top), 4 // Head of area (Low address) + .comm Csym(knl_lowmem_limit), 4 // End of area (High address) +#endif + + .section .text + .align 2 + .global Csym(start) +Csym(start): + mov.l #RI_INTSTACK, er7 + + ldc.b #0xc0, ccr + + mov.l #__vector_start, er2 /* dst address */ + beq vector_done /* if rom_vector (0x00000000) */ + mov.l #__vector_end, er3 + + cmp.l er2, er3 + ble vector_done /* if __vector_start >= __vector_end */ + + mov.l #__vector_org, er1 /* src address */ + +vector_loop: + mov.l @er1+, er0 + mov.l er0, @er2 + add.l #4, er2 + + cmp.l er2, er3 + bgt vector_loop /* if er2 < __data_end */ + +vector_done: + + mov.l #__data_start, er2 /* dst address */ + mov.l #__data_end, er3 + + cmp.l er2, er3 + ble data_done /* if __data_start >= __data_end */ + + mov.l #__data_org, er1 /* src address */ + +data_loop: + mov.l @er1+, er0 + mov.l er0, @er2 + add.l #4, er2 + + cmp.l er2, er3 + bgt data_loop /* if er2 < __data_end */ + +data_done: + +#if USE_NOINIT + mov.l #__noinit_end, er2 /* dst address */ +#else + /* .bss */ + mov.l #__bss_start, er2 /* dst address */ +#endif + mov.l #__bss_end, er3 + + cmp.l er2, er3 + ble bss_done /* if __bss_start >= __bss_end */ + + sub.l er0, er0 +bss_loop: + mov.l er0, @er2 + add #4, er2 + cmp.l er2, er3 + bgt bss_loop /* if er2 < __bss_end */ + +bss_done: + +#if USE_IMALLOC + mov.l #SYSTEMAREA_TOP, er5 + cmp.l er5, er3 /* _end or RAM_TOP */ + bge no_mov /* if er5 <= er3 */ + mov.l er5, er3 +no_mov: + + mov.l er3, @Csym(knl_lowmem_top) /* knl_lowmem_top = _end or RAM_TOP */ + mov.l #SYSTEMAREA_END, er3 + mov.l er3, @Csym(knl_lowmem_limit) /* knl_lowmem_limit = RAM_END */ +#endif + +serial_init: + jsr @Csym(sio_init) /* initialize serial I/O */ + +kernel_start: + sub.l er0, er0 + jsr @Csym(main) +loop_trap: + bra loop_trap + + +#include "vector.S" diff --git a/kernel/sysdepend/device/app_h83052/inthdr_startup.S b/kernel/sysdepend/device/app_h83052/inthdr_startup.S new file mode 100644 index 0000000..892d180 --- /dev/null +++ b/kernel/sysdepend/device/app_h83052/inthdr_startup.S @@ -0,0 +1,89 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * interrupt entry routines (included from vector.S) + */ + +#include + + .section .text + .align 2 + +INT_ENTRY 1 +INT_ENTRY 2 +INT_ENTRY 3 +INT_ENTRY 4 +INT_ENTRY 5 +INT_ENTRY 6 +INT_ENTRY 7 +#if !USE_TRAP +INT_ENTRY 8 +#endif +#if (!USE_TRAP) & (CFN_MAX_SSYID <= 0) +INT_ENTRY 9 +#endif +#if !USE_TRAP +INT_ENTRY 10 +#endif +INT_ENTRY 11 +INT_ENTRY 12 +INT_ENTRY 13 +INT_ENTRY 14 +INT_ENTRY 15 +INT_ENTRY 16 +INT_ENTRY 17 +INT_ENTRY 18 +INT_ENTRY 19 +INT_ENTRY 20 +INT_ENTRY 21 +INT_ENTRY 22 +INT_ENTRY 23 +//INT_ENTRY 24 /* timer */ +INT_ENTRY 25 +INT_ENTRY 26 +INT_ENTRY 27 +INT_ENTRY 28 +INT_ENTRY 29 +INT_ENTRY 30 +INT_ENTRY 31 +INT_ENTRY 32 +INT_ENTRY 33 +INT_ENTRY 34 +INT_ENTRY 35 +INT_ENTRY 36 +INT_ENTRY 37 +INT_ENTRY 38 +INT_ENTRY 39 +INT_ENTRY 40 +INT_ENTRY 41 +INT_ENTRY 42 +INT_ENTRY 43 +INT_ENTRY 44 +INT_ENTRY 45 +INT_ENTRY 46 +INT_ENTRY 47 +INT_ENTRY 48 +INT_ENTRY 49 +INT_ENTRY 50 +INT_ENTRY 51 +INT_ENTRY 52 +INT_ENTRY 53 +INT_ENTRY 54 +INT_ENTRY 55 +INT_ENTRY 56 +INT_ENTRY 57 +INT_ENTRY 58 +INT_ENTRY 59 +INT_ENTRY 60 diff --git a/kernel/sysdepend/device/app_h83052/patch.c b/kernel/sysdepend/device/app_h83052/patch.c new file mode 100644 index 0000000..180114e --- /dev/null +++ b/kernel/sysdepend/device/app_h83052/patch.c @@ -0,0 +1,43 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * patch.c (H8/3052) + * System-dependent initialize process + */ + +#include +#include +#include +#include "patch.h" + +#if USE_SYSDEPEND_PATCH1 +/* + * System-dependent processes (before start_system) + */ +EXPORT void sysdepend_patch1( void ) +{ + /* Do nothing */ +} +#endif + +#if USE_SYSDEPEND_PATCH2 +/* + * System-dependent processes (after start_system) + */ +EXPORT void sysdepend_patch2( void ) +{ + /* Do nothing */ +} +#endif diff --git a/kernel/sysdepend/device/app_h83052/patch.h b/kernel/sysdepend/device/app_h83052/patch.h new file mode 100644 index 0000000..70b68de --- /dev/null +++ b/kernel/sysdepend/device/app_h83052/patch.h @@ -0,0 +1,30 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * patch.h (H8/3052) + * System-dependent initialize process + */ + +#ifndef _PATCH_ +#define _PATCH_ + +/* Define '1' when using patch processes */ +#define USE_SYSDEPEND_PATCH1 0 +#define USE_SYSDEPEND_PATCH2 0 + +EXPORT void sysdepend_patch1( void ); +EXPORT void sysdepend_patch2( void ); + +#endif /* _PATCH_ */ diff --git a/kernel/sysdepend/device/app_h83052/power.c b/kernel/sysdepend/device/app_h83052/power.c new file mode 100644 index 0000000..10c8d84 --- /dev/null +++ b/kernel/sysdepend/device/app_h83052/power.c @@ -0,0 +1,34 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * power.c (H8/3052) + * Power-Saving Function + */ + +#include "sysmgr.h" + +/* + * Switch to power-saving mode + */ +EXPORT void knl_low_pow( void ) +{ +} + +/* + * Move to suspend mode + */ +EXPORT void knl_off_pow( void ) +{ +} diff --git a/kernel/sysdepend/device/app_h83052/tkdev_conf.h b/kernel/sysdepend/device/app_h83052/tkdev_conf.h new file mode 100644 index 0000000..fd6d2a6 --- /dev/null +++ b/kernel/sysdepend/device/app_h83052/tkdev_conf.h @@ -0,0 +1,26 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * tkdev_conf.h (H8/3052) + * Target System Configuration + */ + +#ifndef _TKDEV_CONF_ +#define _TKDEV_CONF_ +/* Also included from assembler source */ + +#define TMP_STACK_SZ (128) + +#endif /* _TKDEV_CONF_ */ diff --git a/kernel/sysdepend/device/app_h83052/tkdev_init.c b/kernel/sysdepend/device/app_h83052/tkdev_init.c new file mode 100644 index 0000000..f367668 --- /dev/null +++ b/kernel/sysdepend/device/app_h83052/tkdev_init.c @@ -0,0 +1,55 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * tkdev_init.c (H8/3052) + * micro T-Kernel Device-Dependent Initialization/Finalization + */ + +#include "kernel.h" +#include +#include +#include + + + + +/* + * Target system-dependent initialization + */ +EXPORT ER knl_tkdev_initialize( void ) +{ + /* system clock must be default setting, same as CPU clock */ + + // do nothing now, but do something what you need... + + return E_OK; +} + +#if USE_CLEANUP +/* + * Target system-dependent finalization + * No return from this function. + */ +EXPORT void knl_tkdev_exit( void ) +{ + disint(); + tm_exit(0); /* Turn off power and exit */ + + /* Not suppose to return from 'tm_exit,' but just in case */ + for ( ;; ) { + tm_monitor(); /* To T-Monitor equivalent function */ + } +} +#endif /* USE_CLEANUP */ diff --git a/kernel/sysdepend/device/app_h83052/tkdev_timer.h b/kernel/sysdepend/device/app_h83052/tkdev_timer.h new file mode 100644 index 0000000..f7904bd --- /dev/null +++ b/kernel/sysdepend/device/app_h83052/tkdev_timer.h @@ -0,0 +1,165 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * tkdev_timer.h (H8/3052) + * Hardware-Dependent Timer Processing + */ + +#ifndef _TKDEV_TIMER_ +#define _TKDEV_TIMER_ + +#include +#include +#include +#include "tkdev_conf.h" + +/* + * Settable interval range (millisecond) + */ +#define MIN_TIMER_PERIOD 1 +#define MAX_TIMER_PERIOD 20 + +/* + * Timer definition + */ +#define MSTCR ((_UB *)0x00ffff5e) + +#define TSTR ((_UB *)0x00ffff60) +#define TSNC ((_UB *)0x00ffff61) +#define TMDR ((_UB *)0x00ffff62) + +#define TCR ((_UB *)0x00ffff64) // 16bit Timer #0 +#define TIOR ((_UB *)0x00ffff65) +#define TIER ((_UB *)0x00ffff66) +#define TSR ((_UB *)0x00ffff67) +#define TCNT ((_UH *)0x00ffff68) +#define GRA ((_UH *)0x00ffff6a) +#define GRB ((_UH *)0x00ffff6c) + +#define MSTOP5 (1 << 5) + +#define TSTR_STR (1 << 0) +#define TSNC_SYNC TSTR_STR +#define TMDR_PWM TSTR_STR + +#define TIER_IMIEA (1 << 0) +#define TIER_IMIEB (1 << 1) +#define TIER_OVIE (1 << 2) + +#define TSR_IMFA TIER_IMIEA +#define TSR_IMFB TIER_IMIEB +#define TSR_OVF TIER_OVIE + +#define TCR_CCLR0 (1 << 5) +#define TCR_TPSC1 (1 << 1) +#define TCR_TPSC0 (1 << 0) + +/* + * Set timer + */ +Inline void knl_init_hw_timer( void ) +{ + /* module power on */ + *MSTCR &= ~MSTOP5; + + /* disable timer interrupt */ + *TIER = 0x00; + + /* initialize timer */ + *TSTR &= ~TSTR_STR; + *TSNC &= ~TSNC_SYNC; + *TMDR &= ~TMDR_PWM; + + *TCR = TCR_CCLR0 | TCR_TPSC1 | TCR_TPSC0; + *TIOR = 0x00; + *TCNT = 0x0000; + *GRA = (CPU_CLOCK / (1000 * 8)) * CFN_TIMER_PERIOD - 1; + *GRB = ~0; + + /* clear interrupt */ + *TSR &= ~(TSR_IMFA | TSR_IMFB | TSR_OVF); +} + +/* + * Timer start processing + * Initialize the timer and start the periodical timer interrupt. + */ +Inline void knl_start_hw_timer( void ) +{ + /* Set timer */ + knl_init_hw_timer(); + + /* start timer */ + *TSTR |= TSTR_STR; + + /* enable interrupt */ + *TIER |= TIER_IMIEA; +} + +/* + * Clear timer interrupt + * Clear the timer interrupt request. Depending on the type of + * hardware, there are two timings for clearing: at the beginning + * and the end of the interrupt handler. + * 'clear_hw_timer_interrupt()' is called at the beginning of the + * timer interrupt handler. + * 'end_of_hw_timer_interrupt()' is called at the end of the timer + * interrupt handler. + * Use either or both according to hardware. + */ +Inline void knl_clear_hw_timer_interrupt( void ) +{ + *TSR &= ~TSR_IMFA; +} +Inline void knl_end_of_hw_timer_interrupt( void ) +{ + /* Nothing required to do at this point */ +} + +/* + * Timer stop processing + * Stop the timer operation. + * Called when system stops. + */ +Inline void knl_terminate_hw_timer( void ) +{ + /* disable timer interrupt */ + *TIER = 0x00; + + /* stop timer */ + *TSTR &= ~TSTR_STR; + + /* clear interrupt */ + *TSR &= ~(TSR_IMFA | TSR_IMFB | TSR_OVF); + + /* module power off */ + *MSTCR |= MSTOP5; +} + +/* + * Get processing time from the previous timer interrupt to the + * current (nanosecond) + * Consider the possibility that the timer interrupt occurred + * during the interrupt disable and calculate the processing time + * within the following + * range: 0 <= Processing time < CFN_TIMER_PERIOD * 2 + */ +Inline UW knl_get_hw_timer_nsec( void ) +{ + // XXX not supported + return 0; +} + +#endif /* _TKDEV_TIMER_ */ diff --git a/kernel/sysdepend/device/app_h83052/vector.S b/kernel/sysdepend/device/app_h83052/vector.S new file mode 100644 index 0000000..e91b8eb --- /dev/null +++ b/kernel/sysdepend/device/app_h83052/vector.S @@ -0,0 +1,190 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * Vector table + */ + +#include "utk_config.h" + + +#define int_ill loop_trap + + .section .vector, "a" + .align 2 + + .global __reset + +#if !USE_FULL_VECTOR +__reset: + .long Csym(start) /* 0: reset */ + .long int_ill /* 1: reserved */ + .long int_ill /* 2: reserved */ + .long int_ill /* 3: reserved */ + .long int_ill /* 4: reserved */ + .long int_ill /* 5: reserved */ + .long int_ill /* 6: reserved */ + .long int_ill /* 7: NMI */ +#if USE_TRAP + .long Csym(knl_dispatch_entry) /* 8: trap (#0) */ +#else + .long int_ill /* 8: trap (#0) */ +#endif +#if USE_TRAP | CFN_MAX_SSYID > 0 + .long Csym(knl_call_entry) /* 9: trap (#1) */ +#else + .long int_ill /* 9: trap (#1) */ +#endif +#if USE_TRAP + .long Csym(tk_ret_int_impl) /* 10: trap (#2) */ +#else + .long int_ill /* 10: trap (#2) */ +#endif + .long int_ill /* 11: trap (#3) */ + .long int_ill /* 12: IRQ0 */ + .long int_ill /* 13: IRQ1 */ + .long int_ill /* 14: IRQ2 */ + .long int_ill /* 15: IRQ3 */ + .long int_ill /* 16: IRQ4 */ + .long int_ill /* 17: IRQ5 */ + .long int_ill /* 18: reserved */ + .long int_ill /* 19: reserved */ + .long int_ill /* 20: WOVI */ + .long int_ill /* 21: CMI */ + .long int_ill /* 22: reserved */ + .long int_ill /* 23: reserved */ + .long Csym(knl_timer_handler_startup) /* 24: IMIA0 */ + .long int_ill /* 25: IMIB0 */ + .long int_ill /* 26: OVI0 */ + .long int_ill /* 27: reserved */ + .long int_ill /* 28: IMIA1 */ + .long int_ill /* 29: IMIB1 */ + .long int_ill /* 30: OVI1 */ + .long int_ill /* 31: reserved */ + .long int_ill /* 32: IMIA2 */ + .long int_ill /* 33: IMIB2 */ + .long int_ill /* 34: OVI2 */ + .long int_ill /* 35: reserved */ + .long int_ill /* 36: IMIA3 */ + .long int_ill /* 37: IMIB3 */ + .long int_ill /* 38: OVI3 */ + .long int_ill /* 39: reserved */ + .long int_ill /* 40: IMIA4 */ + .long int_ill /* 41: IMIB4 */ + .long int_ill /* 42: OVI4 */ + .long int_ill /* 43: reserved */ + .long int_ill /* 44: DEND0A */ + .long int_ill /* 45: DEND0B */ + .long int_ill /* 46: DEND1A */ + .long int_ill /* 47: DEND1B */ + .long int_ill /* 48: reserved */ + .long int_ill /* 49: reserved */ + .long int_ill /* 50: reserved */ + .long int_ill /* 51: reserved */ + .long int_ill /* 52: ERI0 */ + .long int_ill /* 53: RXI0 */ + .long int_ill /* 54: TXI0 */ + .long int_ill /* 55: TEI0 */ + .long int_ill /* 56: ERI1 */ + .long int_ill /* 57: RXI1 */ + .long int_ill /* 58: TXI1 */ + .long int_ill /* 59: TEI1 */ + .long int_ill /* 60: ADI */ + .long int_ill /* 61: ---- */ + .long int_ill /* 62: ---- */ + .long int_ill /* 63: ---- */ + +#else /* USE_FULL_VECTOR */ + +__reset: + .long Csym(start) /* 0: reset */ + .long knl_inthdr_entry1 /* 1: reserved */ + .long knl_inthdr_entry2 /* 2: reserved */ + .long knl_inthdr_entry3 /* 3: reserved */ + .long knl_inthdr_entry4 /* 4: reserved */ + .long knl_inthdr_entry5 /* 5: reserved */ + .long knl_inthdr_entry6 /* 6: reserved */ + .long knl_inthdr_entry7 /* 7: NMI */ +#if USE_TRAP + .long Csym(knl_dispatch_entry) /* 8: trap (#0) */ +#else + .long knl_inthdr_entry8 /* 8: trap (#0) */ +#endif +#if USE_TRAP | CFN_MAX_SSYID > 0 + .long Csym(knl_call_entry) /* 9: trap (#1) */ +#else + .long knl_inthdr_entry9 /* 9: trap (#1) */ +#endif +#if USE_TRAP + .long Csym(tk_ret_int_impl) /* 10: trap (#2) */ +#else + .long knl_inthdr_entry10 /* 10: trap (#2) */ +#endif + .long knl_inthdr_entry11 /* 11: trap (#3) */ + .long knl_inthdr_entry12 /* 12: IRQ0 */ + .long knl_inthdr_entry13 /* 13: IRQ1 */ + .long knl_inthdr_entry14 /* 14: IRQ2 */ + .long knl_inthdr_entry15 /* 15: IRQ3 */ + .long knl_inthdr_entry16 /* 16: IRQ4 */ + .long knl_inthdr_entry17 /* 17: IRQ5 */ + .long knl_inthdr_entry18 /* 18: reserved */ + .long knl_inthdr_entry19 /* 19: reserved */ + .long knl_inthdr_entry20 /* 20: WOVI */ + .long knl_inthdr_entry21 /* 21: CMI */ + .long knl_inthdr_entry22 /* 22: reserved */ + .long knl_inthdr_entry23 /* 23: reserved */ + .long Csym(knl_timer_handler_startup) /* 24: IMIA0 */ + .long knl_inthdr_entry25 /* 25: IMIB0 */ + .long knl_inthdr_entry26 /* 26: OVI0 */ + .long knl_inthdr_entry27 /* 27: reserved */ + .long knl_inthdr_entry28 /* 28: IMIA1 */ + .long knl_inthdr_entry29 /* 29: IMIB1 */ + .long knl_inthdr_entry30 /* 30: OVI1 */ + .long knl_inthdr_entry31 /* 31: reserved */ + .long knl_inthdr_entry32 /* 32: IMIA2 */ + .long knl_inthdr_entry33 /* 33: IMIB2 */ + .long knl_inthdr_entry34 /* 34: OVI2 */ + .long knl_inthdr_entry35 /* 35: reserved */ + .long knl_inthdr_entry36 /* 36: IMIA3 */ + .long knl_inthdr_entry37 /* 37: IMIB3 */ + .long knl_inthdr_entry38 /* 38: OVI3 */ + .long knl_inthdr_entry39 /* 39: reserved */ + .long knl_inthdr_entry40 /* 40: IMIA4 */ + .long knl_inthdr_entry41 /* 41: IMIB4 */ + .long knl_inthdr_entry42 /* 42: OVI4 */ + .long knl_inthdr_entry43 /* 43: reserved */ + .long knl_inthdr_entry44 /* 44: DEND0A */ + .long knl_inthdr_entry45 /* 45: DEND0B */ + .long knl_inthdr_entry46 /* 46: DEND1A */ + .long knl_inthdr_entry47 /* 47: DEND1B */ + .long knl_inthdr_entry48 /* 48: reserved */ + .long knl_inthdr_entry49 /* 49: reserved */ + .long knl_inthdr_entry50 /* 50: reserved */ + .long knl_inthdr_entry51 /* 51: reserved */ + .long knl_inthdr_entry52 /* 52: ERI0 */ + .long knl_inthdr_entry53 /* 53: RXI0 */ + .long knl_inthdr_entry54 /* 54: TXI0 */ + .long knl_inthdr_entry55 /* 55: TEI0 */ + .long knl_inthdr_entry56 /* 56: ERI1 */ + .long knl_inthdr_entry57 /* 57: RXI1 */ + .long knl_inthdr_entry58 /* 58: TXI1 */ + .long knl_inthdr_entry59 /* 59: TEI1 */ + .long knl_inthdr_entry60 /* 60: ADI */ + .long int_ill /* 61: ---- */ + .long int_ill /* 62: ---- */ + .long int_ill /* 63: ---- */ + +#include "inthdr_startup.S" + +#endif /* !USE_FULL_VECTOR */ diff --git a/kernel/sysdepend/device/app_h83069/devinit.c b/kernel/sysdepend/device/app_h83069/devinit.c new file mode 100644 index 0000000..1df5738 --- /dev/null +++ b/kernel/sysdepend/device/app_h83069/devinit.c @@ -0,0 +1,101 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * devinit.c (H8/3069) + * Device-Dependent Initialization + */ + +#include "sysinit.h" +#include "kernel.h" +#include +#include +#include + + +/* ------------------------------------------------------------------------ */ + +/* + * Initialization before micro T-Kernel starts + */ +EXPORT ER knl_init_device( void ) +{ + return E_OK; +} + +/* ------------------------------------------------------------------------ */ +/* + * Start processing after T-Kernel starts + * Called from the initial task contexts. + */ +EXPORT ER knl_start_device( void ) +{ + return E_OK; +} + +#if USE_CLEANUP +/* ------------------------------------------------------------------------ */ +/* + * System finalization + * Called just before system shutdown. + * Execute finalization that must be done before system shutdown. + */ +EXPORT ER knl_finish_device( void ) +{ + return E_OK; +} + +/* ------------------------------------------------------------------------ */ +/* + * Re-starting processing + */ + +/* + * Re-starting processing + * mode = -1 Reset and re-start (cold boot) + * mode = -2 Re-start (warm boot) + * mode = -3 Reboot (normal boot) + * mode = 0xFFhhmmss Re-start at hh:mm:ss + * 0 <= hh < 24, 0 <= mm,ss < 60 + */ +EXPORT ER knl_restart_device( W mode ) +{ + if ( mode == -1 ) { + /* Reset and re-start (cold boot) */ +#if USE_KERNEL_MESSAGE + tm_putstring((UB*)"\n<< SYSTEM RESTART >>\n"); +#endif + tm_exit(-1); /* no return */ + return E_OBJ; + } + + if ( mode == -3 ) { +#if USE_KERNEL_MESSAGE + tm_putstring((UB*)"\n<< SYSTEM REBOOT >>\n"); +#endif + return E_NOSPT; + } + + if ( mode == -2 ) { + return E_NOSPT; /* Unsupported */ + } + + if ( (mode & 0xff000000) == 0xff000000 ) { + /* Re-start at specified time */ + return E_NOSPT; /* Unsupported */ + } + + return E_PAR; +} +#endif /* USE_CLEANUP */ diff --git a/kernel/sysdepend/device/app_h83069/icrt0.S b/kernel/sysdepend/device/app_h83069/icrt0.S new file mode 100644 index 0000000..eda739b --- /dev/null +++ b/kernel/sysdepend/device/app_h83069/icrt0.S @@ -0,0 +1,119 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#) icrt0.S + */ + +#include "utk_config.h" + +#include +#include + + .h8300h + +#if USE_IMALLOC + /* Low level memory manager information */ + .comm Csym(knl_lowmem_top), 4 // Head of area (Low address) + .comm Csym(knl_lowmem_limit), 4 // End of area (High address) +#endif + + .section .text + .align 2 + .global Csym(start) +Csym(start): + mov.l #RI_INTSTACK, er7 + + ldc.b #0xc0, ccr + + mov.l #__vector_start, er2 /* dst address */ + beq vector_done /* if rom_vector (0x00000000) */ + mov.l #__vector_end, er3 + + cmp.l er2, er3 + ble vector_done /* if __vector_start >= __vector_end */ + + mov.l #__vector_org, er1 /* src address */ + +vector_loop: + mov.l @er1+, er0 + mov.l er0, @er2 + add.l #4, er2 + + cmp.l er2, er3 + bgt vector_loop /* if er2 < __data_end */ + +vector_done: + + mov.l #__data_start, er2 /* dst address */ + mov.l #__data_end, er3 + + cmp.l er2, er3 + ble data_done /* if __data_start >= __data_end */ + + mov.l #__data_org, er1 /* src address */ + +data_loop: + mov.l @er1+, er0 + mov.l er0, @er2 + add.l #4, er2 + + cmp.l er2, er3 + bgt data_loop /* if er2 < __data_end */ + +data_done: + +#if USE_NOINIT + mov.l #__noinit_end, er2 /* dst address */ +#else + /* .bss */ + mov.l #__bss_start, er2 /* dst address */ +#endif + mov.l #__bss_end, er3 + + cmp.l er2, er3 + ble bss_done /* if __bss_start >= __bss_end */ + + sub.l er0, er0 +bss_loop: + mov.l er0, @er2 + add #4, er2 + cmp.l er2, er3 + bgt bss_loop /* if er2 < __bss_end */ + +bss_done: + +#if USE_IMALLOC + mov.l #SYSTEMAREA_TOP, er5 + cmp.l er5, er3 /* _end or RAM_TOP */ + bge no_mov /* if er5 <= er3 */ + mov.l er5, er3 +no_mov: + + mov.l er3, @Csym(knl_lowmem_top) /* knl_lowmem_top = _end or RAM_TOP */ + mov.l #SYSTEMAREA_END, er3 + mov.l er3, @Csym(knl_lowmem_limit) /* knl_lowmem_limit = RAM_END */ +#endif + +serial_init: + jsr @Csym(sio_init) /* initialize serial I/O */ + +kernel_start: + sub.l er0, er0 + jsr @Csym(main) +loop_trap: + bra loop_trap + + +#include "vector.S" diff --git a/kernel/sysdepend/device/app_h83069/inthdr_startup.S b/kernel/sysdepend/device/app_h83069/inthdr_startup.S new file mode 100644 index 0000000..d7ab976 --- /dev/null +++ b/kernel/sysdepend/device/app_h83069/inthdr_startup.S @@ -0,0 +1,92 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * interrupt entry routines (included from vector.S) + */ + +#include + + .section .text + .align 2 + +INT_ENTRY 1 +INT_ENTRY 2 +INT_ENTRY 3 +INT_ENTRY 4 +INT_ENTRY 5 +INT_ENTRY 6 +INT_ENTRY 7 +#if !USE_TRAP +INT_ENTRY 8 +#endif +#if (!USE_TRAP) & (CFN_MAX_SSYID <= 0) +INT_ENTRY 9 +#endif +#if !USE_TRAP +INT_ENTRY 10 +#endif +INT_ENTRY 11 +INT_ENTRY 12 +INT_ENTRY 13 +INT_ENTRY 14 +INT_ENTRY 15 +INT_ENTRY 16 +INT_ENTRY 17 +INT_ENTRY 18 +INT_ENTRY 19 +INT_ENTRY 20 +INT_ENTRY 21 +INT_ENTRY 22 +INT_ENTRY 23 +//INT_ENTRY 24 /* timer */ +INT_ENTRY 25 +INT_ENTRY 26 +INT_ENTRY 27 +INT_ENTRY 28 +INT_ENTRY 29 +INT_ENTRY 30 +INT_ENTRY 31 +INT_ENTRY 32 +INT_ENTRY 33 +INT_ENTRY 34 +INT_ENTRY 35 +INT_ENTRY 36 +INT_ENTRY 37 +INT_ENTRY 38 +INT_ENTRY 39 +INT_ENTRY 40 +INT_ENTRY 41 +INT_ENTRY 42 +INT_ENTRY 43 +INT_ENTRY 44 +INT_ENTRY 45 +INT_ENTRY 46 +INT_ENTRY 47 +INT_ENTRY 48 +INT_ENTRY 49 +INT_ENTRY 50 +INT_ENTRY 51 +INT_ENTRY 52 +INT_ENTRY 53 +INT_ENTRY 54 +INT_ENTRY 55 +INT_ENTRY 56 +INT_ENTRY 57 +INT_ENTRY 58 +INT_ENTRY 59 +INT_ENTRY 60 +INT_ENTRY 61 +INT_ENTRY 62 +INT_ENTRY 63 diff --git a/kernel/sysdepend/device/app_h83069/patch.c b/kernel/sysdepend/device/app_h83069/patch.c new file mode 100644 index 0000000..52fb6f3 --- /dev/null +++ b/kernel/sysdepend/device/app_h83069/patch.c @@ -0,0 +1,43 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * patch.c (H8/3069) + * System-dependent initialize process + */ + +#include +#include +#include +#include "patch.h" + +#if USE_SYSDEPEND_PATCH1 +/* + * System-dependent processes (before start_system) + */ +EXPORT void sysdepend_patch1( void ) +{ + /* Do nothing */ +} +#endif + +#if USE_SYSDEPEND_PATCH2 +/* + * System-dependent processes (after start_system) + */ +EXPORT void sysdepend_patch2( void ) +{ + /* Do nothing */ +} +#endif diff --git a/kernel/sysdepend/device/app_h83069/patch.h b/kernel/sysdepend/device/app_h83069/patch.h new file mode 100644 index 0000000..4be126a --- /dev/null +++ b/kernel/sysdepend/device/app_h83069/patch.h @@ -0,0 +1,30 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * patch.h (H8/3069) + * System-dependent initialize process + */ + +#ifndef _PATCH_ +#define _PATCH_ + +/* Define '1' when using patch processes */ +#define USE_SYSDEPEND_PATCH1 0 +#define USE_SYSDEPEND_PATCH2 0 + +EXPORT void sysdepend_patch1( void ); +EXPORT void sysdepend_patch2( void ); + +#endif /* _PATCH_ */ diff --git a/kernel/sysdepend/device/app_h83069/power.c b/kernel/sysdepend/device/app_h83069/power.c new file mode 100644 index 0000000..10c4e02 --- /dev/null +++ b/kernel/sysdepend/device/app_h83069/power.c @@ -0,0 +1,34 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * power.c (H8/3069) + * Power-Saving Function + */ + +#include "sysmgr.h" + +/* + * Switch to power-saving mode + */ +EXPORT void knl_low_pow( void ) +{ +} + +/* + * Move to suspend mode + */ +EXPORT void knl_off_pow( void ) +{ +} diff --git a/kernel/sysdepend/device/app_h83069/tkdev_conf.h b/kernel/sysdepend/device/app_h83069/tkdev_conf.h new file mode 100644 index 0000000..b7fd82b --- /dev/null +++ b/kernel/sysdepend/device/app_h83069/tkdev_conf.h @@ -0,0 +1,26 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * tkdev_conf.h (H8/3069) + * Target System Configuration + */ + +#ifndef _TKDEV_CONF_ +#define _TKDEV_CONF_ +/* Also included from assembler source */ + +#define TMP_STACK_SZ (128) + +#endif /* _TKDEV_CONF_ */ diff --git a/kernel/sysdepend/device/app_h83069/tkdev_init.c b/kernel/sysdepend/device/app_h83069/tkdev_init.c new file mode 100644 index 0000000..cbf3e2f --- /dev/null +++ b/kernel/sysdepend/device/app_h83069/tkdev_init.c @@ -0,0 +1,55 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * tkdev_init.c (H8/3069) + * micro T-Kernel Device-Dependent Initialization/Finalization + */ + +#include "kernel.h" +#include +#include +#include + + + + +/* + * Target system-dependent initialization + */ +EXPORT ER knl_tkdev_initialize( void ) +{ + /* system clock must be default setting, same as CPU clock */ + + // do nothing now, but do something what you need... + + return E_OK; +} + +#if USE_CLEANUP +/* + * Target system-dependent finalization + * No return from this function. + */ +EXPORT void knl_tkdev_exit( void ) +{ + disint(); + tm_exit(0); /* Turn off power and exit */ + + /* Not suppose to return from 'tm_exit,' but just in case */ + for ( ;; ) { + tm_monitor(); /* To T-Monitor equivalent function */ + } +} +#endif /* USE_CLEANUP */ diff --git a/kernel/sysdepend/device/app_h83069/tkdev_timer.h b/kernel/sysdepend/device/app_h83069/tkdev_timer.h new file mode 100644 index 0000000..9f704c6 --- /dev/null +++ b/kernel/sysdepend/device/app_h83069/tkdev_timer.h @@ -0,0 +1,174 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * tkdev_timer.h (H8/3069) + * Hardware-Dependent Timer Processing + */ + +#ifndef _TKDEV_TIMER_ +#define _TKDEV_TIMER_ + +#include +#include +#include +#include "tkdev_conf.h" + +/* + * Settable interval range (millisecond) + */ +#define MIN_TIMER_PERIOD 1 +#define MAX_TIMER_PERIOD 20 + +/* + * Timer definition + */ +#define MSTCRL ((_UB *)0x00fee01d) + +#define TSTR ((_UB *)0x00ffff60) +#define TSNC ((_UB *)0x00ffff61) +#define TMDR ((_UB *)0x00ffff62) +#define TISRA ((_UB *)0x00ffff64) +#define TISRB ((_UB *)0x00ffff65) +#define TISRC ((_UB *)0x00ffff66) + +#define TCR ((_UB *)0x00ffff68) // 16bit Timer #0 +#define TIOR ((_UB *)0x00ffff69) +#define TCNT ((_UH *)0x00ffff6a) +#define GRA ((_UH *)0x00ffff6c) +#define GRB ((_UH *)0x00ffff6e) + +#define MSTPL4 (1 << 4) + +#define TSTR_STR (1 << 0) +#define TSNC_SYNC TSTR_STR +#define TMDR_PWM TSTR_STR + +#define TISRA_IMFA TSTR_STR +#define TISRB_IMFB TSTR_STR +#define TISRC_OVF TSTR_STR + +#define TISRA_IMIEA (TSTR_STR << 4) +#define TISRB_IMIEB TISRA_IMIEA +#define TISRC_OVIE TISRA_IMIEA + +#define TCR_CCLR0 (1 << 5) +#define TCR_TPSC1 (1 << 1) +#define TCR_TPSC0 (1 << 0) + +/* + * Set timer + */ +Inline void knl_init_hw_timer( void ) +{ + /* module power on */ + *MSTCRL &= ~MSTPL4; + + /* disable timer interrupt */ + *TISRA &= ~TISRA_IMIEA; + *TISRB &= ~TISRB_IMIEB; + *TISRC &= ~TISRC_OVIE; + + /* initialize timer */ + *TSTR &= ~TSTR_STR; + *TSNC &= ~TSNC_SYNC; + *TMDR &= ~TMDR_PWM; + + *TCR = TCR_CCLR0 | TCR_TPSC1 | TCR_TPSC0; + *TIOR = 0x00; + *TCNT = 0x0000; + *GRA = (CPU_CLOCK / (1000 * 8)) * CFN_TIMER_PERIOD - 1; + *GRB = ~0; + + /* clear interrupt */ + *TISRA &= ~TISRA_IMFA; + *TISRB &= ~TISRB_IMFB; + *TISRC &= ~TISRC_OVF; +} + +/* + * Timer start processing + * Initialize the timer and start the periodical timer interrupt. + */ +Inline void knl_start_hw_timer( void ) +{ + /* Set timer */ + knl_init_hw_timer(); + + /* start timer */ + *TSTR |= TSTR_STR; + + /* enable interrupt */ + *TISRA |= TISRA_IMIEA; +} + +/* + * Clear timer interrupt + * Clear the timer interrupt request. Depending on the type of + * hardware, there are two timings for clearing: at the beginning + * and the end of the interrupt handler. + * 'clear_hw_timer_interrupt()' is called at the beginning of the + * timer interrupt handler. + * 'end_of_hw_timer_interrupt()' is called at the end of the timer + * interrupt handler. + * Use either or both according to hardware. + */ +Inline void knl_clear_hw_timer_interrupt( void ) +{ + *TISRA &= ~TISRA_IMFA; +} +Inline void knl_end_of_hw_timer_interrupt( void ) +{ + /* Nothing required to do at this point */ +} + +/* + * Timer stop processing + * Stop the timer operation. + * Called when system stops. + */ +Inline void knl_terminate_hw_timer( void ) +{ + /* disable timer interrupt */ + *TISRA &= ~TISRA_IMIEA; + *TISRB &= ~TISRB_IMIEB; + *TISRC &= ~TISRC_OVIE; + + /* stop timer */ + *TSTR &= ~TSTR_STR; + + /* clear interrupt */ + *TISRA &= ~TISRA_IMFA; + *TISRB &= ~TISRB_IMFB; + *TISRC &= ~TISRC_OVF; + + /* module power off */ + *MSTCRL |= MSTPL4; +} + +/* + * Get processing time from the previous timer interrupt to the + * current (nanosecond) + * Consider the possibility that the timer interrupt occurred + * during the interrupt disable and calculate the processing time + * within the following + * range: 0 <= Processing time < CFN_TIMER_PERIOD * 2 + */ +Inline UW knl_get_hw_timer_nsec( void ) +{ + // XXX not supported + return 0; +} + +#endif /* _TKDEV_TIMER_ */ diff --git a/kernel/sysdepend/device/app_h83069/vector.S b/kernel/sysdepend/device/app_h83069/vector.S new file mode 100644 index 0000000..e8ff07f --- /dev/null +++ b/kernel/sysdepend/device/app_h83069/vector.S @@ -0,0 +1,190 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * Vector table + */ + +#include "utk_config.h" + + +#define int_ill loop_trap + + .section .vector, "a" + .align 2 + + .global __reset + +#if !USE_FULL_VECTOR +__reset: + .long Csym(start) /* 0: reset */ + .long int_ill /* 1: reserved */ + .long int_ill /* 2: reserved */ + .long int_ill /* 3: reserved */ + .long int_ill /* 4: reserved */ + .long int_ill /* 5: reserved */ + .long int_ill /* 6: reserved */ + .long int_ill /* 7: NMI */ +#if USE_TRAP + .long Csym(knl_dispatch_entry) /* 8: trap (#0) */ +#else + .long int_ill /* 8: trap (#0) */ +#endif +#if USE_TRAP | CFN_MAX_SSYID > 0 + .long Csym(knl_call_entry) /* 9: trap (#1) */ +#else + .long int_ill /* 9: trap (#1) */ +#endif +#if USE_TRAP + .long Csym(tk_ret_int_impl) /* 10: trap (#2) */ +#else + .long int_ill /* 10: trap (#2) */ +#endif + .long int_ill /* 11: trap (#3) */ + .long int_ill /* 12: IRQ0 */ + .long int_ill /* 13: IRQ1 */ + .long int_ill /* 14: IRQ2 */ + .long int_ill /* 15: IRQ3 */ + .long int_ill /* 16: IRQ4 */ + .long int_ill /* 17: IRQ5 */ + .long int_ill /* 18: reserved */ + .long int_ill /* 19: reserved */ + .long int_ill /* 20: WOVI */ + .long int_ill /* 21: CMI */ + .long int_ill /* 22: reserved */ + .long int_ill /* 23: ADI */ + .long Csym(knl_timer_handler_startup) /* 24: IMIA0 */ + .long int_ill /* 25: IMIB0 */ + .long int_ill /* 26: OVI0 */ + .long int_ill /* 27: reserved */ + .long int_ill /* 28: IMIA1 */ + .long int_ill /* 29: IMIB1 */ + .long int_ill /* 30: OVI1 */ + .long int_ill /* 31: reserved */ + .long int_ill /* 32: IMIA2 */ + .long int_ill /* 33: IMIB2 */ + .long int_ill /* 34: OVI2 */ + .long int_ill /* 35: reserved */ + .long int_ill /* 36: CMIA0 */ + .long int_ill /* 37: CMIB0 */ + .long int_ill /* 38: CMIA1/CMIB1 */ + .long int_ill /* 39: TOVI0/TOVI1 */ + .long int_ill /* 40: CMIA2 */ + .long int_ill /* 41: CMIB2 */ + .long int_ill /* 42: CMIA3/CMIB3 */ + .long int_ill /* 43: TOVI2/TOVI3 */ + .long int_ill /* 44: DEND0A */ + .long int_ill /* 45: DEND0B */ + .long int_ill /* 46: DEND1A */ + .long int_ill /* 47: DEND1B */ + .long int_ill /* 48: reserved */ + .long int_ill /* 49: reserved */ + .long int_ill /* 50: reserved */ + .long int_ill /* 51: reserved */ + .long int_ill /* 52: ERI0 */ + .long int_ill /* 53: RXI0 */ + .long int_ill /* 54: TXI0 */ + .long int_ill /* 55: TEI0 */ + .long int_ill /* 56: ERI1 */ + .long int_ill /* 57: RXI1 */ + .long int_ill /* 58: TXI1 */ + .long int_ill /* 59: TEI1 */ + .long int_ill /* 60: ERI2 */ + .long int_ill /* 61: RXI2 */ + .long int_ill /* 62: TXI2 */ + .long int_ill /* 63: TEI2 */ + +#else /* USE_FULL_VECTOR */ + +__reset: + .long Csym(start) /* 0: reset */ + .long knl_inthdr_entry1 /* 1: reserved */ + .long knl_inthdr_entry2 /* 2: reserved */ + .long knl_inthdr_entry3 /* 3: reserved */ + .long knl_inthdr_entry4 /* 4: reserved */ + .long knl_inthdr_entry5 /* 5: reserved */ + .long knl_inthdr_entry6 /* 6: reserved */ + .long knl_inthdr_entry7 /* 7: NMI */ +#if USE_TRAP + .long Csym(knl_dispatch_entry) /* 8: trap (#0) */ +#else + .long knl_inthdr_entry8 /* 8: trap (#0) */ +#endif +#if USE_TRAP | CFN_MAX_SSYID > 0 + .long Csym(knl_call_entry) /* 9: trap (#1) */ +#else + .long knl_inthdr_entry9 /* 9: trap (#1) */ +#endif +#if USE_TRAP + .long Csym(tk_ret_int_impl) /* 10: trap (#2) */ +#else + .long knl_inthdr_entry10 /* 10: trap (#2) */ +#endif + .long knl_inthdr_entry11 /* 11: trap (#3) */ + .long knl_inthdr_entry12 /* 12: IRQ0 */ + .long knl_inthdr_entry13 /* 13: IRQ1 */ + .long knl_inthdr_entry14 /* 14: IRQ2 */ + .long knl_inthdr_entry15 /* 15: IRQ3 */ + .long knl_inthdr_entry16 /* 16: IRQ4 */ + .long knl_inthdr_entry17 /* 17: IRQ5 */ + .long knl_inthdr_entry18 /* 18: reserved */ + .long knl_inthdr_entry19 /* 19: reserved */ + .long knl_inthdr_entry20 /* 20: WOVI */ + .long knl_inthdr_entry21 /* 21: CMI */ + .long knl_inthdr_entry22 /* 22: reserved */ + .long knl_inthdr_entry23 /* 23: ADI */ + .long Csym(knl_timer_handler_startup) /* 24: IMIA0 */ + .long knl_inthdr_entry25 /* 25: IMIB0 */ + .long knl_inthdr_entry26 /* 26: OVI0 */ + .long knl_inthdr_entry27 /* 27: reserved */ + .long knl_inthdr_entry28 /* 28: IMIA1 */ + .long knl_inthdr_entry29 /* 29: IMIB1 */ + .long knl_inthdr_entry30 /* 30: OVI1 */ + .long knl_inthdr_entry31 /* 31: reserved */ + .long knl_inthdr_entry32 /* 32: IMIA2 */ + .long knl_inthdr_entry33 /* 33: IMIB2 */ + .long knl_inthdr_entry34 /* 34: OVI2 */ + .long knl_inthdr_entry35 /* 35: reserved */ + .long knl_inthdr_entry36 /* 36: CMIA0 */ + .long knl_inthdr_entry37 /* 37: CMIB0 */ + .long knl_inthdr_entry38 /* 38: CMIA1/CMIB1 */ + .long knl_inthdr_entry39 /* 39: TOVI0/TOVI1 */ + .long knl_inthdr_entry40 /* 40: CMIA2 */ + .long knl_inthdr_entry41 /* 41: CMIB2 */ + .long knl_inthdr_entry42 /* 42: CMIA3/CMIB3 */ + .long knl_inthdr_entry43 /* 43: TOVI2/TOVI3 */ + .long knl_inthdr_entry44 /* 44: DEND0A */ + .long knl_inthdr_entry45 /* 45: DEND0B */ + .long knl_inthdr_entry46 /* 46: DEND1A */ + .long knl_inthdr_entry47 /* 47: DEND1B */ + .long knl_inthdr_entry48 /* 48: reserved */ + .long knl_inthdr_entry49 /* 49: reserved */ + .long knl_inthdr_entry50 /* 50: reserved */ + .long knl_inthdr_entry51 /* 51: reserved */ + .long knl_inthdr_entry52 /* 52: ERI0 */ + .long knl_inthdr_entry53 /* 53: RXI0 */ + .long knl_inthdr_entry54 /* 54: TXI0 */ + .long knl_inthdr_entry55 /* 55: TEI0 */ + .long knl_inthdr_entry56 /* 56: ERI1 */ + .long knl_inthdr_entry57 /* 57: RXI1 */ + .long knl_inthdr_entry58 /* 58: TXI1 */ + .long knl_inthdr_entry59 /* 59: TEI1 */ + .long knl_inthdr_entry60 /* 60: ERI2 */ + .long knl_inthdr_entry61 /* 61: RXI2 */ + .long knl_inthdr_entry62 /* 62: TXI2 */ + .long knl_inthdr_entry63 /* 63: TEI2 */ + +#include "inthdr_startup.S" + +#endif /* !USE_FULL_VECTOR */ diff --git a/kernel/sysinit/build/app_h83052/Makefile b/kernel/sysinit/build/app_h83052/Makefile new file mode 100644 index 0000000..d3fd327 --- /dev/null +++ b/kernel/sysinit/build/app_h83052/Makefile @@ -0,0 +1,31 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# sysinit (system-dependent description) +# + +# T-Engine type +MACHINE = h83052 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = devinit.c + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/kernel/sysinit/build/app_h83069/Makefile b/kernel/sysinit/build/app_h83069/Makefile new file mode 100644 index 0000000..a0d8762 --- /dev/null +++ b/kernel/sysinit/build/app_h83069/Makefile @@ -0,0 +1,31 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# sysinit (system-dependent description) +# + +# T-Engine type +MACHINE = h83069 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = devinit.c + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/kernel/sysmain/build/app_h83052/Makefile b/kernel/sysmain/build/app_h83052/Makefile new file mode 100644 index 0000000..26f93b8 --- /dev/null +++ b/kernel/sysmain/build/app_h83052/Makefile @@ -0,0 +1,34 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# sysmain (system-dependent description) +# + +# T-Engine type +MACHINE = h83052 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = power.c + +# Manager and Driver objects (links to the kernel) +K_OBJ = + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/kernel/sysmain/build/app_h83052/kernel-ram.lnk b/kernel/sysmain/build/app_h83052/kernel-ram.lnk new file mode 100644 index 0000000..cd06909 --- /dev/null +++ b/kernel/sysmain/build/app_h83052/kernel-ram.lnk @@ -0,0 +1,90 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * kernel-ram.lnk (sysmain, H83052) + * linker script (RAM) + */ + +OUTPUT_FORMAT("elf32-h8300", "elf32-h8300", "elf32-h8300") +OUTPUT_ARCH(h8300h) + +SECTIONS { + . = 0x00220000; + .text : { + KEEP (*(.init)) + *(.text) + *(.text.*) + *(.stub) + KEEP (*(.fini)) + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + *(.rodata) + *(.rodata.*) + *(.rodata1) + . = ALIGN(0x10); + } =0 + __vector_org = . ; + .vector 0x00ffe000 : AT(__vector_org) { + __vector_start = . ; + *(.vector) + . = ALIGN(4); + __vector_end = . ; + } + __data_org = __vector_org + SIZEOF(.vector); + .data 0x00ffe100 : AT(__data_org) { + __data_start = . ; + *(.data) + *(.data.*) + SORT(CONSTRUCTORS) + *(.data1) + KEEP (*(.eh_frame)) + *(.gcc_except_table) + KEEP (*crtbegin.o(.ctors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + *(.sdata) + *(.sdata.*) + . = ALIGN(4); + __data_end = .; + _edata = .; + PROVIDE (edata = .); + } + .bss ALIGN(4) : { + __bss_start = .; + PROVIDE (__noinit_start = .); + *(.noinit) + PROVIDE (__noinit_end = .); + PROVIDE (__sbss_start = .); + PROVIDE (___sbss_start = .); + *(.sbss) + *(.sbss.*) + *(.scommon) + PROVIDE (__sbss_end = .); + PROVIDE (___sbss_end = .); + *(.bss) + *(.bss.*) + *(COMMON) + . = ALIGN(4); + __bss_end = .; + _end = .; + PROVIDE (end = .); + } +} diff --git a/kernel/sysmain/build/app_h83052/kernel-rom.lnk b/kernel/sysmain/build/app_h83052/kernel-rom.lnk new file mode 100644 index 0000000..c5d1d6d --- /dev/null +++ b/kernel/sysmain/build/app_h83052/kernel-rom.lnk @@ -0,0 +1,90 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * kernel-rom.lnk (sysmain, H83052) + * linker script (ROM) + */ + +OUTPUT_FORMAT("elf32-h8300", "elf32-h8300", "elf32-h8300") +OUTPUT_ARCH(h8300h) + +SECTIONS { + . = 0x00000000; + __vector_org = . ; + .vector : { + __vector_start = . ; + *(.vector) + . = ALIGN(4); + __vector_end = . ; + } + .text : { + KEEP (*(.init)) + *(.text) + *(.text.*) + *(.stub) + KEEP (*(.fini)) + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + *(.rodata) + *(.rodata.*) + *(.rodata1) + . = ALIGN(0x10); + } =0 + __data_org = . ; + .data 0x00ffe100 : AT(__data_org) { + __data_start = . ; + *(.data) + *(.data.*) + SORT(CONSTRUCTORS) + *(.data1) + KEEP (*(.eh_frame)) + *(.gcc_except_table) + KEEP (*crtbegin.o(.ctors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + *(.sdata) + *(.sdata.*) + . = ALIGN(4); + __data_end = .; + _edata = .; + PROVIDE (edata = .); + } + .bss ALIGN(4) : { + __bss_start = .; + PROVIDE (__noinit_start = .); + *(.noinit) + PROVIDE (__noinit_end = .); + PROVIDE (__sbss_start = .); + PROVIDE (___sbss_start = .); + *(.sbss) + *(.sbss.*) + *(.scommon) + PROVIDE (__sbss_end = .); + PROVIDE (___sbss_end = .); + *(.bss) + *(.bss.*) + *(COMMON) + . = ALIGN(4); + __bss_end = .; + _end = .; + PROVIDE (end = .); + } +} diff --git a/kernel/sysmain/build/app_h83069/Makefile b/kernel/sysmain/build/app_h83069/Makefile new file mode 100644 index 0000000..1260847 --- /dev/null +++ b/kernel/sysmain/build/app_h83069/Makefile @@ -0,0 +1,34 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# sysmain (system-dependent description) +# + +# T-Engine type +MACHINE = h83069 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = power.c + +# Manager and Driver objects (links to the kernel) +K_OBJ = + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/kernel/sysmain/build/app_h83069/kernel-ram.lnk b/kernel/sysmain/build/app_h83069/kernel-ram.lnk new file mode 100644 index 0000000..7cf3a05 --- /dev/null +++ b/kernel/sysmain/build/app_h83069/kernel-ram.lnk @@ -0,0 +1,90 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * kernel-ram.lnk (sysmain, H83069) + * linker script (RAM) + */ + +OUTPUT_FORMAT("elf32-h8300", "elf32-h8300", "elf32-h8300") +OUTPUT_ARCH(h8300h) + +SECTIONS { + . = 0x00400000; + .text : { + KEEP (*(.init)) + *(.text) + *(.text.*) + *(.stub) + KEEP (*(.fini)) + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + *(.rodata) + *(.rodata.*) + *(.rodata1) + . = ALIGN(0x10); + } =0 + __vector_org = . ; + .vector 0x00ffc000 : AT(__vector_org) { + __vector_start = . ; + *(.vector) + . = ALIGN(4); + __vector_end = . ; + } + __data_org = __vector_org + SIZEOF(.vector); + .data 0x00ffc100 : AT(__data_org) { + __data_start = . ; + *(.data) + *(.data.*) + SORT(CONSTRUCTORS) + *(.data1) + KEEP (*(.eh_frame)) + *(.gcc_except_table) + KEEP (*crtbegin.o(.ctors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + *(.sdata) + *(.sdata.*) + . = ALIGN(4); + __data_end = .; + _edata = .; + PROVIDE (edata = .); + } + .bss ALIGN(4) : { + __bss_start = .; + PROVIDE (__noinit_start = .); + *(.noinit) + PROVIDE (__noinit_end = .); + PROVIDE (__sbss_start = .); + PROVIDE (___sbss_start = .); + *(.sbss) + *(.sbss.*) + *(.scommon) + PROVIDE (__sbss_end = .); + PROVIDE (___sbss_end = .); + *(.bss) + *(.bss.*) + *(COMMON) + . = ALIGN(4); + __bss_end = .; + _end = .; + PROVIDE (end = .); + } +} diff --git a/kernel/sysmain/build/app_h83069/kernel-rom.lnk b/kernel/sysmain/build/app_h83069/kernel-rom.lnk new file mode 100644 index 0000000..528d4d3 --- /dev/null +++ b/kernel/sysmain/build/app_h83069/kernel-rom.lnk @@ -0,0 +1,90 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * kernel-rom.lnk (sysmain, H83069) + * linker script (ROM) + */ + +OUTPUT_FORMAT("elf32-h8300", "elf32-h8300", "elf32-h8300") +OUTPUT_ARCH(h8300h) + +SECTIONS { + . = 0x00000000; + __vector_org = . ; + .vector : { + __vector_start = . ; + *(.vector) + . = ALIGN(4); + __vector_end = . ; + } + .text : { + KEEP (*(.init)) + *(.text) + *(.text.*) + *(.stub) + KEEP (*(.fini)) + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + *(.rodata) + *(.rodata.*) + *(.rodata1) + . = ALIGN(0x10); + } =0 + __data_org = . ; + .data 0x00ffc100 : AT(__data_org) { + __data_start = . ; + *(.data) + *(.data.*) + SORT(CONSTRUCTORS) + *(.data1) + KEEP (*(.eh_frame)) + *(.gcc_except_table) + KEEP (*crtbegin.o(.ctors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + *(.sdata) + *(.sdata.*) + . = ALIGN(4); + __data_end = .; + _edata = .; + PROVIDE (edata = .); + } + .bss ALIGN(4) : { + __bss_start = .; + PROVIDE (__noinit_start = .); + *(.noinit) + PROVIDE (__noinit_end = .); + PROVIDE (__sbss_start = .); + PROVIDE (___sbss_start = .); + *(.sbss) + *(.sbss.*) + *(.scommon) + PROVIDE (__sbss_end = .); + PROVIDE (___sbss_end = .); + *(.bss) + *(.bss.*) + *(COMMON) + . = ALIGN(4); + __bss_end = .; + _end = .; + PROVIDE (end = .); + } +} diff --git a/kernel/sysmain/src/Makefile.common b/kernel/sysmain/src/Makefile.common index 48ecd79..f55cbac 100644 --- a/kernel/sysmain/src/Makefile.common +++ b/kernel/sysmain/src/Makefile.common @@ -121,14 +121,14 @@ $(TARGET_ROM:%.rom=%.mot): $(TARGET_ROM) $(OBJCOPY) $(OUTPUT_SREC) $< $@ tkernel: - ( cd $(OBJ_TKERNEL_PATH) ; make source ; make) + ( cd $(OBJ_TKERNEL_PATH) ; $(MAKE) source ; $(MAKE)) sysinit: - ( cd $(OBJ_SYSINIT_PATH) ; make ) + ( cd $(OBJ_SYSINIT_PATH) ; $(MAKE) ) tstdlib: - make tstdlib_source - make tstdlib_obj + $(MAKE) tstdlib_source + $(MAKE) tstdlib_obj tstdlib_source: $(TSTDLIB_ORGSRC) (cd $(TSTDLIB_S); \ @@ -145,13 +145,13 @@ $(TSTDLIB_TARGET): $(TSTDLIB_OBJ) endif lib: - (cd $(LIBRARY_PATH); make) + (cd $(LIBRARY_PATH); $(MAKE)) clean: clean_source - ( cd $(OBJ_TKERNEL_PATH) ; make clean clean_source) - ( cd $(OBJ_SYSINIT_PATH) ; make clean ) + ( cd $(OBJ_TKERNEL_PATH) ; $(MAKE) clean clean_source) + ( cd $(OBJ_SYSINIT_PATH) ; $(MAKE) clean ) $(RM) $(OBJ) $(TARGET_CRT0) $(TSTDLIB_OBJ) $(TSTDLIB_TARGET) $(ALL) $(DEPS) - ( cd $(LIBRARY_PATH) ; make clean) + ( cd $(LIBRARY_PATH) ; $(MAKE) clean) clean_source: (cd $(TSTDLIB_S)/func ; $(RM) $(TSTDLIB_FUNCSRC)) diff --git a/kernel/tkernel/build/app_h83052/Makefile b/kernel/tkernel/build/app_h83052/Makefile new file mode 100644 index 0000000..cebe84c --- /dev/null +++ b/kernel/tkernel/build/app_h83052/Makefile @@ -0,0 +1,31 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# micro T-Kernel (system-dependent description) +# + +# T-Engine type +MACHINE = h83052 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/kernel/tkernel/build/app_h83069/Makefile b/kernel/tkernel/build/app_h83069/Makefile new file mode 100644 index 0000000..77d0878 --- /dev/null +++ b/kernel/tkernel/build/app_h83069/Makefile @@ -0,0 +1,31 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# micro T-Kernel (system-dependent description) +# + +# T-Engine type +MACHINE = h83069 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/lib/build/Makefile.common b/lib/build/Makefile.common index e439c69..4c8141d 100644 --- a/lib/build/Makefile.common +++ b/lib/build/Makefile.common @@ -28,20 +28,20 @@ all: $(LIB_SYSDEP_TARGET) $(LIB_CPUDEP_TARGET) $(LIB_SYSDEP_TARGET): cd ../../$@/build/$(TETYPE)_$(MACHINE) ; \ - make ; \ - make install + $(MAKE) ; \ + $(MAKE) install $(LIB_CPUDEP_TARGET): cd ../../$@/build/$(MACHINE) ; \ - make ; \ - make install + $(MAKE) ; \ + $(MAKE) install clean: @( cd ../.. ; \ for dir in $(LIB_SYSDEP_TARGET); do \ - ( cd $$dir/build/$(TETYPE)_$(MACHINE) ; make clean ) ; \ + ( cd $$dir/build/$(TETYPE)_$(MACHINE) ; $(MAKE) clean ) ; \ done ; \ for dir in $(LIB_CPUDEP_TARGET); do \ - ( cd $$dir/build/$(MACHINE) ; make clean ) ; \ + ( cd $$dir/build/$(MACHINE) ; $(MAKE) clean ) ; \ done ) ; rm -rf $(addsuffix .a, $(LIB_ARCHIVE_OBJ)) *.o \#*.o.* \#*.a.* diff --git a/lib/build/app_h83052/Makefile b/lib/build/app_h83052/Makefile new file mode 100644 index 0000000..6014c68 --- /dev/null +++ b/lib/build/app_h83052/Makefile @@ -0,0 +1,28 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# library main (system-dependent description) +# + +# T-Engine type +MACHINE = h83052 +TETYPE = app + +# default rules +include ../../../etc/makerules + +# include main makefile (common description) +include ../Makefile.common diff --git a/lib/build/app_h83069/Makefile b/lib/build/app_h83069/Makefile new file mode 100644 index 0000000..7f701f8 --- /dev/null +++ b/lib/build/app_h83069/Makefile @@ -0,0 +1,28 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# library main (system-dependent description) +# + +# T-Engine type +MACHINE = h83069 +TETYPE = app + +# default rules +include ../../../etc/makerules + +# include main makefile (common description) +include ../Makefile.common diff --git a/lib/libstr/build/h83052/Makefile b/lib/libstr/build/h83052/Makefile new file mode 100644 index 0000000..463dfaa --- /dev/null +++ b/lib/libstr/build/h83052/Makefile @@ -0,0 +1,34 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# libstr (system-dependent description) +# + +# T-Engine type +MACHINE = h83052 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = + +# compiler options +CFLAGS += -fomit-frame-pointer + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/lib/libstr/build/h83069/Makefile b/lib/libstr/build/h83069/Makefile new file mode 100644 index 0000000..9cf1aa4 --- /dev/null +++ b/lib/libstr/build/h83069/Makefile @@ -0,0 +1,34 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# libstr (system-dependent description) +# + +# T-Engine type +MACHINE = h83069 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = + +# compiler options +CFLAGS += -fomit-frame-pointer + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/lib/libstr/src/Makefile.common b/lib/libstr/src/Makefile.common index 6d01a77..ea9436d 100644 --- a/lib/libstr/src/Makefile.common +++ b/lib/libstr/src/Makefile.common @@ -57,8 +57,8 @@ CFLAGS += $(CFLAGS_WARNING) ALL = $(TARGET) all: - make source - make obj + $(MAKE) source + $(MAKE) obj obj: $(ALL) diff --git a/lib/libsvc/build/h83052/Makefile b/lib/libsvc/build/h83052/Makefile new file mode 100644 index 0000000..36b78f4 --- /dev/null +++ b/lib/libsvc/build/h83052/Makefile @@ -0,0 +1,34 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# libsvc (system-dependent description) +# + +# T-Engine type +MACHINE = h83052 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# compiler options +CFLAGS += -fomit-frame-pointer + +# system dependencies +IFLIB_SYSDEP = + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/lib/libsvc/build/h83052/makeifex.pl b/lib/libsvc/build/h83052/makeifex.pl new file mode 100644 index 0000000..d1f12b4 --- /dev/null +++ b/lib/libsvc/build/h83052/makeifex.pl @@ -0,0 +1,52 @@ +#! /usr/bin/env perl +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# makeifex.pl +# +# generate extended SVC interface library for H8/300H +# + +sub makelibex +{ + print LIB < +#include +#include +#include "utk_config.h" + + .h8300h + + .text + .balign 2 + .globl Csym(${func}) + .type Csym(${func}), \@function +Csym(${func}): + mov.l er1, \@-er7 + mov.l er0, \@-er7 + mov.l er7, er1 + mov.l er2, \@-er7 + mov.w \@fno, r0 + trapa #TRAP_SVC + add.l #3*4, er7 + rts + + .balign 2 +fno: .word ${prefix}_${Func}_FN + +EndOfExtIfLibBody +} + +1; diff --git a/lib/libsvc/build/h83052/makeiftd.pl b/lib/libsvc/build/h83052/makeiftd.pl new file mode 100644 index 0000000..308a6d8 --- /dev/null +++ b/lib/libsvc/build/h83052/makeiftd.pl @@ -0,0 +1,51 @@ +#! /usr/bin/env perl +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# makeiftd.pl +# +# generate interface library for H8/300H +# + +sub makelib +{ + print LIB < +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(${func}) +Csym(${func}): + mov.w r0, \@-er7 + mov.w #TDFN_${Func}, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + +EndOfIfLibBody +} + +1; diff --git a/lib/libsvc/build/h83052/makeiftk.pl b/lib/libsvc/build/h83052/makeiftk.pl new file mode 100644 index 0000000..2e61276 --- /dev/null +++ b/lib/libsvc/build/h83052/makeiftk.pl @@ -0,0 +1,51 @@ +#! /usr/bin/env perl +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# makeiftk.pl +# +# generate interface library for H8/300H +# + +sub makelib +{ + print LIB < +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(${func}) +Csym(${func}): + mov.w r0, \@-er7 + mov.w #TFN_${Func}, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + +EndOfIfLibBody +} + +1; diff --git a/lib/libsvc/build/h83069/Makefile b/lib/libsvc/build/h83069/Makefile new file mode 100644 index 0000000..e6ca904 --- /dev/null +++ b/lib/libsvc/build/h83069/Makefile @@ -0,0 +1,34 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# libsvc (system-dependent description) +# + +# T-Engine type +MACHINE = h83069 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# compiler options +CFLAGS += -fomit-frame-pointer + +# system dependencies +IFLIB_SYSDEP = + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/lib/libsvc/build/h83069/makeifex.pl b/lib/libsvc/build/h83069/makeifex.pl new file mode 100644 index 0000000..d1f12b4 --- /dev/null +++ b/lib/libsvc/build/h83069/makeifex.pl @@ -0,0 +1,52 @@ +#! /usr/bin/env perl +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# makeifex.pl +# +# generate extended SVC interface library for H8/300H +# + +sub makelibex +{ + print LIB < +#include +#include +#include "utk_config.h" + + .h8300h + + .text + .balign 2 + .globl Csym(${func}) + .type Csym(${func}), \@function +Csym(${func}): + mov.l er1, \@-er7 + mov.l er0, \@-er7 + mov.l er7, er1 + mov.l er2, \@-er7 + mov.w \@fno, r0 + trapa #TRAP_SVC + add.l #3*4, er7 + rts + + .balign 2 +fno: .word ${prefix}_${Func}_FN + +EndOfExtIfLibBody +} + +1; diff --git a/lib/libsvc/build/h83069/makeiftd.pl b/lib/libsvc/build/h83069/makeiftd.pl new file mode 100644 index 0000000..308a6d8 --- /dev/null +++ b/lib/libsvc/build/h83069/makeiftd.pl @@ -0,0 +1,51 @@ +#! /usr/bin/env perl +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# makeiftd.pl +# +# generate interface library for H8/300H +# + +sub makelib +{ + print LIB < +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(${func}) +Csym(${func}): + mov.w r0, \@-er7 + mov.w #TDFN_${Func}, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + +EndOfIfLibBody +} + +1; diff --git a/lib/libsvc/build/h83069/makeiftk.pl b/lib/libsvc/build/h83069/makeiftk.pl new file mode 100644 index 0000000..2e61276 --- /dev/null +++ b/lib/libsvc/build/h83069/makeiftk.pl @@ -0,0 +1,51 @@ +#! /usr/bin/env perl +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# makeiftk.pl +# +# generate interface library for H8/300H +# + +sub makelib +{ + print LIB < +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(${func}) +Csym(${func}): + mov.w r0, \@-er7 + mov.w #TFN_${Func}, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + +EndOfIfLibBody +} + +1; diff --git a/lib/libsvc/src/sysdepend/h83052/td_acp_que.S b/lib/libsvc/src/sysdepend/h83052/td_acp_que.S new file mode 100644 index 0000000..f69a79e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_acp_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_acp_que) +Csym(td_acp_que): + mov.w r0, @-er7 + mov.w #TDFN_ACP_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_cal_que.S b/lib/libsvc/src/sysdepend/h83052/td_cal_que.S new file mode 100644 index 0000000..be9e710 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_cal_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_cal_que) +Csym(td_cal_que): + mov.w r0, @-er7 + mov.w #TDFN_CAL_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_flg_que.S b/lib/libsvc/src/sysdepend/h83052/td_flg_que.S new file mode 100644 index 0000000..5d4ee65 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_flg_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_flg_que) +Csym(td_flg_que): + mov.w r0, @-er7 + mov.w #TDFN_FLG_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_get_otm.S b/lib/libsvc/src/sysdepend/h83052/td_get_otm.S new file mode 100644 index 0000000..0f19b46 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_get_otm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_get_otm) +Csym(td_get_otm): + mov.w r0, @-er7 + mov.w #TDFN_GET_OTM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_get_reg.S b/lib/libsvc/src/sysdepend/h83052/td_get_reg.S new file mode 100644 index 0000000..4fbf80d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_get_reg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_get_reg) +Csym(td_get_reg): + mov.w r0, @-er7 + mov.w #TDFN_GET_REG, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_get_tim.S b/lib/libsvc/src/sysdepend/h83052/td_get_tim.S new file mode 100644 index 0000000..4b07a9c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_get_tim.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_get_tim) +Csym(td_get_tim): + mov.w r0, @-er7 + mov.w #TDFN_GET_TIM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_hok_dsp.S b/lib/libsvc/src/sysdepend/h83052/td_hok_dsp.S new file mode 100644 index 0000000..542265d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_hok_dsp.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_hok_dsp) +Csym(td_hok_dsp): + mov.w r0, @-er7 + mov.w #TDFN_HOK_DSP, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_hok_int.S b/lib/libsvc/src/sysdepend/h83052/td_hok_int.S new file mode 100644 index 0000000..31b040d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_hok_int.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_hok_int) +Csym(td_hok_int): + mov.w r0, @-er7 + mov.w #TDFN_HOK_INT, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_hok_svc.S b/lib/libsvc/src/sysdepend/h83052/td_hok_svc.S new file mode 100644 index 0000000..0b6d288 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_hok_svc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_hok_svc) +Csym(td_hok_svc): + mov.w r0, @-er7 + mov.w #TDFN_HOK_SVC, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_inf_tsk.S b/lib/libsvc/src/sysdepend/h83052/td_inf_tsk.S new file mode 100644 index 0000000..9880b6d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_inf_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_inf_tsk) +Csym(td_inf_tsk): + mov.w r0, @-er7 + mov.w #TDFN_INF_TSK, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_alm.S b/lib/libsvc/src/sysdepend/h83052/td_lst_alm.S new file mode 100644 index 0000000..38a2bab --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_alm) +Csym(td_lst_alm): + mov.w r0, @-er7 + mov.w #TDFN_LST_ALM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_cyc.S b/lib/libsvc/src/sysdepend/h83052/td_lst_cyc.S new file mode 100644 index 0000000..69dc0d1 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_cyc) +Csym(td_lst_cyc): + mov.w r0, @-er7 + mov.w #TDFN_LST_CYC, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_flg.S b/lib/libsvc/src/sysdepend/h83052/td_lst_flg.S new file mode 100644 index 0000000..d837575 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_flg) +Csym(td_lst_flg): + mov.w r0, @-er7 + mov.w #TDFN_LST_FLG, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_mbf.S b/lib/libsvc/src/sysdepend/h83052/td_lst_mbf.S new file mode 100644 index 0000000..68c61e3 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_mbf) +Csym(td_lst_mbf): + mov.w r0, @-er7 + mov.w #TDFN_LST_MBF, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_mbx.S b/lib/libsvc/src/sysdepend/h83052/td_lst_mbx.S new file mode 100644 index 0000000..9d28243 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_mbx) +Csym(td_lst_mbx): + mov.w r0, @-er7 + mov.w #TDFN_LST_MBX, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_mpf.S b/lib/libsvc/src/sysdepend/h83052/td_lst_mpf.S new file mode 100644 index 0000000..6db25bf --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_mpf) +Csym(td_lst_mpf): + mov.w r0, @-er7 + mov.w #TDFN_LST_MPF, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_mpl.S b/lib/libsvc/src/sysdepend/h83052/td_lst_mpl.S new file mode 100644 index 0000000..6f2f4fe --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_mpl) +Csym(td_lst_mpl): + mov.w r0, @-er7 + mov.w #TDFN_LST_MPL, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_mtx.S b/lib/libsvc/src/sysdepend/h83052/td_lst_mtx.S new file mode 100644 index 0000000..b544052 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_mtx) +Csym(td_lst_mtx): + mov.w r0, @-er7 + mov.w #TDFN_LST_MTX, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_por.S b/lib/libsvc/src/sysdepend/h83052/td_lst_por.S new file mode 100644 index 0000000..2335c76 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_por) +Csym(td_lst_por): + mov.w r0, @-er7 + mov.w #TDFN_LST_POR, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_sem.S b/lib/libsvc/src/sysdepend/h83052/td_lst_sem.S new file mode 100644 index 0000000..cf31623 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_sem) +Csym(td_lst_sem): + mov.w r0, @-er7 + mov.w #TDFN_LST_SEM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_ssy.S b/lib/libsvc/src/sysdepend/h83052/td_lst_ssy.S new file mode 100644 index 0000000..3ff796a --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_ssy.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_ssy) +Csym(td_lst_ssy): + mov.w r0, @-er7 + mov.w #TDFN_LST_SSY, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_lst_tsk.S b/lib/libsvc/src/sysdepend/h83052/td_lst_tsk.S new file mode 100644 index 0000000..a968a51 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_lst_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_tsk) +Csym(td_lst_tsk): + mov.w r0, @-er7 + mov.w #TDFN_LST_TSK, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_mbx_que.S b/lib/libsvc/src/sysdepend/h83052/td_mbx_que.S new file mode 100644 index 0000000..150898f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_mbx_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_mbx_que) +Csym(td_mbx_que): + mov.w r0, @-er7 + mov.w #TDFN_MBX_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_mpf_que.S b/lib/libsvc/src/sysdepend/h83052/td_mpf_que.S new file mode 100644 index 0000000..2381407 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_mpf_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_mpf_que) +Csym(td_mpf_que): + mov.w r0, @-er7 + mov.w #TDFN_MPF_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_mpl_que.S b/lib/libsvc/src/sysdepend/h83052/td_mpl_que.S new file mode 100644 index 0000000..9ff10c2 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_mpl_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_mpl_que) +Csym(td_mpl_que): + mov.w r0, @-er7 + mov.w #TDFN_MPL_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_mtx_que.S b/lib/libsvc/src/sysdepend/h83052/td_mtx_que.S new file mode 100644 index 0000000..6424fa0 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_mtx_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_mtx_que) +Csym(td_mtx_que): + mov.w r0, @-er7 + mov.w #TDFN_MTX_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_rdy_que.S b/lib/libsvc/src/sysdepend/h83052/td_rdy_que.S new file mode 100644 index 0000000..cd5938d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_rdy_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_rdy_que) +Csym(td_rdy_que): + mov.w r0, @-er7 + mov.w #TDFN_RDY_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_alm.S b/lib/libsvc/src/sysdepend/h83052/td_ref_alm.S new file mode 100644 index 0000000..70cf07b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_alm) +Csym(td_ref_alm): + mov.w r0, @-er7 + mov.w #TDFN_REF_ALM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_cyc.S b/lib/libsvc/src/sysdepend/h83052/td_ref_cyc.S new file mode 100644 index 0000000..b30dab3 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_cyc) +Csym(td_ref_cyc): + mov.w r0, @-er7 + mov.w #TDFN_REF_CYC, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_dsname.S b/lib/libsvc/src/sysdepend/h83052/td_ref_dsname.S new file mode 100644 index 0000000..1167dbb --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_dsname.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_dsname) +Csym(td_ref_dsname): + mov.w r0, @-er7 + mov.w #TDFN_REF_DSNAME, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_flg.S b/lib/libsvc/src/sysdepend/h83052/td_ref_flg.S new file mode 100644 index 0000000..d6db216 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_flg) +Csym(td_ref_flg): + mov.w r0, @-er7 + mov.w #TDFN_REF_FLG, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_mbf.S b/lib/libsvc/src/sysdepend/h83052/td_ref_mbf.S new file mode 100644 index 0000000..48b58c4 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_mbf) +Csym(td_ref_mbf): + mov.w r0, @-er7 + mov.w #TDFN_REF_MBF, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_mbx.S b/lib/libsvc/src/sysdepend/h83052/td_ref_mbx.S new file mode 100644 index 0000000..dd1743d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_mbx) +Csym(td_ref_mbx): + mov.w r0, @-er7 + mov.w #TDFN_REF_MBX, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_mpf.S b/lib/libsvc/src/sysdepend/h83052/td_ref_mpf.S new file mode 100644 index 0000000..69c7abe --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_mpf) +Csym(td_ref_mpf): + mov.w r0, @-er7 + mov.w #TDFN_REF_MPF, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_mpl.S b/lib/libsvc/src/sysdepend/h83052/td_ref_mpl.S new file mode 100644 index 0000000..c35d169 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_mpl) +Csym(td_ref_mpl): + mov.w r0, @-er7 + mov.w #TDFN_REF_MPL, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_mtx.S b/lib/libsvc/src/sysdepend/h83052/td_ref_mtx.S new file mode 100644 index 0000000..bc89e09 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_mtx) +Csym(td_ref_mtx): + mov.w r0, @-er7 + mov.w #TDFN_REF_MTX, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_por.S b/lib/libsvc/src/sysdepend/h83052/td_ref_por.S new file mode 100644 index 0000000..5adf03d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_por) +Csym(td_ref_por): + mov.w r0, @-er7 + mov.w #TDFN_REF_POR, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_sem.S b/lib/libsvc/src/sysdepend/h83052/td_ref_sem.S new file mode 100644 index 0000000..c9737a0 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_sem) +Csym(td_ref_sem): + mov.w r0, @-er7 + mov.w #TDFN_REF_SEM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_ssy.S b/lib/libsvc/src/sysdepend/h83052/td_ref_ssy.S new file mode 100644 index 0000000..6e92465 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_ssy.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_ssy) +Csym(td_ref_ssy): + mov.w r0, @-er7 + mov.w #TDFN_REF_SSY, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_sys.S b/lib/libsvc/src/sysdepend/h83052/td_ref_sys.S new file mode 100644 index 0000000..c3b622b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_sys.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_sys) +Csym(td_ref_sys): + mov.w r0, @-er7 + mov.w #TDFN_REF_SYS, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_ref_tsk.S b/lib/libsvc/src/sysdepend/h83052/td_ref_tsk.S new file mode 100644 index 0000000..577a4c9 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_ref_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_tsk) +Csym(td_ref_tsk): + mov.w r0, @-er7 + mov.w #TDFN_REF_TSK, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_rmbf_que.S b/lib/libsvc/src/sysdepend/h83052/td_rmbf_que.S new file mode 100644 index 0000000..7a8926b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_rmbf_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_rmbf_que) +Csym(td_rmbf_que): + mov.w r0, @-er7 + mov.w #TDFN_RMBF_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_sem_que.S b/lib/libsvc/src/sysdepend/h83052/td_sem_que.S new file mode 100644 index 0000000..e31484e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_sem_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_sem_que) +Csym(td_sem_que): + mov.w r0, @-er7 + mov.w #TDFN_SEM_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_set_dsname.S b/lib/libsvc/src/sysdepend/h83052/td_set_dsname.S new file mode 100644 index 0000000..22337f1 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_set_dsname.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_set_dsname) +Csym(td_set_dsname): + mov.w r0, @-er7 + mov.w #TDFN_SET_DSNAME, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_set_reg.S b/lib/libsvc/src/sysdepend/h83052/td_set_reg.S new file mode 100644 index 0000000..20cd356 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_set_reg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_set_reg) +Csym(td_set_reg): + mov.w r0, @-er7 + mov.w #TDFN_SET_REG, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/td_smbf_que.S b/lib/libsvc/src/sysdepend/h83052/td_smbf_que.S new file mode 100644 index 0000000..e8b9006 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/td_smbf_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_smbf_que) +Csym(td_smbf_que): + mov.w r0, @-er7 + mov.w #TDFN_SMBF_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_acp_por.S b/lib/libsvc/src/sysdepend/h83052/tk_acp_por.S new file mode 100644 index 0000000..dbac95a --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_acp_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_acp_por) +Csym(tk_acp_por): + mov.w r0, @-er7 + mov.w #TFN_ACP_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cal_por.S b/lib/libsvc/src/sysdepend/h83052/tk_cal_por.S new file mode 100644 index 0000000..d9cbf14 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cal_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cal_por) +Csym(tk_cal_por): + mov.w r0, @-er7 + mov.w #TFN_CAL_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_can_wup.S b/lib/libsvc/src/sysdepend/h83052/tk_can_wup.S new file mode 100644 index 0000000..85be6fd --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_can_wup.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_can_wup) +Csym(tk_can_wup): + mov.w r0, @-er7 + mov.w #TFN_CAN_WUP, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_chg_pri.S b/lib/libsvc/src/sysdepend/h83052/tk_chg_pri.S new file mode 100644 index 0000000..67c470d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_chg_pri.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_chg_pri) +Csym(tk_chg_pri): + mov.w r0, @-er7 + mov.w #TFN_CHG_PRI, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_clr_flg.S b/lib/libsvc/src/sysdepend/h83052/tk_clr_flg.S new file mode 100644 index 0000000..358f755 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_clr_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_clr_flg) +Csym(tk_clr_flg): + mov.w r0, @-er7 + mov.w #TFN_CLR_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cls_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_cls_dev.S new file mode 100644 index 0000000..220b173 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cls_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cls_dev) +Csym(tk_cls_dev): + mov.w r0, @-er7 + mov.w #TFN_CLS_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_alm.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_alm.S new file mode 100644 index 0000000..17d55fa --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_alm) +Csym(tk_cre_alm): + mov.w r0, @-er7 + mov.w #TFN_CRE_ALM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_cyc.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_cyc.S new file mode 100644 index 0000000..7b2a1cf --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_cyc) +Csym(tk_cre_cyc): + mov.w r0, @-er7 + mov.w #TFN_CRE_CYC, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_flg.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_flg.S new file mode 100644 index 0000000..410822a --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_flg) +Csym(tk_cre_flg): + mov.w r0, @-er7 + mov.w #TFN_CRE_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_mbf.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_mbf.S new file mode 100644 index 0000000..865bf8f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_mbf) +Csym(tk_cre_mbf): + mov.w r0, @-er7 + mov.w #TFN_CRE_MBF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_mbx.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_mbx.S new file mode 100644 index 0000000..3d16650 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_mbx) +Csym(tk_cre_mbx): + mov.w r0, @-er7 + mov.w #TFN_CRE_MBX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_mpf.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_mpf.S new file mode 100644 index 0000000..f2675d6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_mpf) +Csym(tk_cre_mpf): + mov.w r0, @-er7 + mov.w #TFN_CRE_MPF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_mpl.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_mpl.S new file mode 100644 index 0000000..6274c54 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_mpl) +Csym(tk_cre_mpl): + mov.w r0, @-er7 + mov.w #TFN_CRE_MPL, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_mtx.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_mtx.S new file mode 100644 index 0000000..3a772e2 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_mtx) +Csym(tk_cre_mtx): + mov.w r0, @-er7 + mov.w #TFN_CRE_MTX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_por.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_por.S new file mode 100644 index 0000000..58314ab --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_por) +Csym(tk_cre_por): + mov.w r0, @-er7 + mov.w #TFN_CRE_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_sem.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_sem.S new file mode 100644 index 0000000..45e0a55 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_sem) +Csym(tk_cre_sem): + mov.w r0, @-er7 + mov.w #TFN_CRE_SEM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_cre_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_cre_tsk.S new file mode 100644 index 0000000..019bd95 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_cre_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_tsk) +Csym(tk_cre_tsk): + mov.w r0, @-er7 + mov.w #TFN_CRE_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_def_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_def_dev.S new file mode 100644 index 0000000..f31133a --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_def_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_def_dev) +Csym(tk_def_dev): + mov.w r0, @-er7 + mov.w #TFN_DEF_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_def_int.S b/lib/libsvc/src/sysdepend/h83052/tk_def_int.S new file mode 100644 index 0000000..c803298 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_def_int.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_def_int) +Csym(tk_def_int): + mov.w r0, @-er7 + mov.w #TFN_DEF_INT, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_def_ssy.S b/lib/libsvc/src/sysdepend/h83052/tk_def_ssy.S new file mode 100644 index 0000000..7b6a9da --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_def_ssy.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_def_ssy) +Csym(tk_def_ssy): + mov.w r0, @-er7 + mov.w #TFN_DEF_SSY, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_alm.S b/lib/libsvc/src/sysdepend/h83052/tk_del_alm.S new file mode 100644 index 0000000..907ce25 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_alm) +Csym(tk_del_alm): + mov.w r0, @-er7 + mov.w #TFN_DEL_ALM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_cyc.S b/lib/libsvc/src/sysdepend/h83052/tk_del_cyc.S new file mode 100644 index 0000000..d4062e5 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_cyc) +Csym(tk_del_cyc): + mov.w r0, @-er7 + mov.w #TFN_DEL_CYC, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_flg.S b/lib/libsvc/src/sysdepend/h83052/tk_del_flg.S new file mode 100644 index 0000000..f3ae090 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_flg) +Csym(tk_del_flg): + mov.w r0, @-er7 + mov.w #TFN_DEL_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_mbf.S b/lib/libsvc/src/sysdepend/h83052/tk_del_mbf.S new file mode 100644 index 0000000..787eb6c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_mbf) +Csym(tk_del_mbf): + mov.w r0, @-er7 + mov.w #TFN_DEL_MBF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_mbx.S b/lib/libsvc/src/sysdepend/h83052/tk_del_mbx.S new file mode 100644 index 0000000..3b224c8 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_mbx) +Csym(tk_del_mbx): + mov.w r0, @-er7 + mov.w #TFN_DEL_MBX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_mpf.S b/lib/libsvc/src/sysdepend/h83052/tk_del_mpf.S new file mode 100644 index 0000000..e09e590 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_mpf) +Csym(tk_del_mpf): + mov.w r0, @-er7 + mov.w #TFN_DEL_MPF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_mpl.S b/lib/libsvc/src/sysdepend/h83052/tk_del_mpl.S new file mode 100644 index 0000000..30452d5 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_mpl) +Csym(tk_del_mpl): + mov.w r0, @-er7 + mov.w #TFN_DEL_MPL, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_mtx.S b/lib/libsvc/src/sysdepend/h83052/tk_del_mtx.S new file mode 100644 index 0000000..83b10b0 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_mtx) +Csym(tk_del_mtx): + mov.w r0, @-er7 + mov.w #TFN_DEL_MTX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_por.S b/lib/libsvc/src/sysdepend/h83052/tk_del_por.S new file mode 100644 index 0000000..c6888c9 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_por) +Csym(tk_del_por): + mov.w r0, @-er7 + mov.w #TFN_DEL_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_sem.S b/lib/libsvc/src/sysdepend/h83052/tk_del_sem.S new file mode 100644 index 0000000..7c04750 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_sem) +Csym(tk_del_sem): + mov.w r0, @-er7 + mov.w #TFN_DEL_SEM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_del_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_del_tsk.S new file mode 100644 index 0000000..767d295 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_del_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_tsk) +Csym(tk_del_tsk): + mov.w r0, @-er7 + mov.w #TFN_DEL_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_dis_dsp.S b/lib/libsvc/src/sysdepend/h83052/tk_dis_dsp.S new file mode 100644 index 0000000..7476aeb --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_dis_dsp.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_dis_dsp) +Csym(tk_dis_dsp): + mov.w r0, @-er7 + mov.w #TFN_DIS_DSP, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_dly_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_dly_tsk.S new file mode 100644 index 0000000..2ae68f5 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_dly_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_dly_tsk) +Csym(tk_dly_tsk): + mov.w r0, @-er7 + mov.w #TFN_DLY_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ena_dsp.S b/lib/libsvc/src/sysdepend/h83052/tk_ena_dsp.S new file mode 100644 index 0000000..8e1f506 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ena_dsp.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ena_dsp) +Csym(tk_ena_dsp): + mov.w r0, @-er7 + mov.w #TFN_ENA_DSP, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_evt_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_evt_dev.S new file mode 100644 index 0000000..224197f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_evt_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_evt_dev) +Csym(tk_evt_dev): + mov.w r0, @-er7 + mov.w #TFN_EVT_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_exd_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_exd_tsk.S new file mode 100644 index 0000000..b89b6cd --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_exd_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_exd_tsk) +Csym(tk_exd_tsk): + mov.w r0, @-er7 + mov.w #TFN_EXD_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ext_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_ext_tsk.S new file mode 100644 index 0000000..8b901ce --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ext_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ext_tsk) +Csym(tk_ext_tsk): + mov.w r0, @-er7 + mov.w #TFN_EXT_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_frsm_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_frsm_tsk.S new file mode 100644 index 0000000..45ed037 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_frsm_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_frsm_tsk) +Csym(tk_frsm_tsk): + mov.w r0, @-er7 + mov.w #TFN_FRSM_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_fwd_por.S b/lib/libsvc/src/sysdepend/h83052/tk_fwd_por.S new file mode 100644 index 0000000..3d75dcc --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_fwd_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_fwd_por) +Csym(tk_fwd_por): + mov.w r0, @-er7 + mov.w #TFN_FWD_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_get_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_get_dev.S new file mode 100644 index 0000000..7cd092c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_get_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_dev) +Csym(tk_get_dev): + mov.w r0, @-er7 + mov.w #TFN_GET_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_get_mpf.S b/lib/libsvc/src/sysdepend/h83052/tk_get_mpf.S new file mode 100644 index 0000000..475a8ae --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_get_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_mpf) +Csym(tk_get_mpf): + mov.w r0, @-er7 + mov.w #TFN_GET_MPF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_get_mpl.S b/lib/libsvc/src/sysdepend/h83052/tk_get_mpl.S new file mode 100644 index 0000000..8999e8f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_get_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_mpl) +Csym(tk_get_mpl): + mov.w r0, @-er7 + mov.w #TFN_GET_MPL, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_get_otm.S b/lib/libsvc/src/sysdepend/h83052/tk_get_otm.S new file mode 100644 index 0000000..1f3fe1d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_get_otm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_otm) +Csym(tk_get_otm): + mov.w r0, @-er7 + mov.w #TFN_GET_OTM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_get_reg.S b/lib/libsvc/src/sysdepend/h83052/tk_get_reg.S new file mode 100644 index 0000000..e8d73b6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_get_reg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_reg) +Csym(tk_get_reg): + mov.w r0, @-er7 + mov.w #TFN_GET_REG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_get_tid.S b/lib/libsvc/src/sysdepend/h83052/tk_get_tid.S new file mode 100644 index 0000000..3b9d17c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_get_tid.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_tid) +Csym(tk_get_tid): + mov.w r0, @-er7 + mov.w #TFN_GET_TID, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_get_tim.S b/lib/libsvc/src/sysdepend/h83052/tk_get_tim.S new file mode 100644 index 0000000..32266e0 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_get_tim.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_tim) +Csym(tk_get_tim): + mov.w r0, @-er7 + mov.w #TFN_GET_TIM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_loc_mtx.S b/lib/libsvc/src/sysdepend/h83052/tk_loc_mtx.S new file mode 100644 index 0000000..1ff0fb7 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_loc_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_loc_mtx) +Csym(tk_loc_mtx): + mov.w r0, @-er7 + mov.w #TFN_LOC_MTX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_lst_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_lst_dev.S new file mode 100644 index 0000000..a266b57 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_lst_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_lst_dev) +Csym(tk_lst_dev): + mov.w r0, @-er7 + mov.w #TFN_LST_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_opn_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_opn_dev.S new file mode 100644 index 0000000..b1cc198 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_opn_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_opn_dev) +Csym(tk_opn_dev): + mov.w r0, @-er7 + mov.w #TFN_OPN_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_oref_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_oref_dev.S new file mode 100644 index 0000000..7d9e24c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_oref_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_oref_dev) +Csym(tk_oref_dev): + mov.w r0, @-er7 + mov.w #TFN_OREF_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_rcv_mbf.S b/lib/libsvc/src/sysdepend/h83052/tk_rcv_mbf.S new file mode 100644 index 0000000..90e55b6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_rcv_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rcv_mbf) +Csym(tk_rcv_mbf): + mov.w r0, @-er7 + mov.w #TFN_RCV_MBF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_rcv_mbx.S b/lib/libsvc/src/sysdepend/h83052/tk_rcv_mbx.S new file mode 100644 index 0000000..0107c1f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_rcv_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rcv_mbx) +Csym(tk_rcv_mbx): + mov.w r0, @-er7 + mov.w #TFN_RCV_MBX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_rea_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_rea_dev.S new file mode 100644 index 0000000..5cc1f14 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_rea_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rea_dev) +Csym(tk_rea_dev): + mov.w r0, @-er7 + mov.w #TFN_REA_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_alm.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_alm.S new file mode 100644 index 0000000..8b62941 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_alm) +Csym(tk_ref_alm): + mov.w r0, @-er7 + mov.w #TFN_REF_ALM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_cyc.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_cyc.S new file mode 100644 index 0000000..88a34bb --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_cyc) +Csym(tk_ref_cyc): + mov.w r0, @-er7 + mov.w #TFN_REF_CYC, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_dev.S new file mode 100644 index 0000000..b3f5408 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_dev) +Csym(tk_ref_dev): + mov.w r0, @-er7 + mov.w #TFN_REF_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_flg.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_flg.S new file mode 100644 index 0000000..f0bf063 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_flg) +Csym(tk_ref_flg): + mov.w r0, @-er7 + mov.w #TFN_REF_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_idv.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_idv.S new file mode 100644 index 0000000..642de6b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_idv.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_idv) +Csym(tk_ref_idv): + mov.w r0, @-er7 + mov.w #TFN_REF_IDV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_mbf.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_mbf.S new file mode 100644 index 0000000..7b4c067 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_mbf) +Csym(tk_ref_mbf): + mov.w r0, @-er7 + mov.w #TFN_REF_MBF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_mbx.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_mbx.S new file mode 100644 index 0000000..e800ae7 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_mbx) +Csym(tk_ref_mbx): + mov.w r0, @-er7 + mov.w #TFN_REF_MBX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_mpf.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_mpf.S new file mode 100644 index 0000000..e769f29 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_mpf) +Csym(tk_ref_mpf): + mov.w r0, @-er7 + mov.w #TFN_REF_MPF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_mpl.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_mpl.S new file mode 100644 index 0000000..dd3cb4f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_mpl) +Csym(tk_ref_mpl): + mov.w r0, @-er7 + mov.w #TFN_REF_MPL, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_mtx.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_mtx.S new file mode 100644 index 0000000..d0f270b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_mtx) +Csym(tk_ref_mtx): + mov.w r0, @-er7 + mov.w #TFN_REF_MTX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_por.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_por.S new file mode 100644 index 0000000..3ea8888 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_por) +Csym(tk_ref_por): + mov.w r0, @-er7 + mov.w #TFN_REF_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_sem.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_sem.S new file mode 100644 index 0000000..b19e31b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_sem) +Csym(tk_ref_sem): + mov.w r0, @-er7 + mov.w #TFN_REF_SEM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_ssy.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_ssy.S new file mode 100644 index 0000000..1519b6e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_ssy.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_ssy) +Csym(tk_ref_ssy): + mov.w r0, @-er7 + mov.w #TFN_REF_SSY, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_sys.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_sys.S new file mode 100644 index 0000000..e2682ad --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_sys.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_sys) +Csym(tk_ref_sys): + mov.w r0, @-er7 + mov.w #TFN_REF_SYS, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_tsk.S new file mode 100644 index 0000000..f187801 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_tsk) +Csym(tk_ref_tsk): + mov.w r0, @-er7 + mov.w #TFN_REF_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ref_ver.S b/lib/libsvc/src/sysdepend/h83052/tk_ref_ver.S new file mode 100644 index 0000000..b883c6b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ref_ver.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_ver) +Csym(tk_ref_ver): + mov.w r0, @-er7 + mov.w #TFN_REF_VER, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_rel_mpf.S b/lib/libsvc/src/sysdepend/h83052/tk_rel_mpf.S new file mode 100644 index 0000000..8916d25 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_rel_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rel_mpf) +Csym(tk_rel_mpf): + mov.w r0, @-er7 + mov.w #TFN_REL_MPF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_rel_mpl.S b/lib/libsvc/src/sysdepend/h83052/tk_rel_mpl.S new file mode 100644 index 0000000..5867e4e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_rel_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rel_mpl) +Csym(tk_rel_mpl): + mov.w r0, @-er7 + mov.w #TFN_REL_MPL, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_rel_wai.S b/lib/libsvc/src/sysdepend/h83052/tk_rel_wai.S new file mode 100644 index 0000000..b44eec4 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_rel_wai.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rel_wai) +Csym(tk_rel_wai): + mov.w r0, @-er7 + mov.w #TFN_REL_WAI, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ret_int.S b/lib/libsvc/src/sysdepend/h83052/tk_ret_int.S new file mode 100644 index 0000000..996af09 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ret_int.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ret_int) +Csym(tk_ret_int): + mov.w r0, @-er7 + mov.w #TFN_RET_INT, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_rot_rdq.S b/lib/libsvc/src/sysdepend/h83052/tk_rot_rdq.S new file mode 100644 index 0000000..a0084b6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_rot_rdq.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rot_rdq) +Csym(tk_rot_rdq): + mov.w r0, @-er7 + mov.w #TFN_ROT_RDQ, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_rpl_rdv.S b/lib/libsvc/src/sysdepend/h83052/tk_rpl_rdv.S new file mode 100644 index 0000000..7adae04 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_rpl_rdv.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rpl_rdv) +Csym(tk_rpl_rdv): + mov.w r0, @-er7 + mov.w #TFN_RPL_RDV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_rsm_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_rsm_tsk.S new file mode 100644 index 0000000..3370b6f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_rsm_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rsm_tsk) +Csym(tk_rsm_tsk): + mov.w r0, @-er7 + mov.w #TFN_RSM_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_set_flg.S b/lib/libsvc/src/sysdepend/h83052/tk_set_flg.S new file mode 100644 index 0000000..89f2291 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_set_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_set_flg) +Csym(tk_set_flg): + mov.w r0, @-er7 + mov.w #TFN_SET_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_set_reg.S b/lib/libsvc/src/sysdepend/h83052/tk_set_reg.S new file mode 100644 index 0000000..2dbff17 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_set_reg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_set_reg) +Csym(tk_set_reg): + mov.w r0, @-er7 + mov.w #TFN_SET_REG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_set_tim.S b/lib/libsvc/src/sysdepend/h83052/tk_set_tim.S new file mode 100644 index 0000000..a53d8f1 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_set_tim.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_set_tim) +Csym(tk_set_tim): + mov.w r0, @-er7 + mov.w #TFN_SET_TIM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_sig_sem.S b/lib/libsvc/src/sysdepend/h83052/tk_sig_sem.S new file mode 100644 index 0000000..33b6061 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_sig_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sig_sem) +Csym(tk_sig_sem): + mov.w r0, @-er7 + mov.w #TFN_SIG_SEM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_slp_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_slp_tsk.S new file mode 100644 index 0000000..743f540 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_slp_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_slp_tsk) +Csym(tk_slp_tsk): + mov.w r0, @-er7 + mov.w #TFN_SLP_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_snd_mbf.S b/lib/libsvc/src/sysdepend/h83052/tk_snd_mbf.S new file mode 100644 index 0000000..73fbd2b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_snd_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_snd_mbf) +Csym(tk_snd_mbf): + mov.w r0, @-er7 + mov.w #TFN_SND_MBF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_snd_mbx.S b/lib/libsvc/src/sysdepend/h83052/tk_snd_mbx.S new file mode 100644 index 0000000..543b1eb --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_snd_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_snd_mbx) +Csym(tk_snd_mbx): + mov.w r0, @-er7 + mov.w #TFN_SND_MBX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_srea_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_srea_dev.S new file mode 100644 index 0000000..1f55f17 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_srea_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_srea_dev) +Csym(tk_srea_dev): + mov.w r0, @-er7 + mov.w #TFN_SREA_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_sta_alm.S b/lib/libsvc/src/sysdepend/h83052/tk_sta_alm.S new file mode 100644 index 0000000..d58887c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_sta_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sta_alm) +Csym(tk_sta_alm): + mov.w r0, @-er7 + mov.w #TFN_STA_ALM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_sta_cyc.S b/lib/libsvc/src/sysdepend/h83052/tk_sta_cyc.S new file mode 100644 index 0000000..8c69148 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_sta_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sta_cyc) +Csym(tk_sta_cyc): + mov.w r0, @-er7 + mov.w #TFN_STA_CYC, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_sta_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_sta_tsk.S new file mode 100644 index 0000000..93d8cd4 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_sta_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sta_tsk) +Csym(tk_sta_tsk): + mov.w r0, @-er7 + mov.w #TFN_STA_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_stp_alm.S b/lib/libsvc/src/sysdepend/h83052/tk_stp_alm.S new file mode 100644 index 0000000..80a0659 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_stp_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_stp_alm) +Csym(tk_stp_alm): + mov.w r0, @-er7 + mov.w #TFN_STP_ALM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_stp_cyc.S b/lib/libsvc/src/sysdepend/h83052/tk_stp_cyc.S new file mode 100644 index 0000000..38e500e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_stp_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_stp_cyc) +Csym(tk_stp_cyc): + mov.w r0, @-er7 + mov.w #TFN_STP_CYC, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_sus_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_sus_dev.S new file mode 100644 index 0000000..1200416 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_sus_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sus_dev) +Csym(tk_sus_dev): + mov.w r0, @-er7 + mov.w #TFN_SUS_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_sus_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_sus_tsk.S new file mode 100644 index 0000000..c471b23 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_sus_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sus_tsk) +Csym(tk_sus_tsk): + mov.w r0, @-er7 + mov.w #TFN_SUS_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_swri_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_swri_dev.S new file mode 100644 index 0000000..86a6192 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_swri_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_swri_dev) +Csym(tk_swri_dev): + mov.w r0, @-er7 + mov.w #TFN_SWRI_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_ter_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_ter_tsk.S new file mode 100644 index 0000000..cc4032c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_ter_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ter_tsk) +Csym(tk_ter_tsk): + mov.w r0, @-er7 + mov.w #TFN_TER_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_unl_mtx.S b/lib/libsvc/src/sysdepend/h83052/tk_unl_mtx.S new file mode 100644 index 0000000..6d2e1db --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_unl_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_unl_mtx) +Csym(tk_unl_mtx): + mov.w r0, @-er7 + mov.w #TFN_UNL_MTX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_wai_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_wai_dev.S new file mode 100644 index 0000000..4db951f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_wai_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_wai_dev) +Csym(tk_wai_dev): + mov.w r0, @-er7 + mov.w #TFN_WAI_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_wai_flg.S b/lib/libsvc/src/sysdepend/h83052/tk_wai_flg.S new file mode 100644 index 0000000..9ad9a6f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_wai_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_wai_flg) +Csym(tk_wai_flg): + mov.w r0, @-er7 + mov.w #TFN_WAI_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_wai_sem.S b/lib/libsvc/src/sysdepend/h83052/tk_wai_sem.S new file mode 100644 index 0000000..73cf14f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_wai_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_wai_sem) +Csym(tk_wai_sem): + mov.w r0, @-er7 + mov.w #TFN_WAI_SEM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_wri_dev.S b/lib/libsvc/src/sysdepend/h83052/tk_wri_dev.S new file mode 100644 index 0000000..f92d22c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_wri_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_wri_dev) +Csym(tk_wri_dev): + mov.w r0, @-er7 + mov.w #TFN_WRI_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83052/tk_wup_tsk.S b/lib/libsvc/src/sysdepend/h83052/tk_wup_tsk.S new file mode 100644 index 0000000..cef117a --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83052/tk_wup_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83052) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_wup_tsk) +Csym(tk_wup_tsk): + mov.w r0, @-er7 + mov.w #TFN_WUP_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_acp_que.S b/lib/libsvc/src/sysdepend/h83069/td_acp_que.S new file mode 100644 index 0000000..b5ca2d7 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_acp_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_acp_que) +Csym(td_acp_que): + mov.w r0, @-er7 + mov.w #TDFN_ACP_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_cal_que.S b/lib/libsvc/src/sysdepend/h83069/td_cal_que.S new file mode 100644 index 0000000..6a93551 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_cal_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_cal_que) +Csym(td_cal_que): + mov.w r0, @-er7 + mov.w #TDFN_CAL_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_flg_que.S b/lib/libsvc/src/sysdepend/h83069/td_flg_que.S new file mode 100644 index 0000000..1da2e5f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_flg_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_flg_que) +Csym(td_flg_que): + mov.w r0, @-er7 + mov.w #TDFN_FLG_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_get_otm.S b/lib/libsvc/src/sysdepend/h83069/td_get_otm.S new file mode 100644 index 0000000..00ad66d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_get_otm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_get_otm) +Csym(td_get_otm): + mov.w r0, @-er7 + mov.w #TDFN_GET_OTM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_get_reg.S b/lib/libsvc/src/sysdepend/h83069/td_get_reg.S new file mode 100644 index 0000000..2ed3242 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_get_reg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_get_reg) +Csym(td_get_reg): + mov.w r0, @-er7 + mov.w #TDFN_GET_REG, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_get_tim.S b/lib/libsvc/src/sysdepend/h83069/td_get_tim.S new file mode 100644 index 0000000..f9f99ad --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_get_tim.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_get_tim) +Csym(td_get_tim): + mov.w r0, @-er7 + mov.w #TDFN_GET_TIM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_hok_dsp.S b/lib/libsvc/src/sysdepend/h83069/td_hok_dsp.S new file mode 100644 index 0000000..1377bdc --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_hok_dsp.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_hok_dsp) +Csym(td_hok_dsp): + mov.w r0, @-er7 + mov.w #TDFN_HOK_DSP, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_hok_int.S b/lib/libsvc/src/sysdepend/h83069/td_hok_int.S new file mode 100644 index 0000000..96828af --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_hok_int.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_hok_int) +Csym(td_hok_int): + mov.w r0, @-er7 + mov.w #TDFN_HOK_INT, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_hok_svc.S b/lib/libsvc/src/sysdepend/h83069/td_hok_svc.S new file mode 100644 index 0000000..5921119 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_hok_svc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_hok_svc) +Csym(td_hok_svc): + mov.w r0, @-er7 + mov.w #TDFN_HOK_SVC, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_inf_tsk.S b/lib/libsvc/src/sysdepend/h83069/td_inf_tsk.S new file mode 100644 index 0000000..db2eaf8 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_inf_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_inf_tsk) +Csym(td_inf_tsk): + mov.w r0, @-er7 + mov.w #TDFN_INF_TSK, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_alm.S b/lib/libsvc/src/sysdepend/h83069/td_lst_alm.S new file mode 100644 index 0000000..566fa4c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_alm) +Csym(td_lst_alm): + mov.w r0, @-er7 + mov.w #TDFN_LST_ALM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_cyc.S b/lib/libsvc/src/sysdepend/h83069/td_lst_cyc.S new file mode 100644 index 0000000..92987b2 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_cyc) +Csym(td_lst_cyc): + mov.w r0, @-er7 + mov.w #TDFN_LST_CYC, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_flg.S b/lib/libsvc/src/sysdepend/h83069/td_lst_flg.S new file mode 100644 index 0000000..f2bd173 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_flg) +Csym(td_lst_flg): + mov.w r0, @-er7 + mov.w #TDFN_LST_FLG, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_mbf.S b/lib/libsvc/src/sysdepend/h83069/td_lst_mbf.S new file mode 100644 index 0000000..44af47a --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_mbf) +Csym(td_lst_mbf): + mov.w r0, @-er7 + mov.w #TDFN_LST_MBF, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_mbx.S b/lib/libsvc/src/sysdepend/h83069/td_lst_mbx.S new file mode 100644 index 0000000..2c75fad --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_mbx) +Csym(td_lst_mbx): + mov.w r0, @-er7 + mov.w #TDFN_LST_MBX, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_mpf.S b/lib/libsvc/src/sysdepend/h83069/td_lst_mpf.S new file mode 100644 index 0000000..c50900c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_mpf) +Csym(td_lst_mpf): + mov.w r0, @-er7 + mov.w #TDFN_LST_MPF, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_mpl.S b/lib/libsvc/src/sysdepend/h83069/td_lst_mpl.S new file mode 100644 index 0000000..fd76486 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_mpl) +Csym(td_lst_mpl): + mov.w r0, @-er7 + mov.w #TDFN_LST_MPL, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_mtx.S b/lib/libsvc/src/sysdepend/h83069/td_lst_mtx.S new file mode 100644 index 0000000..472027c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_mtx) +Csym(td_lst_mtx): + mov.w r0, @-er7 + mov.w #TDFN_LST_MTX, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_por.S b/lib/libsvc/src/sysdepend/h83069/td_lst_por.S new file mode 100644 index 0000000..f7436d7 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_por) +Csym(td_lst_por): + mov.w r0, @-er7 + mov.w #TDFN_LST_POR, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_sem.S b/lib/libsvc/src/sysdepend/h83069/td_lst_sem.S new file mode 100644 index 0000000..d3b82b4 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_sem) +Csym(td_lst_sem): + mov.w r0, @-er7 + mov.w #TDFN_LST_SEM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_ssy.S b/lib/libsvc/src/sysdepend/h83069/td_lst_ssy.S new file mode 100644 index 0000000..06aba20 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_ssy.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_ssy) +Csym(td_lst_ssy): + mov.w r0, @-er7 + mov.w #TDFN_LST_SSY, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_lst_tsk.S b/lib/libsvc/src/sysdepend/h83069/td_lst_tsk.S new file mode 100644 index 0000000..29017ae --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_lst_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_lst_tsk) +Csym(td_lst_tsk): + mov.w r0, @-er7 + mov.w #TDFN_LST_TSK, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_mbx_que.S b/lib/libsvc/src/sysdepend/h83069/td_mbx_que.S new file mode 100644 index 0000000..38cd843 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_mbx_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_mbx_que) +Csym(td_mbx_que): + mov.w r0, @-er7 + mov.w #TDFN_MBX_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_mpf_que.S b/lib/libsvc/src/sysdepend/h83069/td_mpf_que.S new file mode 100644 index 0000000..33521ba --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_mpf_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_mpf_que) +Csym(td_mpf_que): + mov.w r0, @-er7 + mov.w #TDFN_MPF_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_mpl_que.S b/lib/libsvc/src/sysdepend/h83069/td_mpl_que.S new file mode 100644 index 0000000..e15dcd5 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_mpl_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_mpl_que) +Csym(td_mpl_que): + mov.w r0, @-er7 + mov.w #TDFN_MPL_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_mtx_que.S b/lib/libsvc/src/sysdepend/h83069/td_mtx_que.S new file mode 100644 index 0000000..095ecb2 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_mtx_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_mtx_que) +Csym(td_mtx_que): + mov.w r0, @-er7 + mov.w #TDFN_MTX_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_rdy_que.S b/lib/libsvc/src/sysdepend/h83069/td_rdy_que.S new file mode 100644 index 0000000..440b4d5 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_rdy_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_rdy_que) +Csym(td_rdy_que): + mov.w r0, @-er7 + mov.w #TDFN_RDY_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_alm.S b/lib/libsvc/src/sysdepend/h83069/td_ref_alm.S new file mode 100644 index 0000000..f0a852a --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_alm) +Csym(td_ref_alm): + mov.w r0, @-er7 + mov.w #TDFN_REF_ALM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_cyc.S b/lib/libsvc/src/sysdepend/h83069/td_ref_cyc.S new file mode 100644 index 0000000..96c31ea --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_cyc) +Csym(td_ref_cyc): + mov.w r0, @-er7 + mov.w #TDFN_REF_CYC, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_dsname.S b/lib/libsvc/src/sysdepend/h83069/td_ref_dsname.S new file mode 100644 index 0000000..409a4c6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_dsname.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_dsname) +Csym(td_ref_dsname): + mov.w r0, @-er7 + mov.w #TDFN_REF_DSNAME, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_flg.S b/lib/libsvc/src/sysdepend/h83069/td_ref_flg.S new file mode 100644 index 0000000..8014066 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_flg) +Csym(td_ref_flg): + mov.w r0, @-er7 + mov.w #TDFN_REF_FLG, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_mbf.S b/lib/libsvc/src/sysdepend/h83069/td_ref_mbf.S new file mode 100644 index 0000000..1fb7008 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_mbf) +Csym(td_ref_mbf): + mov.w r0, @-er7 + mov.w #TDFN_REF_MBF, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_mbx.S b/lib/libsvc/src/sysdepend/h83069/td_ref_mbx.S new file mode 100644 index 0000000..2c298b7 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_mbx) +Csym(td_ref_mbx): + mov.w r0, @-er7 + mov.w #TDFN_REF_MBX, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_mpf.S b/lib/libsvc/src/sysdepend/h83069/td_ref_mpf.S new file mode 100644 index 0000000..a1de9b9 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_mpf) +Csym(td_ref_mpf): + mov.w r0, @-er7 + mov.w #TDFN_REF_MPF, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_mpl.S b/lib/libsvc/src/sysdepend/h83069/td_ref_mpl.S new file mode 100644 index 0000000..65247d2 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_mpl) +Csym(td_ref_mpl): + mov.w r0, @-er7 + mov.w #TDFN_REF_MPL, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_mtx.S b/lib/libsvc/src/sysdepend/h83069/td_ref_mtx.S new file mode 100644 index 0000000..2aadd56 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_mtx) +Csym(td_ref_mtx): + mov.w r0, @-er7 + mov.w #TDFN_REF_MTX, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_por.S b/lib/libsvc/src/sysdepend/h83069/td_ref_por.S new file mode 100644 index 0000000..c9b6259 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_por) +Csym(td_ref_por): + mov.w r0, @-er7 + mov.w #TDFN_REF_POR, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_sem.S b/lib/libsvc/src/sysdepend/h83069/td_ref_sem.S new file mode 100644 index 0000000..fe1aefa --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_sem) +Csym(td_ref_sem): + mov.w r0, @-er7 + mov.w #TDFN_REF_SEM, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_ssy.S b/lib/libsvc/src/sysdepend/h83069/td_ref_ssy.S new file mode 100644 index 0000000..7cd1e2c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_ssy.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_ssy) +Csym(td_ref_ssy): + mov.w r0, @-er7 + mov.w #TDFN_REF_SSY, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_sys.S b/lib/libsvc/src/sysdepend/h83069/td_ref_sys.S new file mode 100644 index 0000000..84cd8f9 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_sys.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_sys) +Csym(td_ref_sys): + mov.w r0, @-er7 + mov.w #TDFN_REF_SYS, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_ref_tsk.S b/lib/libsvc/src/sysdepend/h83069/td_ref_tsk.S new file mode 100644 index 0000000..c37bb93 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_ref_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_ref_tsk) +Csym(td_ref_tsk): + mov.w r0, @-er7 + mov.w #TDFN_REF_TSK, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_rmbf_que.S b/lib/libsvc/src/sysdepend/h83069/td_rmbf_que.S new file mode 100644 index 0000000..c7e0562 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_rmbf_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_rmbf_que) +Csym(td_rmbf_que): + mov.w r0, @-er7 + mov.w #TDFN_RMBF_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_sem_que.S b/lib/libsvc/src/sysdepend/h83069/td_sem_que.S new file mode 100644 index 0000000..74faa22 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_sem_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_sem_que) +Csym(td_sem_que): + mov.w r0, @-er7 + mov.w #TDFN_SEM_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_set_dsname.S b/lib/libsvc/src/sysdepend/h83069/td_set_dsname.S new file mode 100644 index 0000000..c1d341f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_set_dsname.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_set_dsname) +Csym(td_set_dsname): + mov.w r0, @-er7 + mov.w #TDFN_SET_DSNAME, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_set_reg.S b/lib/libsvc/src/sysdepend/h83069/td_set_reg.S new file mode 100644 index 0000000..c8bf5e8 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_set_reg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_set_reg) +Csym(td_set_reg): + mov.w r0, @-er7 + mov.w #TDFN_SET_REG, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/td_smbf_que.S b/lib/libsvc/src/sysdepend/h83069/td_smbf_que.S new file mode 100644 index 0000000..8b5ad8d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/td_smbf_que.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(td_smbf_que) +Csym(td_smbf_que): + mov.w r0, @-er7 + mov.w #TDFN_SMBF_QUE, r0 +#if USE_TRAP + trapa #TRAP_DEBUG +#else + jsr Csym(knl_call_dbgspt) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_acp_por.S b/lib/libsvc/src/sysdepend/h83069/tk_acp_por.S new file mode 100644 index 0000000..d5167e5 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_acp_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_acp_por) +Csym(tk_acp_por): + mov.w r0, @-er7 + mov.w #TFN_ACP_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cal_por.S b/lib/libsvc/src/sysdepend/h83069/tk_cal_por.S new file mode 100644 index 0000000..b8a4b13 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cal_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cal_por) +Csym(tk_cal_por): + mov.w r0, @-er7 + mov.w #TFN_CAL_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_can_wup.S b/lib/libsvc/src/sysdepend/h83069/tk_can_wup.S new file mode 100644 index 0000000..6154fc7 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_can_wup.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_can_wup) +Csym(tk_can_wup): + mov.w r0, @-er7 + mov.w #TFN_CAN_WUP, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_chg_pri.S b/lib/libsvc/src/sysdepend/h83069/tk_chg_pri.S new file mode 100644 index 0000000..cebed60 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_chg_pri.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_chg_pri) +Csym(tk_chg_pri): + mov.w r0, @-er7 + mov.w #TFN_CHG_PRI, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_clr_flg.S b/lib/libsvc/src/sysdepend/h83069/tk_clr_flg.S new file mode 100644 index 0000000..91f3027 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_clr_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_clr_flg) +Csym(tk_clr_flg): + mov.w r0, @-er7 + mov.w #TFN_CLR_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cls_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_cls_dev.S new file mode 100644 index 0000000..a948ac8 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cls_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cls_dev) +Csym(tk_cls_dev): + mov.w r0, @-er7 + mov.w #TFN_CLS_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_alm.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_alm.S new file mode 100644 index 0000000..b23c126 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_alm) +Csym(tk_cre_alm): + mov.w r0, @-er7 + mov.w #TFN_CRE_ALM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_cyc.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_cyc.S new file mode 100644 index 0000000..c64ece4 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_cyc) +Csym(tk_cre_cyc): + mov.w r0, @-er7 + mov.w #TFN_CRE_CYC, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_flg.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_flg.S new file mode 100644 index 0000000..da8c88c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_flg) +Csym(tk_cre_flg): + mov.w r0, @-er7 + mov.w #TFN_CRE_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_mbf.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_mbf.S new file mode 100644 index 0000000..611c737 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_mbf) +Csym(tk_cre_mbf): + mov.w r0, @-er7 + mov.w #TFN_CRE_MBF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_mbx.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_mbx.S new file mode 100644 index 0000000..660e23f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_mbx) +Csym(tk_cre_mbx): + mov.w r0, @-er7 + mov.w #TFN_CRE_MBX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_mpf.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_mpf.S new file mode 100644 index 0000000..3a58241 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_mpf) +Csym(tk_cre_mpf): + mov.w r0, @-er7 + mov.w #TFN_CRE_MPF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_mpl.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_mpl.S new file mode 100644 index 0000000..772f17d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_mpl) +Csym(tk_cre_mpl): + mov.w r0, @-er7 + mov.w #TFN_CRE_MPL, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_mtx.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_mtx.S new file mode 100644 index 0000000..b7f3d30 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_mtx) +Csym(tk_cre_mtx): + mov.w r0, @-er7 + mov.w #TFN_CRE_MTX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_por.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_por.S new file mode 100644 index 0000000..1f3e993 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_por) +Csym(tk_cre_por): + mov.w r0, @-er7 + mov.w #TFN_CRE_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_sem.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_sem.S new file mode 100644 index 0000000..ba50b4b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_sem) +Csym(tk_cre_sem): + mov.w r0, @-er7 + mov.w #TFN_CRE_SEM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_cre_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_cre_tsk.S new file mode 100644 index 0000000..8a7c7c8 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_cre_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_cre_tsk) +Csym(tk_cre_tsk): + mov.w r0, @-er7 + mov.w #TFN_CRE_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_def_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_def_dev.S new file mode 100644 index 0000000..d02e41f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_def_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_def_dev) +Csym(tk_def_dev): + mov.w r0, @-er7 + mov.w #TFN_DEF_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_def_int.S b/lib/libsvc/src/sysdepend/h83069/tk_def_int.S new file mode 100644 index 0000000..71d6db0 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_def_int.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_def_int) +Csym(tk_def_int): + mov.w r0, @-er7 + mov.w #TFN_DEF_INT, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_def_ssy.S b/lib/libsvc/src/sysdepend/h83069/tk_def_ssy.S new file mode 100644 index 0000000..32159f6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_def_ssy.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_def_ssy) +Csym(tk_def_ssy): + mov.w r0, @-er7 + mov.w #TFN_DEF_SSY, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_alm.S b/lib/libsvc/src/sysdepend/h83069/tk_del_alm.S new file mode 100644 index 0000000..bef518e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_alm) +Csym(tk_del_alm): + mov.w r0, @-er7 + mov.w #TFN_DEL_ALM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_cyc.S b/lib/libsvc/src/sysdepend/h83069/tk_del_cyc.S new file mode 100644 index 0000000..a041137 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_cyc) +Csym(tk_del_cyc): + mov.w r0, @-er7 + mov.w #TFN_DEL_CYC, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_flg.S b/lib/libsvc/src/sysdepend/h83069/tk_del_flg.S new file mode 100644 index 0000000..148f200 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_flg) +Csym(tk_del_flg): + mov.w r0, @-er7 + mov.w #TFN_DEL_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_mbf.S b/lib/libsvc/src/sysdepend/h83069/tk_del_mbf.S new file mode 100644 index 0000000..8216113 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_mbf) +Csym(tk_del_mbf): + mov.w r0, @-er7 + mov.w #TFN_DEL_MBF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_mbx.S b/lib/libsvc/src/sysdepend/h83069/tk_del_mbx.S new file mode 100644 index 0000000..f464e84 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_mbx) +Csym(tk_del_mbx): + mov.w r0, @-er7 + mov.w #TFN_DEL_MBX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_mpf.S b/lib/libsvc/src/sysdepend/h83069/tk_del_mpf.S new file mode 100644 index 0000000..bee6e6b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_mpf) +Csym(tk_del_mpf): + mov.w r0, @-er7 + mov.w #TFN_DEL_MPF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_mpl.S b/lib/libsvc/src/sysdepend/h83069/tk_del_mpl.S new file mode 100644 index 0000000..213f2c6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_mpl) +Csym(tk_del_mpl): + mov.w r0, @-er7 + mov.w #TFN_DEL_MPL, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_mtx.S b/lib/libsvc/src/sysdepend/h83069/tk_del_mtx.S new file mode 100644 index 0000000..b4af1ca --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_mtx) +Csym(tk_del_mtx): + mov.w r0, @-er7 + mov.w #TFN_DEL_MTX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_por.S b/lib/libsvc/src/sysdepend/h83069/tk_del_por.S new file mode 100644 index 0000000..2d15d19 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_por) +Csym(tk_del_por): + mov.w r0, @-er7 + mov.w #TFN_DEL_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_sem.S b/lib/libsvc/src/sysdepend/h83069/tk_del_sem.S new file mode 100644 index 0000000..fa91d07 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_sem) +Csym(tk_del_sem): + mov.w r0, @-er7 + mov.w #TFN_DEL_SEM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_del_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_del_tsk.S new file mode 100644 index 0000000..a063ab8 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_del_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_del_tsk) +Csym(tk_del_tsk): + mov.w r0, @-er7 + mov.w #TFN_DEL_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_dis_dsp.S b/lib/libsvc/src/sysdepend/h83069/tk_dis_dsp.S new file mode 100644 index 0000000..50da8fa --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_dis_dsp.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_dis_dsp) +Csym(tk_dis_dsp): + mov.w r0, @-er7 + mov.w #TFN_DIS_DSP, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_dly_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_dly_tsk.S new file mode 100644 index 0000000..57092c0 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_dly_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_dly_tsk) +Csym(tk_dly_tsk): + mov.w r0, @-er7 + mov.w #TFN_DLY_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ena_dsp.S b/lib/libsvc/src/sysdepend/h83069/tk_ena_dsp.S new file mode 100644 index 0000000..ab15d62 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ena_dsp.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ena_dsp) +Csym(tk_ena_dsp): + mov.w r0, @-er7 + mov.w #TFN_ENA_DSP, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_evt_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_evt_dev.S new file mode 100644 index 0000000..64e6cd6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_evt_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_evt_dev) +Csym(tk_evt_dev): + mov.w r0, @-er7 + mov.w #TFN_EVT_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_exd_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_exd_tsk.S new file mode 100644 index 0000000..68ba0e9 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_exd_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_exd_tsk) +Csym(tk_exd_tsk): + mov.w r0, @-er7 + mov.w #TFN_EXD_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ext_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_ext_tsk.S new file mode 100644 index 0000000..e155900 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ext_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ext_tsk) +Csym(tk_ext_tsk): + mov.w r0, @-er7 + mov.w #TFN_EXT_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_frsm_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_frsm_tsk.S new file mode 100644 index 0000000..2f609cb --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_frsm_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_frsm_tsk) +Csym(tk_frsm_tsk): + mov.w r0, @-er7 + mov.w #TFN_FRSM_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_fwd_por.S b/lib/libsvc/src/sysdepend/h83069/tk_fwd_por.S new file mode 100644 index 0000000..2c33cb6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_fwd_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_fwd_por) +Csym(tk_fwd_por): + mov.w r0, @-er7 + mov.w #TFN_FWD_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_get_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_get_dev.S new file mode 100644 index 0000000..f2a5b55 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_get_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_dev) +Csym(tk_get_dev): + mov.w r0, @-er7 + mov.w #TFN_GET_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_get_mpf.S b/lib/libsvc/src/sysdepend/h83069/tk_get_mpf.S new file mode 100644 index 0000000..e0b3ed6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_get_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_mpf) +Csym(tk_get_mpf): + mov.w r0, @-er7 + mov.w #TFN_GET_MPF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_get_mpl.S b/lib/libsvc/src/sysdepend/h83069/tk_get_mpl.S new file mode 100644 index 0000000..fa1a041 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_get_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_mpl) +Csym(tk_get_mpl): + mov.w r0, @-er7 + mov.w #TFN_GET_MPL, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_get_otm.S b/lib/libsvc/src/sysdepend/h83069/tk_get_otm.S new file mode 100644 index 0000000..ac0761f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_get_otm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_otm) +Csym(tk_get_otm): + mov.w r0, @-er7 + mov.w #TFN_GET_OTM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_get_reg.S b/lib/libsvc/src/sysdepend/h83069/tk_get_reg.S new file mode 100644 index 0000000..24b22ff --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_get_reg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_reg) +Csym(tk_get_reg): + mov.w r0, @-er7 + mov.w #TFN_GET_REG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_get_tid.S b/lib/libsvc/src/sysdepend/h83069/tk_get_tid.S new file mode 100644 index 0000000..7afb8b8 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_get_tid.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_tid) +Csym(tk_get_tid): + mov.w r0, @-er7 + mov.w #TFN_GET_TID, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_get_tim.S b/lib/libsvc/src/sysdepend/h83069/tk_get_tim.S new file mode 100644 index 0000000..3f80b63 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_get_tim.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_get_tim) +Csym(tk_get_tim): + mov.w r0, @-er7 + mov.w #TFN_GET_TIM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_loc_mtx.S b/lib/libsvc/src/sysdepend/h83069/tk_loc_mtx.S new file mode 100644 index 0000000..fdc4ec6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_loc_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_loc_mtx) +Csym(tk_loc_mtx): + mov.w r0, @-er7 + mov.w #TFN_LOC_MTX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_lst_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_lst_dev.S new file mode 100644 index 0000000..b07e71e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_lst_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_lst_dev) +Csym(tk_lst_dev): + mov.w r0, @-er7 + mov.w #TFN_LST_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_opn_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_opn_dev.S new file mode 100644 index 0000000..17a53a2 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_opn_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_opn_dev) +Csym(tk_opn_dev): + mov.w r0, @-er7 + mov.w #TFN_OPN_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_oref_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_oref_dev.S new file mode 100644 index 0000000..09caa56 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_oref_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_oref_dev) +Csym(tk_oref_dev): + mov.w r0, @-er7 + mov.w #TFN_OREF_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_rcv_mbf.S b/lib/libsvc/src/sysdepend/h83069/tk_rcv_mbf.S new file mode 100644 index 0000000..3057bb8 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_rcv_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rcv_mbf) +Csym(tk_rcv_mbf): + mov.w r0, @-er7 + mov.w #TFN_RCV_MBF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_rcv_mbx.S b/lib/libsvc/src/sysdepend/h83069/tk_rcv_mbx.S new file mode 100644 index 0000000..e024d9b --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_rcv_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rcv_mbx) +Csym(tk_rcv_mbx): + mov.w r0, @-er7 + mov.w #TFN_RCV_MBX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_rea_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_rea_dev.S new file mode 100644 index 0000000..dee133d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_rea_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rea_dev) +Csym(tk_rea_dev): + mov.w r0, @-er7 + mov.w #TFN_REA_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_alm.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_alm.S new file mode 100644 index 0000000..8b5769d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_alm) +Csym(tk_ref_alm): + mov.w r0, @-er7 + mov.w #TFN_REF_ALM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_cyc.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_cyc.S new file mode 100644 index 0000000..1029003 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_cyc) +Csym(tk_ref_cyc): + mov.w r0, @-er7 + mov.w #TFN_REF_CYC, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_dev.S new file mode 100644 index 0000000..725b5d8 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_dev) +Csym(tk_ref_dev): + mov.w r0, @-er7 + mov.w #TFN_REF_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_flg.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_flg.S new file mode 100644 index 0000000..0f8125e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_flg) +Csym(tk_ref_flg): + mov.w r0, @-er7 + mov.w #TFN_REF_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_idv.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_idv.S new file mode 100644 index 0000000..da964ed --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_idv.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_idv) +Csym(tk_ref_idv): + mov.w r0, @-er7 + mov.w #TFN_REF_IDV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_mbf.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_mbf.S new file mode 100644 index 0000000..70f2948 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_mbf) +Csym(tk_ref_mbf): + mov.w r0, @-er7 + mov.w #TFN_REF_MBF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_mbx.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_mbx.S new file mode 100644 index 0000000..2713438 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_mbx) +Csym(tk_ref_mbx): + mov.w r0, @-er7 + mov.w #TFN_REF_MBX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_mpf.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_mpf.S new file mode 100644 index 0000000..084244c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_mpf) +Csym(tk_ref_mpf): + mov.w r0, @-er7 + mov.w #TFN_REF_MPF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_mpl.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_mpl.S new file mode 100644 index 0000000..f9300bb --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_mpl) +Csym(tk_ref_mpl): + mov.w r0, @-er7 + mov.w #TFN_REF_MPL, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_mtx.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_mtx.S new file mode 100644 index 0000000..91ef2e3 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_mtx) +Csym(tk_ref_mtx): + mov.w r0, @-er7 + mov.w #TFN_REF_MTX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_por.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_por.S new file mode 100644 index 0000000..ef001dc --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_por.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_por) +Csym(tk_ref_por): + mov.w r0, @-er7 + mov.w #TFN_REF_POR, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_sem.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_sem.S new file mode 100644 index 0000000..c2699b9 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_sem) +Csym(tk_ref_sem): + mov.w r0, @-er7 + mov.w #TFN_REF_SEM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_ssy.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_ssy.S new file mode 100644 index 0000000..6016920 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_ssy.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_ssy) +Csym(tk_ref_ssy): + mov.w r0, @-er7 + mov.w #TFN_REF_SSY, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_sys.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_sys.S new file mode 100644 index 0000000..fbfe79e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_sys.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_sys) +Csym(tk_ref_sys): + mov.w r0, @-er7 + mov.w #TFN_REF_SYS, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_tsk.S new file mode 100644 index 0000000..c327406 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_tsk) +Csym(tk_ref_tsk): + mov.w r0, @-er7 + mov.w #TFN_REF_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ref_ver.S b/lib/libsvc/src/sysdepend/h83069/tk_ref_ver.S new file mode 100644 index 0000000..b2e52ab --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ref_ver.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ref_ver) +Csym(tk_ref_ver): + mov.w r0, @-er7 + mov.w #TFN_REF_VER, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_rel_mpf.S b/lib/libsvc/src/sysdepend/h83069/tk_rel_mpf.S new file mode 100644 index 0000000..adff559 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_rel_mpf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rel_mpf) +Csym(tk_rel_mpf): + mov.w r0, @-er7 + mov.w #TFN_REL_MPF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_rel_mpl.S b/lib/libsvc/src/sysdepend/h83069/tk_rel_mpl.S new file mode 100644 index 0000000..d7140f2 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_rel_mpl.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rel_mpl) +Csym(tk_rel_mpl): + mov.w r0, @-er7 + mov.w #TFN_REL_MPL, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_rel_wai.S b/lib/libsvc/src/sysdepend/h83069/tk_rel_wai.S new file mode 100644 index 0000000..4f88c15 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_rel_wai.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rel_wai) +Csym(tk_rel_wai): + mov.w r0, @-er7 + mov.w #TFN_REL_WAI, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ret_int.S b/lib/libsvc/src/sysdepend/h83069/tk_ret_int.S new file mode 100644 index 0000000..01352f5 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ret_int.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ret_int) +Csym(tk_ret_int): + mov.w r0, @-er7 + mov.w #TFN_RET_INT, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_rot_rdq.S b/lib/libsvc/src/sysdepend/h83069/tk_rot_rdq.S new file mode 100644 index 0000000..f5cc7c3 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_rot_rdq.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rot_rdq) +Csym(tk_rot_rdq): + mov.w r0, @-er7 + mov.w #TFN_ROT_RDQ, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_rpl_rdv.S b/lib/libsvc/src/sysdepend/h83069/tk_rpl_rdv.S new file mode 100644 index 0000000..977dacc --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_rpl_rdv.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rpl_rdv) +Csym(tk_rpl_rdv): + mov.w r0, @-er7 + mov.w #TFN_RPL_RDV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_rsm_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_rsm_tsk.S new file mode 100644 index 0000000..efb9ad2 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_rsm_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_rsm_tsk) +Csym(tk_rsm_tsk): + mov.w r0, @-er7 + mov.w #TFN_RSM_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_set_flg.S b/lib/libsvc/src/sysdepend/h83069/tk_set_flg.S new file mode 100644 index 0000000..1a3335c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_set_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_set_flg) +Csym(tk_set_flg): + mov.w r0, @-er7 + mov.w #TFN_SET_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_set_reg.S b/lib/libsvc/src/sysdepend/h83069/tk_set_reg.S new file mode 100644 index 0000000..ed8c65e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_set_reg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_set_reg) +Csym(tk_set_reg): + mov.w r0, @-er7 + mov.w #TFN_SET_REG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_set_tim.S b/lib/libsvc/src/sysdepend/h83069/tk_set_tim.S new file mode 100644 index 0000000..e873088 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_set_tim.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_set_tim) +Csym(tk_set_tim): + mov.w r0, @-er7 + mov.w #TFN_SET_TIM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_sig_sem.S b/lib/libsvc/src/sysdepend/h83069/tk_sig_sem.S new file mode 100644 index 0000000..5221013 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_sig_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sig_sem) +Csym(tk_sig_sem): + mov.w r0, @-er7 + mov.w #TFN_SIG_SEM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_slp_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_slp_tsk.S new file mode 100644 index 0000000..5f583dc --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_slp_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_slp_tsk) +Csym(tk_slp_tsk): + mov.w r0, @-er7 + mov.w #TFN_SLP_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_snd_mbf.S b/lib/libsvc/src/sysdepend/h83069/tk_snd_mbf.S new file mode 100644 index 0000000..d12ca18 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_snd_mbf.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_snd_mbf) +Csym(tk_snd_mbf): + mov.w r0, @-er7 + mov.w #TFN_SND_MBF, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_snd_mbx.S b/lib/libsvc/src/sysdepend/h83069/tk_snd_mbx.S new file mode 100644 index 0000000..875cdd6 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_snd_mbx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_snd_mbx) +Csym(tk_snd_mbx): + mov.w r0, @-er7 + mov.w #TFN_SND_MBX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_srea_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_srea_dev.S new file mode 100644 index 0000000..4318c0d --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_srea_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_srea_dev) +Csym(tk_srea_dev): + mov.w r0, @-er7 + mov.w #TFN_SREA_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_sta_alm.S b/lib/libsvc/src/sysdepend/h83069/tk_sta_alm.S new file mode 100644 index 0000000..1f4bc93 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_sta_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sta_alm) +Csym(tk_sta_alm): + mov.w r0, @-er7 + mov.w #TFN_STA_ALM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_sta_cyc.S b/lib/libsvc/src/sysdepend/h83069/tk_sta_cyc.S new file mode 100644 index 0000000..c9977db --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_sta_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sta_cyc) +Csym(tk_sta_cyc): + mov.w r0, @-er7 + mov.w #TFN_STA_CYC, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_sta_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_sta_tsk.S new file mode 100644 index 0000000..963ca3f --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_sta_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sta_tsk) +Csym(tk_sta_tsk): + mov.w r0, @-er7 + mov.w #TFN_STA_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_stp_alm.S b/lib/libsvc/src/sysdepend/h83069/tk_stp_alm.S new file mode 100644 index 0000000..b181fdf --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_stp_alm.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_stp_alm) +Csym(tk_stp_alm): + mov.w r0, @-er7 + mov.w #TFN_STP_ALM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_stp_cyc.S b/lib/libsvc/src/sysdepend/h83069/tk_stp_cyc.S new file mode 100644 index 0000000..f153d21 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_stp_cyc.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_stp_cyc) +Csym(tk_stp_cyc): + mov.w r0, @-er7 + mov.w #TFN_STP_CYC, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_sus_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_sus_dev.S new file mode 100644 index 0000000..afd77eb --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_sus_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sus_dev) +Csym(tk_sus_dev): + mov.w r0, @-er7 + mov.w #TFN_SUS_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_sus_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_sus_tsk.S new file mode 100644 index 0000000..c394ed1 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_sus_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_sus_tsk) +Csym(tk_sus_tsk): + mov.w r0, @-er7 + mov.w #TFN_SUS_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_swri_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_swri_dev.S new file mode 100644 index 0000000..01a0873 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_swri_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_swri_dev) +Csym(tk_swri_dev): + mov.w r0, @-er7 + mov.w #TFN_SWRI_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_ter_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_ter_tsk.S new file mode 100644 index 0000000..4499f68 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_ter_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_ter_tsk) +Csym(tk_ter_tsk): + mov.w r0, @-er7 + mov.w #TFN_TER_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_unl_mtx.S b/lib/libsvc/src/sysdepend/h83069/tk_unl_mtx.S new file mode 100644 index 0000000..09ffd1e --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_unl_mtx.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_unl_mtx) +Csym(tk_unl_mtx): + mov.w r0, @-er7 + mov.w #TFN_UNL_MTX, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_wai_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_wai_dev.S new file mode 100644 index 0000000..5991140 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_wai_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_wai_dev) +Csym(tk_wai_dev): + mov.w r0, @-er7 + mov.w #TFN_WAI_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_wai_flg.S b/lib/libsvc/src/sysdepend/h83069/tk_wai_flg.S new file mode 100644 index 0000000..af3cf38 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_wai_flg.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_wai_flg) +Csym(tk_wai_flg): + mov.w r0, @-er7 + mov.w #TFN_WAI_FLG, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_wai_sem.S b/lib/libsvc/src/sysdepend/h83069/tk_wai_sem.S new file mode 100644 index 0000000..275f9a8 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_wai_sem.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_wai_sem) +Csym(tk_wai_sem): + mov.w r0, @-er7 + mov.w #TFN_WAI_SEM, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_wri_dev.S b/lib/libsvc/src/sysdepend/h83069/tk_wri_dev.S new file mode 100644 index 0000000..a63d87c --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_wri_dev.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_wri_dev) +Csym(tk_wri_dev): + mov.w r0, @-er7 + mov.w #TFN_WRI_DEV, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/h83069/tk_wup_tsk.S b/lib/libsvc/src/sysdepend/h83069/tk_wup_tsk.S new file mode 100644 index 0000000..1049ed2 --- /dev/null +++ b/lib/libsvc/src/sysdepend/h83069/tk_wup_tsk.S @@ -0,0 +1,27 @@ +/* + * micro T-Kernel SVC interface library (h83069) + */ + +#include +#include +#include +#include "utk_config.h" + + .h8300h + +#if USE_TRAP || (USE_DBGSPT && USE_HOOK_TRACE) + .text + .balign 2 + .globl Csym(tk_wup_tsk) +Csym(tk_wup_tsk): + mov.w r0, @-er7 + mov.w #TFN_WUP_TSK, r0 +#if USE_TRAP + trapa #TRAP_SVC +#else + jsr Csym(knl_call_entry) +#endif + inc.l #2, er7 + rts +#endif + diff --git a/lib/libsvc/src/sysdepend/include/tdsvctbl.h b/lib/libsvc/src/sysdepend/include/tdsvctbl.h index 554c4ed..1ee708c 100644 --- a/lib/libsvc/src/sysdepend/include/tdsvctbl.h +++ b/lib/libsvc/src/sysdepend/include/tdsvctbl.h @@ -1,7 +1,5 @@ /* * micro T-Kernel system call branch table (Debugger Support) - * - * created from /usr/local/te/include/tk/dbgspt.h */ #include diff --git a/lib/libsvc/src/sysdepend/include/tksvctbl.h b/lib/libsvc/src/sysdepend/include/tksvctbl.h index c238e61..8b6db77 100644 --- a/lib/libsvc/src/sysdepend/include/tksvctbl.h +++ b/lib/libsvc/src/sysdepend/include/tksvctbl.h @@ -1,7 +1,5 @@ /* * micro T-Kernel system call branch table - * - * created from /usr/local/te/include/tk/syscall.h */ #include diff --git a/lib/libtk/build/app_h83052/Makefile b/lib/libtk/build/app_h83052/Makefile new file mode 100644 index 0000000..0cd1291 --- /dev/null +++ b/lib/libtk/build/app_h83052/Makefile @@ -0,0 +1,34 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# libtk (system-dependent description) +# + +# T-Engine type +MACHINE = h83052 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = disint.S + +# compiler options +CFLAGS += -fomit-frame-pointer + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/lib/libtk/build/app_h83069/Makefile b/lib/libtk/build/app_h83069/Makefile new file mode 100644 index 0000000..a7891d5 --- /dev/null +++ b/lib/libtk/build/app_h83069/Makefile @@ -0,0 +1,34 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# libtk (system-dependent description) +# + +# T-Engine type +MACHINE = h83069 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = disint.S + +# compiler options +CFLAGS += -fomit-frame-pointer + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/lib/libtk/src/Makefile.common b/lib/libtk/src/Makefile.common index 60d8686..ac2cead 100644 --- a/lib/libtk/src/Makefile.common +++ b/lib/libtk/src/Makefile.common @@ -60,8 +60,8 @@ CFLAGS += $(CFLAGS_WARNING) ALL = $(TARGET) all: - make source - make obj + $(MAKE) source + $(MAKE) obj obj: $(ALL) diff --git a/lib/libtk/src/sysdepend/app_h83052/disint.S b/lib/libtk/src/sysdepend/app_h83052/disint.S new file mode 100644 index 0000000..ad28711 --- /dev/null +++ b/lib/libtk/src/sysdepend/app_h83052/disint.S @@ -0,0 +1,56 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)disint.S (libtk/H83052) + * + * Enable/disable external interrupt + */ + +#include +#include + + .h8300h + +/* + * Disable external interrupt + * UINT disint( void ) + */ + .text + .balign 2 + .globl Csym(disint) + .type Csym(disint), %function +Csym(disint): + stc ccr, r0l + orc #CCR_I, ccr + rts + + +/* + * Enable external interrupt (restore to original state) + * UINT enaint( UINT intsts ) + */ + .text + .balign 2 + .globl Csym(enaint) + .type Csym(enaint), %function +Csym(enaint): + mov.b r0l, r1l + and.b #CCR_I, r1l + stc ccr, r0l + mov.b r0l, r0h + and.b #CCR_EI_MASK, r0h + or.b r0h, r1l + ldc r1l, ccr + rts diff --git a/lib/libtk/src/sysdepend/app_h83069/disint.S b/lib/libtk/src/sysdepend/app_h83069/disint.S new file mode 100644 index 0000000..a352849 --- /dev/null +++ b/lib/libtk/src/sysdepend/app_h83069/disint.S @@ -0,0 +1,56 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +/* + * @(#)disint.S (libtk/H83069) + * + * Enable/disable external interrupt + */ + +#include +#include + + .h8300h + +/* + * Disable external interrupt + * UINT disint( void ) + */ + .text + .balign 2 + .globl Csym(disint) + .type Csym(disint), %function +Csym(disint): + stc ccr, r0l + orc #CCR_I, ccr + rts + + +/* + * Enable external interrupt (restore to original state) + * UINT enaint( UINT intsts ) + */ + .text + .balign 2 + .globl Csym(enaint) + .type Csym(enaint), %function +Csym(enaint): + mov.b r0l, r1l + and.b #CCR_I, r1l + stc ccr, r0l + mov.b r0l, r0h + and.b #CCR_EI_MASK, r0h + or.b r0h, r1l + ldc r1l, ccr + rts diff --git a/lib/libtm/build/app_h83052/Makefile b/lib/libtm/build/app_h83052/Makefile new file mode 100644 index 0000000..690461f --- /dev/null +++ b/lib/libtm/build/app_h83052/Makefile @@ -0,0 +1,31 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# libtm (system-dependent description) +# + +# T-Engine type +MACHINE = h83052 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = sio.c + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/lib/libtm/build/app_h83069/Makefile b/lib/libtm/build/app_h83069/Makefile new file mode 100644 index 0000000..0fead54 --- /dev/null +++ b/lib/libtm/build/app_h83069/Makefile @@ -0,0 +1,31 @@ +# +# ---------------------------------------------------------------------- +# micro T-Kernel +# +# Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. +# micro T-Kernel is distributed under the T-License 2.0. +# ---------------------------------------------------------------------- +# +# Version: 1.01.01 +# Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. +# +# ---------------------------------------------------------------------- +# + +# +# Makefile for gmake +# libtm (system-dependent description) +# + +# T-Engine type +MACHINE = h83069 +TETYPE = app + +# default rules +include ../../../../etc/makerules + +# source files (system-dependent) +SRC = sio.c + +# include main makefile (common description) +include ../../src/Makefile.common diff --git a/lib/libtm/src/sysdepend/app_h83052/sio.c b/lib/libtm/src/sysdepend/app_h83052/sio.c new file mode 100644 index 0000000..22aad33 --- /dev/null +++ b/lib/libtm/src/sysdepend/app_h83052/sio.c @@ -0,0 +1,117 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +#include + +#define MSTCR ((_UB *)0x00ffff5e) +#define MSTOP (1 << 3) + +#define SMR ((_UB *)0x00ffffb8) // SCI #1 +#define BRR ((_UB *)0x00ffffb9) +#define SCR ((_UB *)0x00ffffba) +#define TDR ((_UB *)0x00ffffbb) +#define SSR ((_UB *)0x00ffffbc) +#define RDR ((_UB *)0x00ffffbd) +#define SCMR ((_UB *)0x00ffffbe) + +/* SSR */ +#define TDRE (1 << 7) +#define RDRF (1 << 6) +#define OER (1 << 5) +#define FER (1 << 4) +#define PER (1 << 3) +#define TEND (1 << 2) + +/* SCR */ +#define TE (1 << 5) +#define RE (1 << 4) + +#define SYSCLK (CPU_CLOCK) /* System clock (Hz) */ +#define UARTCLK (SYSCLK / 4) /* UART clock */ +#define RS_BAUD_RATE (38400UL) /* 38.4kbps */ + +char Sci2AsyncTx(unsigned char Data); +char Sci2AsyncRx(unsigned char *pData); + +int sio_send_frame(const unsigned char* buf, int size) +{ + int i; + + for(i = 0; i < size; i++) Sci2AsyncTx(buf[i]); + + return i; +} + +int sio_recv_frame(unsigned char* buf, int size) +{ + int i; + + for(i = 0; i < size; i++) while(Sci2AsyncRx(&buf[i])); + + return i; +} + +void sio_init( void ) +{ + unsigned long dly; + + *MSTCR &= ~MSTOP; // SCI power-up + *SCMR = 0x00; // SmartCard I/F disable + + *SCR = 0x00; // TE=0, RE=0 + *SMR = 0x01; // 8N1, system clock / 4 + + *BRR = (UARTCLK + 16 * RS_BAUD_RATE) / (32 * RS_BAUD_RATE) - 1; + + dly = SYSCLK / (2 * RS_BAUD_RATE); + while (dly--){ Asm("nop"); } + + *SCR = TE | RE; +} + +char Sci2AsyncTx(unsigned char Data) +{ + while (!(*SSR & TDRE)); + *TDR = Data; + *SSR &= ~TDRE; // SCI needs this procedure + while (!(*SSR & TEND)); + + return 1; +} + +char Sci2AsyncRx(unsigned char *pData) +{ + char ssr = *SSR; + + if (ssr & FER) { + *SSR &= ~FER; + return 1; + } + if (ssr & PER) { + *SSR &= ~PER; + return 2; + } + if (ssr & OER) { + *SSR &= ~OER; + return 3; + } + if (ssr & RDRF) { + *pData = *RDR; + *SSR &= ~RDRF; // SCI needs this procedure + return 0; + } + + return -1; +} + diff --git a/lib/libtm/src/sysdepend/app_h83069/sio.c b/lib/libtm/src/sysdepend/app_h83069/sio.c new file mode 100644 index 0000000..320ed48 --- /dev/null +++ b/lib/libtm/src/sysdepend/app_h83069/sio.c @@ -0,0 +1,117 @@ +/* + *---------------------------------------------------------------------- + * micro T-Kernel + * + * Copyright (C) 2006-2011 by Ken Sakamura. All rights reserved. + * micro T-Kernel is distributed under the T-License 2.0. + *---------------------------------------------------------------------- + * + * Version: 1.01.01 + * Released by T-Engine Forum(http://www.t-engine.org) at 2011/12/12. + * + *---------------------------------------------------------------------- + */ + +#include + +#define MSTCRH ((_UB *)0x00ffe01c) +#define MSTPH (1 << 1) + +#define SMR ((_UB *)0x00ffffb8) // SCI #1 +#define BRR ((_UB *)0x00ffffb9) +#define SCR ((_UB *)0x00ffffba) +#define TDR ((_UB *)0x00ffffbb) +#define SSR ((_UB *)0x00ffffbc) +#define RDR ((_UB *)0x00ffffbd) +#define SCMR ((_UB *)0x00ffffbe) + +/* SSR */ +#define TDRE (1 << 7) +#define RDRF (1 << 6) +#define OER (1 << 5) +#define FER (1 << 4) +#define PER (1 << 3) +#define TEND (1 << 2) + +/* SCR */ +#define TE (1 << 5) +#define RE (1 << 4) + +#define SYSCLK (CPU_CLOCK) /* System clock (Hz) */ +#define UARTCLK (SYSCLK / 4) /* UART clock */ +#define RS_BAUD_RATE (38400UL) /* 38.4kbps */ + +char Sci2AsyncTx(unsigned char Data); +char Sci2AsyncRx(unsigned char *pData); + +int sio_send_frame(const unsigned char* buf, int size) +{ + int i; + + for(i = 0; i < size; i++) Sci2AsyncTx(buf[i]); + + return i; +} + +int sio_recv_frame(unsigned char* buf, int size) +{ + int i; + + for(i = 0; i < size; i++) while(Sci2AsyncRx(&buf[i])); + + return i; +} + +void sio_init( void ) +{ + unsigned long dly; + + *MSTCRH &= ~MSTPH; // SCI power-up + *SCMR = 0x00; // SmartCard I/F disable + + *SCR = 0x00; // TE=0, RE=0 + *SMR = 0x01; // 8N1, system clock / 4 + + *BRR = (UARTCLK + 16 * RS_BAUD_RATE) / (32 * RS_BAUD_RATE) - 1; + + dly = SYSCLK / (2 * RS_BAUD_RATE); + while (dly--){ Asm("nop"); } + + *SCR = TE | RE; +} + +char Sci2AsyncTx(unsigned char Data) +{ + while (!(*SSR & TDRE)); + *TDR = Data; + *SSR &= ~TDRE; // SCI needs this procedure + while (!(*SSR & TEND)); + + return 1; +} + +char Sci2AsyncRx(unsigned char *pData) +{ + char ssr = *SSR; + + if (ssr & FER) { + *SSR &= ~FER; + return 1; + } + if (ssr & PER) { + *SSR &= ~PER; + return 2; + } + if (ssr & OER) { + *SSR &= ~OER; + return 3; + } + if (ssr & RDRF) { + *pData = *RDR; + *SSR &= ~RDRF; // SCI needs this procedure + return 0; + } + + return -1; +} +