|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 3764 (0xeb4) Types: TextFile Notes: R1k Text-file segment
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦d5db58322⟧ └─⟦this⟧
-- Copyright 1991 Verdix Corporation with system; use system; with unchecked_conversion; package krn_cpu_defs is pragma suppress(ALL_CHECKS); pragma suppress(EXCEPTION_TABLES); pragma not_elaborated; ------------------------------------------------------------------------- -- Kernel type definitions that are M68K cross target specific ------------------------------------------------------------------------- -- Allocation and stack alignment ALIGNMENT: constant := 4; -- Size of exception stack frame for a trap instruction TRAP_FRAME_SIZE: constant := 8; -- This is to get around the problem with 'SIZE not working when -- the elaboration code doesn't get executed. storage_units_per_word: constant := 4; -- Note: for RTS performance reasons a6, a7 and pc aren't being -- updated. They're only there for the debugger. type cpu_state_t is record a6 : address; -- fp -- 0 a7 : address; -- sp -- 4 pc : address; -- 8 sr : short_integer; -- c sr_pad : short_integer; -- When entered_from_intr = TRUE, restore_ssp points to -- preempted_state_t record pushed on the task's supervisor stack. -- The task's SSP is equal to the restore_ssp after this -- record has been popped from the stack. The restore_usp field -- contains the task's USP. None of the above registers -- are valid. -- -- When entered_from_intr = 0, the above registers reflect -- the task's state upon entering the RTS. entered_from_intr : boolean; -- 10 entered_from_intr_pad1 : tiny_integer; -- 11 entered_from_intr_pad2 : short_integer; -- 12 restore_ssp : address; -- 14 restore_usp : address; -- 18 stack_limit : address; -- 1c end record; for cpu_state_t'size use 16#20# * 8; type a_cpu_state_t is access cpu_state_t; -- Length of fields in krn_tcb_t record preceding cpu_state. cpu_state_offset: constant := 0; -- CPU state record field offsets from beginning of task control -- block, not beginning of cpu_state a6_offset: constant := cpu_state_offset + 16#00#; a7_offset: constant := cpu_state_offset + 16#04#; pc_offset: constant := cpu_state_offset + 16#08#; sr_offset: constant := cpu_state_offset + 16#0C#; fp_offset: constant := a6_offset; sp_offset: constant := a7_offset; entered_from_intr_offset: constant := cpu_state_offset + 16#10#; restore_ssp_offset: constant := cpu_state_offset + 16#14#; restore_usp_offset: constant := cpu_state_offset + 16#18#; stack_limit_offset: constant := cpu_state_offset + 16#1c#; -- -- The following state is pushed on the current task's supervisor stack -- when the RTS is entered from an interrupt. For this case, -- ts.ct.proc_state.entered_from_intr = TRUE and -- ts.ct.proc_state.restore_ssp points to this record on the stack. -- type preempted_reg_t is array(0..14) of integer; -- d0..d7, a0..a6 type preempted_state_t is record preempted_reg : preempted_reg_t; sr : short_integer; pc : integer; end record; pragma pack(preempted_state_t); for preempted_state_t'size use 8*32 + 7*32 + 16 + 32; type a_preempted_state_t is access preempted_state_t; -- -- The following state is pushed on the current task's supervisor stack -- before doing a task switch. For this case, -- ts.ct.proc_state.entered_from_intr = FALSE and -- ts.ct.proc_state.restore_ssp points to this record on the stack. -- type switch_reg_t is array(0..8) of integer; -- d4..d7, a2..a6 type task_switch_state_t is record switch_reg : switch_reg_t; pc : integer; end record; pragma pack(task_switch_state_t); for task_switch_state_t'size use 4*32 + 5*32 + 32; type a_task_switch_state_t is access task_switch_state_t; end krn_cpu_defs; package body krn_cpu_defs is end krn_cpu_defs