comparison packages/hal/powerpc/sim/current/src/sim.S @ 0:3111d98ba7b3 ecos-v1_1-release

Initial commit of eCos version 1.1
author jlarmour
date Tue, 11 May 1999 11:16:07 +0000
parents
children 443894e2e912
comparison
equal deleted inserted replaced
-1:000000000000 0:3111d98ba7b3
1 #==============================================================================
2 ##
3 ## sim.S
4 ##
5 ## Simulator hardware setup
6 ##
7 ##=============================================================================
8 #####COPYRIGHTBEGIN####
9 #
10 # -------------------------------------------
11 # The contents of this file are subject to the Cygnus eCos Public License
12 # Version 1.0 (the "License"); you may not use this file except in
13 # compliance with the License. You may obtain a copy of the License at
14 # http://sourceware.cygnus.com/ecos
15 #
16 # Software distributed under the License is distributed on an "AS IS"
17 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
18 # License for the specific language governing rights and limitations under
19 # the License.
20 #
21 # The Original Code is eCos - Embedded Cygnus Operating System, released
22 # September 30, 1998.
23 #
24 # The Initial Developer of the Original Code is Cygnus. Portions created
25 # by Cygnus are Copyright (C) 1998 Cygnus Solutions. All Rights Reserved.
26 # -------------------------------------------
27 #
28 #####COPYRIGHTEND####
29 ##=============================================================================
30 #######DESCRIPTIONBEGIN####
31 ##
32 ## Author(s): nickg
33 ## Contributors: nickg
34 ## Date: 1997-11-11
35 ## Purpose: Simulator hardware setup
36 ## Description: This file contains any code needed to initialize the
37 ## hardware on the PowerPC simulator.
38 ##
39 ######DESCRIPTIONEND####
40 ##
41 ##=============================================================================
42
43 #include <pkgconf/hal.h>
44
45 #include "cyg/hal/ppc.inc"
46
47 #------------------------------------------------------------------------------
48
49 .globl hal_hardware_init
50 hal_hardware_init:
51
52 #if 0
53 # Set up the BAT registers to cover same address spaces
54
55 # ibat0
56 # base addr 0xfff00000
57 # length 1M
58 # WIMG = 0000
59 # covers ROM
60 lwi r4,0xfff0001f
61 mtibatu 0,r4
62 lwi r4,0xfff00002
63 mtibatl 0,r4
64
65 # ibat1
66 # base addr 0x00000000
67 # length 256M
68 # WIMG = 0000
69 # covers DRAM and slots
70 lwi r4,0x00001fff
71 mtibatu 1,r4
72 lwi r4,0x00000002
73 mtibatl 1,r4
74
75 # dbat0
76 # base addr 0xfff00000
77 # length 256M
78 # WIMG = 0101
79 # covers ROM for data access
80 lwi r4,0xfff01fff
81 mtdbatu 0,r4
82 lwi r4,0xfff0002a
83 mtdbatl 0,r4
84
85 # dbat1
86 # base addr 0x00000000
87 # length 256M
88 # WIMG = 0000
89 # covers DRAM and slots
90 lwi r4,0x00001fff
91 mtdbatu 1,r4
92 lwi r4,0x00000002
93 mtdbatl 1,r4
94
95 # Enable translation in the MSR
96 mfmsr r3
97 lwi r4,0x00000030
98 or r3,r3,r4
99 mtmsr r3
100 #endif
101 blr
102
103 #------------------------------------------------------------------------------
104 # end of sim.S