[arch][riscv32] rename the qemu target sifive-e
The initial port is really a Sifive E platform. Call it what it is and make space for bringing up the Sifive U and virt qemu target.
This commit is contained in:
@@ -15,7 +15,7 @@ env:
|
|||||||
- PROJECT=nucleo-f072rb TOOLCHAIN=arm-eabi-7.3.0-Linux-x86_64
|
- PROJECT=nucleo-f072rb TOOLCHAIN=arm-eabi-7.3.0-Linux-x86_64
|
||||||
- PROJECT=qemu-microblaze-test TOOLCHAIN=microblaze-elf-7.3.0-Linux-x86_64
|
- PROJECT=qemu-microblaze-test TOOLCHAIN=microblaze-elf-7.3.0-Linux-x86_64
|
||||||
- PROJECT=qemu-mips-test TOOLCHAIN=mips-elf-7.3.0-Linux-x86_64
|
- PROJECT=qemu-mips-test TOOLCHAIN=mips-elf-7.3.0-Linux-x86_64
|
||||||
- PROJECT=qemu-riscv32-test TOOLCHAIN=riscv32-elf-7.3.0-Linux-x86_64
|
- PROJECT=sifive-e-test TOOLCHAIN=riscv32-elf-7.3.0-Linux-x86_64
|
||||||
- PROJECT=pc-x86-test TOOLCHAIN=i386-elf-7.3.0-Linux-x86_64
|
- PROJECT=pc-x86-test TOOLCHAIN=i386-elf-7.3.0-Linux-x86_64
|
||||||
- PROJECT=pc-x86-64-test TOOLCHAIN=x86_64-elf-7.3.0-Linux-x86_64
|
- PROJECT=pc-x86-64-test TOOLCHAIN=x86_64-elf-7.3.0-Linux-x86_64
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ env:
|
|||||||
- PROJECT=pc-x86-64-test TOOLCHAIN=x86_64-elf-7.3.0-Linux-x86_64 DEBUG=0
|
- PROJECT=pc-x86-64-test TOOLCHAIN=x86_64-elf-7.3.0-Linux-x86_64 DEBUG=0
|
||||||
- PROJECT=qemu-microblaze-test TOOLCHAIN=microblaze-elf-7.3.0-Linux-x86_64 DEBUG=0
|
- PROJECT=qemu-microblaze-test TOOLCHAIN=microblaze-elf-7.3.0-Linux-x86_64 DEBUG=0
|
||||||
- PROJECT=qemu-mips-test TOOLCHAIN=mips-elf-7.3.0-Linux-x86_64 DEBUG=0
|
- PROJECT=qemu-mips-test TOOLCHAIN=mips-elf-7.3.0-Linux-x86_64 DEBUG=0
|
||||||
- PROJECT=qemu-riscv32-test TOOLCHAIN=riscv32-elf-7.3.0-Linux-x86_64 DEBUG=0
|
- PROJECT=sifive-e-test TOOLCHAIN=riscv32-elf-7.3.0-Linux-x86_64 DEBUG=0
|
||||||
|
|
||||||
# run in a container
|
# run in a container
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|||||||
@@ -80,40 +80,9 @@ FUNCTION(_start)
|
|||||||
# call main
|
# call main
|
||||||
jal lk_main
|
jal lk_main
|
||||||
|
|
||||||
|
# should never return here
|
||||||
j .
|
j .
|
||||||
|
|
||||||
#if 0
|
|
||||||
# set the default stack
|
|
||||||
addik r1, r0, default_stack_top
|
|
||||||
|
|
||||||
# set up small data pointers
|
|
||||||
addik r2, r0, _SDATA2_START__
|
|
||||||
addik r13, r0, _SDATA_START__
|
|
||||||
|
|
||||||
# set the processor mode to default
|
|
||||||
mts rmsr, r0
|
|
||||||
|
|
||||||
# zero out bss sections
|
|
||||||
addik r5, r0, __bss_start
|
|
||||||
addik r6, r0, 0
|
|
||||||
rsubik r7, r5, __bss_end
|
|
||||||
brlid r15, memset
|
|
||||||
nop
|
|
||||||
|
|
||||||
# arguments to main
|
|
||||||
addik r5, r0, 1
|
|
||||||
addik r6, r0, 2
|
|
||||||
addik r7, r0, 3
|
|
||||||
brlid r15, lk_main
|
|
||||||
addik r8, r0, 4
|
|
||||||
|
|
||||||
# shouldn't be here
|
|
||||||
bri .
|
|
||||||
|
|
||||||
FUNCTION(unhandled_exception)
|
|
||||||
bri .
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
.align 4
|
.align 4
|
||||||
LOCAL_DATA(default_stack)
|
LOCAL_DATA(default_stack)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ MODULE := $(LOCAL_DIR)
|
|||||||
|
|
||||||
ARCH := riscv
|
ARCH := riscv
|
||||||
SUBARCH ?= 32
|
SUBARCH ?= 32
|
||||||
|
VARIANT ?= sifive_e
|
||||||
|
|
||||||
MODULE_DEPS += lib/cbuf
|
MODULE_DEPS += lib/cbuf
|
||||||
|
|
||||||
@@ -15,6 +16,9 @@ ROMBASE ?= 0x20400000 # if running from rom, start here
|
|||||||
MEMBASE ?= 0x80000000
|
MEMBASE ?= 0x80000000
|
||||||
MEMSIZE ?= 0x00100000 # default to 1MB
|
MEMSIZE ?= 0x00100000 # default to 1MB
|
||||||
|
|
||||||
|
# sifive_e or _u?
|
||||||
|
GLOBAL_DEFINES += PLATFORM_${VARIANT}=1
|
||||||
|
|
||||||
# set some global defines based on capability
|
# set some global defines based on capability
|
||||||
GLOBAL_DEFINES += PLATFORM_HAS_DYNAMIC_TIMER=1
|
GLOBAL_DEFINES += PLATFORM_HAS_DYNAMIC_TIMER=1
|
||||||
GLOBAL_DEFINES += ARCH_RISCV_CLINT_BASE=0x02000000
|
GLOBAL_DEFINES += ARCH_RISCV_CLINT_BASE=0x02000000
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
include project/target/qemu-riscv32.mk
|
|
||||||
include project/virtual/test.mk
|
|
||||||
2
project/sifive-e-test.mk
Normal file
2
project/sifive-e-test.mk
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
include project/target/sifive-e.mk
|
||||||
|
include project/virtual/test.mk
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
TARGET := qemu-riscv
|
|
||||||
SUBARCH := 32
|
|
||||||
|
|
||||||
3
project/target/sifive-e.mk
Normal file
3
project/target/sifive-e.mk
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
TARGET := sifive-e
|
||||||
|
SUBARCH := 32
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
make qemu-riscv32-test -j4 &&
|
make sifive-e-test -j4 &&
|
||||||
qemu-system-riscv32 -machine sifive_e -kernel build-qemu-riscv32-test/lk.elf -nographic $@
|
qemu-system-riscv32 -machine sifive_e -kernel build-sifive-e-test/lk.elf -nographic $@
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2015 Travis Geiselbrecht
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
* a copy of this software and associated documentation files
|
|
||||||
* (the "Software"), to deal in the Software without restriction,
|
|
||||||
* including without limitation the rights to use, copy, modify, merge,
|
|
||||||
* publish, distribute, sublicense, and/or sell copies of the Software,
|
|
||||||
* and to permit persons to whom the Software is furnished to do so,
|
|
||||||
* subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be
|
|
||||||
* included in all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#define DEBUG_UART 0
|
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2015 Travis Geiselbrecht
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
* a copy of this software and associated documentation files
|
|
||||||
* (the "Software"), to deal in the Software without restriction,
|
|
||||||
* including without limitation the rights to use, copy, modify, merge,
|
|
||||||
* publish, distribute, sublicense, and/or sell copies of the Software,
|
|
||||||
* and to permit persons to whom the Software is furnished to do so,
|
|
||||||
* subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be
|
|
||||||
* included in all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#define TIMER_RATE (62*1000000)
|
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@ LOCAL_DIR := $(GET_LOCAL_DIR)
|
|||||||
GLOBAL_INCLUDES += $(LOCAL_DIR)/include
|
GLOBAL_INCLUDES += $(LOCAL_DIR)/include
|
||||||
|
|
||||||
PLATFORM := sifive
|
PLATFORM := sifive
|
||||||
SUBARCH ?= 32
|
VARIANT := sifive_e
|
||||||
|
|
||||||
MEMSIZE ?= 0x4000 # 16KB
|
MEMSIZE ?= 0x4000 # 16KB
|
||||||
|
|
||||||
Reference in New Issue
Block a user