update readme.md

This commit is contained in:
hustccc 2020-10-23 09:00:43 +09:00
parent 6710792ef5
commit 5bfe8bf516
2 changed files with 7 additions and 3 deletions

View File

@ -14,14 +14,17 @@ First you need to connect your k210 board to your PC.
And check the USB port:
>\$ ls /dev/ | grep USB
In my situation it will be `ttyUSB0`
In my situation it will be `ttyUSB1`
>\$ cd xv6-k210
>\$ mkdir target
>\$ make build
## Run
>\$ make run-k210 k210-serialport=`Your-USB-port`(default by ttyUSB0)
>\$ make run-k210 k210-serialport=`Your-USB-port`(default by ttyUSB1)
Ps: Most of the k210-port in Linux is ttyUSB0, if you use Windows or Mac OS, this doc
may help you: [maixpy-doc](https://maixpy.sipeed.com/zh/get_started/env_install_driver.html#)
## What I have done
+ Multicore boot

View File

@ -248,12 +248,13 @@ r_mcounteren()
return x;
}
// machine-mode cycle counter
// supervisor-mode cycle counter
static inline uint64
r_time()
{
uint64 x;
// asm volatile("csrr %0, time" : "=r" (x) );
// this instruction will trap in SBI
asm volatile("rdtime %0" : "=r" (x) );
return x;
}