Index: /ssp_aarch64/trunk/arm64_gcc/MANIFEST
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/MANIFEST	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/MANIFEST	(revision 353)
@@ -0,0 +1,27 @@
+PACKAGE ssp
+
+MANIFEST
+Makefile.prc
+arm64.h
+gic_config.c
+gic_config.h
+gic_support.S
+prc_cfg1_out.h
+prc_check.trb
+prc_config.c
+prc_config.h
+prc_design.txt
+prc_kernel.h
+prc_kernel.trb
+prc_rename.def
+prc_rename.h
+prc_sil.h
+prc_stddef.h
+prc_support.S
+prc_sym.def
+prc_test.h
+prc_timer.c
+prc_timer.cfg
+prc_timer.h
+prc_unrename.h
+prc_user.txt
Index: /ssp_aarch64/trunk/arm64_gcc/Makefile.prc
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/Makefile.prc	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/Makefile.prc	(revision 353)
@@ -0,0 +1,48 @@
+#
+#  @(#) $Id: Makefile.prc 1304 2008-08-27 07:28:36Z ertl-honda $
+#
+
+#
+#		Makefile ã®ãã­ã»ããµä¾å­é¨ï¼ARM64ç¨ï¼
+#
+
+PRCDIR = $(SRCDIR)/arch/$(PRC)_$(TOOL)
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+COPTS := $(COPTS)
+CDEFS := $(CDEFS)
+INCLUDES := $(INCLUDES) -I$(SRCDIR)/arch
+LDFLAGS := $(LDFLAGS)
+LIBS := $(LIBS)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIRS := $(KERNEL_DIRS) $(PRCDIR)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) prc_support.o gic_support.o
+KERNEL_COBJS := $(KERNEL_COBJS) prc_config.o gic_config.o prc_timer.o
+KERNEL_CFLAGS := $(KERNEL_CFLAGS)
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+#
+CFG_TABS := $(CFG_TABS) --symval-table $(PRCDIR)/prc_sym.def
+CFG1_OUT_LDFLAGS := $(CFG1_OUT_LDFLAGS)
+CFG_OBJS := $(CFG_OBJS)
+CFG2_OUT := $(CFG2_OUT)
+
+#
+#  ä¾å­é¢ä¿ã®å®ç¾©
+#
+cfg1_out.c: $(PRCDIR)/prc_sym.def
+kernel_cfg.timestamp: $(PRCDIR)/prc_kernel.trb
+check.timestamp: $(PRCDIR)/prc_check.trb
+
+#
+#  ãã®ä»
+#
+CLEAN_FILES := $(CLEAN_FILES)
+REALCLEAN_FILES := $(REALCLEAN_FILES)
+
Index: /ssp_aarch64/trunk/arm64_gcc/arm64.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/arm64.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/arm64.h	(revision 353)
@@ -0,0 +1,160 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: arm64.h 714 2018-05-29 05:52:19Z saito $
+ */
+#ifndef TOPPERS_ARM64_H
+#define TOPPERS_ARM64_H
+
+/*
+ *  PSTATE
+ */
+#define AARCH64_PSTATE_N         (1 << 31)
+#define AARCH64_PSTATE_Z         (1 << 30)
+#define AARCH64_PSTATE_C         (1 << 29)
+#define AARCH64_PSTATE_V         (1 << 28)
+#define AARCH64_PSTATE_SS        (1 << 21)
+#define AARCH64_PSTATE_IL        (1 << 20)
+#define AARCH64_PSTATE_D         (1 << 9)
+#define AARCH64_PSTATE_A         (1 << 8)
+#define AARCH64_PSTATE_I         (1 << 7)
+#define AARCH64_PSTATE_F         (1 << 6)
+#define AARCH64_PSTATE_MODE4     (1 << 4)
+#define AARCH64_PSTATE_MODE_MASK (AARCH64_PSTATE_MODE4 - 1)
+
+/*
+ *  DAIF
+ */
+#define AARCH64_DAIF_FIQ    UINT64_C(1)
+#define AARCH64_DAIF_IRQ    UINT64_C(2)
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  DAIFã®è¨­å®ããã³ç¶æ
+åç
+§
+ */
+Inline uint32_t
+aarch64_get_daif(void){
+    uint32_t daif;
+    Asm ("mrs %0, daif\n\t":"=r"(daif));
+    return daif;
+}
+
+Inline void
+aarch64_set_daif(uint32_t daif) {
+
+        Asm ("msr daif, %0\n\t" : : "r"(daif));
+}
+
+/*
+ *  DAIF.F ããã³ DAIF.I ã®ã»ãã/ã¯ãªã¢
+ */
+Inline void
+aarch64_set_daif_if(void) {
+    Asm ("msr daifset, %0\n\t"::"i"(AARCH64_DAIF_IRQ | AARCH64_DAIF_FIQ));
+}
+
+Inline void
+aarch64_clear_daif_if(void) {
+    Asm ("msr daifclr, %0\n\t"::"i"(AARCH64_DAIF_IRQ | AARCH64_DAIF_FIQ));
+}
+
+/*
+ *  DAIF.I ã®ç¶æ
+åç
+§
+ */
+Inline bool_t
+aarch64_sense_daif_irq(void) {
+    uint32_t daif;
+    bool_t state;
+
+    daif = aarch64_get_daif();
+
+    if(daif & AARCH64_PSTATE_I) {
+        state = true;
+    }
+    else {
+        state = false;
+    }
+
+    return state;
+}
+
+/*
+ *  DAIF.F ã®ç¶æ
+åç
+§
+ */
+Inline bool_t
+aarch64_sense_daif_fiq(void) {
+    uint32_t daif;
+    bool_t state;
+
+    daif = aarch64_get_daif();
+
+    if(daif & AARCH64_PSTATE_F) {
+        state = true;
+    }
+    else {
+        state = false;
+    }
+
+    return state;
+}
+
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_ARM64_H */
Index: /ssp_aarch64/trunk/arm64_gcc/gic_config.c
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/gic_config.c	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/gic_config.c	(revision 353)
@@ -0,0 +1,178 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: gic_kernel_impl.c 714 2016-03-31 05:52:19Z ertl-hiro $
+ */
+/*
+ *  GICä¾å­å¦çï¼ARM64ç¨ï¼
+ */
+#include "kernel_impl.h"
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®æä½
+ */
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®åæå
+ */
+void
+gicc_initialize(void)
+{
+        /*
+         *  CPUã¤ã³ã¿ãã§ã¼ã¹ãããã­ã»ããµã¸ã®å²è¾¼ã¿ä¿¡å·éåºãç¡å¹ã«ãã
+         */
+        sil_wrw_mem(GICC_CTLR, GICC_CTLR_DISABLE);
+
+        /*
+         *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãæä½åªå
+åº¦ã«è¨­å®
+         */
+        gicc_set_priority((GIC_PRI_LEVEL - 1) << GIC_PRI_SHIFT);
+
+        /*
+         *  å²è¾¼ã¿åªå
+åº¦ã®å
+¨ãããæå¹ã«
+         */
+        sil_wrw_mem(GICC_BPR, 0U);
+
+        /*
+         *  ã¢ã¯ãã£ããªå²è¾¼ã¿ãããã°ï¼EOIã«ããã¯ãªã¢ãã
+         */
+        sil_wrw_mem(GICC_EOIR, sil_rew_mem(GICC_IAR));
+
+        /*
+         *  CPUã¤ã³ã¿ãã§ã¼ã¹ãã¤ãã¼ãã«
+         */
+        sil_wrw_mem(GICC_CTLR, GICC_CTLR_ENABLE);
+}
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®çµäºå¦ç
+ */
+void
+gicc_terminate(void)
+{
+        sil_wrw_mem(GICC_CTLR, GICC_CTLR_DISABLE);
+}
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®æä½
+ */
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®åæå
+ */
+void
+gicd_initialize(void)
+{
+        int             i;
+
+        /*
+         *  ãã£ã¹ããªãã¥ã¼ã¿ãç¡å¹ã«ãã¦è»¢éãåæ­¢
+         */
+        sil_wrw_mem(GICD_CTLR, GICD_CTLR_DISABLE);
+
+        /*
+         *  ãã¹ã¦ã®å²è¾¼ã¿ã®è»¢éãç¦æ­¢
+         */
+        for (i = 0; i < (GIC_TNUM_INTNO + 31) / 32; i++) {
+                sil_wrw_mem(GICD_ICENABLER(i), 0xffffffffU);
+        }
+
+        /*
+         *  ãã¹ã¦ã®å²è¾¼ã¿å²è¾¼ã¿ä¿çç¶æ
+ãã¯ãªã¢
+         */
+        for (i = 0; i < (GIC_TNUM_INTNO + 31) / 32; i++) {
+                sil_wrw_mem(GICD_ICPENDR(i), 0xffffffffU);
+        }
+
+        /*
+         *  ãã¹ã¦ã®å²è¾¼ã¿ãæä½åªå
+åº¦ã«è¨­å®
+         */
+        for (i = 0; i < (GIC_TNUM_INTNO + 3) / 4; i++){
+                sil_wrw_mem(GICD_IPRIORITYR(i), 0xffffffffU);
+        }
+        /*
+         *  ãã¹ã¦ã®å
+±æããªãã§ã©ã«å²è¾¼ã¿ã®ã¿ã¼ã²ããããã­ã»ããµ0ã«è¨­å®
+         */
+        for (i = GIC_INTNO_SPI0 / 4; i < (GIC_TNUM_INTNO + 3) / 4; i++) {
+                sil_wrw_mem(GICD_ITARGETSR(i), 0x01010101U);
+        }
+
+        /*
+         *  ãã¹ã¦ã®ããªãã§ã©ã«å²è¾¼ã¿ãã¬ãã«ããªã¬ã«è¨­å®
+         */
+        for (i = GIC_INTNO_PPI0 / 16; i < (GIC_TNUM_INTNO + 15) / 16; i++) {
+                sil_wrw_mem(GICD_ICFGR(i), 0x00000000U);
+        }
+        /*
+         *  ãã£ã¹ããªãã¥ã¼ã¿ãæå¹ã«ãã¦åªå
+åº¦è¦åã«ããå²è¾¼ã¿ã®è»¢éãéå§
+         */
+        sil_wrw_mem(GICD_CTLR, GICD_CTLR_ENABLE);
+}
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®çµäºå¦ç
+ */
+void
+gicd_terminate(void)
+{
+        sil_wrw_mem(GICD_CTLR, GICD_CTLR_DISABLE);
+}
+
Index: /ssp_aarch64/trunk/arm64_gcc/gic_config.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/gic_config.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/gic_config.h	(revision 353)
@@ -0,0 +1,348 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: gic_config.h 714 2018-05-29 05:52:19Z saito $
+ */
+
+/*
+ *		ã«ã¼ãã«ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©ä¾å­é¨ï¼GICç¨ï¼
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼target_config.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ã
+ *  ããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼
+ *  ä»ã®ãã¡ã¤ã«ããç´æ¥ã¤ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_GIC_KERNEL_IMPL_H
+#define TOPPERS_GIC_KERNEL_IMPL_H
+
+#include <sil.h>
+#include "arm64.h"
+
+/*
+ *  å²è¾¼ã¿çªå·ã®å®ç¾©
+ */
+#define GIC_INTNO_PPI0		16U
+#define GIC_INTNO_SPI0		32U
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ã®æä½
+ *
+ *  å²è¾¼ã¿åªå
+åº¦ã®å
+é¨è¡¨ç¾ã¯ï¼uint_tåã§è¡¨ãï¼0ãæé«åªå
+åº¦ã§ï¼å¤ãå¤§ã
+ *  ãã»ã©åªå
+åº¦ãä¸ãããã®ã¨ããï¼GICã®ã¬ã¸ã¹ã¿æ§æã¨æ´åãããããã«ï¼
+ *  åªå
+åº¦ã®æ®µæ°ã256æ®µéã®æã«ãããã¦è¡¨ãï¼
+ */
+#define GIC_PRI_LEVEL		(TMAX_INTPRI - TMIN_INTPRI + 2)
+
+#if GIC_PRI_LEVEL == 16
+#define GIC_PRI_SHIFT		4
+#define GIC_PRI_MASK		UINT_C(0x0f)
+#elif GIC_PRI_LEVEL == 32
+#define GIC_PRI_SHIFT		3
+#define GIC_PRI_MASK		UINT_C(0x1f)
+#elif GIC_PRI_LEVEL == 64
+#define GIC_PRI_SHIFT		2
+#define GIC_PRI_MASK		UINT_C(0x3f)
+#elif GIC_PRI_LEVEL == 128
+#define GIC_PRI_SHIFT		1
+#define GIC_PRI_MASK		UINT_C(0x7f)
+#elif GIC_PRI_LEVEL == 256
+#define GIC_PRI_SHIFT		0
+#define GIC_PRI_MASK		UINT_C(0xff)
+#else
+#error Invalid number of priority levels for GIC.
+#endif /* GIC_PRI_LEVEL == 16 */
+
+/* å¤é¨è¡¨ç¾ã¸ã®å¤æ */
+#define EXT_IPM(pri) \
+			(((PRI)((pri) >> GIC_PRI_SHIFT)) - (GIC_PRI_LEVEL - 1))
+
+/* å
+é¨è¡¨ç¾ã¸ã®å¤æ */
+#define INT_IPM(ipm) \
+			(((uint_t)((ipm) + (GIC_PRI_LEVEL - 1))) << GIC_PRI_SHIFT)
+
+/*
+ *  GICã¬ã¸ã¹ã¿ã®ã¢ãã¬ã¹ãå®ç¾©ããããã®ãã¯ã­
+ *
+ *  GICã¬ã¸ã¹ã¿ã®ã¢ãã¬ã¹ãï¼ã¢ã»ã³ããªè¨èªãããåç
+§ã§ããããã«ããã
+ *  ãã®ãã¯ã­ï¼
+ */
+#ifndef GIC_REG
+#define GIC_REG(base, offset)	((uint32_t *)(uintptr_t)((base) + (offset ## U)))
+#endif /* GIC_REG */
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹é¢é£ã®å®ç¾©
+ */
+#define GICC_CTLR		GIC_REG(GICC_BASE, 0x00)
+#define GICC_PMR		GIC_REG(GICC_BASE, 0x04)
+#define GICC_BPR		GIC_REG(GICC_BASE, 0x08)
+#define GICC_IAR		GIC_REG(GICC_BASE, 0x0C)
+#define GICC_EOIR		GIC_REG(GICC_BASE, 0x10)
+#define GICC_RPR		GIC_REG(GICC_BASE, 0x14)
+#define GICC_HPIR		GIC_REG(GICC_BASE, 0x18)
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹å¶å¾¡ã¬ã¸ã¹ã¿ï¼GICC_CTLRï¼ã®è¨­å®å¤
+ *  ï¼GICv1ã§ã»ã­ã¥ãªãã£æ¡å¼µããªãå ´åï¼
+ */
+#define GICC_CTLR_DISABLE		UINT_C(0x00)
+#define GICC_CTLR_ENABLE		UINT_C(0x01)
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿é¢é£ã®å®ç¾©
+ */
+#define GICD_CTLR		GIC_REG(GICD_BASE, 0x000)
+#define GICD_TYPER		GIC_REG(GICD_BASE, 0x004)
+#define GICD_IIDR		GIC_REG(GICD_BASE, 0x008)
+#define GICD_IGROUPR(n)		GIC_REG(GICD_BASE, 0x080 + (n) * 4)
+#define GICD_ISENABLER(n)	GIC_REG(GICD_BASE, 0x100 + (n) * 4)
+#define GICD_ICENABLER(n)	GIC_REG(GICD_BASE, 0x180 + (n) * 4)
+#define GICD_ISPENDR(n)		GIC_REG(GICD_BASE, 0x200 + (n) * 4)
+#define GICD_ICPENDR(n)		GIC_REG(GICD_BASE, 0x280 + (n) * 4)
+#define GICD_ISACTIVER(n)	GIC_REG(GICD_BASE, 0x300 + (n) * 4)
+#define GICD_ICACTIVER(n)	GIC_REG(GICD_BASE, 0x380 + (n) * 4)
+#define GICD_IPRIORITYR(n)	GIC_REG(GICD_BASE, 0x400 + (n) * 4)
+#define GICD_ITARGETSR(n)	GIC_REG(GICD_BASE, 0x800 + (n) * 4)
+#define GICD_ICFGR(n)		GIC_REG(GICD_BASE, 0xc00 + (n) * 4)
+#define GICD_NSCAR(n)		GIC_REG(GICD_BASE, 0xe00 + (n) * 4)
+#define GICD_SGIR		GIC_REG(GICD_BASE, 0xf00)
+#define GICD_CPENDSGIR(n)	GIC_REG(GICD_BASE, 0xf10 + (n) * 4)
+#define GICD_SPENDSGIR(n)	GIC_REG(GICD_BASE, 0xf20 + (n) * 4)
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ï¼GICD_CTLRï¼ã®è¨­å®å¤
+ */
+#define GICD_CTLR_DISABLE	UINT_C(0x00)
+#define GICD_CTLR_ENABLE	UINT_C(0x01)
+
+/*
+ *  å²è¾¼ã¿ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¬ã¸ã¹ã¿ï¼GICD_ICFGRnï¼ã®è¨­å®å¤
+ */
+#define GICD_ICFGRn_LEVEL	UINT_C(0x00)
+#define GICD_ICFGRn_EDGE	UINT_C(0x02)
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®æä½
+ */
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãè¨­å®ï¼priã¯å
+é¨è¡¨ç¾ï¼
+ */
+Inline void
+gicc_set_priority(uint_t pri)
+{
+	sil_wrw_mem(GICC_PMR, pri);
+}
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãåå¾ï¼å
+é¨è¡¨ç¾ã§è¿ãï¼
+ */
+Inline uint_t
+gicc_get_priority(void)
+{
+	return(sil_rew_mem(GICC_PMR));
+}
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®åæå
+ */
+extern void gicc_initialize(void);
+
+/*
+ *  CPUã¤ã³ã¿ãã§ã¼ã¹ã®çµäº
+ */
+extern void gicc_terminate(void);
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®æä½
+ */
+
+/*
+ *  å²è¾¼ã¿ç¦æ­¢ï¼å²è¾¼ã¿ã¤ãã¼ãã«ã®ã¯ãªã¢ï¼
+ */
+Inline void
+gicd_disable_int(INTNO intno)
+{
+	sil_wrw_mem(GICD_ICENABLER(intno / 32), (1U << (intno % 32)));
+}
+
+/*
+ *  å²è¾¼ã¿è¨±å¯ï¼å²è¾¼ã¿ã¤ãã¼ãã«ã®ã»ããï¼
+ */
+Inline void
+gicd_enable_int(INTNO intno)
+{
+	sil_wrw_mem(GICD_ISENABLER(intno / 32), (1U << (intno % 32)));
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã£ã³ã°ã®ã¯ãªã¢
+ */
+Inline void
+gicd_clear_pending(INTNO intno)
+{
+	sil_wrw_mem(GICD_ICPENDR(intno / 32), (1U << (intno % 32)));
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã£ã³ã°ã®ã»ãã
+ */
+Inline void
+gicd_set_pending(INTNO intno)
+{
+	sil_wrw_mem(GICD_ISPENDR(intno / 32), (1U << (intno % 32)));
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã£ã³ã°ã®ãã§ãã¯
+ */
+Inline bool_t
+gicd_probe_pending(INTNO intno)
+{
+    return((sil_rew_mem(GICD_ISPENDR(intno / 32)) & (1U << (intno % 32))) != 0U);
+}
+
+/*
+ *  å²è¾¼ã¿ã®ã³ã³ãã£ã°ã¬ã¼ã·ã§ã³
+ */
+Inline void
+gicd_config(INTNO intno, uint_t config)
+{
+	uint_t		shift = (intno % 16) * 2;
+	uint32_t	reg;
+
+	reg = sil_rew_mem(GICD_ICFGR(intno / 16));
+	reg &= ~(0x03U << shift);
+	reg |= (config << shift);
+	sil_wrw_mem(GICD_ICFGR(intno / 16), reg);
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ããå²è¾¼ã¿åªå
+åº¦ã®è¨­å®ï¼priã¯å
+é¨è¡¨ç¾ï¼
+ */
+Inline void
+gicd_set_priority(INTNO intno, uint_t pri)
+{
+	uint_t		shift = (intno % 4) * 8;
+	uint32_t	reg;
+
+	reg = sil_rew_mem(GICD_IPRIORITYR(intno / 4));
+	reg &= ~(0xffU << shift);
+	reg |= (pri << shift);
+	sil_wrw_mem(GICD_IPRIORITYR(intno / 4), reg);
+}
+
+/*
+ *  å²è¾¼ã¿ã¿ã¼ã²ãããã­ã»ããµã®è¨­å®
+ *
+ *  prcsã¯ï¼ã¿ã¼ã²ããã¨ãããã­ã»ããµãè¡¨ããããã®ãããæ¯è«çåã§æ
+ *  å®ããï¼
+ *		ãã­ã»ããµ0 : 0x01
+ *		ãã­ã»ããµ1 : 0x02
+ *		ãã­ã»ããµ2 : 0x04
+ *		ãã­ã»ããµ3 : 0x08
+ */
+Inline void
+gicd_set_target(INTNO intno, uint_t prcs)
+{
+    uint_t      shift = (intno % 4) * 8;
+    uint32_t    reg;
+
+    reg = sil_rew_mem(GICD_ITARGETSR(intno / 4));
+    reg &= ~(0xffU << shift);
+    reg |= (prcs << shift);
+    sil_wrw_mem(GICD_ITARGETSR(intno / 4), reg);
+}
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®åæå
+ */
+extern void gicd_initialize(void);
+
+/*
+ *  ãã£ã¹ããªãã¥ã¼ã¿ã®çµäº
+ */
+extern void gicd_terminate(void);
+
+/*
+ *  ä¾å¤å
+¥å£ã®GICæä½ï¼gic_support.Sï¼
+ */
+extern void gic_exc_entry(void);
+
+/*
+ *  å²è¾¼ã¿å
+¥å£ã®GICæä½ï¼gic_support.Sï¼
+ */
+extern void gic_int_entry(void);
+
+
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_GIC_KERNEL_IMPL_H */
Index: /ssp_aarch64/trunk/arm64_gcc/gic_support.S
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/gic_support.S	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/gic_support.S	(revision 353)
@@ -0,0 +1,144 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ *  ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã« ã¢ã»ã³ããªè¨èªé¨ï¼GICï¼
+ */
+
+#define TOPPERS_MACRO_ONLY
+#define UINT_C(val)	(val)		/* uint_tåã®å®æ°ãä½ããã¯ã­ */
+#define ULONG_C(val)	(val)		/* ulong_tåã®å®æ°ãä½ããã¯ã­ */
+#define CAST(type, val)	(val)		/* åã­ã£ã¹ããè¡ããã¯ã­ */
+
+#define GIC_REG(base, offset)   ((base) + (offset))
+
+#include "kernel_impl.h"
+
+/*
+ *  ä¾å¤å
+¥å£ã®GICæä½
+ *    x22: ä¾å¤çªå·(0..7)
+ */
+    .text
+    .align 2
+    .global gic_exc_entry
+gic_exc_entry:
+    mov    x0, sp             // å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®ä¿å­
+    ldr    x9, =GICC_PMR
+    ldr    x9, [x9]
+    str    x9, [x0, #0]
+
+    str    x22, [x0, #8]      // ä¾å¤çªå·ã®ä¿å­
+
+    mov    x1, x22            // å¼æ°ãã»ãããã¦ call_exc_handler å¼ã³åºã
+    ldr    x30, =gic_ret_int
+    b      call_exc_handler
+
+/*
+ *  å²è¾¼ã¿å
+¥å£ã®GICæä½
+ */
+    .text
+    .align 2
+    .global gic_int_entry
+gic_int_entry:
+    mov    x0,    sp
+    /*
+     * å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½
+     */
+    ldr    x9, =GICC_IAR      //  å²è¾¼ã¿è¦å ãä¿å­
+    ldr    w9, [x9]
+    str    w9, [x0, #8]
+
+    ldr    x10, =GICC_RPR     //  å²è¾¼ã¿è¦å ã®åªå
+åº¦ãå²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã«ã»ãã
+    ldr    w10, [x10]
+
+    ldr    x11, =GICC_PMR
+    ldr    w12, [x11]         //  å²è¾¼ã¿çºçåã®ãã¹ã¯ã®å¤ãåãåºãã¦ãã
+    str    w10, [x11]
+
+    dsb    sy                 // å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã»ãããããã®ãå¾
+ã¤
+
+    str    w12, [x0, #0]      //  å²è¾¼ã¿çºçåã®åªå
+åº¦ãã¹ã¯ãä¿å­
+    ldr    x11, =GICC_EOIR    //  EOIã®çºè¡
+    str    w9, [x11]
+
+    mov    w0, w9             // å¼æ°ãã»ãããã¦ call_int_handler å¼ã³åºã
+    ldr    x30, =gic_ret_int
+    b     call_int_handler
+
+
+/*
+ *  å²è¾¼ã¿åºå£ã®GICæä½
+ */
+    .text
+    .align 2
+gic_ret_int:
+    mov    x0, sp
+    ldr    w9, [x0, #0]       // å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå
+ã«æ»ã
+    ldr    x10, =GICC_PMR
+    str    w9, [x10]
+
+    dsb    sy                 // å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã»ãããããã®ãå¾
+ã¤
+
+    b      ret_int
Index: /ssp_aarch64/trunk/arm64_gcc/prc_cfg1_out.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_cfg1_out.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_cfg1_out.h	(revision 353)
@@ -0,0 +1,12 @@
+/*
+ *  @(#) $Id: prc_cfg1_out.h 1304 2008-08-27 07:28:36Z ertl-honda $
+ */
+
+/*
+ *		cfg1_out.cããªã³ã¯ããããã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+ */
+
+void sta_ker(void){}
+STK_T *const	_kernel_istkpt = 0x00;
+void * _kernel_vectors = 0x00;
Index: /ssp_aarch64/trunk/arm64_gcc/prc_check.trb
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_check.trb	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_check.trb	(revision 353)
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+# 
+#		ãã¹3ã®çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+# 
+#  $Id: core_check.trb 730 2016-04-03 02:04:52Z ertl-hiro $
+#
+
+#
+#  ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+IncludeTrb("kernel/kernel_check.trb")
+
+#
+#  å²è¾¼ã¿ãã³ãã©ãã¼ãã«ã«é¢ãããã§ãã¯
+#
+# DEF_INHã§ç»é²ããå²è¾¼ã¿ãã³ãã©ã®ã¿ãã§ãã¯ããï¼éã«è¨ãã¨ï¼ã³ã³ãã£
+# ã®ã¥ã¬ã¼ã¿ã§çæããå²è¾¼ã¿ãã³ãã©ãï¼default_int_handlerã®ãã§ãã¯ã¯
+# è¡ããªãï¼
+#
+inhinib_entry = SYMBOL("_kernel_inhinib_entry")
+$cfgData[:DEF_INH].each do |key, params|
+  inthdr = PEEK(inhinib_entry, $sizeof_FP)
+
+  #	å²è¾¼ã¿ãã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯
+  if (inthdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :inthdr, :inhno, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && inthdr == 0
+    error_wrong_id("E_PAR", params, :inthdr, :inhno, "null")
+  end
+
+  inhinib_entry += $sizeof_FP
+end
+
+#
+#  CPUä¾å¤ãã³ãã©ãã¼ãã«ã«é¢ãããã§ãã¯
+#
+# DEF_EXCã§ç»é²ããCPUä¾å¤ãã³ãã©ã®ã¿ãã§ãã¯ããï¼éã«è¨ãã¨ï¼
+# default_exc_handlerã®ãã§ãã¯ã¯è¡ããªãï¼
+#
+excinib_entry = SYMBOL("_kernel_excinib_entry")
+$cfgData[:DEF_EXC].each do |key, params|
+  exchdr = PEEK(excinib_entry, $sizeof_FP)
+
+  # CPUä¾å¤ãã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯
+  if (exchdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :exchdr, :excno, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && exchdr == 0
+    error_wrong_id("E_PAR", params, :exchdr, :excno, "null")
+  end
+
+  excinib_entry += $sizeof_FP
+end
Index: /ssp_aarch64/trunk/arm64_gcc/prc_config.c
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_config.c	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_config.c	(revision 353)
@@ -0,0 +1,217 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2008 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2010 by Meika Sugimoto
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id: prc_config.c 1304 2008-08-27 07:28:36Z ertl-honda $
+ */
+
+/*
+ *		ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã«ï¼ARM64ç¨ï¼
+ */
+
+#include "kernel_impl.h"
+#include <t_syslog.h>
+
+/* å²è¾¼ã¿ãã¹ãæ°ã®ç®¡ç */
+uint8_t intnest;
+
+/*
+ *  ãã­ã»ããµä¾å­ã®åæå
+ */
+void
+prc_initialize(void)
+{
+	/* å²è¾¼ã¿ãã¹ãæ°ã®åæå */
+	intnest = 0u;
+
+	/*
+	 *  GICã®è¨­å®
+	 */
+        gicd_initialize();
+        gicc_initialize();
+}
+
+/*
+ *  ãã­ã»ããµä¾å­ã®çµäºå¦ç
+ */
+void
+prc_terminate(void)
+{
+	while(1)
+		;
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³å±æ§ã®è¨­å®
+ */
+void
+x_config_int(INTNO intno, ATR intatr, PRI intpri)
+{
+        assert(VALID_INTNO(intno));
+        assert(TMIN_INTPRI <= intpri && intpri <= TMAX_INTPRI);
+
+        /*
+         *  å²è¾¼ã¿ãç¦æ­¢
+         *
+         *  å²è¾¼ã¿ãåãä»ããã¾ã¾ï¼ã¬ãã«ããªã¬ï¼ã¨ãã¸ããªã¬ã®è¨­å®ãï¼å²
+         *  è¾¼ã¿åªå
+åº¦ã®è¨­å®ãè¡ãã®ã¯å±éºãªããï¼å²è¾¼ã¿å±æ§ã«ãããããï¼
+         *  ä¸æ¦ãã¹ã¯ããï¼
+         */
+        x_disable_int(intno);
+
+        /*
+         *  å²è¾¼ã¿ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+         */
+
+        if ((intatr & TA_EDGE) != 0U) {
+                gicd_config(intno, GICD_ICFGRn_EDGE);
+                x_clear_int(intno);
+        }
+        else {
+                gicd_config(intno, GICD_ICFGRn_LEVEL);
+        }
+
+        /*
+         *  å²è¾¼ã¿åªå
+åº¦ã¨ã¿ã¼ã²ãããã­ã»ããµãè¨­å®
+         */
+        gicd_set_priority(intno, INT_IPM(intpri));
+        gicd_set_target(intno, 1U << ARM_PRC_INDEX);
+
+        /*
+         * å²è¾¼ã¿ãè¨±å¯
+         */
+        if ((intatr & TA_ENAINT) != 0U) {
+                x_enable_int(intno);
+        }
+}
+
+#ifndef OMIT_DEFAULT_EXC_HANDLER
+/*
+ *  ç»é²ããã¦ããªãä¾å¤ãçºçããã¨å¼ã³åºããã
+ */
+void
+default_exc_handler(void *p_excinf)
+{
+    uint64_t gicc_pmr = *(((uint64_t*)p_excinf) + 0);
+    uint64_t excno    = *(((uint64_t*)p_excinf) + 1);
+    // ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´é
+    uint64_t adj      = *(((uint64_t*)p_excinf) + 3) >> 3;
+    uint64_t esr, pc, spsr, sp;
+
+    esr      = *(((uint64_t*)p_excinf) + 4 + adj);
+    pc       = *(((uint64_t*)p_excinf) + 5 + adj);
+    spsr     = *(((uint64_t*)p_excinf) + 6 + adj);
+    sp       = *(((uint64_t*)p_excinf) + 38 + adj);
+
+    syslog(LOG_EMERG, "\nUnregistered CPU Exception occured.");
+    syslog(LOG_EMERG, "EXCNO = %08x ESR = %08x GICC_PMR = %08x ", excno, esr, gicc_pmr);
+    syslog(LOG_EMERG, "PC=%08x%08x SP = %08x%08x SPSR = %08x",
+        (uint32_t)((pc & UINT64_C(0xffffffff00000000))>>32), (uint32_t)(pc & UINT64_C(0xffffffff)),
+        (uint32_t)((sp & UINT64_C(0xffffffff00000000))>>32), (uint32_t)(sp & UINT64_C(0xffffffff)),
+        (uint32_t)spsr);
+
+    target_exit();
+}
+#endif /* OMIT_DEFAULT_EXC_HANDLER */
+
+#ifndef OMIT_DEFAULT_INT_HANDLER
+/*
+ *  æªç»é²ã®å²è¾¼ã¿ãçºçããå ´åã«å¼ã³åºããã
+ */
+void
+default_int_handler(void)
+{
+    syslog(LOG_EMERG, "\nUnregistered Interrupt occurs.");
+
+    target_exit();
+}
+#endif /* OMIT_DEFAULT_INT_HANDLER */
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©ã®å¼ã³åºã
+ */
+void
+call_int_handler(uint32_t intno)
+{
+    intnest++;
+
+    i_unlock_cpu();
+
+    // ãã³ãã©ã®å¼ã³åºã
+    inh_table[intno]();
+
+    i_lock_cpu();
+
+    intnest--;
+}
+
+/*
+ *  CPUä¾å¤ãã³ãã©ã®å¼ã³åºã
+ */
+void
+call_exc_handler(void *p_excinf, uint32_t excno)
+{
+    intnest++;
+
+    // CPUä¾å¤çºçæã¯CPUã­ãã¯ãã©ã°ãæä½ããªã
+
+    // ãã³ãã©ã®å¼ã³åºã
+    exc_table[excno](p_excinf);
+
+    i_lock_cpu();
+
+    intnest--;
+}
+
Index: /ssp_aarch64/trunk/arm64_gcc/prc_config.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_config.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_config.h	(revision 353)
@@ -0,0 +1,446 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2008 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2015,2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id: prc_config.h 1304 2008-08-27 07:28:36Z ertl-honda $
+ */
+
+/*
+ *		ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã«ï¼ARM64ç¨ï¼
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼target_config.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯
+ *  ã«ã¼ãããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ãã
+ *  ç´æ¥ã¤ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_PRC_CONFIG_H
+#define TOPPERS_PRC_CONFIG_H
+
+#include "gic_config.h"
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯åæå¤
+ */
+#define TOPPERS_ISTKPT(istk, istksz) ((STK_T *)((char *)(istk) + (istksz)))
+
+/*
+ *  å²è¾¼ã¿ãã¹ãæ°
+ */
+extern uint8_t intnest;
+
+/*
+ *  ã³ã³ãã­ã¹ãã®åç
+§
+ *
+ */
+Inline bool_t
+sense_context(void)
+{
+	bool_t ctx;
+
+	if (intnest > 0u){
+		ctx = true;
+	}
+	else {
+		ctx = false;
+	}
+
+	return ctx;
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  TOPPERSæ¨æºå²è¾¼ã¿å¦çã¢ãã«ã®å®ç¾
+ *
+ *  å
+¨å²è¾¼ã¿ã­ãã¯ãã©ã°ã¨ãã¦ PSTATE.F ããã³ PSTATE.I ãç¨ãã
+ *  CPUã­ãã¯ãã©ã°ã¨ãã¦ PSTATE.Iããç¨ãã
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¨ãã¦ GICC_PMR ã¬ã¸ã¹ã¿ãç¨ããï¼
+ */
+
+/*
+ *  TIPM_ENAALLï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ï¼ã®å
+é¨è¡¨ç¾
+ */
+#define IIPM_ENAALL  (0)
+
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã¸ã®ç§»è¡
+ */
+Inline void
+x_lock_cpu(void)
+{
+    aarch64_set_daif_if();
+}
+
+#define t_lock_cpu()    x_lock_cpu()
+#define i_lock_cpu()    x_lock_cpu()
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®è§£é¤
+ */
+Inline void
+x_unlock_cpu(void)
+{
+    aarch64_clear_daif_if();
+}
+
+#define t_unlock_cpu()    x_unlock_cpu()
+#define i_unlock_cpu()    x_unlock_cpu()
+
+/*
+ *  CPUã­ãã¯ç¶æ
+ã®åç
+§
+ */
+Inline bool_t
+x_sense_lock(void)
+{
+    bool_t state;
+
+    if(aarch64_sense_daif_irq() && aarch64_sense_daif_fiq()) {
+        state = true;
+    }
+    else {
+        state = false;
+    }
+
+    return state;
+}
+
+#define t_sense_lock()    x_sense_lock()
+#define i_sense_lock()    x_sense_lock()
+
+
+/*
+ * ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®è¨­å®
+ *
+ *  CPUã­ãã¯ãã©ã°ãã¯ãªã¢ããã¦ããæã¯ï¼ãã¼ãã¦ã§ã¢ã®å²è¾¼ã¿åªå
+åº¦ã
+ *  ã¹ã¯ãè¨­å®ããï¼CPUã­ãã¯ãã©ã°ãã»ããããã¦ããæã¯ï¼saved_iipm
+ *  ãè¨­å®ãï¼ããã«ï¼ãã¼ãã¦ã§ã¢ã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãï¼è¨­å®ãããã¨
+ *  ããï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¨TIPM_LOCKã®é«ãæ¹ã«è¨­å®ããï¼
+ */
+Inline void
+x_set_ipm(PRI intpri)
+{
+    gicc_set_priority(INT_IPM(intpri));
+}
+
+#define t_set_ipm(intpri)    x_set_ipm(intpri)
+#define i_set_ipm(intpri)    x_set_ipm(intpri)
+
+/*
+ * ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®åç
+§
+ *
+ *  CPUã­ãã¯ãã©ã°ãã¯ãªã¢ããã¦ããæã¯ãã¼ãã¦ã§ã¢ã®å²è¾¼ã¿åªå
+åº¦ã
+ *  ã¹ã¯ãï¼ã»ããããã¦ããæã¯saved_iipmãåç
+§ããï¼
+ */
+Inline PRI
+x_get_ipm(void)
+{
+    return(EXT_IPM(gicc_get_priority()));
+}
+
+#define t_get_ipm()    x_get_ipm()
+#define i_get_ipm()    x_get_ipm()
+
+/*
+ *  ãã£ã¹ãããã£ã®åä½éå§ï¼prc_support.Sï¼
+ *
+ *  start_dispatchã¯ï¼ã«ã¼ãã«èµ·åæã«å¼ã³åºãã¹ããã®ã§ï¼ãã¹ã¦ã®å²è¾¼
+ *  ã¿ãç¦æ­¢ããç¶æ
+ï¼å²è¾¼ã¿ã­ãã¯ç¶æ
+ã¨åç­ã®ç¶æ
+ï¼ã§å¼ã³åºããªããã°
+ *  ãªããªãï¼
+ */
+extern void start_dispatch(void) NoReturn;
+
+
+/*
+ *  ã«ã¼ãã«ã®çµäºå¦çã®å¼åºãï¼prc_support.Sï¼
+ *
+ *  call_exit_kernelã¯ï¼ã«ã¼ãã«ã®çµäºæã«å¼ã³åºãã¹ããã®ã§ï¼éã¿ã¹ã¯
+ *  ã³ã³ãã­ã¹ãã«åãæãã¦ï¼ã«ã¼ãã«ã®çµäºå¦çï¼exit_kernelï¼ãå¼ã³åº
+ *  ãï¼
+ */
+extern void call_exit_kernel(void) NoReturn;
+
+/*
+ *  ã¢ã¤ãã«ã«ã¼ãã®å®è£
+
+ *
+ *  åã«CPUã­ãã¯ç¶æ
+ã¨CPUã­ãã¯è§£é¤ç¶æ
+ãå¼ã³åºãå®è£
+ã¨ããï¼
+ *  ã¹ãªã¼ãã¢ã¼ãã«å
+¥ããå ´åã¯æ¬å¦çãwfiå½ä»¤ãç¨ãã¦æ¸ãæããã°è¯ãï¼
+ */
+Inline void
+idle_loop(void)
+{
+    x_unlock_cpu();
+    /* CPUã¢ã³ã­ãã¯ => CPUã­ãã¯  */
+    x_lock_cpu();
+}
+
+/*
+ *  å²è¾¼ã¿çªå·ã»å²è¾¼ã¿ãã³ãã©çªå·
+ *
+ *  å²è¾¼ã¿ãã³ãã©çªå·(inhno)ã¨å²è¾¼ã¿çªå·(intno)ã¯ï¼
+ *  å²ãè¾¼ã¿çºçæã«GICC_IAR ã«è¨­å®ãããä¾å¤çªå·ã¨ããï¼
+ */
+
+/*
+ *  å²è¾¼ã¿çªå·ã®ç¯å²ã®å¤å®
+ */
+#define VALID_INTNO(intno)           ((TMIN_INTNO <= (intno)) && ((intno) <= TMAX_INTNO))
+#define VALID_INTNO_DISINT(intno)    VALID_INTNO(intno)
+#define VALID_INTNO_CFGINT(intno)    VALID_INTNO(intno)
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©ã®è¨­å®
+ */
+Inline void
+x_define_inh(INHNO inhno, FP int_entry)
+{
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©ã®åºå
+¥å£å¦çã®çæãã¯ã­
+ *
+ */
+#define INT_ENTRY(inhno, inthdr)    inthdr
+#define INTHDR_ENTRY(inhno, inhno_num, inthdr) extern void inthdr(void);
+
+/*
+ *  å²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°
+ */
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³è¨­å®ãã¼ãã«ï¼kernel_cfg.cï¼
+ *
+ *  å²è¾¼ã¿å±æ§ãè¨­å®ããã¦ããããå¤å¥ããããã®ãã¼ãã«ï¼kernel_cfg.cï¼
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ãã¦å²è¾¼ã¿å±æ§ãè¨­å®ããã¦ããã°1ï¼è¨­å®ããã¦ã
+ *  ãªããã°0ãä¿æãããã¼ãã«ï¼
+ */
+extern const uint8_t intcfg_table[];
+
+
+/*
+ *  å²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ã®ã»ãã
+ *
+ *  intnoã§æå®ãããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ããå²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ã®ã»ã
+ *  ããï¼å²è¾¼ã¿ãç¦æ­¢ããï¼å²è¾¼ã¿å±æ§ãè¨­å®ããã¦ããªãå²è¾¼ã¿è¦æ±ã©ã¤
+ *  ã³ãæå®ãããå ´åã«ã¯ï¼falseãè¿ãï¼
+ */
+Inline bool_t
+x_disable_int(INTNO intno)
+{
+    if (intcfg_table[intno] == 0U) {
+        return(false);
+    }
+    gicd_disable_int(intno);
+    return(true);
+}
+
+
+#define t_disable_int(intno) x_disable_int(intno)
+#define i_disable_int(intno) x_disable_int(intno)
+
+/*
+ *  å²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ã®ã¯ãªã¢
+ *
+ *  intnoã§æå®ãããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ããå²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ã®ã¯ãª
+ *  ã¢ãï¼å²è¾¼ã¿ãè¨±å¯ããï¼å²è¾¼ã¿å±æ§ãè¨­å®ããã¦ããªãå²è¾¼ã¿è¦æ±ã©ã¤
+ *  ã³ãæå®ãããå ´åã«ã¯ï¼falseãè¿ãï¼
+ */
+Inline bool_t
+x_enable_int(INTNO intno)
+{
+    if (intcfg_table[intno] == 0U) {
+        return(false);
+    }
+    gicd_enable_int(intno);
+    return(true);
+}
+
+
+#define t_enable_int(intno) x_enable_int(intno)
+#define i_enable_int(intno) x_enable_int(intno)
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢
+ */
+Inline void
+x_clear_int(INTNO intno)
+{
+    gicd_clear_pending(intno);
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ãã§ãã¯
+ */
+Inline bool_t
+probe_int(INTNO intno)
+{
+    return(gicd_probe_pending(intno));
+}
+
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®
+ */
+extern void x_config_int(INTNO intno, ATR intatr, PRI intpri);
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©å
+¥å£ã§å¿
+è¦ãªIRCæä½
+ */
+Inline void
+i_begin_int(INTNO intno)
+{
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©ã®åºå£ã§å¿
+è¦ãªIRCæä½
+ */
+Inline void
+i_end_int(INTNO intno)
+{
+}
+
+/*
+ *  CPUä¾å¤ãã³ãã©é¢é£
+ */
+
+/*
+ *  CPUä¾å¤ãã³ãã©çªå·
+ */
+#define VALID_EXCNO_DEFEXC(excno)    (TMIN_EXCNO <= (excno) && (excno) <= TMAX_EXCNO)
+
+/*
+ *  CPUä¾å¤ãã³ãã©ã®è¨­å®
+ */
+Inline void
+x_define_exc(EXCNO excno, FP exc_entry)
+{
+}
+
+/*
+ *  CPUä¾å¤ãã³ãã©ã®å
+¥å£å¦çã®çæãã¯ã­
+ */
+#define EXC_ENTRY(excno, exchdr)    exchdr
+#define EXCHDR_ENTRY(excno, excno_num, exchdr) extern void exchdr(void *p_excinf);
+
+/*
+ *  ãã­ã»ããµä¾å­ã®åæå
+ */
+extern void prc_initialize(void);
+
+/*
+ *  ãã­ã»ããµä¾å­ã®çµäºæå¦ç
+ */
+extern void prc_terminate(void) NoReturn;
+
+/*
+ * ç»é²ããã¦ããªãä¾å¤ãçºçããã¨å¼ã³åºããã
+ */
+extern void default_exc_handler(void *p_excinf);
+
+/*
+ * æªç»é²ã®å²è¾¼ã¿ãçºçããå ´åã«å¼ã³åºããã
+ */
+extern void default_int_handler(void);
+
+/*
+ *  å²è¾¼ã¿/ä¾å¤ãã³ãã©ãã¼ãã«(kernel_cfg.c)
+ */
+extern const INTHDR inh_table[];
+extern const EXCHDR exc_table[];
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©ã®å¼ã³åºã
+ */
+extern void call_int_handler(uint32_t intno);
+
+/*
+ *  CPUä¾å¤ãã³ãã©ã®å¼ã³åºã
+ */
+extern void call_exc_handler(void *p_excinf, uint32_t excno);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_PRC_CONFIG_H */
Index: /ssp_aarch64/trunk/arm64_gcc/prc_design.txt
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_design.txt	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_design.txt	(revision 353)
@@ -0,0 +1,436 @@
+=====================================================================
+                         ARM64ãã­ã»ããµä¾å­é¨è¨­è¨ã¡ã¢
+                                  Last Modified: 5 Jun 2018
+=====================================================================
+
+âãã®ãã­ã¥ã¡ã³ãã®ä½ç½®ã¥ã
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/SSPã«ã¼ãã«ãARMv8-Aãã­ã»ããµã«ç§»æ¤ããé
+ã®è¨­è¨ã¡ã¢ã§ããï¼
+
+
+âARMv8-Aã®ä»æ§ã¾ã¨ã
+
+ARMv8-Aã®ä»æ§ã®ãã¡ï¼ã«ã¼ãã«ã®è¨­è¨ã«é¢ä¿ããäºé 
+ã«ã¤ãã¦ã¾ã¨ããï¼
+
+âã¬ã¸ã¹ã¿
+
+æ±ç¨ã¬ã¸ã¹ã¿ã¯r0ãr30 (ç¹ã«64ãããã¬ã¸ã¹ã¿ã¯X0..X30ã§è¡¨ç¾)ã®31ç¨®é¡ãããªãï¼
+ï¼åèï¼ãProcedure Call Standard for the ARM 64-bit Architectureã
+
+r0...r7    Parameter/result registers(å¼æ°ããã³è¿å¤ã®åãæ¸¡ãç¨)
+r8         Indirect result location register (å¤§ããªãã¼ã¿æ§é ã
+           è¿å¤ã¨ãã¦è¿ãå ´åãªã©ï¼å¼ã³åºãå´ãçµæãåãåºãããã«
+           éæ¥ã¢ãã¬ãã·ã³ã°ãå¤ç¨ããéï¼ãã®ãã¼ã¹ã¢ãã¬ã¹ãåãæ¸¡ã
+           ããããã«ä½¿ããã)
+r9..r15    Caller-saved Temporary registers(å¼ã³åºãå´ã§ä¿å­ãã¹ãã¬ã¸ã¹ã¿)
+r16(IP0)   The first intra-procedure-call scratch register
+           ãªã³ã«ã«ãã£ã¦ veneer(æ³¨1) ããã³ PLT(Procedure Linkage Table,æ³¨2) ã³ã¼ã
+           ã®å¼ã³åºãã§ä½¿ãããï¼ããä»¥å¤ã®æã¯ãã³ãã©ãªã¬ã¸ã¹ã¿ã¨ãã¦ä½¿ããããã¨ãããï¼
+           (æ³¨1)ãªã³ã«ã«ãã£ã¦æ¿å
+¥ãããå°ããªã³ã¼ãçã§ï¼
+                åå²å½ä»¤ã®ã¿ã¼ã²ãããç¯å²å¤ã®å ´åãªã©ã«ä½¿ããã
+           (æ³¨2)å
+±æã©ã¤ãã©ãªã®å¼ã³åºãã§ã·ã³ãã«è§£æ±ºãè¡ãããã«ä½¿ç¨ããã
+                é¢æ°ãã¼ãã«
+r17(IP1)   The second intra-procedure-call temporary register(r16ã¨å½¹å²ã¯åã)
+r18        The Platform Register(ãã©ãããã©ã¼ã ABIã§ä½¿ç¨ãããã¬ã¸ã¹ã¿ï¼
+           ABIã§ä½¿ãããªãå ´åã¯ãã³ãã©ãªã¬ã¸ã¹ã¿ã¨ãã¦ä½¿ããã)
+r19..r28   Callee-saved registers(å¼ã³åºãããå´ã§ä¿å­ãã¦ä½¿ãã¬ã¸ã¹ã¿)
+r29(FP)    The Frame Pointer(ãã¬ã¼ã ãã¤ã³ã¿)
+r30(LR)    The Link Register(ãªã³ã¯ã¬ã¸ã¹ã¿)
+
+SSPã«ã¼ãã«ã®ã¢ã»ã³ãã©ã«ããå®è£
+ã§ã¯r8, r16...r18ã¯ä½¿ç¨ãã¦ããªãï¼
+
+
+âã³ã¼ãªã³ã°ã³ã³ãã³ã·ã§ã³
+
+r0...R7 ãå¼æ°ããã³è¿å¤ã«ä½¿ãããï¼
+ARMã«ããè¦å®ããã¦ããããï¼ã³ã³ãã¤ã©ã«ä¾å­ãããã®ã«ã¼ã«ã¨ãªã
+
+âPSTATE
+
+AArch64ã§ã¯ãã­ã»ããµã®ç¶æ
+ãè¡¨ããã©ã°ã®éã¾ããã¾ã¨ãã¦PSTATEã¨å¼ã³ï¼
+ããããã®ãã©ã°ã¸å¥ã
+ã«ã¢ã¯ã»ã¹ããããã®ç¹å¥ãªã¬ã¸ã¹ã¿åãå®ç¾©ããã¦ããï¼
+
+PSTATEã®è©³ç´°ã¯ï¼ARM Architecture Reference Manual
+ARMv8, for ARMv8-A architecture profile ã® D1.7 ãªã©ãåç
+§ã®ãã¨ï¼
+
+ã»spsel
+EL1ããä¸ã®ä¾å¤ã¬ãã«ã§ã¯ï¼spsel ã¨ããç¹å¥ãªåç§°ã®ã¬ã¸ã¹ã¿ã«ã¢ã¯ã»ã¹ãï¼
+PSTATE.SPãã©ã°ã®å¤ãã»ãããã¦ä½¿ç¨ã¹ã¿ãã¯ã®åãæ¿ããè¡ãï¼
+
+ã»daif
+daif ã¨ããåç§°ã®ã¬ã¸ã¹ã¿ãä½¿ç¨ãã¦PSTATEã®D,A,I,Fããããæä½ãï¼
+åç¨®ä¾å¤ããã³å²è¾¼ã¿ã®ç¦æ­¢/è¨±å¯ãå¶å¾¡ãã
+
+
+SSPã«ã¼ãã«ã®å®è£
+ã§ã¯ï¼ã¹ã¿ãã¯ã¯SP_EL1ã®ã¿ãä½¿ç¨ããï¼
+ã¾ãï¼CPUã­ãã¯ç¶æ
+ããã³å²è¾¼ã¿ã­ãã¯ç¶æ
+ã®å®è£
+ã«PSTATEã®Iããã³Fãã©ã°ã
+å©ç¨ãã¦ããï¼
+
+
+âå²è¾¼ã¿ãã¯ã¿
+
+ãã¯ã¿ãã¼ãã«ã®ã¢ãã¬ã¹ã¯ãªã»ããæã«ï¼ã·ã¹ãã ã¬ã¸ã¹ã¿ã®ä¸ã¤Vector Base
+Address Register(VBAR, ã·ã¹ãã ã¬ã¸ã¹ã¿)ã«ã¢ãã¬ã¹ãã»ãããããã¨ã§ï¼
+2048ãã¤ãå¢çã®ä»»æã®ã¢ãã¬ã¹ã«é
+ç½®å¯è½ã§ããï¼
+
+SSPã«ã¼ãã«ã®å®è£
+ã§ã¯ã¹ã¿ã¼ãã¢ããã«ã¼ãã³ã§è¨­å®ãã¦ããï¼
+
+
+âå²è¾¼ã¿åªå
+åº¦
+
+è¨­å®å¤ã®å°ããæ¹ãé«åªå
+åº¦ã¨ãªãï¼
+
+åªå
+åº¦ã¯æå¤§8bitã§ããï¼SoCæ¯ã«å®è£
+ããã¦ãããããå¹
+ãç°ãªãï¼å®è£
+ã
+ãããããã8bitä»¥ä¸ã®å ´åã¯ï¼LSBããç¡å¹ã«ãªãï¼ä¾ãã°ï¼å®è£
+ããã¦ã
+ããããå¹
+ã7bitã®å ´åã¯ï¼ããã0ãç¡å¹ã¨ãªãï¼
+
+åªå
+åº¦ã®ããããã£ã¼ã«ãã®LSBããæ°ãããããµãåªå
+åº¦ã¨å¼ã¶ãã£ã¼ã«ã
+ã«è¨­å®ãããã¨ãå¯è½ã§ããï¼æ®ãã®ä¸ä½ããããããªã¨ã³ãã·ã§ã³åªå
+åº¦ã¨
+å¼ã¶ï¼ããªã¨ã³ãã·ã§ã³åªå
+åº¦ãåãã§ï¼ãµãåªå
+åº¦ãç°ãªãåªå
+åº¦ã®ã°ã«ã¼
+ãã¯ï¼ãäºããããªã¨ã³ãããããã¨ãã§ããªãï¼
+
+ä¾ã¨ãã¦ï¼QEMU Virtãã¼ãåãSSPã®å®è£
+ã§ã¯ Cortex-A53ãã­ã»ããµã
+ã¿ã¼ã²ããã¨ãã¦ããï¼åªå
+åº¦ã¯16æ®µé(4bit)ã§ããã0ãã3ãç¡å¹ã§ããï¼
+
+âCPUã¢ã¼ã
+
+ãã­ã»ããµã¯ï¼EL0ããEL3ã¾ã§ã®ä¾å¤ã¬ãã«ã®ããããã§åä½ããï¼
+ã¾ãããããã®ã¬ãã«ã§64ãããã¢ã¼ã(AArch64) ã¾ãã¯32ãããã¢ã¼ã(AArch32)ã
+é¸æãããã¨ãã§ããï¼ãã ãï¼ããä¾å¤ã¬ãã«ã32ãããã¢ã¼ãã§åä½ããå ´åã¯
+ããããä½ãä¾å¤ã¬ãã«ã§ã¯64ãããã¢ã¼ããé¸æãããã¨ãã§ããªãï¼
+
+ã¾ãï¼ã»ã­ã¥ãªãã£æ¡å¼µæ©è½ãæ­è¼ãããã­ã»ããµã§ã¯ã»ã­ã¥ã¢ã¢ã¼ãããã³
+éã»ã­ã¥ã¢ã¢ã¼ããé¸æãããã¨ãã§ããï¼
+
+SSPã®å®è£
+ã§ã¯ï¼64ãããã¢ã¼ã(AArch64)ï¼éã»ã­ã¥ã¢ï¼ä¾å¤ã¬ãã«1(EL1) ã§åä½ããï¼
+
+
+âãªã»ããæã®ç¶æ
+
+
+ãªã»ããæã¯ãã­ã»ããµãããããµãã¼ãããæå¤§ã®ä¾å¤ã¬ãã«ããã³ãã®ã¬ãã«ã®
+ã¹ã¿ãã¯(SP_ELx)ãæå¹ã¨ãªã£ã¦ããï¼
+
+ä¾ã¨ãã¦QEMUåãVirtãã¼ã(Cortex-A53) ã§ã¯ï¼æ¢å®ã§EL1ãæå¤§ä¾å¤ã¬ãã«ã®ãã
+ãªã»ããç´å¾ã¯SP_EL1ãæå¹ã¨ãªã£ã¦ããï¼
+
+âå²è¾¼ã¿/ä¾å¤ã®åä»
+
+å²è¾¼ã¿ãåãä»ããã¨åãä»ããå²è¾¼ã¿ã®çªå·ãï¼GICC_IARã«ã»ãããããï¼
+å²è¾¼ã¿çªå·ã¯ãã®ã¬ã¸ã¹ã¿ã«ã»ãããããå¤ãä½¿ç¨ããï¼
+
+ä¾å¤çªå·ã¯ï¼ä¾å¤çºçæã®ãã­ã»ããµç¶æ
+ã«å¿ãã¦æ±ºå®ãããï¼ãã¯ã¿ãã¼ãã«ä¸­ã®
+ã¸ã£ã³ãå
+ãªãã»ããæ¯ã«ç°ãªãçªå·ãå²ãæ¯ããã¨ã«ãã¦ããï¼
+
+  ä¾å¤çºçæã®ç¶æ
+             ä¾å¤ã®ç¨®é¡      ä¾å¤çªå· ãä¾å¤ãã¯ã¿å
+é ­ããã®ãªãã»ãã
+  AArch64, EL1t(EL1, SP_EL0)  Synchronous         0        0x0000
+  AArch64, EL1t(EL1, SP_EL0)  SError              1        0x0180
+  AArch64, EL1h(EL1, SP_EL1)  Synchronous         2        0x0200
+  AArch64, EL1h(EL1, SP_EL1)  SError              3        0x0380
+  AArch64, EL0 (EL0, SP_EL0)  Synchronous         4        0x0400
+  AArch64, EL0 (EL0, SP_EL0)  SError              5        0x0580
+  AArch32, EL0 (EL0, SP_EL0)  Synchronous         6        0x0600
+  AArch32, EL0 (EL0, SP_EL0)  SError              7        0x0780
+
+å²è¾¼ã¿ãåãä»ããéï¼åãä»ããå²è¾¼ã¿ã«è¨­å®ãããåªå
+åº¦ããä½ãå²è¾¼ã¿ã
+ç¦æ­¢ããããï¼GICC_RPRããåå¾ããå²è¾¼ã¿è¦å ã®å²è¾¼ã¿åªå
+åº¦ã GICC_PMRã¸
+ã»ãããã¦ããï¼ããã¦ãã³ãã©çµäºå¾ã«å²è¾¼ã¿çºçåã®å²ãè¾¼ã¿åªå
+åº¦ã«æ»ãï¼
+
+â ã¹ã¿ãã¯ãã¤ã³ã¿ï¼SP_EL0ã¨SP_ELxï¼
+
+ã¹ã¿ãã¯ãã¤ã³ã¿ã¯ï¼ä¾å¤ã¬ãã«0ã®ã¹ã¿ãã¯ãã¤ã³ã¿(SP_EL0)ããã³å®è¡ä¸­ã®
+ä¾å¤ã¬ãã«ã®ã¹ã¿ãã¯ãã¤ã³ã¿(SP_ELx)ãé¸æå¯è½ã§ããï¼
+ã¹ã¿ãã¯ã®é¸æã¯spselã¬ã¸ã¹ã¿ã¸1ãè¨­å®ããã¨SP_ELxãï¼0ãè¨­å®ããã¨
+SP_EL0 ãé¸æããï¼
+
+SSPã®å®è£
+ã§ã¯ï¼EL1 ã§ SP_EL1 ã®ã¿ãä½¿ç¨ãã¦åä½ããï¼
+
+âä¾å¤ã¬ãã«ã®é·ç§»
+
+ä¾å¤ã¬ãã«(EL)ã®é·ç§»ã¯å²è¾¼ã¿/ä¾å¤ã®åä»ããã³ä¾å¤ãªã¿ã¼ã³å½ä»¤(eret)ã«ããè¡ãï¼
+
+å²è¾¼ã¿ããã³ä¾å¤ãåãä»ãããã¨ã§çºçåã¨åãã¾ãã¯ããé«ãä¾å¤ã¬ãã«ã¸é·ç§»ããï¼
+ä¸æ¹ï¼åãã¾ãã¯ããä½ãä¾å¤ã¬ãã«ã¸ã®é·ç§»ã¯ä¾å¤ãªã¿ã¼ã³å½ä»¤(eret)ã«ããè¡ãï¼
+
+åä»æã®é·ç§»å
+ã¨ãªãä¾å¤ã¬ãã«ã®æå®ã¯ã·ã¹ãã ã¬ã¸ã¹ã¿ã«ããè¨­å®ãããã¨ã§è¡ãï¼
+å²è¾¼ã¿/ä¾å¤ãªã¿ã¼ã³æã®é·ç§»å
+ã¨ãªãä¾å¤ã¬ãã«ã¯ï¼SPSR_ELxã®ããã2ããã³3ã§
+æå®ããï¼å²è¾¼ã¿/ä¾å¤åä»æï¼PSTATEã®ç¶æ
+ãSPSR_ELxã«ï¼ãªã¿ã¼ã³ã¢ãã¬ã¹ãELR_ELxã«ï¼
+ããããä¿å­ããeretå½ä»¤ã®å®è¡ã«ãããã®æ ¼ç´å¤ãå¾©å¸°ãããããï¼eretå®è¡åã«
+ãããããSPSR_ELxã«ã»ãããã¦ãããã¨ã§æå®ããä¾å¤ã¬ãã«ã¸é·ç§»ãããã¨ãå¯è½ã§ããï¼
+åãã¿ã¤ãã³ã°ã§ä½¿ç¨ã¹ã¿ãã¯ã64ããã/32ãããã¢ã¼ãã®æå®ãè¡ããã¨ãã§ããï¼
+
+QEMU VirtåãSSPã®å®è£
+ã§ã¯EL1ã®ã¿ãä½¿ç¨ããããï¼ä¾å¤ã¬ãã«éã®é·ç§»å¦çã¯è¡ã£ã¦ããªãï¼
+
+âä¾å¤ã¬ãã«ã®å¤å®
+
+ç¾ç¶ã®ä¾å¤ã¬ãã«ãå¤å®ããã«ã¯ï¼CPSRã®ããã2ããã³ããã3ã®å¤ãä½¿ç¨ããï¼
+bit[3:2]ã®å¤ã
+    '11'ã®å ´åï¼EL3
+    '10'ã®å ´åï¼EL2
+    '01'ã®å ´åï¼EL1
+    '00'ã®å ´åï¼EL0
+
+âGICC_PMRã¬ã¸ã¹ã¿
+
+è¨­å®ããåªå
+åº¦ä»¥ä¸(å¤ã¨ãã¦ã¯ä»¥ä¸)ã®åªå
+åº¦ã®å²è¾¼ã¿ã®åä»ãç¦æ­¢ããï¼
+è¨­å®å¯è½ãªæå¤§å¤ãè¨­å®ããã¨ï¼å
+¨ã¦ã®å²è¾¼ã¿ãè¨±å¯ããï¼
+ä¾ãã°åªå
+åº¦ã16æ®µéã®å ´åã¯0xf0(=0x0f << 4)ãã»ããããã¨ãã¹ã¦ã®å²è¾¼ã¿è¨±å¯
+ã¨ãªãï¼å¤ã¯ä¾å¤/å²è¾¼ã¿ã®åä»ã¨ãªã¿ã¼ã³ã«ããå¤åããªãããï¼åãä»ããå²è¾¼ã¿
+ã®åªå
+åº¦ãå²è¾¼ã¿ã®å
+¥å£å¦çã§è¨­å®ããå¿
+è¦ãããï¼
+
+âä¾å¤/å²è¾¼ã¿ã®åä»
+
+ã»ä¾å¤/å²è¾¼ã¿ãåä»ããã¨ï¼åä»ãæã«ã¢ã¯ãã£ããªã¹ã¿ãã¯ä¸ã«ä»¥ä¸ã®ã³
+  ã³ãã­ã¹ããä¿å­ããï¼
+
+   ---------------
+  |   GICC_PMR     |  <- new SP
+   ----------------
+  | å²è¾¼ã¿/ä¾å¤çªå·|
+   ----------------
+  |    ããã¼(0)   |
+   ----------------
+  | èª¿æ´é(0 or 8) |
+   ----------------
+  |èª¿æ´é å(å¿
+è¦æ)| (*)ã¢ã©ã¤ã¡ã³ãèª¿æ´ãå¿
+è¦ãªã¨ãã®ã¿
+   ----------------
+  |    ESR_ELx     |
+   ----------------
+  |    ELR_ELx     |
+   ----------------
+  |   SPSR_ELx     |
+   ----------------
+  |      X30       |
+   ----------------
+  |      X29       |
+   ----------------
+  |      ï¼        |
+  |      ï¼        |
+   ----------------
+  |      X1        |
+   ----------------
+  |      X0        |
+   ----------------
+  |                | <- old SP
+
+
+å²è¾¼ã¿/ä¾å¤çºçæã®ä¸»ãªã·ã¼ã±ã³ã¹ã¯æ¬¡ã®ããã«ãªãï¼é·ç§»å
+ã®ä¾å¤ã¬ãã«ãELxã¨è¡¨ç¾ããï¼
+
+ï¼ãã¼ãã¦ã§ã¢ã®å¦çï¼
+  ã»PSTATEãSPSR_ELxã«ä¿å­ãã
+  ã»ãªã¿ã¼ã³ã¢ãã¬ã¹ãELR_ELxã«ä¿å­ãã
+  ã»PSTATE.{D,A,I,F}ã1ã«ã»ãããã
+  ã»åæä¾å¤ããã³SErrorå²è¾¼ã¿ã®ã¨ãï¼ä¾å¤è¦å æ
+å ±ãESR_ELxã«ä¿å­ãã
+  ã»ã¹ã¿ãã¯ãã¤ã³ã¿ãSP_ELxã«åãæ¿ãã
+  ã»ELxã¸é·ç§»ãã
+
+ï¼ã½ããã¦ã§ã¢ã§ã®å¦çï¼
+  ã»(çºçæã«SP_EL0ãä½¿ç¨ãã¦ããå ´å)ã¹ã¿ãã¯ãå²è¾¼ã¿çºçå(SP_EL0)ã«æ»ã
+  ã»æ±ç¨ã¬ã¸ã¹ã¿(X0-X30)ãã¹ã¿ãã¯ã«ä¿å­
+  ã»SPSR_ELx, ESR_ELx, ELR_ELxãã¹ã¿ãã¯ã«ä¿å­
+  ã»ã¹ã¿ãã¯ãã¤ã³ã¿ã®ã¢ã©ã¤ã¡ã³ããèª¿æ´
+  ã»å²è¾¼ã¿çªå·(GICC_IARããåå¾)ï¼ä¾å¤çªå·(ãªãã»ããæ¯ã«å®ç¾©ããå¤)ãã¹ã¿ãã¯ã«ä¿å­
+  ã»å²è¾¼ã¿çºçåã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã¹ã¿ãã¯ã«ä¿å­
+  ã»GICC_PMRã«åãä»ããå²è¾¼ã¿ã®å²è¾¼ã¿åªå
+åº¦ãã»ãã
+  ã»å²è¾¼ã¿/ä¾å¤ãã¹ãã«ã¦ã³ã¿ã®ã¤ã³ã¯ãªã¡ã³ã
+  ã»(å²è¾¼ã¿ã®å ´å)CPUã­ãã¯è§£é¤
+  ã»ãã¯ã¿ãã¼ãã«ãèª­ã¿è¾¼ã¿ãã³ãã©ãå®è¡ãã
+
+âä¾å¤/å²è¾¼ã¿ããã®ãªã¿ã¼ã³
+
+ï¼ã½ããã¦ã§ã¢ã§ã®å¦çï¼
+  ã»CPUã­ãã¯ç¶æ
+ã¸ç§»è¡
+  ã»å²è¾¼ã¿/ä¾å¤ãã¹ã¨ã«ã¦ã³ã¿ã®ãã¯ãªã¡ã³ã
+  ã»GICC_PMRã«å²è¾¼ã¿çºçåã®åªå
+åº¦ãã¹ã¯ãæ»ã
+  ã»ã¹ã¿ãã¯ãã¤ã³ã¿ã®ã¢ã©ã¤ã¡ã³ãèª¿æ´åãæ»ã
+  ã»æ»ãå
+ã®ã³ã³ãã­ã¹ããã·ã¹ãã ç¶æ
+ã«å¿ãã¦å²è¾¼ã¿/ä¾å¤çºçå
+ã¸ãªã¿ã¼ã³
+    ã¾ãã¯é
+å»¶ãã£ã¹ããããå®è¡ãã
+  ã»ELR_ELxã«æ»ãå
+ã¢ãã¬ã¹ï¼SPSR_ELxã«ãã­ã»ããµç¶æ
+ããããã
+    ã»ããããã¦ããç¶æ
+ã§eretå½ä»¤ãå®è¡ãï¼å²è¾¼ã¿/ä¾å¤ãããªã¿ã¼ã³
+
+âã¹ã¿ãã¯ãã¤ã³ã¿ã®ã¢ã©ã¤ã¡ã³ãèª¿æ´
+
+AArch64ã§ã¯ï¼å¤é¨ã¤ã³ã¿ãã§ã¼ã¹ã«ããã¦ã¹ã¿ãã¯ãã¤ã³ã¿ã¯16ãã¤ãå¢çã«
+ã¢ã©ã¤ã³ãããå¿
+è¦ãããï¼ãããä¾å¤çºçæã«ãããæºãããã¦ããã¨ã¯éããªãããï¼
+å²è¾¼ã¿/CPUä¾å¤ã®å
+¥å£å¦çã§ï¼ã¹ã¿ãã¯ãã¤ã³ã¿ãã¢ã©ã¤ã¡ã³ãæ¡ä»¶ãæºããã¦ããªãå ´åã«ã¯ï¼
+ã¹ã¿ãã¯ãã¤ã³ã¿ãèª¿æ´ããï¼ã¾ãï¼åºå£å¦çã§ã¹ã¿ãã¯ãã¤ã³ã¿ãå
+ã«æ»ããããã«ï¼èª¿æ´éãä¿å­ããï¼
+
+
+âOSã®å®è£
+
+
+1.ãã­ã»ããµä¾å­é¨åç§°: arm64
+
+ARMv8 ã§ã¯ï¼64ãããã¢ã¼ã(AArch64)ããã³32ãããã¢ã¼ã(AArch32)ã®ä¸¡æ¹ããµãã¼ãããã
+æ¬å®è£
+ã¯64ãããã¢ã¼ãã®ã¿ããµãã¼ããããã¨ãæç¤ºãããããã­ã»ããµä¾å­é¨åç§°ã arm64 ã¨ãã
+
+2. ä¾å¤ã¢ã¼ãã®ä½¿ãåã
+
+æ¬å®è£
+ã§ã¯ã¿ã¹ã¯ã³ã³ãã­ã¹ãï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãããããä¾å¤ã¬ãã«1(EL1)ã§åä½ããï¼
+ã¿ã¹ã¯ã³ã³ãã­ã¹ããEL0ã§åä½ããæ¡ãèããããï¼ãã®å ´åã¯å²è¾¼ã¿/ä¾å¤ã®åºå£å¦çã«ããã¦
+é
+å»¶ãã£ã¹ãããã®åã«ä¾å¤ã¬ãã«ã®åãæ¿ããå¿
+è¦ã¨ãªãï¼
+
+3.ãã£ã¹ãããã£ã®å®è¡ã¢ã¼ã
+
+æ¬å®è£
+ã§ã¯ãã¹ã¦ä¾å¤ã¬ãã«1ã§åä½ããããï¼ãã£ã¹ãããã£ã¯ä¾å¤ã¬ãã«1(EL1)ã§åä½ããï¼
+
+
+4.ã¹ã¿ãã¯ã®ä½¿ãåã
+
+SSPã§ã¯ã¿ã¹ã¯ã³ã³ãã­ã¹ãï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãå
+±ã«ä¸ã¤ã®ã¹ã¿ãã¯ãå
+±ç¨ããï¼
+æ¬å®è£
+ã§ã¯SP_ELxãä½¿ç¨ãã¦ããï¼
+ãã®ä»ã«SP_EL0ãä½¿ç¨ããå®è£
+ãèããããï¼ãã®å ´åã¯å²è¾¼ã¿/ä¾å¤ã®å
+¥å£å¦çã«ã¦
+ã¬ã¸ã¹ã¿ãä¿å­ããåã«SP_EL0ã¸ã®ã¹ã¿ãã¯åãæ¿ããè¡ãï¼
+
+5.ã³ã³ãã­ã¹ãã®å¤å®
+
+å²è¾¼ã¿/ä¾å¤ã®ãã¹ãåæ°ãä¿æããå¤æ°(intnest)ã0ãªãã¿ã¹ã¯ã¿ã¹ã¯ã³ã³ãã­ã¹ãï¼
+1ä»¥ä¸ãªãéã¿ã¹ã¯ã³ã³ãã­ã¹ãã¨ããï¼
+ã³ã³ãã­ã¹ãæ¯ã«ä¾å¤ã¬ãã«ãåããå®è£
+ãåãå ´åã¯PSTATEã®ããã2ããã³3ã§
+ä¾å¤ã¬ãã«ãèª­ã¿åºããã¨ã«ããå¤å¥ããã¨ããæ¹æ³ãèããããï¼
+æ¬å®è£
+ã§ã¯ã³ã³ãã­ã¹ãã«ãããåãä¾å¤ã¬ãã«ãä½¿ç¨ãï¼ãã­ã»ããµã®
+ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ã§ã¯å¤å¥ãã§ããªãããå¤æ°ã§å¤å¥ããï¼
+
+6. CPUã­ãã¯
+
+CPUã­ãã¯PSTATE.Iããã³PSTATE.Fã«ããCPUã­ãã¯ãå®ç¾ããï¼
+
+7. å²è¾¼ã¿ã­ãã¯ã¨CPUä¾å¤ã®é¢ä¿
+
+ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ã¯ãµãã¼ãããªãããï¼å²è¾¼ã¿ã­ãã¯ã¨CPUã­ãã¯ããã¹ã¯ãã
+å²è¾¼ã¿ã®ç¯å²ã¯åãã¨ããï¼ãã ãï¼ãã©ã°èªä½ã¯ãäºãã«ç¬ç«ãããããï¼
+å²è¾¼ã¿ã­ãã¯ç¶æ
+ã®è¨­å®/è§£é¤ã®éã¯ï¼ã­ãã¯åã«CPUã­ãã¯ãã©ã°ã®ç¶æ
+ãä¿å­ãï¼
+è§£é¤åã«å
+ã®ç¶æ
+ã«æ»ãããã«ãã¦ããï¼
+
+8. å¤é¨åªå
+åº¦ã¨å
+é¨åªå
+åº¦
+
+å¤é¨åªå
+åº¦ã¨ã¯APIã§æå®ããå²è¾¼ã¿åªå
+åº¦(PRIå)ã®ãã¨ã§ããï¼å¤ãå°ãã
+ã»ã©åªå
+åº¦ãé«ãï¼å²è¾¼ã¿ãã³ãã©ã«ã¯ï¼-1ããé£ç¶ããè² ã®å¤ãè¨­å®å¯è½ã§
+ããï¼å
+é¨åªå
+åº¦ã¯ï¼GICC_PMRã¬ã¸ã¹ã¿ã«è¨­å®ããå¤ã§ããï¼
+å¤é¨åªå
+åº¦ã¨å
+é¨åªå
+åº¦ã®å¤æã¯ä»¥ä¸ã®ãã¯ã­ã§è¡¨ç¾ãããï¼
+
+/* å¤é¨è¡¨ç¾ã¸ã®å¤æ */
+#define EXT_IPM(pri) \
+                        (((PRI)((pri) >> GIC_PRI_SHIFT)) - (GIC_PRI_LEVEL - 1))
+
+/* å
+é¨è¡¨ç¾ã¸ã®å¤æ */
+#define INT_IPM(ipm) \
+                        (((uint_t)((ipm) + (GIC_PRI_LEVEL - 1))) << GIC_PRI_SHIFT)
+
+ããã§GIC_PRI_LEVELã¯ãµãã¼ãããå²è¾¼ã¿åªå
+åº¦ã®æ°ï¼GIC_PRI_SHIFTã¯GICC_PMRã¬ã¸ã¹ã¿å
+
+ã®ï¼å
+é¨åªå
+åº¦ã®å¤ãæ ¼ç´ãããä½ç½®ï¼ããã0ããã®ãªãã»ããï¼ãè¡¨ãï¼
+
+
+9. ã«ã¼ãã«ç®¡çå
+ã®æé«åªå
+åº¦(CPUã­ãã¯ç¶æ
+ã§ã®åªå
+åº¦ãã¹ã¯)
+
+ã«ã¼ãã«ç®¡çå
+ã®å²è¾¼ã¿ã®æé«åªå
+åº¦ã¯è¨­å®å¯è½ãªå¤é¨åªå
+åº¦ã®æé«å¤ã¨åãã¨ããï¼
+
+
+ä»¥ä¸ï¼
Index: /ssp_aarch64/trunk/arm64_gcc/prc_kernel.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_kernel.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_kernel.h	(revision 353)
@@ -0,0 +1,84 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2008 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id: prc_kernel.h 1304 2008-08-27 07:28:36Z ertl-honda $
+ */
+
+/*
+ *		kernel.hã®ãã­ã»ããµä¾å­é¨ï¼ARM64ç¨ï¼
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼target_kernel.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯
+ *  ã«ã¼ãããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ãã
+ *  ç´æ¥ã¤ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_PRC_KERNEL_H
+#define TOPPERS_PRC_KERNEL_H
+
+/*
+ *  ãµãã¼ãããæ©è½ã®å®ç¾©
+ */
+#define TOPPERS_TARGET_SUPPORT_DIS_INT            /* dis_intããµãã¼ããã */
+#define TOPPERS_TARGET_SUPPORT_ENA_INT            /* ena_intããµãã¼ããã */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¹ã¿ãã¯ã®å
+ *    ã¹ã¿ãã¯ãã¤ã³ã¿ã®ã¢ã©ã¤ã¡ã³ãã¯ãã¤ã³ã¿ãµã¤ãºã®åã«ããå¿
+è¦ããã
+ */
+#define TOPPERS_STK_T  uint128_t
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_PRC_KERNEL_H */
Index: /ssp_aarch64/trunk/arm64_gcc/prc_kernel.trb
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_kernel.trb	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_kernel.trb	(revision 353)
@@ -0,0 +1,167 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+#
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: core_kernel.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+# 
+
+#
+#		ãã¹2ã®çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+#
+
+#
+#  æå¹ãªå²è¾¼ã¿çªå·ï¼å²è¾¼ã¿ãã³ãã©çªå·
+#
+$INTNO_VALID = [ *(0..63) ]
+$INHNO_VALID = $INTNO_VALID
+
+#
+#  æå¹ãªCPUä¾å¤ãã³ãã©çªå·
+#
+$EXCNO_VALID = [ *(0..7) ]
+
+#
+#  ATT_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·
+#
+$INTNO_ATTISR_VALID = $INTNO_VALID
+$INHNO_ATTISR_VALID = $INHNO_VALID
+
+#
+#  DEF_INT/DEF_EXCã§ä½¿ç¨ã§ããå²è¾¼ã¿ãã³ãã©çªå·ï¼CPUä¾å¤ãã³ãã©çªå·
+#
+$INHNO_DEFINH_VALID = $INHNO_VALID
+$EXCNO_DEFEXC_VALID = $EXCNO_VALID
+
+#
+#  ãã§ãã¯æ¹æ³ã®æå®
+#
+$CHECK_STKSZ_ALIGN = 16
+
+#
+#  CFG_INTã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨å²è¾¼ã¿åªå
+åº¦
+#
+$INTNO_CFGINT_VALID = $INTNO_VALID
+$INTPRI_CFGINT_VALID = Array(-15..-1)
+
+#
+#  å²è¾¼ã¿å±æ§ä¸­ã®ã¿ã¼ã²ããä¾å­ã«ç¨ããããã
+#
+#$TARGET_INTATR =
+
+#
+#  ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+IncludeTrb("kernel/kernel.trb")
+
+$kernelCfgC.comment_header("Target-dependent Definitions (ARMv8-A)")
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³è¨­å®ãã¼ãã«
+#
+
+$kernelCfgC.comment_header("Interrupt Configuration Table")
+
+$kernelCfgC.add("const uint8_t _kernel_intcfg_table[] = {")
+$INTNO_VALID.each_with_index do |intnoVal, index|
+    $kernelCfgC.add(",") if index > 0
+    $kernelCfgC.append("\t/* 0x#{sprintf("%03x", intnoVal)} */ ")
+    if $cfgData[:CFG_INT].has_key?(intnoVal)
+      $kernelCfgC.append("1U")
+    else
+      $kernelCfgC.append("0U")
+    end
+end
+
+$kernelCfgC.add
+$kernelCfgC.add2("};")
+
+
+#
+#  å²è¾¼ã¿ãã³ãã©ãã¼ãã«
+#
+$kernelCfgC.comment_header("Interrupt Handler Table")
+
+$kernelCfgC.add("const INTHDR _kernel_inh_table[] = {")
+$INHNO_VALID.each_with_index do |inhnoVal, index|
+  $kernelCfgC.add(",") if index > 0
+  $kernelCfgC.append("\t/* 0x#{sprintf("%03x", inhnoVal)} */ ")
+  if $cfgData[:DEF_INH].has_key?(inhnoVal)
+    $kernelCfgC.append("(INTHDR)(#{$cfgData[:DEF_INH][inhnoVal][:inthdr]})")
+  else
+    $kernelCfgC.append("(INTHDR)(_kernel_default_int_handler)")
+  end
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
+
+#
+#  CPUä¾å¤ãã³ãã©ãã¼ãã«
+#
+$kernelCfgC.comment_header("CPU Exception Handler Table")
+
+$kernelCfgC.add("const EXCHDR _kernel_exc_table[] = {")
+$EXCNO_VALID.each_with_index do |excnoVal, index|
+  $kernelCfgC.add(",") if index > 0
+  $kernelCfgC.append("\t/* #{excnoVal} */ ")
+  if $cfgData[:DEF_EXC].has_key?(excnoVal)
+    $kernelCfgC.append("(EXCHDR)(#{$cfgData[:DEF_EXC][excnoVal][:exchdr]})")
+  else
+    $kernelCfgC.append("(EXCHDR)(_kernel_default_exc_handler)")
+  end
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
Index: /ssp_aarch64/trunk/arm64_gcc/prc_rename.def
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_rename.def	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_rename.def	(revision 353)
@@ -0,0 +1,30 @@
+# gic_config.c
+gicc_initialize
+gicc_terminate
+gicd_initialize
+gicd_terminate
+
+# gic_support.S
+gic_exc_entry
+gic_int_entry
+
+# prc_config.c
+intnest
+prc_initialize
+prc_terminate
+x_config_int
+default_exc_handler
+default_int_handler
+call_int_handler
+call_exc_handler
+
+# prc_support.S
+start_dispatch
+call_exit_kernel
+ret_int
+vectors
+
+# kernel_cfg.c
+intcfg_table
+inh_table
+exc_table
Index: /ssp_aarch64/trunk/arm64_gcc/prc_rename.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_rename.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_rename.h	(revision 353)
@@ -0,0 +1,93 @@
+/* This file is generated from prc_rename.def by genrename. */
+
+#ifndef TOPPERS_PRC_RENAME_H
+#define TOPPERS_PRC_RENAME_H
+
+/*
+ *  gic_config.c
+ */
+#define gicc_initialize				_kernel_gicc_initialize
+#define gicc_terminate				_kernel_gicc_terminate
+#define gicd_initialize				_kernel_gicd_initialize
+#define gicd_terminate				_kernel_gicd_terminate
+
+/*
+ *  gic_support.S
+ */
+#define gic_exc_entry				_kernel_gic_exc_entry
+#define gic_int_entry				_kernel_gic_int_entry
+
+/*
+ *  prc_config.c
+ */
+#define intnest						_kernel_intnest
+#define prc_initialize				_kernel_prc_initialize
+#define prc_terminate				_kernel_prc_terminate
+#define x_config_int				_kernel_x_config_int
+#define default_exc_handler			_kernel_default_exc_handler
+#define default_int_handler			_kernel_default_int_handler
+#define call_int_handler			_kernel_call_int_handler
+#define call_exc_handler			_kernel_call_exc_handler
+
+/*
+ *  prc_support.S
+ */
+#define start_dispatch				_kernel_start_dispatch
+#define call_exit_kernel			_kernel_call_exit_kernel
+#define ret_int						_kernel_ret_int
+#define vectors						_kernel_vectors
+
+/*
+ *  kernel_cfg.c
+ */
+#define intcfg_table				_kernel_intcfg_table
+#define inh_table					_kernel_inh_table
+#define exc_table					_kernel_exc_table
+
+#ifdef TOPPERS_LABEL_ASM
+
+/*
+ *  gic_config.c
+ */
+#define _gicc_initialize			__kernel_gicc_initialize
+#define _gicc_terminate				__kernel_gicc_terminate
+#define _gicd_initialize			__kernel_gicd_initialize
+#define _gicd_terminate				__kernel_gicd_terminate
+
+/*
+ *  gic_support.S
+ */
+#define _gic_exc_entry				__kernel_gic_exc_entry
+#define _gic_int_entry				__kernel_gic_int_entry
+
+/*
+ *  prc_config.c
+ */
+#define _intnest					__kernel_intnest
+#define _prc_initialize				__kernel_prc_initialize
+#define _prc_terminate				__kernel_prc_terminate
+#define _x_config_int				__kernel_x_config_int
+#define _default_exc_handler		__kernel_default_exc_handler
+#define _default_int_handler		__kernel_default_int_handler
+#define _call_int_handler			__kernel_call_int_handler
+#define _call_exc_handler			__kernel_call_exc_handler
+
+/*
+ *  prc_support.S
+ */
+#define _start_dispatch				__kernel_start_dispatch
+#define _call_exit_kernel			__kernel_call_exit_kernel
+#define _ret_int					__kernel_ret_int
+#define _vectors					__kernel_vectors
+
+/*
+ *  kernel_cfg.c
+ */
+#define _intcfg_table				__kernel_intcfg_table
+#define _inh_table					__kernel_inh_table
+#define _exc_table					__kernel_exc_table
+
+#endif /* TOPPERS_LABEL_ASM */
+
+
+#endif /* TOPPERS_PRC_RENAME_H */
Index: /ssp_aarch64/trunk/arm64_gcc/prc_sil.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_sil.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_sil.h	(revision 353)
@@ -0,0 +1,118 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2008 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id: prc_sil.h 1304 2008-08-27 07:28:36Z ertl-honda $
+ */
+
+/*
+ *   sil.hã®ãã­ã»ããµä¾å­é¨ï¼ARM64ç¨ï¼
+ */
+
+#ifndef TOPPERS_PRC_SIL_H
+#define TOPPERS_PRC_SIL_H
+
+#include "arm64_gcc/arm64.h"
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  å
+¨å²è¾¼ã¿ã­ãã¯ãã©ã°ã®ã»ãã(NMIãé¤ããã¹ã¦ã®å²è¾¼ã¿ã®ç¦æ­¢)
+ */
+Inline bool_t
+TOPPERS_disint(void)
+{
+    bool_t locked;
+
+    if(aarch64_sense_daif_irq() && aarch64_sense_daif_fiq()) {
+        locked = true;
+    }
+    else {
+        aarch64_set_daif_if();
+        locked = false;
+    }
+
+    return (locked);
+}
+
+/*
+ *  å
+¨å²è¾¼ã¿ã­ãã¯ãã©ã°ã®è§£é¤
+ */
+Inline void
+TOPPERS_enaint(uint32_t locked)
+{
+    if(locked == false) {
+        aarch64_clear_daif_if();
+    }
+}
+
+/*
+ *  å
+¨å²è¾¼ã¿ã­ãã¯ç¶æ
+ã®å¶å¾¡
+ */
+#define SIL_PRE_LOC      bool_t  TOPPERS_locked
+#define SIL_LOC_INT()    ((TOPPERS_locked = TOPPERS_disint()))
+#define SIL_UNL_INT()    (TOPPERS_enaint(TOPPERS_locked))
+
+/*
+ *  ã¨ã³ãã£ã¢ã³ã®å®ç¾©
+ */
+
+#define SIL_ENDIAN_LITTLE
+
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PRC_SIL_H */
Index: /ssp_aarch64/trunk/arm64_gcc/prc_stddef.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_stddef.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_stddef.h	(revision 353)
@@ -0,0 +1,82 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2008 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id: prc_stddef.h 1304 2008-08-27 07:28:36Z ertl-honda $
+ */
+
+/*
+ *  t_stddef.hã®ãã­ã»ããµä¾å­é¨ï¼ARM64ç¨ï¼
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼target_stddef.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯
+ *  ã«ã¼ãããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ãã
+ *  ç´æ¥ã¤ã³ã¯ã«ã¼ããã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_PRC_STDDEF_H
+#define TOPPERS_PRC_STDDEF_H
+
+/*
+ *  ã¿ã¼ã²ãããè­å¥ããããã®ãã¯ã­ã®å®ç¾©
+ */
+#define TOPPERS_ARM64           /* ãã­ã»ããµç¥ç§° */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ãã¼ã¿åã®å®ç¾©
+ */
+typedef __int128_t    int128_t;
+typedef __uint128_t   uint128_t;
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_PRC_STDDEF_H */
Index: /ssp_aarch64/trunk/arm64_gcc/prc_support.S
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_support.S	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_support.S	(revision 353)
@@ -0,0 +1,406 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2008 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ *  ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã« ã¢ã»ã³ããªè¨èªé¨ï¼ARM64ç¨ï¼
+ */
+
+#define TOPPERS_MACRO_ONLY
+#define UINT_C(val)	(val)		/* uint_tåã®å®æ°ãä½ããã¯ã­ */
+#define ULONG_C(val)	(val)		/* ulong_tåã®å®æ°ãä½ããã¯ã­ */
+#define CAST(type, val)	(val)		/* åã­ã£ã¹ããè¡ããã¯ã­ */
+
+#include "kernel_impl.h"
+
+/*
+ *  ãã£ã¹ãããã£ã®åä½éå§
+ */
+    .text
+    .align    2
+    .globl    start_dispatch
+    .type     start_dispatch, function
+start_dispatch:
+    /*
+     *  ãã®ã«ã¼ãã³ã¯ï¼ã«ã¼ãã«èµ·åæã«ï¼ãã¹ã¦ã®å²è¾¼ã¿ãç¦æ­¢ããç¶æ
+
+     * ï¼å²è¾¼ã¿ã­ãã¯ç¶æ
+ã¨åç­ï¼ã§å¼ã³åºãããï¼
+     *
+     *  ããã§ã¯ dispatcher ãå¼ã³åºãåã®åæè¨­å®ãè¡ãï¼
+     *  (1) ã·ã¹ãã ç¶æ
+ã®åæåï¼ä»¥ä¸ã®ç¶æ
+ã¸ç§»è¡ããï¼
+     *    ã»å
+¨å²è¾¼ã¿ã­ãã¯è§£é¤ç¶æ
+(ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿è¨±å¯)
+     *    ã»CPUã­ãã¯ç¶æ
+(ã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ç¦æ­¢)
+     *    ã»å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+
+     *    ã»ãã£ã¹ãããè¨±å¯ç¶æ
+
+     *
+     *    (1-1) å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯ gicc_initializeã§ï¼GICC_PMR ãåæåãããã¨ã«ãã
+     *          ãã§ã«ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã«ãªã£ã¦ããï¼
+     *    (1-2) ãã£ã¹ãããç¦æ­¢ãã©ã°ã¯ task_initialize ã§ disdsp ã false ã«åæåãã¦ãããã
+     *          ãã§ã«ãã£ã¹ãããè¨±å¯ç¶æ
+ã«ãªã£ã¦ããï¼
+     *    (1-3) ããã§ã¯ã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ãç¦æ­¢ããï¼
+     *
+     *  (2) ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå
+     *      start_dispatch ãå¼ã³åºãããã¨ããã«æ»ã£ã¦ãããã¨ã¯ãªããã
+     *      ã¹ã¿ãã¯ãã¤ã³ã¿ãããã§åæåããï¼
+     */
+    ldr x0, =_kernel_istkpt // setup stack
+    ldr x0, [x0]
+    mov sp, x0
+
+    // ã«ã¼ãã«ç®¡çå
+ã®å²è¾¼ã¿ç¦æ­¢
+    msr    daifset, #3
+
+    // dispatcherå¼ã³åºã
+    b      dispatcher
+
+/*
+ *  ã«ã¼ãã«ã®çµäºå¦çã®å¼åºã
+ *
+ *  ã¹ã¿ãã¯ãéã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã«åãæ¿ãï¼
+ *
+ */
+    .text
+    .align   2
+    .globl   call_exit_kernel
+    .type    call_exit_kernel, function
+call_exit_kernel:
+    /*
+     *  ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå
+     */
+    ldr    x0, =_kernel_istkpt
+    ldr    x0, [x0]
+    mov    sp, x0
+
+    b      exit_kernel       /* ã«ã¼ãã«ã®çµäºå¦çãå¼ã¶ */
+
+
+/*
+ * å²è¾¼ã¿/ä¾å¤ã³ã³ãã­ã¹ãä¿å­å¦ç
+ */
+.macro __save_context
+    /*
+     *  x0 - x29 ã®ä¿å­(x0,x1ãã¢ããx28, x29ã¾ã§)
+     */
+    stp	   x1, x0, [sp, #-16]!
+    stp	   x3, x2, [sp, #-16]!
+    stp	   x5, x4, [sp, #-16]!
+    stp	   x7, x6, [sp, #-16]!
+    stp	   x9, x8, [sp, #-16]!
+    stp	   x11, x10, [sp, #-16]!
+    stp	   x13, x12, [sp, #-16]!
+    stp	   x15, x14, [sp, #-16]!
+    stp	   x17, x16, [sp, #-16]!
+    stp	   x19, x18, [sp, #-16]!
+    stp	   x21, x20, [sp, #-16]!
+    stp	   x23, x22, [sp, #-16]!
+    stp	   x25, x24, [sp, #-16]!
+    stp	   x27, x26, [sp, #-16]!
+    stp	   x29, x28, [sp, #-16]!
+
+    /*
+     * spsr_el1, x30ããã¢ã§ä¿å­
+     */
+    mrs	   x21, spsr_el1
+    stp	   x21, x30, [sp, #-16]!
+
+    /*
+     * esr_el1, elr_el1 ããã¢ã§ä¿å­
+     */
+    mrs	   x21, esr_el1
+    mrs	   x22, elr_el1
+    stp	   x21, x22, [sp, #-16]!
+
+    /*
+     *  SPã®èª¿æ´(16ãããã¢ã©ã¤ã¡ã³ãã«ãã)
+     */
+    mov    x1, #8
+    mov    x2, sp
+    and    x1, x2, x1    // èª¿æ´éã®è¨ç®(0 or 8)
+    sub    sp, sp, x1    // SPã®èª¿æ´
+    stp    xzr, x1, [sp, #-16]!  // èª¿æ´éãä¿å­
+
+    /*
+     * è¿½å ã®æ ¼ç´é åãç¢ºä¿ããããï¼SPãæ¸ç®ãã¦ãã
+     */
+    sub     sp, sp, #16
+.endm
+
+/*
+ * ã³ã³ãã­ã¹ãå¾©å¸°å¦ç
+ */
+.macro __restore_context
+    /*
+     * ã¹ã¿ãã¯ã«ä¿å­ããä¸é¨ãã¼ã¿ã®ç ´æ£(ã¢ã©ã¤ã¡ã³ãèª¿æ´åãèæ
+®)
+     */
+    mov    x1, #40
+    ldr    x2, [sp, #24]
+    add    x1, x1, x2
+    add	   sp, sp, x1
+    /*
+     * ELR/SPSR ã®å¾©å
+
+     */
+    ldp    x21, x22, [sp], #16
+    msr    elr_el1, x21
+    msr    spsr_el1, x22
+    /*
+     * x0 - x30 ã®å¾©å
+
+     */
+    ldr    x30, [sp], #8
+    ldp    x29, x28, [sp], #16
+    ldp    x27, x26, [sp], #16
+    ldp    x25, x24, [sp], #16
+    ldp    x23, x22, [sp], #16
+    ldp    x21, x20, [sp], #16
+    ldp    x19, x18, [sp], #16
+    ldp    x17, x16, [sp], #16
+    ldp    x15, x14, [sp], #16
+    ldp    x13, x12, [sp], #16
+    ldp    x11, x10, [sp], #16
+    ldp    x9, x8, [sp], #16
+    ldp    x7, x6, [sp], #16
+    ldp    x5, x4, [sp], #16
+    ldp    x3, x2, [sp], #16
+    ldp    x1, x0, [sp], #16
+.endm
+
+/*
+ *  å²è¾¼ã¿/ä¾å¤ã®åºå£å¦ç
+ *    åæï¼CPUã­ãã¯ç¶æ
+, ãã¹ãã«ã¦ã³ã¿ãã¯ãªã¡ã³ãæ¸ã¿
+ */
+    .text
+    .align 2
+    .global ret_int
+ret_int:
+    // æ»ãå
+ã®ã³ã³ãã­ã¹ããç¢ºèªãï¼å¤æ®µå²è¾¼ã¿ãªããªã¿ã¼ã³
+    ldr    x1, =_kernel_intnest
+    ldrb   w3, [x1]
+    cbnz   w3, int_return
+
+ret_int_2:        // åæ®µã®å²è¾¼ã¿ã®å ´å
+    // reqflg ã false ãªãå¼ã³åºãå
+ã¸æ»ã
+    ldr    x0, =reqflg
+    ldr    w1, [x0]
+    cbz    w1, int_return
+
+ret_int_3:        // reqflg ã true ã®å ´å
+    mov    w1, #0        // reqflg = false
+    str    w1, [x0]
+
+    // ãã£ã¹ãããç¦æ­¢ãªãå¼ã³åºãå
+ã¸æ»ã
+    ldr    x0, =disdsp
+    ldr    w1, [x0]
+    cbnz   w1, int_return
+
+    /*
+     *  é
+å»¶ãã£ã¹ããã
+     *    search_schedtsk ã®è¿å¤(x0)ãå¼æ°ã¨ãã¦ run_task ãå¼ã³åºã
+     */
+    bl    search_schedtsk
+    bl    run_task
+
+    /*
+     *  å¼ã³åºãå
+ã¸ãªã¿ã¼ã³
+     */
+int_return:
+    __restore_context    // ã¬ã¸ã¹ã¿å¾©å¸°
+    eret
+
+/*
+ *  å²è¾¼ã¿ãã¯ã¿
+ *    æåã«å²è¾¼ã¿çºçåã®ã¹ã¿ãã¯ã«æ»ãã¦ããã¬ã¸ã¹ã¿ãä¿å­ãã
+ *    ãã¼ãã¦ã§ã¢ã«ãã£ã¦PSTATE.{I,F} ãã»ããæ¸ã§ãããã¨ãåæã¨ãã
+ */
+    .text
+    .global vectors
+    .align 11
+vectors:
+    /*
+     *  From EL1t
+     */
+
+    // Sync EL1
+    msr    spsel,  #0               // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã«æ»ã
+    __save_context
+    mov    x22, #0                  // ä¾å¤çªå·ãx22ã«ã»ãã
+    b      gic_exc_entry
+
+    // IRQ EL1
+    .align 7
+    msr    spsel,   #0              // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã«æ»ã
+    __save_context
+    b      gic_int_entry
+
+    // FIQ EL1
+    .align 7
+    msr    spsel, #0                // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã¸æ»ã
+    __save_context
+    b      gic_int_entry
+
+    // SError EL1
+    .align 7
+    msr    spsel, #0                // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã¸æ»ã
+    __save_context
+    mov    x22, #1                  // ä¾å¤çªå·ãx22ã«ã»ãã
+    b      gic_exc_entry
+
+    /*
+     *  From EL1h
+     */
+
+    // Sync EL1
+    .align 7
+    __save_context
+    mov    x22, #2                  // ä¾å¤çªå·ãx22ã«ã»ãã
+    b      gic_exc_entry
+
+    // IRQ EL1
+    .align 7
+    __save_context
+    b      gic_int_entry
+
+    // FIQ EL1
+    .align 7
+    __save_context
+    b      gic_int_entry
+
+    // Error EL1
+    .align 7
+    __save_context
+    mov    x22, #3                  // ä¾å¤çªå·ãx22ã«ã»ãã
+    b      gic_exc_entry
+
+    /*
+     *  From EL0t
+     */
+
+    // Sync EL0
+    .align 7
+    msr    spsel,  #0               // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã«æ»ã
+    __save_context
+    mov    x22, #4                  // ä¾å¤çªå·ãx22ã«ã»ãã
+    b      gic_exc_entry
+
+   // IRQ EL0
+    .align 7
+    msr    spsel,  #0               // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã«æ»ã
+    __save_context
+    b      gic_int_entry
+
+    // FIQ EL0
+    .align 7
+    msr    spsel,  #0               // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã«æ»ã
+    __save_context
+    b      gic_int_entry
+
+    // Error EL0
+    .align 7
+    msr    spsel,  #0               // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã«æ»ã
+    __save_context
+    mov    x22, #5                  // ä¾å¤çªå·ãx22ã«ã»ãã
+    b      gic_exc_entry
+
+    /*
+     *  From EL0 using AArch32
+     */
+
+    // AArch32 sync
+    .align 7
+    msr    spsel,  #0               // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã«æ»ã
+    __save_context
+    mov    x22, #6                  // ä¾å¤çªå·ãx22ã«ã»ãã
+    b      gic_exc_entry
+
+    // AArch32 IRQ
+    .align 7
+    msr    spsel,  #0               // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã«æ»ã
+    __save_context
+    b      gic_int_entry
+
+    // AArch32 FIQ
+    .align 7
+    msr    spsel,  #0               // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã«æ»ã
+    __save_context
+    b      gic_int_entry
+
+    // AArch32 Error
+    .align 7
+    msr    spsel,  #0               // ä¾å¤çºçåã®ã¹ã¿ãã¯(SP_EL0)ã«æ»ã
+    __save_context
+    mov    x22, #7                  // ä¾å¤çªå·ãx22ã«ã»ãã
+    b      gic_exc_entry
Index: /ssp_aarch64/trunk/arm64_gcc/prc_sym.def
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_sym.def	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_sym.def	(revision 353)
@@ -0,0 +1,1 @@
+TMAX_INTNO
Index: /ssp_aarch64/trunk/arm64_gcc/prc_test.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_test.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_test.h	(revision 353)
@@ -0,0 +1,73 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2008 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id: prc_test.h 1304 2008-08-27 07:28:36Z ertl-honda $
+ */
+
+/*
+ *		ãã¹ããã­ã°ã©ã ã®ãããä¾å­å®ç¾©ï¼ARM64ç¨ï¼
+ */
+
+#ifndef TOPPERS_PRC_TEST_H
+#define TOPPERS_PRC_TEST_H
+
+/*
+ *  ãããã§å
+±éãªå®ç¾©
+ */
+
+#define CPUEXC1    3
+#define RAISE_CPU_EXCEPTION     { unsigned int r; r=*((volatile unsigned int*)0x0000000000000000); r++; }
+#define CANNOT_RETURN_CPUEXC
+
+#endif /* TOPPERS_PRC_TEST_H */
Index: /ssp_aarch64/trunk/arm64_gcc/prc_timer.c
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_timer.c	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_timer.c	(revision 353)
@@ -0,0 +1,215 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2013-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *  ã¿ã¤ããã©ã¤ãï¼Generic Timerï¼
+ */
+#include "kernel_impl.h"
+#include "time_event.h"
+#include "target_timer.h"
+#include <sil.h>
+
+/*
+ *  ä»®æ³ã¿ã¤ãã®å¶å¾¡ã¬ã¸ã¹ã¿ããã®èª­ã¿åºã
+ */
+Inline uint64_t
+clock_read_ctrl(void) {
+    uint64_t cntv_ctrl;
+
+    Asm ("isb; mrs %0, cntv_ctl_el0; isb;"
+        : "=r"(cntv_ctrl) :: "memory");
+
+    return cntv_ctrl;
+}
+
+/*
+ *  ä»®æ³ã¿ã¤ãã®å¶å¾¡ã¬ã¸ã¹ã¿ã¸ã®æ¸ãè¾¼ã¿
+ */
+Inline void
+clock_write_ctrl(uint64_t cntv_ctrl) {
+
+    Asm ("isb; msr cntv_ctl_el0, %0; isb;"
+        :: "r"(cntv_ctrl) : "memory");
+    return ;
+}
+
+/*
+ *  ä»®æ³ã¿ã¤ã(ããªã¼ã«ã¦ã³ã¿)ã®ã«ã¦ã³ãå¤ã®èª­ã¿åºã
+ */
+Inline uint64_t
+clock_read_counter(void){
+    uint64_t cval;
+
+    Asm ("mrs %0, cntvct_el0" : "=r" (cval));
+
+    return cval;
+}
+
+/*
+ *  ä»®æ³ã¿ã¤ãã®å¤ã®èª­ã¿åºã
+ */
+Inline uint64_t
+clock_read_tval(void){
+    uint64_t cntv_tval;
+
+    Asm ("isb; mrs %0, cntv_tval_el0; isb;" : "=r"(cntv_tval)
+        :: "memory");
+    return cntv_tval;
+}
+
+/*
+ *  ä»®æ³ã¿ã¤ãã®å¤ã®æ¸ãè¾¼ã¿
+ */
+Inline void
+clock_write_tval(uint64_t cntv_tval){
+
+    Asm ("isb; msr cntv_tval_el0, %0; isb;" :: "r"(cntv_tval)
+        : "memory");
+}
+
+/*
+ *  ã·ã¹ãã ã«ã¦ã³ã¿ã®ã¯ã­ãã¯å¨æ³¢æ°ã®åå¾
+ */
+Inline uint64_t
+get_timer_freq(void) {
+    uint64_t freq_hz;
+
+    Asm ("mrs %0, cntfrq_el0; isb; " : "=r"(freq_hz) :: "memory");
+    return freq_hz;
+}
+
+/*
+ *  ã¿ã¤ãã®éå§
+ */
+static void
+target_timer_start(void)
+{
+    uint64_t cntv_ctl;
+
+    cntv_ctl = clock_read_ctrl();
+    cntv_ctl |=  ( CNTV_CTL_ENABLE | CNTV_CTL_START );
+    cntv_ctl &= ~CNTV_CTL_MASK; //mask
+    clock_write_ctrl(cntv_ctl);
+}
+
+/*
+ *  ã¿ã¤ãã®åæ­¢
+ */
+static void
+target_timer_stop(void)
+{
+    uint64_t cntv_ctl;
+
+    cntv_ctl = clock_read_ctrl();
+    cntv_ctl &= ~( CNTV_CTL_ENABLE | CNTV_CTL_START );
+    cntv_ctl |=  CNTV_CTL_MASK;
+    clock_write_ctrl(cntv_ctl);
+}
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿è¦æ±ã®ã¯ãªã¢
+ */
+static void
+target_timer_int_clear(void){
+
+    gicd_clear_pending(INTNO_TIMER);
+}
+
+/*
+ *  æ¬¡ã®ã¿ã¤ãå²è¾¼ã¿çºçã¾ã§ã®ãªãã»ãã
+ */
+static uint64_t next_tval;
+
+/*
+ *  ã¿ã¤ãã®èµ·åå¦ç
+ */
+void
+target_timer_initialize(intptr_t exinf)
+{
+    target_timer_stop();
+    target_timer_int_clear();
+
+    // æ¬¡åã®ã¿ã¤ãå²è¾¼ã¿çºçã¾ã§ã®ãªãã»ããç®åº
+    next_tval = get_timer_freq() * 1000 / 1000000UL;  /* 1ms */
+    clock_write_tval(next_tval);
+
+    target_timer_start();
+}
+
+/*
+ *  ã¿ã¤ãã®åæ­¢å¦ç
+ */
+void
+target_timer_terminate(intptr_t exinf)
+{
+    target_timer_stop();
+}
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿ãã³ãã©
+ */
+void
+target_timer_handler(void)
+{
+    target_timer_stop();
+    target_timer_int_clear();
+    clock_write_tval(next_tval);    // æ¬¡åã®å²è¾¼ã¿
+    target_timer_start();
+
+    i_begin_int(INTNO_TIMER);
+    signal_time();
+    i_end_int(INTNO_TIMER);
+}
Index: /ssp_aarch64/trunk/arm64_gcc/prc_timer.cfg
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_timer.cfg	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_timer.cfg	(revision 353)
@@ -0,0 +1,11 @@
+/*
+ *  @(#) $Id: prc_timer.cfg 1304 2008-08-27 07:28:36Z ertl-honda $
+ */
+
+/*
+ *		ã¿ã¤ããã©ã¤ãã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+ATT_INI({ TA_NULL, 0, target_timer_initialize });
+ATT_TER({ TA_NULL, 0, target_timer_terminate });
+DEF_INH(INHNO_TIMER, { TA_NULL, target_timer_handler });
+CFG_INT(INTNO_TIMER, { TA_ENAINT|INTATR_TIMER, INTPRI_TIMER });
Index: /ssp_aarch64/trunk/arm64_gcc/prc_timer.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_timer.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_timer.h	(revision 353)
@@ -0,0 +1,123 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2013-2015 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *  ã¿ã¤ããã©ã¤ãï¼Generic Timerï¼
+ */
+
+#ifndef TOPPERS_PRC_TIMER_H
+#define TOPPERS_PRC_TIMER_H
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿ãã³ãã©ç»é²ã®ããã®å®æ°
+ */
+#define INTNO_TIMER     TINTNO_TIMER  /* å²è¾¼ã¿çªå· */
+#define INHNO_TIMER     INTNO_TIMER   /* å²è¾¼ã¿ãã³ãã©çªå· */
+
+#define CNTV_CTL_ENABLE  (1 << 0)
+#define CNTV_CTL_MASK    (1 << 1)
+#define CNTV_CTL_START   (1 << 2)
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¿ã¤ãå¤ã®å
+é¨è¡¨ç¾ã®å
+ */
+typedef uint64_t    CLOCK;
+
+/*
+ *  ã¿ã¤ãå¤ã®å
+é¨è¡¨ç¾ã¨ããªç§ã»Î¼ç§åä½ã¨ã®å¤æ
+ *
+ */
+#define TO_CLOCK(nume, deno)    ((CLOCK)(TIMER_CLOCK * (nume) / (deno)))
+#define TO_USEC(clock)          (((SYSUTM) clock) * 1000U / TIMER_CLOCK)
+
+/*
+ *  ã¿ã¤ãã®èµ·åå¦ç
+ *
+ *  ã¿ã¤ããåæåãï¼å¨æçãªã¿ã¤ãå²è¾¼ã¿è¦æ±ãçºçãããï¼
+ */
+extern void target_timer_initialize(intptr_t exinf);
+
+/*
+ *  ã¿ã¤ãã®åæ­¢å¦ç
+ *
+ *  ã¿ã¤ãã®åä½ãåæ­¢ãããï¼
+ */
+extern void target_timer_terminate(intptr_t exinf);
+
+/*
+ *  ã¿ã¤ãã®ç¾å¨å¤ã®èª­åºã
+ */
+Inline CLOCK
+target_timer_get_current(void)
+{
+        uint64_t cntv_tval;
+
+        Asm ("isb; mrs %0, cntv_tval_el0; isb;" : "=r"(cntv_tval)
+            :: "memory");
+        return cntv_tval;
+}
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿ãã³ãã©
+ */
+extern void target_timer_handler(void);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_PRC_TIMER_H */
Index: /ssp_aarch64/trunk/arm64_gcc/prc_unrename.h
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_unrename.h	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_unrename.h	(revision 353)
@@ -0,0 +1,94 @@
+/* This file is generated from prc_rename.def by genrename. */
+
+/* This file is included only when prc_rename.h has been included. */
+#ifdef TOPPERS_PRC_RENAME_H
+#undef TOPPERS_PRC_RENAME_H
+
+/*
+ *  gic_config.c
+ */
+#undef gicc_initialize
+#undef gicc_terminate
+#undef gicd_initialize
+#undef gicd_terminate
+
+/*
+ *  gic_support.S
+ */
+#undef gic_exc_entry
+#undef gic_int_entry
+
+/*
+ *  prc_config.c
+ */
+#undef intnest
+#undef prc_initialize
+#undef prc_terminate
+#undef x_config_int
+#undef default_exc_handler
+#undef default_int_handler
+#undef call_int_handler
+#undef call_exc_handler
+
+/*
+ *  prc_support.S
+ */
+#undef start_dispatch
+#undef call_exit_kernel
+#undef ret_int
+#undef vectors
+
+/*
+ *  kernel_cfg.c
+ */
+#undef intcfg_table
+#undef inh_table
+#undef exc_table
+
+#ifdef TOPPERS_LABEL_ASM
+
+/*
+ *  gic_config.c
+ */
+#undef _gicc_initialize
+#undef _gicc_terminate
+#undef _gicd_initialize
+#undef _gicd_terminate
+
+/*
+ *  gic_support.S
+ */
+#undef _gic_exc_entry
+#undef _gic_int_entry
+
+/*
+ *  prc_config.c
+ */
+#undef _intnest
+#undef _prc_initialize
+#undef _prc_terminate
+#undef _x_config_int
+#undef _default_exc_handler
+#undef _default_int_handler
+#undef _call_int_handler
+#undef _call_exc_handler
+
+/*
+ *  prc_support.S
+ */
+#undef _start_dispatch
+#undef _call_exit_kernel
+#undef _ret_int
+#undef _vectors
+
+/*
+ *  kernel_cfg.c
+ */
+#undef _intcfg_table
+#undef _inh_table
+#undef _exc_table
+
+#endif /* TOPPERS_LABEL_ASM */
+
+
+#endif /* TOPPERS_PRC_RENAME_H */
Index: /ssp_aarch64/trunk/arm64_gcc/prc_user.txt
===================================================================
--- /ssp_aarch64/trunk/arm64_gcc/prc_user.txt	(revision 353)
+++ /ssp_aarch64/trunk/arm64_gcc/prc_user.txt	(revision 353)
@@ -0,0 +1,190 @@
+=====================================================================
+                         ARM64ãã­ã»ããµä¾å­é¨
+                                  Last Modified: '18/05/29
+=====================================================================
+
+
+(1) å¯¾å¿ãã¦ããã¿ã¼ã²ããã·ã¹ãã ã®ç¨®é¡ã»æ§æ
+
+ARM64ä¾å­é¨ã¯ï¼ARMv8-A ã¢ã¼ã­ãã¯ãã£ãã¿ã¼ã²ããã¨ãã¦ããï¼ARMv8-A ã¯
+64ãããã¢ã¼ã­ãã¯ãã£ã§ããå½ä»¤ã»ããã¬ãã«ã§ãARMã¨ã¯ç°ãªãããï¼
+ARMä¾å­é¨ã¨åãã¦ããï¼
+
+(2) ä½¿ç¨ããéçºç°å¢ã¨åä½æ¤è¨¼ããæ¡ä»¶ï¼ãã¼ã¸ã§ã³ï¼ãªãã·ã§ã³ç­ï¼
+
+ã«ã¼ãã«ã¯GCCãç¨ãã¦ã³ã³ãã¤ã«ããï¼åä½ç¢ºèªãããã¼ã¸ã§ã³ã¯åã¿ã¼ã²
+ããä¾å­é¨ã®ãã­ã¥ã¡ã³ãã«è¨è¼ããï¼
+
+(3) ã¿ã¼ã²ããå®ç¾©äºé 
+ã®è¦å®
+
+(3-1) ãã¼ã¿åã«é¢ããè¦å®
+
+ãã¼ã¿åã¯ arch/gcc/tool_stddef.h ã§å®ç¾©ããã¦ããå
+å®¹ã§ï¼floatåã¨
+doubleåã¯ï¼ããããIEEE754æºæ ã®åç²¾åº¦æµ®åå°æ°ç¹æ°ã¨åç²¾åº¦æµ®åå°æ°ç¹
+æ°ã§ããï¼
+
+(3-2) å²è¾¼ã¿å¦çã«é¢ããè¦å®
+
+âå²è¾¼ã¿ãã³ãã©çªå·ã¨å²è¾¼ã¿çªå·ã®å²å½ã¦ï¼ä¸¡è
+ã®å¯¾å¿
+
+IRQ ããã³ FIQ ãã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ã¨ããï¼
+å²è¾¼ã¿ãã³ãã©çªå·ã¨å²è¾¼ã¿çªå·ã¯ï¼ä¾å¤çºçæã«GICC_IAR ã«ã»ãããããä¾å¤çª
+å·ãç¨ããï¼Generic Timer ã¯27çªã§ï¼å²è¾¼ã¿ã¯0çªããã®çªå·ãå²ãä»ããã
+ã¦ããï¼
+
+âå²è¾¼ã¿åªå
+åº¦ã®æ®µéæ°ï¼TMIN_INTPRIã®å¤ï¼ï¼ãã®è¨­å®æ¹æ³
+
+å²è¾¼ã¿åªå
+åº¦ã®æ®µéæ°ã¯ï¼ã¿ã¼ã²ããä¾å­é¨æ¯ã«ç°ãªãï¼
+ã«ã¼ãã«ç®¡çå
+ã®å²è¾¼ã¿ã®æé«åªå
+åº¦ï¼TMIN_INTPRIï¼ã¯ã¿ã¼ã²ããä¾å­é¨ã§è¨­å®ããï¼
+
+åå²è¾¼ã¿ã®å²è¾¼ã¿åªå
+åº¦ã¯ï¼CFG_INT ã§ TMIN_INTPRI ä»¥ä¸ã®å¤ãæå®ããï¼
+
+âdis_intã¨ena_intã®ãµãã¼ãã®æç¡ï¼ãã®å¶éäºé 
+
+
+dis_intã¨ena_intããµãã¼ãããï¼å¶éäºé 
+ã¯ç¹ã«ãªãï¼
+
+âCFG_INTã®å¶éäºé 
+ã¨æ¡å¼µï¼ã¿ã¼ã²ããå®ç¾©ã§ä½¿ç¨ã§ããå²è¾¼ã¿å±æ§ï¼
+
+CFG_INTã®å¶éäºé 
+ã¯ãªãï¼ã¿ã¼ã²ããå®ç¾©ã§ä½¿ç¨å¯è½ãªå²è¾¼ã¿å±æ§ã¯ç¹ã«ãª
+ãï¼
+
+âã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿
+
+ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ã¯ãµãã¼ãããªãï¼
+IRQï¼FIQå
+±ã«ã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ã¨ãã¦æ±ãï¼
+
+
+(3-3) CPUä¾å¤å¦çã«é¢ããè¦å®
+
+âCPUä¾å¤ãã³ãã©çªå·
+
+ARMv8ã§ã¯ï¼ä¾å¤çºçæã®ä¾å¤ã¬ãã«(EL)ï¼ä½¿ç¨ã¹ã¿ãã¯ï¼å®è¡ç¶æ
+(AArch32 or AArch64)ï¼
+çºçããä¾å¤ã®ç¨®é¡ã«ããï¼ã¸ã£ã³ãå
+ã¨ãªãä¾å¤ãã¯ã¿ä¸­ã®ãªãã»ããã¢ãã¬ã¹ãç°ãªãï¼
+CPUä¾å¤ãã³ãã©ã¯ãã®ã¸ã£ã³ãå
+ã®ãªãã»ããã¢ãã¬ã¹ã§åºå¥ãããã¨ã«ãï¼
+ããããç°ãªãCPUä¾å¤ãã³ãã©çªå·ãå²ãå½ã¦ãï¼
+
+  ä¾å¤çºçæã®ç¶æ
+             ä¾å¤ã®ç¨®é¡      ä¾å¤çªå· ãä¾å¤ãã¯ã¿å
+é ­ããã®ãªãã»ãã
+  AArch64, EL1t(EL1, SP_EL0)  Synchronous         0        0x0000
+  AArch64, EL1t(EL1, SP_EL0)  SError              1        0x0180
+  AArch64, EL1h(EL1, SP_EL1)  Synchronous         2        0x0200
+  AArch64, EL1h(EL1, SP_EL1)  SError              3        0x0380
+  AArch64, EL0 (EL0, SP_EL0)  Synchronous         4        0x0400
+  AArch64, EL0 (EL0, SP_EL0)  SError              5        0x0580
+  AArch32, EL0 (EL0, SP_EL0)  Synchronous         6        0x0600
+  AArch32, EL0 (EL0, SP_EL0)  SError              7        0x0780
+
+(3-4) CPUã­ãã¯ã»å²è¾¼ã¿ã­ãã¯
+
+CPUã­ãã¯ã¯ï¼PSTATE.I ããã³ PSTATE.F ãå
+±ã« 1 ã«ãããã¨ã§å®ç¾ããï¼
+ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ããµãã¼ãããªãããï¼å
+¨å²è¾¼ã¿ã­ãã¯ãã©ã°ã
+CPUã­ãã¯ã¨åæ§ã®å®è£
+ã§ããï¼ãã ã CPUã­ãã¯ãã©ã°ã¨ã¯ç¬ç«ãããã©ã°
+ã¨ãã¦å
+¨å²è¾¼ã¿ã­ãã¯ãã©ã°ããµãã¼ãããï¼å
+·ä½çã«ã¯SIL_LOC_INTå¼ã³åºã
+æã«Iããã³Fãã©ã°ã®ç¶æ
+ãè¨æ¶ãã¦ããï¼SIL_UNL_INT ã§å
+ã®ç¶æ
+ã«
+æ»ãã¦ããï¼
+
+(3-5) æ§è½è©ä¾¡ç¨ã·ã¹ãã æå»ã®åç
+§ã«é¢ããè¦å®
+
+get_utmããµãã¼ãããªãï¼
+
+
+(3-6) ã¹ã¿ã¼ãã¢ããã«ã¼ãã³ã§ã®åæåå
+å®¹
+
+ã¹ã¿ã¼ãã¢ããã«ã¼ãã³ãåæã¨ãããã­ã»ããµã®ç¶æ
+ã¯ãã­ã»ããµã«ããç°ãªãããï¼
+ã¹ã¿ã¼ãã¢ããã«ã¼ãã³ã¯ã¿ã¼ã²ããä¾å­é¨ã«é
+ç½®ãã¦ããï¼
+
+ä¾ã¨ãã¦QEMU VIRT ãã¼ãã®å ´åã¯ä»¥ä¸ã®ããã«ãªã£ã¦ããï¼
+ã»ä¾å¤ã¬ãã«ã¯æ¢å®ã§EL1
+ã»ä½¿ç¨ã¹ã¿ãã¯ã¯(EL1ã®å ´åï¼) SP_EL1
+ã»èµ·åç´å¾ã¯PSTATEã®Fããã³Iã¯1ï¼IRQ,FIQç¦æ­¢ï¼
+
+ã¹ã¿ã¼ãã¢ããã«ã¼ãã³ã§ã¯ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæåï¼ãã¯ã¿ãã¼ãã«ã¢ãã¬ã¹ã®è¨­å®ï¼
+ã¡ã¢ãªã®åæåãªã©ã®å¿
+è¦ãªå¦çãè¡ãï¼sta_ker ãå¼ã³åºãï¼
+
+
+(4) ã¿ã¤ããã©ã¤ãé¢é£ã®æ
+å ±
+
+ã«ã¼ãã«ã®ã¿ã¤ã ãã£ãã¯ã¨ãã¦ï¼Generic Timer ãä½¿ç¨ããï¼
+ãã£ãã¯å¨æã¯1msecã¨ããï¼
+
+
+(5) ã¿ã¼ã²ããä¾å­é¨ã§ã®è¨­å®é 
+ç®
+
+ã¿ã¼ã²ããä¾å­é¨ã§ã¯ä»¥ä¸ã®ãã¯ã­ãå®ç¾©ããå¿
+è¦ãããï¼
+
+   ã»TMAX_INTNO     : å²è¾¼ã¿çªå·ã®æå¤§å¤(éå¸¸ã®å²è¾¼ã¿çªå· + 15)
+   ã»TMIN_INTPRI    : å²è¾¼ã¿åªå
+åº¦ã®æå°å¤ï¼æé«å¤ï¼
+   ã»TIC_NUME       : ã¿ã¤ã ãã£ãã¯ã®å¨æã®åå­
+   ã»TIC_DENO       : ã¿ã¤ã ãã£ãã¯ã®å¨æã®åæ¯
+   ã»INTPRI_TIMER   : ã¿ã¤ãå²è¾¼ã¿å²è¾¼ã¿åªå
+åº¦
+   ã»INTATR_TIMER   : ã¿ã¤ãå²è¾¼ã¿ã®å²è¾¼ã¿å±æ§
+   ã»DEFAULT_ISTKSZ : ã¹ã¿ãã¯ãµã¤ãºï¼16byteåä½ã§æå®ï¼
+
+
+(6) ãã£ã¬ã¯ããªæ§æã»ãã¡ã¤ã«æ§æ
+  ./arch/arm64/
+    ./MANIFEST
+    ./Makefile.prc
+    ./arm64.h
+    ./gic_config.c
+    ./gic_config.h
+    ./gic_support.S
+    ./prc_cfg1_out.h
+    ./prc_check.trb
+    ./prc_config.c
+    ./prc_config.h
+    ./prc_design.txt
+    ./prc_kernel.h
+    ./prc_kernel.trb
+    ./prc_rename.def
+    ./prc_rename.h
+    ./prc_sil.h
+    ./prc_stddef.h
+    ./prc_support.S
+    ./prc_sym.def
+    ./prc_test.h
+    ./prc_timer.c
+    ./prc_timer.cfg
+    ./prc_timer.h
+    ./prc_unrename.h
+    ./prc_user.txt
+
+(12) ãã¼ã¸ã§ã³å±¥æ­´
+
+2018/05/30
+ ã»æåã®ãªãªã¼ã¹
Index: /ssp_aarch64/trunk/install.sh
===================================================================
--- /ssp_aarch64/trunk/install.sh	(revision 353)
+++ /ssp_aarch64/trunk/install.sh	(revision 353)
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+set -eu
+
+SCRIPT_DIR=$(cd $(dirname $0);pwd)
+
+if [ $# -lt 1 ]; then
+  echo "usage: install.sh dest_ssp_dir"
+  exit 1
+else
+  SSPDIR=$1
+fi
+
+cp -a ${SCRIPT_DIR}/arm64_gcc ${SSPDIR}/arch/
+cp -a ${SCRIPT_DIR}/qemu_virt_gcc ${SSPDIR}/target/
+(cd ${SSPDIR} && patch -p1 < ${SCRIPT_DIR}/ssp_aarch64.patch)
+
+exit 0
Index: /ssp_aarch64/trunk/qemu_virt_gcc/E_PACKAGE
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/E_PACKAGE	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/E_PACKAGE	(revision 353)
@@ -0,0 +1,5 @@
+E_PACKAGE ssp_qemu_virt_gcc
+VERSION %date
+
+INCLUDE ../../MANIFEST
+INCLUDE ../../cfg/MANIFEST
Index: /ssp_aarch64/trunk/qemu_virt_gcc/MANIFEST
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/MANIFEST	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/MANIFEST	(revision 353)
@@ -0,0 +1,30 @@
+PACKAGE ssp
+
+E_PACKAGE
+MANIFEST
+Makefile.target
+qemu_virt.h
+qemu_virt.ld
+start.S
+target_cfg1_out.h
+target_check.trb
+target_config.c
+target_config.h
+target_kernel.cfg
+target_kernel.h
+target_kernel.trb
+target_rename.def
+target_rename.h
+target_serial.c
+target_serial.cfg
+target_serial.h
+target_sil.h
+target_stddef.h
+target_sym.def
+target_syssvc.h
+target_test.h
+target_timer.cfg
+target_timer.h
+target_unrename.h
+target_user.txt
+uart_pl011.h
Index: /ssp_aarch64/trunk/qemu_virt_gcc/Makefile.target
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/Makefile.target	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/Makefile.target	(revision 353)
@@ -0,0 +1,127 @@
+#
+#		Makefile ã®ã¿ã¼ã²ããä¾å­é¨(QEMU-VIRTç¨)
+#
+
+#
+#  ãã¼ãåï¼ãã­ã»ããµåï¼éçºç°å¢åã®å®ç¾©
+#
+BOARD = qemu_virt
+PRC   = arm64
+TOOL  = gcc
+
+#
+#  GNUéçºç°å¢ã®ã¿ã¼ã²ããã¢ã¼ã­ãã¯ãã£ã®å®ç¾©
+#
+GCC_TARGET = aarch64-elf
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+COPTS := $(COPTS) -Werror -mgeneral-regs-only -ggdb3 -fno-pic -fno-builtin -mstrict-align -mtune=cortex-a53 -mcpu=cortex-a53+nofp #-mfix-cortex-a53-835769 -mfix-cortex-a53-843419
+CDEFS := $(CDEFS) #-DTOPPERS_LABEL_ASM
+INCLUDES := $(INCLUDES) -I$(TARGETDIR)
+LDFLAGS := -nostdlib $(LDFLAGS)
+LIBS := $(LIBS) -lgcc
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+SYSSVC_DIRS := $(SYSSVC_DIRS)
+SYSSVC_ASMOBJS := $(SYSSVC_ASMOBJS)
+SYSSVC_COBJS := $(SYSSVC_COBJS) target_serial.o
+SYSSVC_CFLAGS := $(SYSSVC_CFLAGS)
+SYSSVC_LIBS := $(SYSSVC_LIBS)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIRS := $(KERNEL_DIRS) $(TARGETDIR)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS) target_config.o
+KERNEL_CFLAGS := $(KERNEL_CFLAGS) #-fno-strict-aliasing
+
+#
+#  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+#
+ifeq ($(ENABLE_TRACE),true)
+	COPTS := $(COPTS) -DTOPPERS_ENABLE_TRACE
+	KERNEL_DIRS := $(KERNEL_DIRS) $(SRCDIR)/arch/logtrace
+	KERNEL_COBJS := $(KERNEL_COBJS) trace_config.o trace_dump.o
+endif
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+#
+CFG_TABS := $(CFG_TABS) --symval-table $(TARGETDIR)/target_sym.def
+CFG1_OUT_LDFLAGS := $(CFG1_OUT_LDFLAGS)
+CFG_OBJS := $(CFG_OBJS)
+CFG2_OUT := $(CFG2_OUT)
+
+#
+#  -Wall ãªãã·ã§ã³ã®çç¥
+#    -Wallãè¿½å ããããªãå ´åã« true ã«å®ç¾©ãã
+#
+#OMIT_WARNING_ALL = true
+
+#
+#  æé©åãã©ã°ã®çç¥
+#    -O2ãè¿½å ããããªãå ´åã« true ã«å®ç¾©ãã
+#
+#OMIT_OPTIMIZATION = true
+
+#
+#  ãªã³ã«ã¹ã¯ãªããã®å®ç¾©
+#
+LDSCRIPT = $(SRCDIR)/target/$(BOARD)_$(TOOL)/$(BOARD).ld
+
+#
+#  åã»ã¯ã·ã§ã³ã®å
+é ­çªå°ã®æå®
+#
+#TEXT_START_ADDRESS =
+#DATA_START_ADDRESS =
+
+#
+#  ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã«é¢ããå®ç¾©
+#
+
+#  ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«
+START_OBJS = start.o
+#  ãªã³ã«ã¹ã¯ãªããã«ãSTARTUP(start.o)ããè¨è¿°ããå ´åï¼
+#  ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã®ååãSTART_OBJS ã®ä»£ããã« HIDDEN_OBJS ã§å®ç¾©ããï¼
+HIDDEN_OBJS =
+
+
+# ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã¤ã«ã«ã¼ã«
+$(START_OBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+$(HIDDEN_OBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+
+# ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã®ä¾å­é¢ä¿ä½æã«ã¼ã«
+$(START_OBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+                -O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+$(HIDDEN_OBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+                -O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+#
+#  ä¾å­é¢ä¿ã®å®ç¾©
+#
+cfg1_out.c: $(TARGETDIR)/target_sym.def
+kernel_cfg.timestamp: $(TARGETDIR)/target_kernel.trb
+check.timestamp: $(TARGETDIR)/target_check.trb
+
+#
+#  ãã®ä»
+#
+CLEAN_FILES := $(CLEAN_FILES)
+REALCLEAN_FILES := $(REALCLEAN_FILES)
+
+
+#
+#  ãã­ã»ããµä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(SRCDIR)/arch/$(PRC)_$(TOOL)/Makefile.prc
Index: /ssp_aarch64/trunk/qemu_virt_gcc/qemu_virt.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/qemu_virt.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/qemu_virt.h	(revision 353)
@@ -0,0 +1,98 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2013-2014 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+/*
+ *  QEMU VIRT ã¿ã¼ã²ããã®ãã¼ãã¦ã§ã¢è³æºå®ç¾©
+ */
+
+#ifndef TOPPERS_QEMU_VIRT_H
+#define TOPPERS_QEMU_VIRT_H
+
+/*
+ *  å²è¾¼ã¿çªå·ï¼intnoï¼ã®å®ç¾©
+ */
+#define TINTNO_TIMER    27    /* é«åè§£è½ã¿ã¤ã */
+#define TINTNO_UART0    33    /* SIOãã¼ã */
+
+/*
+ * GIC
+ */
+#define GIC_BASE                (0x08000000)
+#define GICD_BASE               (GIC_BASE)
+#define GICC_BASE               (GIC_BASE + 0x10000)
+#define GIC_TNUM_INTNO          (64)
+
+/*
+ *  å²è¾¼ã¿çªå·ã®æå°å¤ã¨æå¤§å¤
+ */
+#define TMIN_INTNO              UINT_C(0)
+#define TMAX_INTNO              (GIC_TNUM_INTNO - 1)
+
+/*
+ *  UARTã¬ã¸ã¹ã¿ã®ãã¼ã¹ã¢ãã¬ã¹
+ */
+#define VIRT_UART0_BASE		(0x09000000)
+
+/*
+ *  ãã¼ã¬ã¼ãè¨­å®ï¼38400bpsï¼
+ */
+#define VIRT_UART_IBRD_38400	0x27U
+#define VIRT_UART_FBRD_38400	0x04U
+
+#ifndef  TOPPERS_MACRO_ONLY
+#endif  /*  TOPPERS_MACRO_ONLY  */
+#endif /* TOPPERS_QEMU_VIRT_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/qemu_virt.ld
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/qemu_virt.ld	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/qemu_virt.ld	(revision 353)
@@ -0,0 +1,88 @@
+/*
+ *  $Id:$
+ */
+
+OUTPUT_FORMAT("elf64-littleaarch64", "elf64-bigaarch64",
+              "elf64-littleaarch64")
+OUTPUT_ARCH(aarch64)
+
+PROVIDE(hardware_init_hook = 0);
+PROVIDE(software_init_hook = 0);
+PROVIDE(software_term_hook = 0);
+
+ENTRY(start)
+SECTIONS
+{
+	. = 0x40000000;
+	.text : {
+		__start_text = .;
+		 *(.text) 
+		__end_kernel = .;
+	}
+	_etext = .;
+	PROVIDE(etext = .);
+
+	. = ALIGN(8);
+	.rodata : {
+		__start_rodata = .;
+		*(.rodata)
+		__end_rodata = .;
+	}
+
+	. = ALIGN(8);
+	__start_idata = .;
+	.data : AT(__start_idata){
+		__start_data = .;
+		 *(.data) 
+		__end_data = .;
+	 }
+	__end_idata = __start_idata + SIZEOF(.data);
+	_edata = .;
+	PROVIDE(edata = .);
+	. = ALIGN(8);
+	.bss : {
+		__start_bss = .;
+		*(.bss)
+		*(COMMON)
+		__end_bss = .;
+	 }
+	. = ALIGN(8);
+	_end = .;
+	PROVIDE(end = .);
+	. = . + 0x1000; /* 4kB of stack memory */
+	stack_top = .;
+	.comment 0 : { *(.comment) }	
+
+	/*
+	 *  DWARF debug sections.
+	 *  Symbols in the DWARF debugging sections are relative to
+	 *  the beginning of the section so we begin them at 0.
+	 */
+
+	/* DWARF 1 */
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+
+	/* GNU DWARF 1 extensions */
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+
+	/* DWARF 1.1 and DWARF 2 */
+	.debug_aranges	0 : { *(.debug_aranges) }
+	.debug_pubnames	0 : { *(.debug_pubnames) }
+
+	/* DWARF 2 */
+	.debug_info		0 : { *(.debug_info) }
+	.debug_abbrev	0 : { *(.debug_abbrev) }
+	.debug_line		0 : { *(.debug_line) }
+	.debug_frame	0 : { *(.debug_frame) }
+	.debug_str		0 : { *(.debug_str) }
+	.debug_loc		0 : { *(.debug_loc) }
+	.debug_macinfo	0 : { *(.debug_macinfo) }
+
+	/* SGI/MIPS DWARF 2 extensions */
+	.debug_weaknames 0 : { *(.debug_weaknames) }
+	.debug_funcnames 0 : { *(.debug_funcnames) }
+	.debug_typenames 0 : { *(.debug_typenames) }
+	.debug_varnames  0 : { *(.debug_varnames) }
+}
Index: /ssp_aarch64/trunk/qemu_virt_gcc/start.S
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/start.S	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/start.S	(revision 353)
@@ -0,0 +1,82 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id$
+ */
+
+#define TOPPERS_MACRO_ONLY
+#include "kernel_impl.h"
+
+    .text
+    .align 4
+    .global start
+    .global vectors
+start:
+    msr daifset, #3         //å²è¾¼ã¿ç¦æ­¢(å²è¾¼ã¿ã­ãã¯ç¸å½)
+
+    /*
+     *  ä¾å¤ãã¯ã¿ãã¼ãã«ã®ãã¼ã¹ã¢ãã¬ã¹è¨­å®
+     */
+    ldr x0, =vectors
+    msr vbar_el1, x0
+
+    /*
+     *  ã¹ã¿ãã¯ãã¤ã³ã¿ã¨ãã¬ã¼ã ãã¤ã³ã¿ã®åæå
+     */
+    ldr x0, =_kernel_istkpt	// setup stack
+    ldr x0, [x0]
+    mov sp, x0
+    bl sta_ker
+    b .
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_cfg1_out.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_cfg1_out.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_cfg1_out.h	(revision 353)
@@ -0,0 +1,9 @@
+/*
+ *		cfg1_out.cããªã³ã¯ããããã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+ */
+
+/*
+ *  ã³ã¢ä¾å­ã®ã¹ã¿ãã®å®ç¾© 
+ */
+#include "arm64_gcc/prc_cfg1_out.h"
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_check.trb
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_check.trb	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_check.trb	(revision 353)
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+#
+#		ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨
+#
+
+IncludeTrb("arm64_gcc/prc_check.trb")
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_config.c
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_config.c	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_config.c	(revision 353)
@@ -0,0 +1,96 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012 Meika Sugimoto
+ *  Copyright (C) 2015,2018 by Naoki Saito
+ *              Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ * ã¿ã¼ã²ããä¾å­ã¢ã¸ã¥ã¼ã«(QEMU_VIRTç¨)
+ */
+#include "kernel_impl.h"
+#include <sil.h>
+#include "target_serial.h"
+#include "target_syssvc.h"
+
+/*
+ * ã¿ã¼ã²ããä¾å­é¨ãåæåå¦ç
+ */
+void target_initialize(void)
+{
+    /*
+     *  ãã­ã»ããµä¾å­é¨ã®åæå
+     */
+    prc_initialize();
+}
+
+/*
+ * ã¿ã¼ã²ããä¾å­é¨ çµäºå¦ç
+ */
+void target_exit(void)
+{
+    /* ãã­ã»ããµä¾å­é¨ã®çµäºå¦ç */
+    prc_terminate();
+}
+
+/*
+ * ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ããã®æå­åºå
+ */
+void target_fput_log(char c)
+{
+    if (c == '\n') {
+        sio_pol_snd_chr('\r', SIO_PORTID);
+    }
+    sio_pol_snd_chr(c, SIO_PORTID);
+}
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_config.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_config.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_config.h	(revision 353)
@@ -0,0 +1,110 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012 by Meika Sugimoto
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+#ifndef TOPPERS_TARGET_CONFIG_H
+#define TOPPERS_TARGET_CONFIG_H
+
+/*
+ * ã¿ã¼ã²ããä¾å­é¨ã¢ã¸ã¥ã¼ã«(QEMU-VIRTç¨)
+ *
+ * ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ï¼
+ * kernel_impl.hã®ã¿ã¼ã²ããä¾å­é¨ã®ä½ç½®ä»ãã¨ãªãï¼
+ */
+
+#include "qemu_virt.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+ */
+#ifdef TOPPERS_ENABLE_TRACE
+#include "logtrace/trace_config.h"
+#endif /* TOPPERS_ENABLE_TRACE */
+
+/*
+ *  ããã©ã«ãã®éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å®ç¾©
+ *  16byteåä½ã§åå¾ãããï¼
+ */
+#define DEFAULT_ISTKSZ			(0x4000 / 16)		/* 16KByte */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¿ã¼ã²ããã·ã¹ãã ä¾å­ã®åæå
+ */
+extern void	target_initialize(void);
+
+/*
+ *  ã¿ã¼ã²ããã·ã¹ãã ã®çµäº
+ *
+ *  ã·ã¹ãã ãçµäºããæã«ä½¿ãï¼
+ */
+extern void	target_exit(void) NoReturn;
+
+/*
+ *  å¯¾è±¡ã¨ãããã­ã»ããµçªå·
+ */
+#define ARM_PRC_INDEX    (0)
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ãããä¾å­ã¢ã¸ã¥ã¼ã«ï¼ARM64ç¨ï¼
+ */
+#include "arm64_gcc/prc_config.h"
+
+#endif /* TOPPERS_TARGET_CONFIG_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_kernel.cfg
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_kernel.cfg	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_kernel.cfg	(revision 353)
@@ -0,0 +1,1 @@
+INCLUDE("target_timer.cfg");
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_kernel.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_kernel.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_kernel.h	(revision 353)
@@ -0,0 +1,89 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ *  kernel.hã®ã¿ã¼ã²ããä¾å­é¨(QEMU-VIRTç¨)
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼kernel.hã§ã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡
+ *  ã¤ã«ããç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªãï¼ãã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ã
+ *  ããåã«ï¼t_stddef.hãã¤ã³ã¯ã«ã¼ããããã®ã§ï¼ãããã«ä¾å­ãã¦ãã
+ *  ãï¼
+ */
+
+#ifndef TOPPERS_TARGET_KERNEL_H
+#define TOPPERS_TARGET_KERNEL_H
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ã®ç¯å²
+ */
+#define TMIN_INTPRI             (-15)           /* å²è¾¼ã¿åªå
+åº¦ã®æå°å¤ï¼æé«å¤ï¼*/
+#define TMAX_INTPRI             (-1)            /* å²è¾¼ã¿åªå
+åº¦ã®æå¤§å¤ï¼æä½å¤ï¼ */
+
+/*
+ *  ã¿ã¤ã ãã£ãã¯ã®å®ç¾©
+ */
+#define TIC_NUME			1U		/* ã¿ã¤ã ãã£ãã¯ã®å¨æã®åå­ */
+#define TIC_DENO			1U		/* ã¿ã¤ã ãã£ãã¯ã®å¨æã®åæ¯ */
+
+/*
+ *  ãã­ã»ããµã§å
+±éãªå®ç¾©
+ */
+#include "arm64_gcc/prc_kernel.h"
+
+#endif /* TOPPERS_TARGET_KERNEL_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_kernel.trb
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_kernel.trb	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_kernel.trb	(revision 353)
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+#
+#		ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨
+#
+
+IncludeTrb("arm64_gcc/prc_kernel.trb")
+IncludeTrb("syssvc/banner.trb")
+
+
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_rename.def
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_rename.def	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_rename.def	(revision 353)
@@ -0,0 +1,5 @@
+# target_config.c
+target_initialize
+target_exit
+
+INCLUDE	"arm64_gcc/prc"
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_rename.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_rename.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_rename.h	(revision 353)
@@ -0,0 +1,26 @@
+/* This file is generated from target_rename.def by genrename. */
+
+#ifndef TOPPERS_TARGET_RENAME_H
+#define TOPPERS_TARGET_RENAME_H
+
+/*
+ *  target_config.c
+ */
+#define target_initialize			_kernel_target_initialize
+#define target_exit					_kernel_target_exit
+
+
+#ifdef TOPPERS_LABEL_ASM
+
+/*
+ *  target_config.c
+ */
+#define _target_initialize			__kernel_target_initialize
+#define _target_exit				__kernel_target_exit
+
+
+#endif /* TOPPERS_LABEL_ASM */
+
+#include "arm64_gcc/prc_rename.h"
+
+#endif /* TOPPERS_TARGET_RENAME_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_serial.c
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_serial.c	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_serial.c	(revision 353)
@@ -0,0 +1,314 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012 by Meika Sugimoto
+ *  Copyright (C) 2015 by Naoki Saito
+ *              Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ * ã·ãªã¢ã«ãã©ã¤ã
+ */
+
+#include <sil.h>
+#include "target_serial.h"
+#include "target_syssvc.h"
+
+/*
+ * ã¬ã¸ã¹ã¿è¨­å®å¤
+ */
+#define PORT2SIOPID(x)  ((x) + 1)
+#define INDEX_PORT(x)   ((x) - 1)
+#define GET_SIOPCB(x)   (&siopcb_table[INDEX_PORT(x)])
+
+const SIOPINIB siopinib_table[TNUM_PORT] = {
+    {
+        VIRT_UART0_BASE,             /* baseAddress */
+        VIRT_UART_IBRD_38400,        /* ibrd */
+        VIRT_UART_FBRD_38400,        /* fbrd */
+        UART_LCR_H_WLEN8,            /* lcr_h */
+    },
+};
+
+SIOPCB siopcb_table[TNUM_PORT];
+
+/*
+ *  éä¿¡ãããã¡ã«ç©ºãããããï¼
+ */
+Inline bool_t
+sio_putready(SIOPCB* siopcb)
+{
+    return((sil_rew_mem(UART_FR(siopcb->inib->baseAddress)) & UART_FR_TXFF) == 0U);
+}
+
+/*
+ *  åä¿¡ãããã¡ã«æå­ããããï¼
+ */
+Inline bool_t
+sio_getready(SIOPCB* siopcb)
+{
+    return((sil_rew_mem(UART_FR(siopcb->inib->baseAddress)) & UART_FR_RXFE) == 0U);
+}
+
+/*
+ *  åä¿¡ããæå­ã®ååºã
+ */
+Inline char
+sio_getchar(SIOPCB *siopcb)
+{
+    return((char) sil_rew_mem(UART_DR(siopcb->inib->baseAddress)));
+}
+
+/*
+ *  éä¿¡ããæå­ã®æ¸è¾¼ã¿
+ */
+Inline void
+sio_putchar(SIOPCB *siopcb, char c)
+{
+    sil_wrw_mem(UART_DR(siopcb->inib->baseAddress), (uint32_t) c);
+}
+
+
+/*
+ *  ã¿ã¼ã²ããã®ã·ãªã¢ã«åæå
+ */
+void target_low_output_init(ID siopid)
+{
+    SIOPCB  *siopcb = GET_SIOPCB(siopid);
+    SIOPINIB *inib;
+
+    inib = siopcb -> inib;
+
+    /*
+     *  UARTããã£ã¹ã¨ã¼ãã«
+     */
+    sil_wrw_mem(UART_CR(inib->baseAddress), 0U);
+
+        /*
+         *  ã¨ã©ã¼ãã©ã°ãã¯ãªã¢
+         */
+        sil_wrw_mem(UART_ECR(inib->baseAddress), 0U);
+
+    /*
+     *  å²è¾¼ã¿ã¹ãã¼ã¿ã¹ãã¯ãªã¢
+     */
+    sil_wrw_mem(UART_ICR(inib->baseAddress), 0U);
+    sil_wrw_mem(UART_RIS(inib->baseAddress), 0U);
+    sil_wrw_mem(UART_MIS(inib->baseAddress), 0U);
+
+    /*
+     *  FIFOãç©ºã«ãã
+     */
+    while (sio_getready(siopcb)) {
+            (void) sio_getchar(siopcb);
+    }
+
+    /*
+     *  ãã¼ã¬ã¼ãã¨éä¿¡è¦æ ¼ãè¨­å®
+     */
+    sil_wrw_mem(UART_IBRD(inib->baseAddress), inib->ibrd);
+    sil_wrw_mem(UART_FBRD(inib->baseAddress), inib->fbrd);
+    sil_wrw_mem(UART_LCR_H(inib->baseAddress), inib->lcr_h);
+
+    /*
+     *  UARTãã¤ãã¼ãã«
+     */
+    sil_wrw_mem(UART_CR(inib->baseAddress),
+                    UART_CR_UARTEN|UART_CR_TXE|UART_CR_RXE);
+}
+
+/*
+ *  SIOåæå
+ */
+void sio_initialize(intptr_t exinf)
+{
+    int i;
+
+    for (i = 0; i < TNUM_PORT; i++) {
+        siopcb_table[i].inib = &(siopinib_table[i]);
+        siopcb_table[i].exinf = 0;
+    }
+}
+
+/*
+ *  ã·ãªã¢ã«ãªã¼ãã³
+ */
+SIOPCB *sio_opn_por(ID siopid, intptr_t exinf)
+{
+    SIOPCB* siopcb;
+
+    if (siopid > TNUM_PORT) {
+        return NULL;
+    }
+
+    siopcb = GET_SIOPCB(siopid);
+    siopcb->exinf = exinf;
+
+    target_low_output_init(siopid);
+
+    // åä¿¡ã³ã¼ã«ããã¯è¨±å¯
+    sio_ena_cbr(siopcb, SIO_RDY_RCV);
+
+    return siopcb;
+}
+
+/*
+ *  ã·ãªã¢ã«ã¯ã­ã¼ãº
+ */
+void sio_cls_por(SIOPCB *siopcb)
+{
+    /*
+     *  UARTããã£ã¹ã¨ã¼ãã«
+     */
+    sil_wrw_mem(UART_CR(siopcb->inib->baseAddress), 0U);
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©
+ */
+void sio_isr(intptr_t exinf)
+{
+    SIOPCB* siopcb = GET_SIOPCB(exinf);
+
+    if (sio_getready(siopcb)) {
+        /*
+         *  åä¿¡éç¥ã³ã¼ã«ããã¯ã«ã¼ãã³ãå¼ã³åºãï¼
+         */
+        sio_irdy_rcv(siopcb->exinf);
+    }
+    if (sio_putready(siopcb)) {
+        /*
+         *  éä¿¡å¯è½ã³ã¼ã«ããã¯ã«ã¼ãã³ãå¼ã³åºãï¼
+         */
+        sio_irdy_snd(siopcb->exinf);
+    }
+}
+
+/*
+ *  1æå­éä¿¡
+ */
+bool_t sio_snd_chr(SIOPCB *siopcb, char c)
+{
+    if (sio_putready(siopcb)){
+        sio_putchar(siopcb, c);
+        return(true);
+    }
+    return(false);
+}
+
+/*
+ *  1æå­åä¿¡
+ */
+int_t sio_rcv_chr(SIOPCB *siopcb)
+{
+    if (sio_getready(siopcb)) {
+        return((int_t)(uint8_t) sio_getchar(siopcb));
+    }
+    return(-1);
+}
+
+/*
+ *  ã³ã¼ã«ããã¯ã®è¨±å¯
+ */
+void sio_ena_cbr(SIOPCB *siopcb, uint_t cbrtn)
+{
+    SIOPINIB        *inib;
+    uint32_t        reg;
+
+    inib = siopcb->inib;
+    reg = sil_rew_mem(UART_IMSC(inib->baseAddress));
+
+    switch (cbrtn) {
+    case SIO_RDY_SND:
+        reg |= UART_IMSC_TXIM;
+        break;
+    case SIO_RDY_RCV:
+        reg |= UART_IMSC_RXIM;
+        break;
+    }
+    sil_wrw_mem(UART_IMSC(inib->baseAddress), reg);
+}
+
+/*
+ *  ã³ã¼ã«ããã¯ã®ç¦æ­¢
+ */
+void sio_dis_cbr(SIOPCB *siopcb, uint_t cbrtn)
+{
+    SIOPINIB    *inib;
+    uint32_t    reg;
+
+    inib = siopcb -> inib;
+    reg = sil_rew_mem(UART_IMSC(inib->baseAddress));
+
+    switch (cbrtn) {
+    case SIO_RDY_SND:
+        reg &= ~UART_IMSC_TXIM;
+        break;
+    case SIO_RDY_RCV:
+        reg &= ~UART_IMSC_RXIM;
+        break;
+    }
+    sil_wrw_mem(UART_IMSC(inib->baseAddress), reg);
+}
+
+/*
+ *  1æå­åºåï¼ãã¼ãªã³ã°ã§ã®åºåï¼
+ */
+void sio_pol_snd_chr(char c, ID siopid)
+{
+    SIOPCB *siopcb = GET_SIOPCB(siopid);
+
+    if(c == '\n'){
+        while(!sio_snd_chr(siopcb, '\r'));
+    }
+    while(!sio_snd_chr(siopcb, c));
+}
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_serial.cfg
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_serial.cfg	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_serial.cfg	(revision 353)
@@ -0,0 +1,10 @@
+/*
+ *  SIOãã©ã¤ãï¼CQ-FRK-FM3ç¨ï¼ã®ã³ã³ãã£ã°ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#include "target_syssvc.h"
+#include "target_serial.h"
+
+ATT_INI({ TA_NULL, 0, sio_initialize });
+ATT_ISR({ TA_NULL, SIO_PORTID, INTNO_SIO, sio_isr, 1 });
+CFG_INT(INTNO_SIO, { TA_ENAINT|INTATR_SIO, INTPRI_SIO });
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_serial.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_serial.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_serial.h	(revision 353)
@@ -0,0 +1,158 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2015,2018 by Naoki Saito
+ *              Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ *  ã·ãªã¢ã«I/Oããã¤ã¹(SIO)ãã©ã¤ã
+ */
+
+#ifndef TOPPERS_TARGET_SERIAL_H
+#define TOPPERS_TARGET_SERIAL_H
+
+/*
+ *  SIOã®å²è¾¼ã¿è¨­å®
+ */
+#define INTNO_SIO     TINTNO_UART0    // å²è¾¼ã¿çªå·
+#define INTATR_SIO    TA_NULL         // å²è¾¼ã¿å±æ§
+#define INTPRI_SIO    (-2)            // å²è¾¼ã¿åªå
+åº¦
+
+/*
+ *  ã³ã¼ã«ããã¯ã«ã¼ãã³ã®è­å¥çªå·
+ */
+#define SIO_RDY_SND    1U        /* éä¿¡å¯è½ã³ã¼ã«ããã¯ */
+#define SIO_RDY_RCV    2U        /* åä¿¡éç¥ã³ã¼ã«ããã¯ */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®åæåãã­ãã¯
+ */
+typedef const struct tag_SIOPINIB {
+    uintptr_t      baseAddress;
+    uint8_t        ibrd;
+    uint8_t        fbrd;
+    uint8_t        lcr_h;
+}  SIOPINIB;
+
+/*
+ *  ã·ãªã¢ã«ãã¼ãã®ç®¡çãã­ãã¯
+ */
+typedef struct sio_port_control_block {
+    SIOPINIB *inib;
+    intptr_t exinf;
+} SIOPCB;
+
+/*
+ *  SIOåæå
+ */
+extern void sio_initialize(intptr_t exinf);
+
+/*
+ *  ã·ãªã¢ã«ãªã¼ãã³
+ */
+extern SIOPCB *sio_opn_por(ID siopid, intptr_t exinf);
+
+/*
+ *  ã·ãªã¢ã«ã¯ã­ã¼ãº
+ */
+extern void sio_cls_por(SIOPCB *p_siopcb);
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©
+ */
+extern void sio_isr(intptr_t exinf);
+
+/*
+ *  1æå­éä¿¡
+ */
+extern bool_t sio_snd_chr(SIOPCB *siopcb, char c);
+
+/*
+ *  1æå­åä¿¡
+ */
+extern int_t sio_rcv_chr(SIOPCB *siopcb);
+
+/*
+ *  ã³ã¼ã«ããã¯ã®è¨±å¯
+ */
+extern void sio_ena_cbr(SIOPCB *siopcb, uint_t cbrtn);
+
+/*
+ *  ã³ã¼ã«ããã¯ã®ç¦æ­¢
+ */
+extern void sio_dis_cbr(SIOPCB *siopcb, uint_t cbrtn);
+
+/*
+ *  éä¿¡å¯è½ã³ã¼ã«ããã¯
+ */
+extern void sio_irdy_snd(intptr_t exinf);
+
+/*
+ *  åä¿¡éç¥ã³ã¼ã«ããã¯
+ */
+extern void sio_irdy_rcv(intptr_t exinf);
+
+/*
+ *  1æå­éä¿¡ï¼ãã¼ãªã³ã°ã§ã®åºåï¼
+ */
+extern void sio_pol_snd_chr(char c, ID siopid);
+
+/*
+ *  ä½ã¬ãã«åºååæå
+ */
+extern void target_low_output_init(ID siopid);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_TARGET_SERIAL_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_sil.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_sil.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_sil.h	(revision 353)
@@ -0,0 +1,77 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ *  sil.hã®ã¿ã¼ã²ããä¾å­é¨ï¼QEMU-VIRTï¼
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼sil.hã®å
+é ­ã§ã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡
+ *  ã¤ã«ããã¯ç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªãï¼ãã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼
+ *  ãããåã«ï¼t_stddef.hãã¤ã³ã¯ã«ã¼ããããã®ã§ï¼ãããã«ä¾å­ãã¦ã
+ *  ããï¼
+ */
+
+#ifndef TOPPERS_TARGET_SIL_H
+#define TOPPERS_TARGET_SIL_H
+
+#include "qemu_virt.h"
+
+/*
+ *  ãã­ã»ããµã§å
+±éãªå®ç¾©
+ */
+#include "arm64_gcc/prc_sil.h"
+
+#endif /* TOPPERS_TARGET_SIL_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_stddef.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_stddef.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_stddef.h	(revision 353)
@@ -0,0 +1,103 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *
+ *  Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ *  t_stddef.hã®ã¿ã¼ã²ããä¾å­é¨(QEMU-VIRT)
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼t_stddef.hã®å
+é ­ã§ã¤ã³ã¯ã«ã¼ããããï¼
+ *  ä»ã®ãã¡ã¤ã«ããã¯ç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªãï¼ä»ã®ã¤ã³ã¯ã«ã¼ã
+ *  ãã¡ã¤ã«ã«å
+ç«ã£ã¦å¦çãããããï¼ä»ã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã«ä¾å­ã
+ *  ã¦ã¯ãªããªãï¼
+ */
+
+#ifndef TOPPERS_TARGET_STDDEF_H
+#define TOPPERS_TARGET_STDDEF_H
+
+/*
+ *  ã¿ã¼ã²ãããè­å¥ããããã®ãã¯ã­ã®å®ç¾©
+ */
+#define TOPPERS_QEMU_VIRT			/* ã·ã¹ãã ç¥ç§° */
+
+
+/*
+ *  éçºç°å¢ã§å
+±éãªå®ç¾©
+ */
+#define TOPPERS_STDFLOAT_TYPE1
+#include "gcc/tool_stddef.h"
+
+/*
+ *  ãã­ã»ããµã§å
+±éãªå®ç¾©
+ */
+#include "arm64_gcc/prc_stddef.h"
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¢ãµã¼ã·ã§ã³ã®å¤±ææã®å®è¡ä¸­æ­å¦ç
+ */
+Inline void
+TOPPERS_assert_abort(void)
+{
+	while(1)
+	{
+	}
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_TARGET_STDDEF_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_syssvc.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_syssvc.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_syssvc.h	(revision 353)
@@ -0,0 +1,110 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2015,2018 by Naoki Saito
+ *              Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ *  ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­é¨(QEMU-VIRTç¨)
+ *
+ *  ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ï¼
+ */
+
+#ifndef TOPPERS_TARGET_SYSSVC_H
+#define TOPPERS_TARGET_SYSSVC_H
+
+/*
+ *  ã¿ã¼ã²ããã·ã¹ãã ã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
+#include "qemu_virt.h"
+#include "uart_pl011.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+ */
+#ifdef TOPPERS_TRACE_ENABLE
+#include "logtrace/trace_config.h"
+#endif /* TOPPERS_TRACE_ENABLE */
+
+/*
+ *  èµ·åã¡ãã»ã¼ã¸ã®ã¿ã¼ã²ããã·ã¹ãã å
+ */
+#define TARGET_NAME    "QEMU Virt(Cortex-A53)"
+
+/*
+ *  èµ·åã¡ãã»ã¼ã¸ã«ã¿ã¼ã²ããä¾å­é¨ã®èä½æ¨©è¡¨ç¤ºã
+ *  è¿½å ããããã®ãã¯ã­ï¼
+ */
+#ifdef PRC_COPYRIGHT
+#define TARGET_COPYRIGHT	PRC_COPYRIGHT
+#endif /* PRC_COPYRIGHT */
+
+/*
+ *  ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ããã®æå­åºå
+ *
+ *  ã¿ã¼ã²ããä¾å­ã®æ¹æ³ã§ï¼æå­cãè¡¨ç¤º/åºå/ä¿å­ããï¼
+ */
+extern void	target_fput_log(char c);
+
+/*
+ *  ãµãã¼ãããã·ãªã¢ã«ãã¼ãã®æ°
+ */
+#define TNUM_PORT        (1)
+#define TNUM_SIOP        (1)
+
+/*
+ *  ä½¿ç¨ããã·ãªã¢ã«ãã¼ãID
+ */
+#define SIO_PORTID		(1)
+
+
+#endif /* TOPPERS_TARGET_SYSSVC_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_test.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_test.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_test.h	(revision 353)
@@ -0,0 +1,76 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2015,2018 by Naoki Saito
+ *              Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ *    ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©(QEMU-VIRT)
+ */
+
+#ifndef TOPPERS_TARGET_TEST_H
+#define TOPPERS_TARGET_TEST_H
+
+#define STACK_SIZE       (1024U)
+#define ALL_STACKSIZE    (20480U)
+
+/*
+ *  ä½¿ç¨ããã·ãªã¢ã«ãã¼ãID
+ */
+#define TASK_PORTID      (1)
+
+/*
+ *  ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã«(ARM64ç¨)
+ */
+#include "arm64_gcc/prc_test.h"
+
+#endif /* TOPPERS_TARGET_TEST_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_timer.cfg
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_timer.cfg	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_timer.cfg	(revision 353)
@@ -0,0 +1,7 @@
+/*
+ *  ã¿ã¤ããã©ã¤ãã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+
+#include "target_timer.h"
+
+INCLUDE("arch/arm64_gcc/prc_timer.cfg");
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_timer.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_timer.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_timer.h	(revision 353)
@@ -0,0 +1,83 @@
+/*
+ *  TOPPERS/SSP Kernel
+ *      Smallest Set Profile Kernel
+ *
+ *  Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ */
+
+/*
+ *  ã¿ã¤ããã©ã¤ã(QEMU-VIRTç¨)
+ */
+
+#ifndef TOPPERS_TARGET_TIMER_H
+#define TOPPERS_TARGET_TIMER_H
+
+#include "qemu_virt.h"
+
+/*
+ *  ã¿ã¤ãå¤ã®å
+é¨è¡¨ç¾ã¨ããªç§åä½ã¨ã®å¤æ
+ */
+#define TIMER_CLOCK		(SYSTIC_CLOCK / 1000)
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿ãã³ãã©ç»é²ã®ããã®å®æ°
+ */
+#define INTPRI_TIMER    (-6)          /* å²è¾¼ã¿åªå
+åº¦ */
+#define INTATR_TIMER    TA_NULL       /* å²è¾¼ã¿å±æ§ */
+
+/*
+ *  ãã­ã»ããµä¾å­é¨ã§å®ç¾©ãã
+ */
+#include "arm64_gcc/prc_timer.h"
+
+#endif /* TOPPERS_TARGET_TIMER_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_unrename.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_unrename.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_unrename.h	(revision 353)
@@ -0,0 +1,27 @@
+/* This file is generated from target_rename.def by genrename. */
+
+/* This file is included only when target_rename.h has been included. */
+#ifdef TOPPERS_TARGET_RENAME_H
+#undef TOPPERS_TARGET_RENAME_H
+
+/*
+ *  target_config.c
+ */
+#undef target_initialize
+#undef target_exit
+
+
+#ifdef TOPPERS_LABEL_ASM
+
+/*
+ *  target_config.c
+ */
+#undef _target_initialize
+#undef _target_exit
+
+
+#endif /* TOPPERS_LABEL_ASM */
+
+#include "arm64_gcc/prc_unrename.h"
+
+#endif /* TOPPERS_TARGET_RENAME_H */
Index: /ssp_aarch64/trunk/qemu_virt_gcc/target_user.txt
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/target_user.txt	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/target_user.txt	(revision 353)
@@ -0,0 +1,161 @@
+=====================================================================
+                 QEMU-VIRTã¿ã¼ã²ããä¾å­é¨ (ssp-1.3.0å¯¾å¿ï¼
+                               Last Modified: '18/05/29
+=====================================================================
+
+âæ¦è¦
+
+QEMU-VIRTã¿ã¼ã²ããä¾å­é¨ã¯ï¼ãã­ã»ããµã«Cortex-A53 ãæ­è¼ãã
+QEMUã®ä»®æ³ãã¼ãVIRTããµãã¼ããã¦ããï¼
+
+
+âã«ã¼ãã«ã®ä½¿ç¨ãªã½ã¼ã¹
+
+ã«ã¼ãã«ã¯ä»¥ä¸ã®ãªã½ã¼ã¹ãä½¿ç¨ããï¼
+
+  ã»ROM
+     ã³ã¼ããé
+ç½®ããï¼
+     ä½¿ç¨éã¯ä½¿ç¨ããAPIã®æ°ã«ä¾å­ããï¼
+
+  ã»RAM
+     ãã¼ã¿ãé
+ç½®ããï¼
+     ä½¿ç¨éã¯ãªãã¸ã§ã¯ãæ°ã«ä¾å­ããï¼
+  
+  ã»Generic Timer
+     ã«ã¼ãã«å
+é¨ã®ãã£ãã¯ã®çæã«ç¨ããï¼
+     
+  ã»UART0 (PL011)
+     ã³ã³ã½ã¼ã«ã®åºåã«ä½¿ç¨ï¼
+
+âãããã°ç°å¢
+
+ãããã°ç°å¢ã¨ãã¦ï¼QEMUã®GDBãµã¼ãæ©è½ãå©ç¨ãã¦ï¼GDBã«ãããããã°ãå¯è½.
+
+âã³ã³ãã¤ã©
+
+GCC ã§åä½ç¢ºèªãè¡ã£ãï¼åä½ç¢ºèªãã GCC ã¯ï¼ä»¥ä¸ã®ãµã¤ããã
+ãã¤ããªããã±ã¼ã¸ããã¦ã³ã­ã¼ããããã¨ãã§ããï¼
+åä½ç¢ºèªãã¼ã¸ã§ã³ã¯ 5.3.1 ã§è¡ã£ãï¼
+
+  https://releases.linaro.org/components/toolchain/binaries/
+
+âå²è¾¼ã¿åªå
+åº¦
+
+å²è¾¼ã¿åªå
+åº¦ã¨ãã¦æå®å¯è½ãªç¯å²ã¯ï¼-15 ã -1 ã§ããï¼
+
+âã³ã³ã½ã¼ã«åºå
+
+ã³ã³ã½ã¼ã«åºåã«ã¯ PrimeCell UART (PL011)ãä½¿ç¨ããï¼
+
+éä¿¡ãã©ã¼ãããã¯ä»¥ä¸ã®éãã§ããï¼
+
+  ã»38400bps, Data 8bit, Parity none, Stop 1bit, Flowå¶å¾¡ãªã
+
+
+âåç¨®è¨­å®ã®å¤æ´
+
+å¹¾ã¤ãã®ãã©ã¡ã¼ã¿ã¯å¤æ´å¯è½ã«ãªã£ã¦ããï¼è¨­å®ãã¡ã¤ã«æ¯ã«è¨­å®å¯è½é 
+ç®
+ã¯æ¬¡ã®ããã«ãªã£ã¦ããï¼
+
+âMakefile.target ã®è¨­å®é 
+ç®
+
+ã»GCC_TARGET
+  GCCã® target triplet ãå®ç¾©
+
+ã»TEXT_START_ADDRESS/DATA_START_ADDRESS
+  ãã­ã¹ãã»ã¯ã·ã§ã³ï¼ãã¼ã¿ã»ã¯ã·ã§ã³ã®éå§ã¢ãã¬ã¹
+
+ã»INCLUDES
+  ã¤ã³ã¯ã«ã¼ãæå®
+
+ã»COPTS
+  Cã³ã³ãã¤ã©ã¸ã®ãªãã·ã§ã³
+
+ã»LDFLAGS
+  ãªã³ã«ã¸ã®ãªãã·ã§ã³
+
+âtarget_config.h ã®è¨­å®é 
+ç®
+
+ã»DEFAULT_ISTKSZ
+  ããã©ã«ãã®éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ãµã¤ãº
+
+âåä½ç¢ºèªæ¹æ³
+
+â QEMUãç¨ãã¦åä½ãç¢ºèªããå ´åï¼ä»¥ä¸ã®ããã«ã³ãã³ããå®è¡ããï¼
+
+(å®è¡ä¾)
+$ qemu-system-aarch64 -M virt -cpu cortex-a53 -serial stdio -kernel ssp
+
+TOPPERS/SSP Kernel 1.3.0  for QEMU Virt(Cortex-A53) (May 29 2018 , 15:51:44)
+Copyright (C) 2010 by Meika Sugimoto
+Copyright (C) 2010 by Naoki Saito
+            Nagoya Municipal Industrial Research Institute, JAPAN
+
+System logging task is started on port 1.
+Sample program starts.
+#act_tsk(1)
+task1 is running (001).   |
+task1 is running (002).   |
+
+
+â GDBã«ãããããã°æé 
+
+GDBãç¨ãããããã°ãè¡ãå ´åï¼ã·ã§ã«ã2ã¤ç¨æããï¼
+ä¸ã¤ã¯qemuãèµ·åãGDBãµã¼ãã¨ãã¦èµ·åããï¼
+
+(1ã¤ç®ã®ã·ã§ã«)
+$ qemu-system-aarch64 -M virt -cpu cortex-a53 -serial stdio -s -S
+VNC server running on 127.0.0.1:5900
+
+ããã§ localhost:1234 ã§GDBãµã¼ããæ¥ç¶ãå¾
+ã¡åããç¶æ
+ã«ãªãï¼
+
+ããä¸ã¤ã®ã·ã§ã«ã§GDBãèµ·åãï¼GDBãµã¼ãã«æ¥ç¶ããï¼
+
+(2ã¤ç®ã®ã·ã§ã«)
+$ aarch-elf-gdb ssp
+(gdb)
+
+ããã§åç¨®ã®è¨­å®ï¼ãµã¼ãã¸ã®æ¥ç¶ï¼ã­ã¼ããè¡ãã¨ã¹ããããå®è¡ç­ã®
+ãããã°åä½ãè¡ããã¨ãã§ããï¼
+
+(gdb) set architecture aarch64
+The target architecture is assumed to be aarch64
+(gdb) set debug aarch64
+(gdb) target extended-remote localhost:1234
+Remote debugging using localhost:1234
+0x0000000000000000 in ?? ()
+(gdb) load
+Loading section .note.gnu.build-id, size 0x24 lma 0x0
+Loading section .text, size 0x5040 lma 0x40000000
+Loading section .rodata, size 0x650 lma 0x40005040
+Loading section .rodata.str1.8, size 0x5b8 lma 0x40005690
+Loading section .data, size 0x8 lma 0x40005c48
+Start address 0x40000000, load size 23668
+Transfer rate: 11556 KB/sec, 1577 bytes/write.
+(gdb) s
+aarch64: prologue analysis gave up addr=0x0x40000000 opcode=0xd50343df
+58	    ldr x0, =vectors
+(gdb) c
+Continuing.
+
+'c' ã³ãã³ãã§å®è¡ãç¶ç¶ããã¨ï¼GDBãµã¼ãå´ã®ç»é¢ã«ã·ãªã¢ã«ã¡ãã»ã¼ã¸ãè¡¨ç¤ºãããï¼
+ã­ã¼å
+¥åããµã¼ãå´ã®ã·ã§ã«ç»é¢ã§è¡ãï¼
+
+qemuãçµäºããå ´åã¯Ctrl-Cã§çµäºããï¼
+gdb ãçµäºããå ´åã¯ãã­ã³ããã§'q'ã³ãã³ããå®è¡ãã¦çµäºããï¼
+
+
+âå¤æ´å±¥æ­´
+ ã»2018/05/29
+ããæ°è¦ä½æ
Index: /ssp_aarch64/trunk/qemu_virt_gcc/uart_pl011.h
===================================================================
--- /ssp_aarch64/trunk/qemu_virt_gcc/uart_pl011.h	(revision 353)
+++ /ssp_aarch64/trunk/qemu_virt_gcc/uart_pl011.h	(revision 353)
@@ -0,0 +1,115 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2018 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: uart_pl011.h 509 2016-01-12 06:06:14Z ertl-hiro $
+ */
+
+/*
+ *		ARM PrimCell UARTï¼PL011ï¼ã«é¢ããå®ç¾©
+ */
+
+#ifndef TOPPERS_UART_PL011_H
+#define TOPPERS_UART_PL011_H
+
+/*
+ *  UARTã¬ã¸ã¹ã¿ã®çªå°ã®å®ç¾©
+ */
+#define UART_DR(base)		((uint32_t *)((base) + 0x00U))
+#define UART_RSR(base)		((uint32_t *)((base) + 0x04U))
+#define UART_ECR(base)		((uint32_t *)((base) + 0x04U))
+#define UART_FR(base)		((uint32_t *)((base) + 0x18U))
+#define UART_IBRD(base)		((uint32_t *)((base) + 0x24U))
+#define UART_FBRD(base)		((uint32_t *)((base) + 0x28U))
+#define UART_LCR_H(base)	((uint32_t *)((base) + 0x2cU))
+#define UART_CR(base)		((uint32_t *)((base) + 0x30U))
+#define UART_IFLS(base)		((uint32_t *)((base) + 0x34U))
+#define UART_IMSC(base)		((uint32_t *)((base) + 0x38U))
+#define UART_RIS(base)		((uint32_t *)((base) + 0x3cU))
+#define UART_MIS(base)		((uint32_t *)((base) + 0x40U))
+#define UART_ICR(base)		((uint32_t *)((base) + 0x44U))
+
+/*
+ *  ãã©ã°ã¬ã¸ã¹ã¿ï¼UART_FRï¼ã®åç
+§å¤
+ */
+#define UART_FR_RXFE		UINT_C(0x10)	/* åä¿¡ãããã¡ãç©º */
+#define UART_FR_TXFF		UINT_C(0x20)	/* éä¿¡ãããã¡ããã« */
+
+/*
+ *  ã©ã¤ã³å¶å¾¡ã¬ã¸ã¹ã¿ï¼UART_LCR_Hï¼ã®è¨­å®å¤
+ */
+#define UART_LCR_H_PEN		UINT_C(0x02)	/* ããªãã£ãç¨ãã */
+#define UART_LCR_H_EPS		UINT_C(0x04)	/* å¶æ°ããªãã£ã« */
+#define UART_LCR_H_STP2		UINT_C(0x08)	/* ã¹ããããããã2ãããã« */
+#define UART_LCR_H_FEN		UINT_C(0x10)	/* FIFOãæå¹ã« */
+#define UART_LCR_H_WLEN8	UINT_C(0x60)	/* ãã¼ã¿é·ã8ãããã« */
+
+/*
+ *  å¶å¾¡ã¬ã¸ã¹ã¿ï¼UART_CRï¼ã®è¨­å®å¤
+ */
+#define UART_CR_UARTEN	UINT_C(0x0001)		/* UARTãã¤ãã¼ãã«ã« */
+#define UART_CR_TXE		UINT_C(0x0100)		/* éä¿¡ãã¤ãã¼ãã«ã« */
+#define UART_CR_RXE		UINT_C(0x0200)		/* åä¿¡ãã¤ãã¼ãã«ã« */
+
+/*
+ *  å²è¾¼ã¿ãã¹ã¯ã»ããï¼ã¯ãªã¢ã¬ã¸ã¹ã¿ï¼UART_IMSCï¼ã®è¨­å®å¤
+ */
+#define UART_IMSC_RXIM	UINT_C(0x0010)		/* åä¿¡å²è¾¼ã¿ãã¹ã¯ */
+#define UART_IMSC_TXIM	UINT_C(0x0020)		/* éä¿¡å²è¾¼ã¿ãã¹ã¯ */
+
+#ifndef TOPPERS_MACRO_ONLY
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_UART_PL011_H */
Index: /ssp_aarch64/trunk/ssp_aarch64.patch
===================================================================
--- /ssp_aarch64/trunk/ssp_aarch64.patch	(revision 353)
+++ /ssp_aarch64/trunk/ssp_aarch64.patch	(revision 353)
@@ -0,0 +1,74 @@
+diff -x '.git*' -uprN ssp.orig/doc/porting.txt ssp/doc/porting.txt
+--- ssp.orig/doc/porting.txt	2015-05-19 18:45:26.000000000 +0900
++++ ssp/doc/porting.txt	2018-06-06 18:24:58.000000000 +0900
+@@ -408,7 +408,7 @@ KERNEL_CFLAGS := $(KERNEL_CFLAGS) -fno-s
+ ã¾ãï¼ã¢ã»ã³ããªè¨èªã¬ãã«ã®è­å¥åãï¼Cè¨èªã¬ãã«ã®è­å¥åã®å
+é ­ã«"_"ã
+ ä»ãããã®ã«ãªãå ´åã«ã¯ï¼CDEFSã«-DTOPPERS_LABEL_ASMãè¿½å ããï¼
+ 
+-(2-4-6) SYSSVC_DIR			ã·ã¹ãã ãµã¼ãã¹ã®ã½ã¼ã¹ãç½®ããããã£ã¬ã¯ããª
++(2-4-6) SYSSVC_DIRS			ã·ã¹ãã ãµã¼ãã¹ã®ã½ã¼ã¹ãç½®ããããã£ã¬ã¯ããª
+ (2-4-7) SYSSVC_ASMOBJS		ã¢ã»ã³ããªè¨èªã§è¨è¿°ãããã·ã¹ãã ãµã¼ãã¹ã®
+ 							ãªãã¸ã§ã¯ã
+ (2-4-8) SYSSVC_COBJS		Cè¨èªã§è¨è¿°ãããã·ã¹ãã ãµã¼ãã¹ã®ãªãã¸ã§ã¯ã
+@@ -421,7 +421,7 @@ KERNEL_CFLAGS := $(KERNEL_CFLAGS) -fno-s
+ ã¤ã«ãªãã·ã§ã³ï¼ãã®æ§æã«å¿
+è¦ãªã©ã¤ãã©ãªãªã³ã¯æå®ãè¿½å ããå ´åã«ã¯ï¼
+ ä¸ã«ç¤ºããå¤æ°ã«å®ç¾©ããï¼
+ 
+-(2-4-11) KERNEL_DIR			ã«ã¼ãã«ã®ã½ã¼ã¹ãç½®ããããã£ã¬ã¯ããª
++(2-4-11) KERNEL_DIRS			ã«ã¼ãã«ã®ã½ã¼ã¹ãç½®ããããã£ã¬ã¯ããª
+ (2-4-12) KERNEL_ASMOBJS		ã¢ã»ã³ããªè¨èªã§è¨è¿°ãããã«ã¼ãã«ã®ãªãã¸ã§ã¯ã
+ (2-4-13) KERNEL_COBJS		Cè¨èªã§è¨è¿°ãããã«ã¼ãã«ã®ãªãã¸ã§ã¯ã
+ (2-4-14) KERNEL_CFLAGS		ã«ã¼ãã«ã«å¯¾ããã³ã³ãã¤ã«ãªãã·ã§ã³
+@@ -450,7 +450,7 @@ KERNEL_COBJS := $(KERNEL_COBJS) target_c
+ ä¸ã®è¨è¿°ãå«ããå¿
+è¦ãããï¼
+ 
+ ----------------------------------------
+-CFG_TABS := $(CFG_TABS) --cfg1-def-table $(TARGETDIR)/target_def.csv
++CFG_TABS := $(CFG_TABS) --symval-table $(TARGETDIR)/target_sym.def
+ ----------------------------------------
+ 
+ (2-4-16) CFG1_OUT_LDFLAGS	cfg1_out.cã«å¯¾ãããªã³ã¯ãªãã·ã§ã³
+@@ -595,9 +595,9 @@ LIBS := $(LIBS) -lgcc
+ ä¸ã®è¨è¿°ãå«ããå¿
+è¦ãããï¼
+ 
+ ----------------------------------------
+-cfg1_out.c: $(TARGETDIR)/target_def.csv
+-kernel_cfg.timestamp: $(TARGETDIR)/target.tf
+-$(OBJFILE): $(TARGETDIR)/target_check.tf
++cfg1_out.c: $(TARGETDIR)/target_sym.def
++kernel_cfg.timestamp: $(TARGETDIR)/target_kernel.trb
++check.timestamp: $(TARGETDIR)/target_check.trb
+ ----------------------------------------
+ 
+ 2.7 ãã®ä»ã®è¨­å®
+diff -x '.git*' -uprN ssp.orig/sample/Makefile ssp/sample/Makefile
+--- ssp.orig/sample/Makefile	2018-06-06 19:35:22.000000000 +0900
++++ ssp/sample/Makefile	2018-06-06 18:24:58.000000000 +0900
+@@ -256,14 +256,6 @@ else
+ 	KERNEL_COBJS := $(KERNEL_COBJS) \
+ 					$(foreach file,$(KERNEL_FCSRCS),$(file:.c=.o))
+ endif
+-ifdef OMIT_OFFSET_H
+-	OFFSET_H =
+-else
+-	OFFSET_H = offset.h
+-endif
+-ifndef TARGET_OFFSET_TRB
+-	TARGET_OFFSET_TRB := $(TARGETDIR)/target_offset.trb
+-endif
+ ifndef TARGET_KERNEL_TRB
+ 	TARGET_KERNEL_TRB := $(TARGETDIR)/target_kernel.trb
+ endif
+@@ -275,7 +267,7 @@ ifndef TARGET_KERNEL_CFG
+ endif
+ 
+ #
+-#  ã³ã³ãã£ã­ï¾ã¥ã¬ã¼ã¿ã«é¢ããå®ç¾©
++#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«é¢ããå®ç¾©
+ #
+ CFG_TABS := --api-table $(SRCDIR)/kernel/kernel_api.def \
+                         --symval-table $(SRCDIR)/kernel/kernel_sym.def \
