Files
lk/target/sifive-unleashed/include/platform/sifive.h
Elliot Berman acfe991c7f [arch][riscv] Expose RISC-V mp kernel start
Support mp lk start on RISC-V. Several changes throughout were required:
- Add signal in asm start to force secondary harts to wait for bss to be
  cleared.
- Use mhartid in arch_curr_cpu_num, PLIC, and CLINT
- Use tp register as thread pointer instead of global variable.
- Support sending IPIs between harts using CLINT
- Add spinlock implementation
2020-01-16 23:06:28 -08:00

25 lines
597 B
C

/*
* 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 53
#define CLINT_BASE 0x02000000
#define PLIC_BASE 0x0c000000
#define PRCI_BASE 0x10000000
#define UART0_BASE 0x10010000
#define UART1_BASE 0x10011000
#define PWM0_BASE 0x10020000
#define PWM1_BASE 0x10021000
#define GPIO_BASE 0x10060000
#define PLIC_HART_IDX(hart) ((hart) ? ((2 * (hart)) - 1) : 0)