cpu_config.h

プロセッサ依存モジュール(M68040用) [詳細]

#include <cpu_rename.h>
#include <cpu_insn.h>

cpu_config.hのインクルード依存関係図

このグラフは、どのファイルから直接、間接的にインクルードされているかを示しています。

ソースコードを見る。

データ構造

struct  task_context_block
struct  exc_vector_entry

マクロ定義

#define SUPPORT_CHG_IPM
#define TBIT_TCB_TSTAT   8
#define TBIT_TCB_PRIORITY   8
#define t_sense_lock   sense_lock
#define i_sense_lock   sense_lock
#define INTHDR_ENTRY(inthdr)
#define INT_ENTRY(inthdr)   inthdr##_entry
#define EXCHDR_ENTRY(exchdr)
#define EXC_ENTRY(exchdr)   exchdr##_entry

型定義

typedef task_context_block CTXB
typedef exc_vector_entry EXCVE

関数

Inline UH current_intmask ()
Inline void set_intmask (UH intmask)
Inline BOOL sense_context ()
Inline BOOL sense_lock ()
Inline void t_lock_cpu ()
Inline void t_unlock_cpu ()
Inline void i_lock_cpu ()
Inline void i_unlock_cpu ()
void dispatch (void)
void exit_and_dispatch (void)
Inline void define_inh (INHNO inhno, FP inthdr)
Inline void define_exc (EXCNO excno, FP exchdr)
Inline BOOL exc_sense_context (VP p_excinf)
Inline BOOL exc_sense_lock (VP p_excinf)
void cpu_initialize (void)
void cpu_terminate (void)

変数

UH task_intmask
UH int_intmask


説明

プロセッサ依存モジュール(M68040用)

このインクルードファイルは, t_config.h のみからインクルードされる. 他のファイルから直接インクルードしてはならない.

cpu_config.h で定義されています。


マクロ定義

#define EXC_ENTRY ( exchdr   )     exchdr##_entry

cpu_config.h311 行で定義されています。

#define EXCHDR_ENTRY ( exchdr   ) 

値:

extern void exchdr##_entry(VP sp);      \
asm(".text                              \n" \
#exchdr "_entry:                        \n" \
"       movem.l %d0-%d1/%a0-%a1, -(%sp) \n" /* スクラッチレジスタを保存 */ \
"       lea.l 16(%sp), %a0              \n" /* 例外フレームの先頭を A0 に */ \
"       move.w %sr, %d0                 \n" /* SR を D0 に */ \
"       and.w #~0x1000, %sr             \n" /* 割込みモード */ \
"       move.l %d0, -(%sp)              \n" /* 元の SR をスタックに保存 */ \
"       move.l %a0, -(%sp)              \n" /* A0 を引数として渡す */ \
"       jsr " #exchdr "                 \n" /* CPU例外ハンドラを呼び出す */ \
"       addq.l #4, %sp                  \n" \
"       move.l (%sp)+, %d0              \n" \
"       and.w #0x1000, %d0              \n" /* 元が割込みモードなら */ \
"       jbeq 1f                         \n" /*       すぐにリターン */ \
"       or.w #0x1700, %sr               \n" /* マスタモード・割込み禁止 */ \
"       tst.l _kernel_reqflg            \n" /* reqflg が TRUE であれば */ \
"       jbne _kernel_ret_exc            \n" /*              ret_exc へ */ \
"1:     movem.l (%sp)+, %d0-%d1/%a0-%a1 \n" /* スクラッチレジスタを復帰 */ \
"       rte                             \n")

cpu_config.h290 行で定義されています。

#define i_sense_lock   sense_lock

cpu_config.h126 行で定義されています。

参照元 iloc_cpu()iunl_cpu().

#define INT_ENTRY ( inthdr   )     inthdr##_entry

cpu_config.h275 行で定義されています。

#define INTHDR_ENTRY ( inthdr   ) 

値:

extern void inthdr##_entry(void);       \
asm(".text                              \n" \
#inthdr "_entry:                        \n" \
"       movem.l %d0-%d1/%a0-%a1, -(%sp) \n" /* スクラッチレジスタを保存 */ \
"       jsr " #inthdr "                 \n" /* 割込みハンドラを呼び出す */ \
"       movem.l (%sp)+, %d0-%d1/%a0-%a1 \n" /* スクラッチレジスタを復帰 */ \
"       btst.b #4, (%sp)                \n" /* 戻り先が割込みモードなら */ \
"       jbeq 1f                         \n" /*           すぐにリターン */ \
"       or.w #0x0700, %sr               \n" /* 割込み禁止 */ \
"       tst.l _kernel_reqflg            \n" /* reqflg が TRUE であれば */ \
"       jbne _kernel_ret_int            \n" /*              ret_int へ */ \
"1:     rte                             \n")

cpu_config.h261 行で定義されています。

#define SUPPORT_CHG_IPM

cpu_config.h64 行で定義されています。

#define t_sense_lock   sense_lock

cpu_config.h125 行で定義されています。

参照元 call_texrtn()loc_cpu()unl_cpu().

#define TBIT_TCB_PRIORITY   8

cpu_config.h73 行で定義されています。

#define TBIT_TCB_TSTAT   8

cpu_config.h72 行で定義されています。


型定義

typedef struct task_context_block CTXB

typedef struct exc_vector_entry EXCVE


関数

void cpu_initialize ( void   ) 

cpu_config.c65 行で定義されています。

参照先 set_vbr()task_intmask.

参照元 kernel_start().

00066 {
00067         /*
00068          *  タスクコンテキストでの割込みマスクの初期化
00069          */
00070 #ifdef SUPPORT_CHG_IPM
00071         task_intmask = 0x0000;
00072 #endif /* SUPPORT_CHG_IPM */
00073 
00074         /*
00075          *  例外ベクタテーブルの初期化
00076          */
00077 #ifdef EXCVT_KERNEL
00078         memcpy(EXCVT_KERNEL, EXCVT_ORIG, EXCVT_LEN);
00079         set_vbr(EXCVT_KERNEL);
00080 #endif /* EXCVT_KERNEL */
00081 }

関数の呼び出しグラフ:

void cpu_terminate ( void   ) 

cpu_config.c87 行で定義されています。

参照先 set_vbr().

参照元 kernel_exit().

00088 {
00089 #ifdef EXCVT_KERNEL
00090         set_vbr(EXCVT_ORIG);
00091 #endif /* EXCVT_KERNEL */
00092 }

関数の呼び出しグラフ:

Inline UH current_intmask (  ) 

cpu_config.h95 行で定義されています。

参照先 current_sr().

参照元 i_lock_cpu()sense_lock().

00096 {
00097         return(current_sr() & 0x0700);
00098 }

関数の呼び出しグラフ:

Inline void define_exc ( EXCNO  excno,
FP  exchdr 
)

cpu_config.h244 行で定義されています。

参照先 define_inh().

参照元 exception_initialize().

00245 {
00246         define_inh(excno, exchdr);
00247 }

関数の呼び出しグラフ:

Inline void define_inh ( INHNO  inhno,
FP  inthdr 
)

cpu_config.h222 行で定義されています。

参照先 current_vbr()exc_vector_entry::exchdr.

参照元 define_exc()interrupt_initialize().

00223 {
00224         EXCVE   *excvt;
00225 
00226 #ifdef EXCVT_KERNEL
00227         /*
00228          *  EXCVT_KERNEL が定義されている時は,初期化処理の中で VBR を 
00229          *  EXCVT_KERNEL に設定するので,EXCVT_KERNEL を使う.
00230          */
00231         excvt = (EXCVE *) EXCVT_KERNEL;
00232 #else /* EXCVT_KERNEL */
00233         excvt = (EXCVE *) current_vbr();
00234 #endif /* EXCVT_KERNEL */
00235         excvt[inhno].exchdr = inthdr;
00236 }

関数の呼び出しグラフ:

void dispatch ( void   ) 

Inline BOOL exc_sense_context ( VP  p_excinf  ) 

cpu_config.h321 行で定義されています。

参照元 vxsns_ctx()vxsns_dpn().

00322 {
00323         return((*((UH *) p_excinf) & 0x1000) == 0);
00324 }

Inline BOOL exc_sense_lock ( VP  p_excinf  ) 

cpu_config.h330 行で定義されています。

参照元 vxsns_dpn()vxsns_loc().

00331 {
00332         return((*((UH *) p_excinf) & 0x0700) == 0x0700);
00333 }

void exit_and_dispatch ( void   ) 

Inline void i_lock_cpu (  ) 

cpu_config.h166 行で定義されています。

参照先 current_intmask()disint()int_intmask.

参照元 call_cychdr()ext_tsk()iact_tsk()ifsnd_dtq()iget_tid()iloc_cpu()ipsnd_dtq()iras_tex()irel_wai()irot_rdq()iset_flg()isig_sem()isig_tim()iwup_tsk()kernel_exit().

00167 {
00168         UH      intmask;
00169 
00170         /*
00171          *  一時変数 intmask を使っているのは,current_intmask() を呼
00172          *  んだ直後に割込みが発生し,起動された割込みハンドラ内で
00173          *  int_intmask が変更される可能性があるためである.
00174          */
00175         intmask = current_intmask();
00176         disint();
00177         int_intmask = intmask;
00178 }

関数の呼び出しグラフ:

Inline void i_unlock_cpu (  ) 

cpu_config.h181 行で定義されています。

参照先 int_intmaskset_intmask().

参照元 call_cychdr()iact_tsk()ifsnd_dtq()iget_tid()ipsnd_dtq()iras_tex()irel_wai()irot_rdq()iset_flg()isig_sem()isig_tim()iunl_cpu()iwup_tsk().

00182 {
00183         set_intmask(int_intmask);
00184 }

関数の呼び出しグラフ:

Inline BOOL sense_context (  ) 

cpu_config.h114 行で定義されています。

参照先 current_sr().

参照元 ext_tsk()kernel_exit()sns_ctx()sns_dpn().

00115 {
00116         return((current_sr() & 0x1000) == 0);
00117 }

関数の呼び出しグラフ:

Inline BOOL sense_lock (  ) 

cpu_config.h120 行で定義されています。

参照先 current_intmask().

参照元 ext_tsk()kernel_exit()sns_dpn()sns_loc()vrea_log()vwri_log()vxget_tim().

00121 {
00122         return(current_intmask() == 0x0700);
00123 }

関数の呼び出しグラフ:

Inline void set_intmask ( UH  intmask  ) 

cpu_config.h104 行で定義されています。

参照先 current_sr()set_sr().

参照元 i_unlock_cpu()t_unlock_cpu().

00105 {
00106         set_sr((current_sr() & ~0x0700) | intmask);
00107 }

関数の呼び出しグラフ:

Inline void t_unlock_cpu (  ) 

cpu_config.h146 行で定義されています。

参照先 enaint()set_intmask()task_intmask.

参照元 act_tsk()call_texrtn()can_act()can_wup()chg_pri()clr_flg()dis_dsp()dis_tex()dly_tsk()ena_dsp()ena_tex()fsnd_dtq()get_mpf()get_pri()get_tid()get_tim()pget_mpf()pol_flg()pol_sem()prcv_dtq()prcv_mbx()psnd_dtq()ras_tex()rcv_dtq()rcv_mbx()rel_mpf()rel_wai()rot_rdq()rsm_tsk()set_flg()set_tim()sig_sem()slp_tsk()snd_dtq()snd_mbx()sta_cyc()stp_cyc()sus_tsk()ter_tsk()tget_mpf()trcv_dtq()trcv_mbx()tslp_tsk()tsnd_dtq()twai_flg()twai_sem()unl_cpu()vxget_tim()wai_flg()wai_sem()wup_tsk().

00147 {
00148 #ifdef SUPPORT_CHG_IPM
00149         /*
00150          *  t_unlock_cpu が呼び出されるのは CPUロック状態のみであるた
00151          *  め,処理の途中で task_intmask が書き換わることはない.
00152          */
00153         set_intmask(task_intmask);
00154 #else /* SUPPORT_CHG_IPM */
00155         enaint();
00156 #endif /* SUPPORT_CHG_IPM */
00157 }

関数の呼び出しグラフ:


変数

cpu_config.c59 行で定義されています。

参照元 i_lock_cpu()i_unlock_cpu().


Copyright © 2006 by TAKAGI Nobuhisa.
Copyright © 2006 by Kijineko Inc..
このページは Mon Dec 18 17:18:56 2006 に Doxygen によって生成されました。
データ入力からプログラム開発まで!様々なスキルを持ったメンバーが登録しています【@SOHO】