Skip to content

Commit f82a87c

Browse files
committed
Merge branch 'master' of https://github.com/cahirwpz/mimiker into vcache
2 parents 6663116 + 0b5cc9c commit f82a87c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1061
-183
lines changed

.ackrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
--ignore-dir=toolchain/mipsel-mimiker-elf
1+
--ignore-dir=toolchain/gnu/aarch64-mimiker-elf
2+
--ignore-dir=toolchain/gnu/mipsel-mimiker-elf
3+
--ignore-dir=toolchain/gnu/riscv32-mimiker-elf
24
--ignore-dir=toolchain/qemu-mimiker
3-
--ignore-dir=lib/newlib
45
--ignore-dir=sysroot
56
--asm
67
--cc

bin/utest/mmap.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212
#include <unistd.h>
1313
#include <stdlib.h>
1414

15-
#ifdef __mips__
15+
#if __SIZEOF_POINTER__ == 4
1616
#define BAD_ADDR_SPAN 0x7fff0000
1717
#define BAD_ADDR_SPAN_LEN 0x20000
18-
#endif
19-
20-
#ifdef __aarch64__
18+
#else
2119
#define BAD_ADDR_SPAN 0x00007fffffff0000L
2220
#define BAD_ADDR_SPAN_LEN 0xfffe800000002000
2321
#endif

bin/utest/sbrk.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
#include <unistd.h>
66
#include <assert.h>
77

8-
#ifdef __mips__
8+
#if __SIZEOF_POINTER__ == 4
99
#define TOO_MUCH 0x80000000
10-
#endif
11-
12-
#ifdef __aarch64__
10+
#else
1311
#define TOO_MUCH 0x4000000000000000L
1412
#endif
1513

build/arch.riscv.mk

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# vim: tabstop=8 shiftwidth=8 noexpandtab:
2+
#
3+
# Common makefile which specifies RISC-V architecture specific settings.
4+
#
5+
# Explanation of specified options can be found here:
6+
# https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html#RISC-V-Options
7+
#
8+
# Required common variables: KERNEL, BOARD.
9+
#
10+
11+
TARGET := riscv32-mimiker-elf
12+
GCC_ABIFLAGS :=
13+
CLANG_ABIFLAGS := -target riscv32-elf
14+
ELFTYPE := elf32-littleriscv
15+
ELFARCH := riscv
16+
17+
ifeq ($(BOARD), litex-riscv)
18+
KERNEL_PHYS := 0x40000000
19+
KERNEL-IMAGES := mimiker.img
20+
CPPFLAGS += -DFPU=1
21+
endif
22+
23+
ifeq ($(KERNEL), 1)
24+
CFLAGS += -mcmodel=medany
25+
CPPFLAGS += -DKERNEL_PHYS=$(KERNEL_PHYS)
26+
CPPLDSCRIPT := 1
27+
endif

config.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
# build system for given platform.
55
#
66

7-
CONFIG_OPTS := KASAN LOCKDEP KGPROF MIPS AARCH64 KCSAN
7+
CONFIG_OPTS := KASAN LOCKDEP KGPROF MIPS AARCH64 RISCV KCSAN
88

99
BOARD ?= malta
1010

1111
MIPS ?= 0
1212
AARCH64 ?= 0
13+
RISCV ?= 0
1314

1415
ifeq ($(BOARD), malta)
1516
ARCH := mips
@@ -21,6 +22,11 @@ ARCH := aarch64
2122
AARCH64 := 1
2223
endif
2324

25+
ifeq ($(BOARD), litex-riscv)
26+
ARCH := riscv
27+
RISCV := 1
28+
endif
29+
2430
VERBOSE ?= 0
2531
CLANG ?= 0
2632
LOCKDEP ?= 0

include/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TOPDIR = $(realpath ..)
55
HEADERS = $(wildcard *.h) $(foreach dir, machine sys, $(wildcard $(dir)/*.h))
66
INSTALL-FILES = $(addprefix $(SYSROOT)/usr/include/, $(HEADERS))
77

8-
SOURCES_H = $(foreach dir, . dev aarch64 mips sys, $(wildcard $(dir)/*.h))
8+
SOURCES_H = $(foreach dir, . dev aarch64 mips riscv sys, $(wildcard $(dir)/*.h))
99
FORMAT-EXCLUDE = mips/m32c0.h sys/syscall.h sys/syscallargs.h
1010

1111
all: build

include/aarch64/asm.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
#ifndef _AARCH64_ASM_H_
3333
#define _AARCH64_ASM_H_
3434

35-
#include <aarch64/cdefs.h>
36-
3735
#define _C_LABEL(x) x
3836

3937
#define EXPORT(x) \

include/aarch64/cdefs.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

include/mips/asm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
#include <machine/abi.h>
6262
#include <machine/regdef.h>
6363
#include <sys/endian.h>
64-
#include <machine/cdefs.h>
6564

6665
#define _C_LABEL(x) x
6766

include/mips/cdefs.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)