blob: 3a97793f070d058a1288031201a6e46c7129b928 [file] [log] [blame]
Tianrui Wei2ef594d2021-07-01 12:54:19 +08001.. SPDX-License-Identifier: GPL-2.0+
2
3Openpiton RISC-V SoC
4====================
5
Tianrui Wei2ef594d2021-07-01 12:54:19 +08006OpenPiton is an open source, manycore processor and research platform. It is a
7tiled manycore framework scalable from one to 1/2 billion cores. It supports a
8number of ISAs including RISC-V with its P-Mesh cache coherence protocol and
9networks on chip. It is highly configurable in both core and uncore components.
10OpenPiton has been verified in both ASIC and multiple Xilinx FPGA prototypes
11running full-stack Debian linux.
12
13RISC-V Standard Bootflow
14-------------------------
Heinrich Schuchardtd597da02021-07-24 10:43:35 +020015
Tianrui Wei2ef594d2021-07-01 12:54:19 +080016Currently, OpenPiton implements RISC-V standard bootflow in the following steps
17mover.S -> u-boot-spl -> opensbi -> u-boot -> Linux
18This board supports S-mode u-boot as well as M-mode SPL
19
20Building OpenPition
21---------------------
Heinrich Schuchardtd597da02021-07-24 10:43:35 +020022
Tianrui Wei2ef594d2021-07-01 12:54:19 +080023If you'd like to build OpenPiton, please go to OpenPiton github repo
24(at https://github.com/PrincetonUniversity/openpiton) to build from the latest
25changes
26
27Building Images
Heinrich Schuchardtd597da02021-07-24 10:43:35 +020028---------------
Tianrui Wei2ef594d2021-07-01 12:54:19 +080029
30SPL
Heinrich Schuchardtd597da02021-07-24 10:43:35 +020031~~~
Tianrui Wei2ef594d2021-07-01 12:54:19 +080032
331. Add the RISC-V toolchain to your PATH.
342. Setup ARCH & cross compilation environment variable:
35
36.. code-block:: none
37
38 export CROSS_COMPILE=<riscv64 toolchain prefix>
39 export ARCH=riscv
40
413. make openpiton_riscv64_spl_defconfig
424. make
43
44U-Boot
Heinrich Schuchardtd597da02021-07-24 10:43:35 +020045~~~~~~
Tianrui Wei2ef594d2021-07-01 12:54:19 +080046
471. Add the RISC-V toolchain to your PATH.
482. Setup ARCH & cross compilation environment variable:
49
50.. code-block:: none
51
52 export CROSS_COMPILE=<riscv64 toolchain prefix>
53 export ARCH=riscv
54
553. make openpiton_riscv64_defconfig
564. make
57
Tianrui Wei2ef594d2021-07-01 12:54:19 +080058opensbi
Heinrich Schuchardtd597da02021-07-24 10:43:35 +020059~~~~~~~
Tianrui Wei2ef594d2021-07-01 12:54:19 +080060
611. Add the RISC-V toolchain to your PATH.
622. Setup ARCH & cross compilation environment variable:
63
64.. code-block:: none
65
66 export CROSS_COMPILE=<riscv64 toolchain prefix>
67 export ARCH=riscv
68
693. Go to OpenSBI directory
704. make PLATFORM=fpga/openpiton FW_PAYLOAD_PATH=<path to u-boot-nodtb.bin>
71
Heinrich Schuchardtd597da02021-07-24 10:43:35 +020072Using fw_payload.bin with Linux
73~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tianrui Wei2ef594d2021-07-01 12:54:19 +080074
Tianrui Wei2ef594d2021-07-01 12:54:19 +080075Put the generated fw_payload.bin into the /boot directory on the root filesystem,
76plug in the SD card, then flash the bitstream. Linux will boot automatically.
77
78Booting
79-------
80Once you plugin the sdcard and power up, you should see the U-Boot prompt.
81
82Sample Dual-core Debian boot log from OpenPiton
Heinrich Schuchardtd597da02021-07-24 10:43:35 +020083~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tianrui Wei2ef594d2021-07-01 12:54:19 +080084
85.. code-block:: none
86
87 Trying to boot from MMC1
88
89 OpenSBI v0.9-5-gd06cb61
90 ____ _____ ____ _____
91 / __ \ / ____| _ \_ _|
92 | | | |_ __ ___ _ __ | (___ | |_) || |
93 | | | | '_ \ / _ \ '_ \ \___ \| _ < | |
94 | |__| | |_) | __/ | | |____) | |_) || |_
95 \____/| .__/ \___|_| |_|_____/|____/_____|
96 | |
97 |_|
98
99 Platform Name : OPENPITON RISC-V
100 Platform Features : timer,mfdeleg
101 Platform HART Count : 3
102 Firmware Base : 0x80000000
103 Firmware Size : 104 KB
104 Runtime SBI Version : 0.2
105
106 Domain0 Name : root
107 Domain0 Boot HART : 0
108 Domain0 HARTs : 0*,1*,2*
109 Domain0 Region00 : 0x0000000080000000-0x000000008001ffff ()
110 Domain0 Region01 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
111 Domain0 Next Address : 0x0000000080200000
112 Domain0 Next Arg1 : 0x0000000082200000
113 Domain0 Next Mode : S-mode
114 Domain0 SysReset : yes
115
116 Boot HART ID : 0
117 Boot HART Domain : root
118 Boot HART ISA : rv64imafdcsu
119 Boot HART Features : scounteren,mcounteren
120 Boot HART PMP Count : 0
121 Boot HART PMP Granularity : 0
122 Boot HART PMP Address Bits: 0
123 Boot HART MHPM Count : 0
124 Boot HART MHPM Count : 0
125 Boot HART MIDELEG : 0x0000000000000222
126 Boot HART MEDELEG : 0x000000000000b109
127
128
129 U-Boot 2021.01+ (Jun 12 2021 - 10:31:34 +0800)
130
131 DRAM: 1 GiB
132 MMC: sdhci@f000000000: 0 (eMMC)
133 In: uart@fff0c2c000
134 Out: uart@fff0c2c000
135 Err: uart@fff0c2c000
136 Hit any key to stop autoboot: 0
137 6492992 bytes read in 5310 ms (1.2 MiB/s)
138 ## Flattened Device Tree blob at 86000000
139 Booting using the fdt blob at 0x86000000
140 Loading Device Tree to 00000000bfffa000, end 00000000bffff007 ... OK
141
142 Starting kernel ...
143
144 [ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
145 [ 0.000000] Linux version 5.6.0-rc4-gb9d34f7e294d-dirty
146 [ 0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
147 [ 0.000000] printk: bootconsole [sbi0] enabled
148 [ 0.000000] Zone ranges:
149 [ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff]
150 [ 0.000000] Normal empty
151 [ 0.000000] Movable zone start for each node
152 [ 0.000000] Early memory node ranges
153 [ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff]
154 [ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff]
155 [ 0.000000] On node 0 totalpages: 261632
156 [ 0.000000] DMA32 zone: 4088 pages used for memmap
157 [ 0.000000] DMA32 zone: 0 pages reserved
158 [ 0.000000] DMA32 zone: 261632 pages, LIFO batch:63
159 [ 0.000000] software IO TLB: mapped [mem 0xbaffa000-0xbeffa000] (64MB)
160 [ 0.000000] SBI specification v0.2 detected
161 [ 0.000000] SBI implementation ID=0x1 Version=0x9
162 [ 0.000000] SBI v0.2 TIME extension detected
163 [ 0.000000] SBI v0.2 IPI extension detected
164 [ 0.000000] SBI v0.2 RFENCE extension detected
165 [ 0.000000] SBI v0.2 HSM extension detected
166 [ 0.000000] elf_hwcap is 0x112d
167 [ 0.000000] percpu: Embedded 16 pages/cpu s25368 r8192 d31976 u65536
168 [ 0.000000] pcpu-alloc: s25368 r8192 d31976 u65536 alloc=16*4096
169 [ 0.000000] pcpu-alloc: [0] 0
170 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 257544
171 [ 0.000000] Kernel command line: earlycon=sbi root=/dev/piton_sd1
172 [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
173 [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
174 [ 0.000000] Sorting __ex_table...
175 [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
176 [ 0.000000] Memory: 956252K/1046528K available (4357K kernel code, 286K rwdata, 1200K rodata, 168K init, 311K bss, 90276K re)
177 [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
178 [ 0.000000] rcu: Hierarchical RCU implementation.
179 [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
180 [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
181 [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
182 [ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
183 [ 0.000000] plic: mapped 2 interrupts with 1 handlers for 2 contexts.
184 [ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
185 [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1ec037a6a, max_idle_ns: 7052723236599 ns
186 [ 0.000138] sched_clock: 64 bits at 520kHz, resolution 1919ns, wraps every 4398046510738ns
187 [ 0.009429] printk: console [hvc0] enabled
188 [ 0.009429] printk: console [hvc0] enabled
189 [ 0.017850] printk: bootconsole [sbi0] disabled
190 [ 0.017850] printk: bootconsole [sbi0] disabled
191 [ 0.028029] Calibrating delay loop (skipped), value calculated using timer frequency.. 1.04 BogoMIPS (lpj=5208)
192 [ 0.038753] pid_max: default: 32768 minimum: 301
193 [ 0.050248] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
194 [ 0.058661] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
195 [ 0.069359] *** VALIDATE tmpfs ***
196 [ 0.089093] *** VALIDATE proc ***
197 [ 0.101135] *** VALIDATE cgroup ***
198 [ 0.105019] *** VALIDATE cgroup2 ***
199 [ 0.144310] rcu: Hierarchical SRCU implementation.
200 [ 0.162836] smp: Bringing up secondary CPUs ...
201 [ 0.167736] smp: Brought up 1 node, 1 CPU
202 [ 0.185982] devtmpfs: initialized
203 [ 0.216237] random: get_random_u32 called from bucket_table_alloc.isra.25+0x4e/0x15c with crng_init=0
204 [ 0.236026] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
205 [ 0.246916] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
206 [ 0.266994] NET: Registered protocol family 16
207 [ 0.763362] clocksource: Switched to clocksource riscv_clocksource
208 [ 0.770122] *** VALIDATE bpf ***
209 [ 0.782837] *** VALIDATE ramfs ***
210 [ 0.829997] NET: Registered protocol family 2
211 [ 0.853577] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
212 [ 0.864085] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
213 [ 0.875373] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
214 [ 0.887958] TCP: Hash tables configured (established 8192 bind 8192)
215 [ 0.902149] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
216 [ 0.909904] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
217 [ 0.924809] NET: Registered protocol family 1
218 [ 0.948605] RPC: Registered named UNIX socket transport module.
219 [ 0.956003] RPC: Registered udp transport module.
220 [ 0.961565] RPC: Registered tcp transport module.
221 [ 0.966432] RPC: Registered tcp NFSv4.1 backchannel transport module.
222 [ 0.987180] Initialise system trusted keyrings
223 [ 0.998953] workingset: timestamp_bits=46 max_order=18 bucket_order=0
224 [ 1.323977] *** VALIDATE nfs ***
225 [ 1.328520] *** VALIDATE nfs4 ***
226 [ 1.334422] NFS: Registering the id_resolver key type
227 [ 1.340148] Key type id_resolver registered
228 [ 1.345280] Key type id_legacy registered
229 [ 1.349820] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
230 [ 1.357610] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
231 [ 1.866909] Key type asymmetric registered
232 [ 1.872460] Asymmetric key parser 'x509' registered
233 [ 1.878750] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
234 [ 1.887480] io scheduler mq-deadline registered
235 [ 1.892864] io scheduler kyber registered
236 [ 3.905595] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
237 [ 3.954332] fff0c2c000.uart: ttyS0 at MMIO 0xfff0c2c000 (irq = 1, base_baud = 4166687) is a 16550
238 [ 4.254794] loop: module loaded
239 [ 4.258269] piton_sd:v1.0 Apr 26, 2019
240 [ 4.258269]
241 [ 4.265170] gpt partition table header:
242 [ 4.265283] signature: 5452415020494645
243 [ 4.269258] revision: 10000
244 [ 4.273746] size: 5c
245 [ 4.276659] crc_header: 26b42404
246 [ 4.278911] reserved: 0
247 [ 4.282730] current lba: 1
248 [ 4.285311] backup lda: 3b723ff
249 [ 4.288093] partition entries lba: 2
250 [ 4.291835] number partition entries: 80
251 [ 4.295529] size partition entries: 80
252 [ 9.473253] piton_sd: piton_sd1
253 [ 10.099676] libphy: Fixed MDIO Bus: probed
254 [ 10.148782] NET: Registered protocol family 10
255 [ 10.183418] Segment Routing with IPv6
256 [ 10.189384] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
257 [ 10.214449] NET: Registered protocol family 17
258 [ 10.227413] Key type dns_resolver registered
259 [ 10.240561] Loading compiled-in X.509 certificates
260 [ 10.465264] EXT4-fs (piton_sd1): mounted filesystem with ordered data mode. Opts: (null)
261 [ 10.475922] VFS: Mounted root (ext4 filesystem) readonly on device 254:1.
262 [ 10.551865] devtmpfs: mounted
263 [ 10.562744] Freeing unused kernel memory: 168K
264 [ 10.567450] This architecture does not have kernel memory protection.
265 [ 10.574688] Run /sbin/init as init process
266 [ 10.578916] with arguments:
267 [ 10.582489] /sbin/init
268 [ 10.585312] with environment:
269 [ 10.588518] HOME=/
270 [ 10.591459] TERM=linux
271 [ 18.154373] systemd[1]: System time before build time, advancing clock.
272 [ 18.565415] systemd[1]: systemd 238 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIB)
273 [ 18.596359] systemd[1]: Detected architecture riscv64.
274
275 Welcome to Debian GNU/Linux buster/sid!
276
277 [ 18.797150] systemd[1]: Set hostname to <openpiton>.
278 [ 31.609244] random: systemd: uninitialized urandom read (16 bytes read)
279 [ 31.630366] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
280 [ OK ] Listening on /dev/initctl Compatibility Named Pipe.
281 [ 31.674820] random: systemd: uninitialized urandom read (16 bytes read)
282 [ 31.806800] systemd[1]: Created slice system-serial\x2dgetty.slice.
283 [ OK ] Created slice system-serial\x2dgetty.slice.
284 [ 31.839855] random: systemd: uninitialized urandom read (16 bytes read)
285 [ 31.850670] systemd[1]: Reached target Slices.
286 [ OK ] Reached target Slices.
287 [ 32.128005] systemd[1]: Reached target Swap.
288 [ OK ] Reached target Swap.
289 [ 32.180337] systemd[1]: Listening on Journal Socket.
290 [ OK ] Listening on Journal Socket.
291 [ 32.416448] systemd[1]: Mounting Kernel Debug File System...
292 Mounting Kernel Debug File System...
293 [ 32.937934] systemd[1]: Starting Remount Root and Kernel File Systems...
294 Starting Remount Root and Kernel File Systems...
295 [ 33.117472] urandom_read: 4 callbacks suppressed
296 [ 33.117645] random: systemd: uninitialized urandom read (16 bytes read)
297 [ 33.214868] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
298 [ OK ] Started Forward Password Requests to Wall Directory Watch.
299 [ 33.366745] random: systemd: uninitialized urandom read (16 bytes read)
300 [ 33.453262] systemd[1]: Listening on Journal Socket (/dev/log).
301 [ OK ] Listening on Journal Socket (/dev/log).
302 [ 33.627020] random: systemd: uninitialized urandom read (16 bytes read)
303 [ 34.029973] systemd[1]: Starting Load Kernel Modules...
304 Starting Load Kernel Modules...
305 [ OK ] Created slice system-getty.slice.
306 [ OK ] Started Dispatch Password Requests to Console Directory Watch.
307 [ OK ] Reached target Local Encrypted Volumes.
308 [ OK ] Reached target Paths.
309 [ OK ] Reached target Remote File Systems.
310 [ OK ] Listening on udev Kernel Socket.
311 [ OK ] Listening on udev Control Socket.
312 [ OK ] Reached target Sockets.
313 Starting udev Coldplug all Devices...
314 Starting Journal Service...
315 [ 37.108761] systemd[1]: Starting Create Static Device Nodes in /dev...
316 Starting Create Static Device Nodes in /dev...
317 [ 37.941929] systemd[1]: Mounted Kernel Debug File System.
318 [ OK ] Mounted Kernel Debug File System.
319 [ 38.463855] systemd[1]: Started Remount Root and Kernel File Systems.
320 [ OK ] Started Remount Root and Kernel File Systems.
321 [ 39.614728] systemd[1]: Started Load Kernel Modules.
322 [ OK ] Started Load Kernel Modules.
323 [ 40.794332] systemd[1]: Starting Apply Kernel Variables...
324 Starting Apply Kernel Variables...
325 [ 41.928338] systemd[1]: Starting Load/Save Random Seed...
326 Starting Load/Save Random Seed...
327 [ 43.494757] systemd[1]: Started Create Static Device Nodes in /dev.
328 [ OK ] Started Create Static Device Nodes in /dev.
329 [ 44.795372] systemd[1]: Starting udev Kernel Device Manager...
330 Starting udev Kernel Device Manager...
331 [ 45.043065] systemd[1]: Reached target Local File Systems (Pre).
332 [ OK ] Reached target Local File Systems (Pre).
333 [ 45.224716] systemd[1]: Reached target Local File Systems.
334 [ OK ] Reached target Local File Systems.
335 [ 46.036491] systemd[1]: Started Apply Kernel Variables.
336 [ OK ] Started Apply Kernel Variables.
337 [ 46.947879] systemd[1]: Started Load/Save Random Seed.
338 [ OK ] Started Load/Save Random Seed.
339 [ 47.910242] systemd[1]: Starting Raise network interfaces...
340 Starting Raise network interfaces...
341 [ 48.119915] systemd[1]: Started Journal Service.
342 [ OK ] Started Journal Service.
343 Starting Flush Journal to Persistent Storage...
344 [ OK ] Started udev Kernel Device Manager.
345 [ 55.369915] systemd-journald[88]: Received request to flush runtime journal from PID 1
346 [ OK ] Started Flush Journal to Persistent Storage.
347 Starting Create Volatile Files and Directories...
348 [ OK ] Started Raise network interfaces.
349 [ OK ] Reached target Network.
350 [FAILED] Failed to start Create Volatile Files and Directories.
351 See 'systemctl status systemd-tmpfiles-setup.service' for details.
352 Starting Update UTMP about System Boot/Shutdown...
353 [FAILED] Failed to start Network Time Synchronization.
354 See 'systemctl status systemd-timesyncd.service' for details.
355 [ OK ] Reached target System Time Synchronized.
356 [ OK ] Stopped Network Time Synchronization.
357 [ OK ] Started udev Coldplug all Devices.
358 [ OK ] Found device /dev/hvc0.
359 [ OK ] Reached target System Initialization.
360 [ OK ] Reached target Basic System.
361 [ OK ] Started Regular background program processing daemon.
362 [ OK ] Started Daily Cleanup of Temporary Directories.
363 Starting Permit User Sessions...
364 [ OK ] Started Daily apt download activities.
365 [ OK ] Started Daily apt upgrade and clean activities.
366 [ OK ] Reached target Timers.
367 [ OK ] Started Permit User Sessions.
368 [ OK ] Started Serial Getty on hvc0.
369 [ OK ] Reached target Login Prompts.
370 [ OK ] Reached target Multi-User System.
371 [ OK ] Reached target Graphical Interface.
372
373 Debian GNU/Linux buster/sid openpiton hvc0
374
375 openpiton login: