summaryrefslogtreecommitdiffstats
path: root/src/tools/debug/simics/sbe_startupAxone.simics
blob: 03dc26a915a8123fa1731e415d0d9467ef174e79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#######################################
#Declare simics environment variables
#######################################
decl {
    group "sbe_ci"

    param sbe_scripts_path : string or nil = NIL
    ! SBE scripts_path at time 0
    result sbe_scripts_path : string or nil

    param sbe_ci : bool = FALSE
    ! is sbe-ci TRUE
    result sbe_ci : bool

    param sbe_ci_script : string or nil = NIL
    ! SBE ci script to run at time 0
    result sbe_ci_script : string or nil
}
if $sbe_scripts_path != NIL {
    add-directory $sbe_scripts_path
}
if $sbe_ci_script != NIL {
    $sbe_ci_script = (lookup-file $sbe_ci_script)
}

###################################
#Enable SBE
###################################
echo "Enable the SBE"

(get-master-cec-chips)[0].invoke parallel_store SCOM 0x5003A "90000000_00000000" 64
# Set security enabled bit
(get-master-cec-chips)[0].invoke parallel_store SCOM 0x00050001 "0C000002_00000000" 64

echo "Attempting to register SBE Tools"
# Load SBE debug tools.
try {
    run-python-file (lookup-file "%script%/simics-debug-framework.py")

} except { echo "ERROR: Failed to load SBE debug tools." }


#If we are running CI, run the test cases
if $sbe_ci == TRUE {
   try {
   run-command-file $sbe_ci_script
   } except{
   echo " Debug ::SBE CI Script error"
   q 1
   }
   #Kill runsim if any test case fails.
   q 0
}
OpenPOWER on IntegriCloud