[target][riscv] Add support for qemu-sifive-u virt machine

A copy/paste from sifive-unleashed but without PWM/LED.
This commit is contained in:
Elliot Berman
2019-09-16 15:50:17 -07:00
committed by Travis Geiselbrecht
parent acfe991c7f
commit e137d70ccd
5 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
/*
* Copyright (c) 2019 Elliot Berman
*
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*/
#pragma once
#define SIFIVE_IRQ_UART0 4
#define SIFIVE_IRQ_UART1 5
#define SIFIVE_NUM_IRQS 127
#define CLINT_BASE 0x02000000
#define PLIC_BASE 0x0c000000
#define UART0_BASE 0x10010000
#define UART1_BASE 0x10011000
#define PLIC_HART_IDX(hart) (2 * (hart))