Skip to content

Commit 2653018

Browse files
committed
[test] Enable bootstrapping for QEMU exec envs
Signed-off-by: James Wainwright <[email protected]>
1 parent 46ad3f7 commit 2653018

File tree

2 files changed

+58
-8
lines changed

2 files changed

+58
-8
lines changed

hw/top_earlgrey/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ sim_qemu(
159159
slot_spec = EARLGREY_SLOTS,
160160
test_cmd = """
161161
--exec="transport init"
162+
--exec="bootstrap --clear-uart=true --reset-delay 1000ms {firmware}"
162163
--exec="console --non-interactive --exit-success='{exit_success}' --exit-failure='{exit_failure}'"
163164
no-op
164165
""",

sw/host/opentitanlib/src/app/config/opentitan_qemu.json

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,63 @@
11
{
22
"interface": "qemu",
33
"pins": [
4-
// Resetting is done through the monitor on QEMU, but OpenTitanTool
5-
// expects a pin. We map a pin-like interface to ID 255 which can be used
6-
// to send reset commands to QEMU when pulled up and down.
7-
{
8-
"name": "RESET",
9-
"alias_of": "255",
10-
"level": true,
11-
},
4+
// Resetting is done through the monitor on QEMU, but OpenTitanTool
5+
// expects a pin. We map a pin-like interface to ID 255 which can be used
6+
// to send reset commands to QEMU when pulled up and down.
7+
{
8+
"name": "RESET",
9+
"alias_of": "255",
10+
"level": true,
11+
},
12+
{
13+
"name": "SW_STRAP0",
14+
"mode": "PushPull",
15+
"level": false,
16+
"pull_mode": "None",
17+
"alias_of": "22"
18+
},
19+
{
20+
"name": "SW_STRAP1",
21+
"mode": "PushPull",
22+
"level": false,
23+
"pull_mode": "None",
24+
"alias_of": "23"
25+
},
26+
{
27+
"name": "SW_STRAP2",
28+
"mode": "PushPull",
29+
"level": false,
30+
"pull_mode": "None",
31+
"alias_of": "24"
32+
},
33+
],
34+
"strappings": [
35+
{
36+
"name": "RESET",
37+
"pins": [
38+
{
39+
"name": "RESET",
40+
"level": false
41+
}
42+
]
43+
},
44+
{
45+
"name": "ROM_BOOTSTRAP",
46+
"pins": [
47+
{
48+
"name": "SW_STRAP0",
49+
"level": true
50+
},
51+
{
52+
"name": "SW_STRAP1",
53+
"level": true
54+
},
55+
{
56+
"name": "SW_STRAP2",
57+
"level": true
58+
}
59+
]
60+
},
1261
],
1362
"uarts": [
1463
{

0 commit comments

Comments
 (0)