ev5_alpha_defs.h revision 8029
12810SN/A/* 210764Sandreas.hansson@arm.com * Copyright (c) 1993 The Hewlett-Packard Development Company 39663Suri.wiener@arm.com * All rights reserved. 49663Suri.wiener@arm.com * 59663Suri.wiener@arm.com * Redistribution and use in source and binary forms, with or without 69663Suri.wiener@arm.com * modification, are permitted provided that the following conditions are 79663Suri.wiener@arm.com * met: redistributions of source code must retain the above copyright 89663Suri.wiener@arm.com * notice, this list of conditions and the following disclaimer; 99663Suri.wiener@arm.com * redistributions in binary form must reproduce the above copyright 109663Suri.wiener@arm.com * notice, this list of conditions and the following disclaimer in the 119663Suri.wiener@arm.com * documentation and/or other materials provided with the distribution; 129663Suri.wiener@arm.com * neither the name of the copyright holders nor the names of its 139663Suri.wiener@arm.com * contributors may be used to endorse or promote products derived from 142810SN/A * this software without specific prior written permission. 152810SN/A * 162810SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172810SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182810SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192810SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202810SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212810SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222810SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232810SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242810SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252810SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262810SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272810SN/A */ 282810SN/A 292810SN/A#ifndef EV5_ALPHA_DEFS_INCLUDED 302810SN/A#define EV5_ALPHA_DEFS_INCLUDED 1 312810SN/A 322810SN/A// from ev5_alpha_defs.mar from Lance's fetch directory 332810SN/A// Lower-caseified and $ signs removed ... pb Nov/95 342810SN/A 352810SN/A// 362810SN/A// PS Layout - PS 372810SN/A// Loc Size name function 382810SN/A// ------ ------ ______ ----------------------------------- 392810SN/A// <31:29> 3 SA stack alignment 402810SN/A// <31:13> 24 RES Reserved MBZ 412810SN/A// <12:8> 5 IPL Priority level 422810SN/A// <7> 1 VMM Virtual Mach Monitor 432810SN/A// <6:5> 2 RES Reserved MBZ 442810SN/A// <4:3> 2 CM Current Mode 452810SN/A// <2> 1 IP Interrupt Pending 462810SN/A// <1:0> 2 SW Software bits 472810SN/A// 4810764Sandreas.hansson@arm.com 4910764Sandreas.hansson@arm.com#define ps_v_sw 0 502810SN/A#define ps_m_sw (3<<ps_v_sw) 514626SN/A 524626SN/A#define ps_v_ip 2 535314SN/A#define ps_m_ip (1<<ps_v_ip) 542810SN/A 552810SN/A#define ps_v_cm 3 564626SN/A#define ps_m_cm (3<<ps_v_cm) 574626SN/A 582810SN/A#define ps_v_vmm 7 592810SN/A#define ps_m_vmm (1<<ps_v_vmm) 602810SN/A 613374SN/A#define ps_v_ipl 8 629264Sdjordje.kovacevic@arm.com#define ps_m_ipl (0x1f<<ps_v_ipl) 632810SN/A 645314SN/A#define ps_v_sp (0x38) 654626SN/A#define ps_m_sp (0x3f<<ps_v_sp) 664626SN/A 679725Sandreas.hansson@arm.com 689725Sandreas.hansson@arm.com#define ps_c_kern (0x00) 699725Sandreas.hansson@arm.com#define ps_c_exec (0x08) 709725Sandreas.hansson@arm.com#define ps_c_supr (0x10) 719725Sandreas.hansson@arm.com#define ps_c_user (0x18) 729725Sandreas.hansson@arm.com#define ps_c_ipl0 (0x0000) 739725Sandreas.hansson@arm.com#define ps_c_ipl1 (0x0100) 749725Sandreas.hansson@arm.com#define ps_c_ipl2 (0x0200) 759725Sandreas.hansson@arm.com#define ps_c_ipl3 (0x0300) 769725Sandreas.hansson@arm.com#define ps_c_ipl4 (0x0400) 779725Sandreas.hansson@arm.com#define ps_c_ipl5 (0x0500) 789725Sandreas.hansson@arm.com#define ps_c_ipl6 (0x0600) 799725Sandreas.hansson@arm.com#define ps_c_ipl7 (0x0700) 809725Sandreas.hansson@arm.com#define ps_c_ipl8 (0x0800) 819725Sandreas.hansson@arm.com#define ps_c_ipl9 (0x0900) 829725Sandreas.hansson@arm.com#define ps_c_ipl10 (0x0A00) 839725Sandreas.hansson@arm.com#define ps_c_ipl11 (0x0B00) 849725Sandreas.hansson@arm.com#define ps_c_ipl12 (0x0C00) 859725Sandreas.hansson@arm.com#define ps_c_ipl13 (0x0D00) 869725Sandreas.hansson@arm.com#define ps_c_ipl14 (0x0E00) 879725Sandreas.hansson@arm.com#define ps_c_ipl15 (0x0F00) 889725Sandreas.hansson@arm.com#define ps_c_ipl16 (0x1000) 899725Sandreas.hansson@arm.com#define ps_c_ipl17 (0x1100) 909725Sandreas.hansson@arm.com#define ps_c_ipl18 (0x1200) 919725Sandreas.hansson@arm.com#define ps_c_ipl19 (0x1300) 922810SN/A#define ps_c_ipl20 (0x1400) 934626SN/A#define ps_c_ipl21 (0x1500) 944626SN/A#define ps_c_ipl22 (0x1600) 954626SN/A#define ps_c_ipl23 (0x1700) 965875Ssteve.reinhardt@amd.com#define ps_c_ipl24 (0x1800) 975875Ssteve.reinhardt@amd.com#define ps_c_ipl25 (0x1900) 985875Ssteve.reinhardt@amd.com#define ps_c_ipl26 (0x1A00) 995875Ssteve.reinhardt@amd.com#define ps_c_ipl27 (0x1B00) 1005875Ssteve.reinhardt@amd.com#define ps_c_ipl28 (0x1C00) 1015875Ssteve.reinhardt@amd.com#define ps_c_ipl29 (0x1D00) 1025875Ssteve.reinhardt@amd.com#define ps_c_ipl30 (0x1E00) 1034871SN/A#define ps_c_ipl31 (0x1F00) 1044871SN/A 1054666SN/A// 1064626SN/A// PTE layout - symbol prefix PTE_ 1075875Ssteve.reinhardt@amd.com// 1085318SN/A// Loc Size name function 1095318SN/A// ------ ------ ------ ----------------------------------- 1104626SN/A// <63:32> 32 PFN Page Frame Number 1115318SN/A// <31:16> 16 SOFT Bits reserved for software use 1125875Ssteve.reinhardt@amd.com// <15> 1 UWE User write enable 1137823Ssteve.reinhardt@amd.com// <14> 1 SWE Super write enable 1145875Ssteve.reinhardt@amd.com// <13> 1 EWE Exec write enable 1154626SN/A// <12> 1 KWE Kernel write enable 1164626SN/A// <11> 1 URE User read enable 1174626SN/A// <10> 1 SRE Super read enable 1184903SN/A// <9> 1 ERE Exec read enable 1194903SN/A// <8> 1 KRE Kernel read enable 1204903SN/A// <7:6> 2 RES Reserved SBZ 1215314SN/A// <5> 1 HPF Huge Page Flag 1224903SN/A// <4> 1 ASM Wild card address space number match 1234903SN/A// <3> 1 FOE Fault On execute 1244903SN/A// <2> 1 FOW Fault On Write 1254903SN/A// <1> 1 FOR Fault On Read 1264903SN/A// <0> 1 V valid bit 1274903SN/A// 1284903SN/A 1294903SN/A#define pte_v_pfn 32 1305318SN/A#define pte_m_soft (0xFFFF0000) 1315875Ssteve.reinhardt@amd.com#define pte_v_soft 16 1324903SN/A#define pte_m_uwe (0x8000) 1334908SN/A#define pte_v_uwe 15 1344920SN/A#define pte_m_swe (0x4000) 1355314SN/A#define pte_v_swe 14 1365314SN/A#define pte_m_ewe (0x2000) 1374903SN/A#define pte_v_ewe 13 1384903SN/A#define pte_m_kwe (0x1000) 1392810SN/A#define pte_v_kwe 12 1402810SN/A#define pte_m_ure (0x0800) 1412810SN/A#define pte_v_ure 11 1422810SN/A#define pte_m_sre (0x0400) 1432810SN/A#define pte_v_sre 10 1442810SN/A#define pte_m_ere (0x0200) 1452810SN/A#define pte_v_ere 9 1464626SN/A#define pte_m_kre (0x0100) 1474626SN/A#define pte_v_kre 8 1484626SN/A#define pte_m_hpf (0x0020) 1494666SN/A#define pte_v_hpf 5 1504666SN/A#define pte_m_asm (0x0010) 1514666SN/A#define pte_v_asm 4 15210764Sandreas.hansson@arm.com#define pte_m_foe (0x0008) 15310764Sandreas.hansson@arm.com#define pte_v_foe 3 1544626SN/A#define pte_m_fow (0x0004) 15510764Sandreas.hansson@arm.com#define pte_v_fow 2 15610764Sandreas.hansson@arm.com#define pte_m_for (0x0002) 1574626SN/A#define pte_v_for 1 15810028SGiacomo.Gabrielli@arm.com#define pte_m_v (0x0001) 15910028SGiacomo.Gabrielli@arm.com#define pte_v_v 0 16010028SGiacomo.Gabrielli@arm.com 1613374SN/A// 1622810SN/A// VA layout - symbol prefix VA_ 1634626SN/A// 1645730SSteve.Reinhardt@amd.com// Loc Size name function 1655730SSteve.Reinhardt@amd.com// ------ ------ ------- ----------------------------------- 1664903SN/A// <42:33> 10 SEG1 First seg table offset for mapping 1677667Ssteve.reinhardt@amd.com// <32:23> 10 SEG2 Second seg table offset for mapping 1687667Ssteve.reinhardt@amd.com// <22:13> 10 SEG3 Third seg table offset for mapping 1697667Ssteve.reinhardt@amd.com// <12:0> 13 OFFSET Byte within page 1707667Ssteve.reinhardt@amd.com// 1717667Ssteve.reinhardt@amd.com 1729725Sandreas.hansson@arm.com#define va_m_offset (0x000000001FFF) 1739725Sandreas.hansson@arm.com#define va_v_offset 0 1749725Sandreas.hansson@arm.com#define va_m_seg3 (0x0000007FE000) 1757667Ssteve.reinhardt@amd.com#define va_v_seg3 13 1767667Ssteve.reinhardt@amd.com#define va_m_seg2 (0x0001FF800000) 1777667Ssteve.reinhardt@amd.com#define va_v_seg2 23 1787667Ssteve.reinhardt@amd.com#define va_m_seg1 (0x7FE00000000) 1797667Ssteve.reinhardt@amd.com#define va_v_seg1 33 1807667Ssteve.reinhardt@amd.com 1817667Ssteve.reinhardt@amd.com// 1827667Ssteve.reinhardt@amd.com//PRIVILEGED CONTEXT BLOCK (PCB) 1837667Ssteve.reinhardt@amd.com// 1847667Ssteve.reinhardt@amd.com#define pcb_q_ksp 0 1857667Ssteve.reinhardt@amd.com#define pcb_q_esp 8 1864665SN/A#define pcb_q_ssp 16 1872810SN/A#define pcb_q_usp 24 1886221Snate@binkert.org#define pcb_q_ptbr 32 1892810SN/A#define pcb_q_asn 40 1909725Sandreas.hansson@arm.com#define pcb_q_ast 48 1914668SN/A#define pcb_q_fen 56 1924668SN/A#define pcb_q_cc 64 1934668SN/A#define pcb_q_unq 72 1944668SN/A#define pcb_q_sct 80 1954668SN/A 1962810SN/A#define pcb_v_asten 0 1972810SN/A#define pcb_m_asten (0x0f<<pcb_v_asten) 1982810SN/A#define pcb_v_astsr 4 1992810SN/A#define pcb_m_astsr (0x0f<<pcb_v_astsr) 2002810SN/A#define pcb_v_dat 63 2014626SN/A#define pcb_v_pme 62 2022810SN/A 2032810SN/A// 2042810SN/A// SYSTEM CONTROL BLOCK (SCB) 2052810SN/A// 2062810SN/A 2072810SN/A#define scb_v_fen (0x0010) 2083374SN/A#define scb_v_acv (0x0080) 2099725Sandreas.hansson@arm.com#define scb_v_tnv (0x0090) 2102810SN/A#define scb_v_for (0x00A0) 2119725Sandreas.hansson@arm.com#define scb_v_fow (0x00B0) 2124665SN/A#define scb_v_foe (0x00C0) 2139725Sandreas.hansson@arm.com#define scb_v_arith (0x0200) 2144626SN/A#define scb_v_kast (0x0240) 2159725Sandreas.hansson@arm.com#define scb_v_east (0x0250) 2164626SN/A#define scb_v_sast (0x0260) 2172810SN/A#define scb_v_uast (0x0270) 2182810SN/A#define scb_v_unalign (0x0280) 21910764Sandreas.hansson@arm.com#define scb_v_bpt (0x0400) 22010764Sandreas.hansson@arm.com#define scb_v_bugchk (0x0410) 22110764Sandreas.hansson@arm.com#define scb_v_opcdec (0x0420) 22210764Sandreas.hansson@arm.com#define scb_v_illpal (0x0430) 22310764Sandreas.hansson@arm.com#define scb_v_trap (0x0440) 2242810SN/A#define scb_v_chmk (0x0480) 22510764Sandreas.hansson@arm.com#define scb_v_chme (0x0490) 22610764Sandreas.hansson@arm.com#define scb_v_chms (0x04A0) 2272810SN/A#define scb_v_chmu (0x04B0) 22810679Sandreas.hansson@arm.com#define scb_v_sw0 (0x0500) 2294908SN/A#define scb_v_sw1 (0x0510) 2305318SN/A#define scb_v_sw2 (0x0520) 2315318SN/A#define scb_v_sw3 (0x0530) 2322810SN/A#define scb_v_sw4 (0x0540) 2332810SN/A#define scb_v_sw5 (0x0550) 2342810SN/A#define scb_v_sw6 (0x0560) 2352810SN/A#define scb_v_sw7 (0x0570) 2362810SN/A#define scb_v_sw8 (0x0580) 2372810SN/A#define scb_v_sw9 (0x0590) 2383374SN/A#define scb_v_sw10 (0x05A0) 2392810SN/A#define scb_v_sw11 (0x05B0) 2402810SN/A#define scb_v_sw12 (0x05C0) 2414666SN/A#define scb_v_sw13 (0x05D0) 2424902SN/A#define scb_v_sw14 (0x05E0) 2432810SN/A#define scb_v_sw15 (0x05F0) 2442810SN/A#define scb_v_clock (0x0600) 2452810SN/A#define scb_v_inter (0x0610) 2462810SN/A#define scb_v_sys_corr_err (0x0620) 2472810SN/A#define scb_v_proc_corr_err (0x0630) 2482810SN/A#define scb_v_pwrfail (0x0640) 2492810SN/A#define scb_v_perfmon (0x0650) 2502810SN/A#define scb_v_sysmchk (0x0660) 2519725Sandreas.hansson@arm.com#define scb_v_procmchk (0x0670) 2529725Sandreas.hansson@arm.com#define scb_v_passive_rel (0x06F0) 2532810SN/A 2542810SN/A// 2554899SN/A// Stack frame (FRM) 2564899SN/A// 2574899SN/A 2589725Sandreas.hansson@arm.com#define frm_v_r2 (0x0000) 2594899SN/A#define frm_v_r3 (0x0008) 2604899SN/A#define frm_v_r4 (0x0010) 2612810SN/A#define frm_v_r5 (0x0018) 2622810SN/A#define frm_v_r6 (0x0020) 2632810SN/A#define frm_v_r7 (0x0028) 2649725Sandreas.hansson@arm.com#define frm_v_pc (0x0030) 2655730SSteve.Reinhardt@amd.com#define frm_v_ps (0x0038) 2665730SSteve.Reinhardt@amd.com 2679725Sandreas.hansson@arm.com// 2685730SSteve.Reinhardt@amd.com// Exeception summary register (EXS) 2692810SN/A// 2702810SN/A// exs_v_swc <0> ; Software completion 2712810SN/A// exs_v_inv <1> ; Ivalid operation 2722810SN/A// exs_v_dze <2> ; Div by zero 2732810SN/A// exs_v_fov <3> ; Floating point overflow 2742810SN/A// exs_v_unf <4> ; Floating point underflow 2759725Sandreas.hansson@arm.com// exs_v_ine <5> ; Floating point inexact 2762810SN/A// exs_v_iov <6> ; Floating convert to integer overflow 2772810SN/A#define exs_v_swc 0 2785730SSteve.Reinhardt@amd.com#define exs_v_inv 1 2792810SN/A#define exs_v_dze 2 2804630SN/A#define exs_v_fov 3 2814630SN/A#define exs_v_unf 4 2829725Sandreas.hansson@arm.com#define exs_v_ine 5 2835875Ssteve.reinhardt@amd.com#define exs_v_iov 6 2842810SN/A 2852810SN/A#define exs_m_swc (1<<exs_v_swc) 2864665SN/A#define exs_m_inv (1<<exs_v_inv) 2874665SN/A#define exs_m_dze (1<<exs_v_dze) 2884671SN/A#define exs_m_fov (1<<exs_v_fov) 2894668SN/A#define exs_m_unf (1<<exs_v_unf) 2905314SN/A#define exs_m_ine (1<<exs_v_ine) 2914920SN/A#define exs_m_iov (1<<exs_v_iov) 2922810SN/A 2935314SN/A// 2942810SN/A// machine check error summary register (mces) 2955314SN/A// 2965314SN/A// mces_v_mchk <0> ; machine check in progress 2975314SN/A// mces_v_sce <1> ; system correctable error 2989663Suri.wiener@arm.com// mces_v_pce <2> ; processor correctable error 2999663Suri.wiener@arm.com// mces_v_dpc <3> ; disable reporting of processor correctable errors 3009663Suri.wiener@arm.com// mces_v_dsc <4> ; disable reporting of system correctable errors 3019663Suri.wiener@arm.com#define mces_v_mchk 0 3029663Suri.wiener@arm.com#define mces_v_sce 1 3039663Suri.wiener@arm.com#define mces_v_pce 2 3049663Suri.wiener@arm.com#define mces_v_dpc 3 3052810SN/A#define mces_v_dsc 4 3062810SN/A 30710764Sandreas.hansson@arm.com#define mces_m_mchk (1<<mces_v_mchk) 308#define mces_m_sce (1<<mces_v_sce) 309#define mces_m_pce (1<<mces_v_pce) 310#define mces_m_dpc (1<<mces_v_dpc) 311#define mces_m_dsc (1<<mces_v_dsc) 312#define mces_m_all ((1<<mces_v_mchk) | (1<<mces_v_sce) | (1<<mces_v_pce) | (1<<mces_v_dpc) | (1<<mces_v_dsc)) 313 314#endif 315