aboutsummaryrefslogtreecommitdiff
path: root/riscv/dts.cc
AgeCommit message (Collapse)AuthorFilesLines
2022-10-17Merge branch 'master' into plic_uart_v1plic_uart_v1Andrew Waterman1-3/+2
2022-10-14Support command-line configuration of number of pmpregionsJerry Zhao1-1/+2
2022-07-07remove multi blank linesWeiwei Li1-2/+0
2022-04-20Add ns16550 serial device emulationAnup Patel1-4/+54
The ns16550 is a widely use serial device so we add a simplified ns16550 device emulation which is good enough for Linux, OpenSBI, and hypervisors to use as console. Signed-off-by: Anup Patel <anup@brainfault.org>
2022-04-20Add PLIC emulationAnup Patel1-0/+37
We need an interrupt controller in Spike which will allow us to emulate more real-world devices such as UART, VirtIO net, VirtIO block, etc. The RISC-V PLIC (or SiFive PLIC) is the commonly used interrupt controller in existing RISC-V platforms so this patch adds PLIC emulation for Spike. Signed-off-by: Anup Patel <anup@brainfault.org>
2022-04-01update dts.cc to make sv57 default maximum paging mode (#962)Alenkruth Murali1-1/+1
2022-03-12Construct an isa_parser_t and pass it to processor_t constructorRupert Swarbrick1-2/+2
This is a minor change, turning processor_t from a child class of isa_parser_t into a class that contains an isa_parser_t as a field. The point is that it is a step toward separating out "configuration" (and ISA string parsing) from processor state. This should be helpful for rejigging things so that we construct more from a supplied device tree.
2022-02-21Avoid an unnecessary strcpy (#925)Rupert Swarbrick1-2/+5
We don't actually know that the field in the DTB points at a string that's less than 256 bytes long, I don't think, so this could probably cause a buffer overflow on the stack. Anyway, it turns out that there's no need to copy anything anyway, so let's just update a char** instead.
2021-08-27Fix warning in new dtcAndrew Waterman1-0/+1
I think this is benign and in fact arbitrary, since the enclosing scope has no addresses. Resolves #784
2021-06-04encoding: udpate and move platform-related define outChih-Min Chao1-0/+1
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-11-15dts: config pmp attribute by each core's settingChih-Min Chao1-13/+10
The original implementation only uses the value in first core and apply it to other core. The patch makes the configuration hetergeneous for differenct cores. Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-11-15dts: extract cpu node checking as helper functionChih-Min Chao1-9/+21
all atrribute in cpu could leverage it Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-11-11dts: extend dts api to get info of each cpuChih-Min Chao1-0/+38
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-07-09Add bootargs command-line option to SpikeAnup Patel1-3/+14
We add bootargs command-line option to Spike which allows us to provide custom kernel parameters to Linux and Xvisor. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2020-05-18fix clang compile error wthin FDT parsingScott Beamer1-4/+4
2020-04-27fdt: add pmp granularity functionChih-Min Chao1-2/+21
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-04-27fdt: add pmp parsing helperChih-Min Chao1-0/+16
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-04-27fdt: add clint base address parsing helperChih-Min Chao1-0/+62
borrow from OpenSBI Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2020-03-24Allow PATH lookup for executing dtc (#432)綺麗な賢狼ホロ1-1/+1
2020-02-14Make spike capable of booting LinuxAnup Patel1-0/+10
Latest Linux does not boot Spike mainly because: 1. Spike does not set bootargs in DTS 2. Spike does not provide mechanism to load initrd for Linux This patch addresses both above issues and we can now get latest Linux to prompt on Spike. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2019-07-11Fix some 32-bit safety issuesAndrew Waterman1-1/+1
2018-12-19Flush I/O buffers before forkingAndrew Waterman1-0/+1
This prevents duplicate I/Os to buffered streams early in the program.
2018-05-18Extract out device-tree generation and compilation into an exported api. (#197)Prashanth Mundkur1-0/+156