This repository has been archived by the owner on Apr 13, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds the include files for the RISC-V port. These are mostly based on the score port, but there are a lot of arm64-based files as well. Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
- Loading branch information
1 parent
87a6021
commit daaea16
Showing
59 changed files
with
4,873 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
generic-y += bugs.h | ||
generic-y += cacheflush.h | ||
generic-y += checksum.h | ||
generic-y += clkdev.h | ||
generic-y += cputime.h | ||
generic-y += div64.h | ||
generic-y += dma.h | ||
generic-y += dma-contiguous.h | ||
generic-y += emergency-restart.h | ||
generic-y += errno.h | ||
generic-y += exec.h | ||
generic-y += fb.h | ||
generic-y += fcntl.h | ||
generic-y += ftrace.h | ||
generic-y += futex.h | ||
generic-y += hardirq.h | ||
generic-y += hash.h | ||
generic-y += hw_irq.h | ||
generic-y += ioctl.h | ||
generic-y += ioctls.h | ||
generic-y += ipcbuf.h | ||
generic-y += irq_regs.h | ||
generic-y += irq_work.h | ||
generic-y += kdebug.h | ||
generic-y += kmap_types.h | ||
generic-y += kvm_para.h | ||
generic-y += local.h | ||
generic-y += mm-arch-hooks.h | ||
generic-y += mman.h | ||
generic-y += module.h | ||
generic-y += msgbuf.h | ||
generic-y += mutex.h | ||
generic-y += param.h | ||
generic-y += percpu.h | ||
generic-y += poll.h | ||
generic-y += posix_types.h | ||
generic-y += preempt.h | ||
generic-y += resource.h | ||
generic-y += scatterlist.h | ||
generic-y += sections.h | ||
generic-y += sembuf.h | ||
generic-y += setup.h | ||
generic-y += shmbuf.h | ||
generic-y += shmparam.h | ||
generic-y += signal.h | ||
generic-y += socket.h | ||
generic-y += sockios.h | ||
generic-y += stat.h | ||
generic-y += statfs.h | ||
generic-y += swab.h | ||
generic-y += termbits.h | ||
generic-y += termios.h | ||
generic-y += topology.h | ||
generic-y += trace_clock.h | ||
generic-y += types.h | ||
generic-y += ucontext.h | ||
generic-y += unaligned.h | ||
generic-y += user.h | ||
generic-y += vga.h | ||
generic-y += vmlinux.lds.h | ||
generic-y += xor.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <generated/asm-offsets.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* Copyright (C) 2015 Regents of the University of California | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation, version 2. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
|
||
#ifndef _ASM_RISCV_ASM_H | ||
#define _ASM_RISCV_ASM_H | ||
|
||
#ifdef __ASSEMBLY__ | ||
#define __ASM_STR(x) x | ||
#else | ||
#define __ASM_STR(x) #x | ||
#endif | ||
|
||
#if __riscv_xlen == 64 | ||
#define __REG_SEL(a, b) __ASM_STR(a) | ||
#elif __riscv_xlen == 32 | ||
#define __REG_SEL(a, b) __ASM_STR(b) | ||
#else | ||
#error "Unexpected __riscv_xlen" | ||
#endif | ||
|
||
#define REG_L __REG_SEL(ld, lw) | ||
#define REG_S __REG_SEL(sd, sw) | ||
#define SZREG __REG_SEL(8, 4) | ||
#define LGREG __REG_SEL(3, 2) | ||
|
||
#if __SIZEOF_POINTER__ == 8 | ||
#ifdef __ASSEMBLY__ | ||
#define RISCV_PTR .dword | ||
#define RISCV_SZPTR 8 | ||
#define RISCV_LGPTR 3 | ||
#else | ||
#define RISCV_PTR ".dword" | ||
#define RISCV_SZPTR "8" | ||
#define RISCV_LGPTR "3" | ||
#endif | ||
#elif __SIZEOF_POINTER__ == 4 | ||
#ifdef __ASSEMBLY__ | ||
#define RISCV_PTR .word | ||
#define RISCV_SZPTR 4 | ||
#define RISCV_LGPTR 2 | ||
#else | ||
#define RISCV_PTR ".word" | ||
#define RISCV_SZPTR "4" | ||
#define RISCV_LGPTR "2" | ||
#endif | ||
#else | ||
#error "Unexpected __SIZEOF_POINTER__" | ||
#endif | ||
|
||
#if (__SIZEOF_INT__ == 4) | ||
#define INT __ASM_STR(.word) | ||
#define SZINT __ASM_STR(4) | ||
#define LGINT __ASM_STR(2) | ||
#else | ||
#error "Unexpected __SIZEOF_INT__" | ||
#endif | ||
|
||
#if (__SIZEOF_SHORT__ == 2) | ||
#define SHORT __ASM_STR(.half) | ||
#define SZSHORT __ASM_STR(2) | ||
#define LGSHORT __ASM_STR(1) | ||
#else | ||
#error "Unexpected __SIZEOF_SHORT__" | ||
#endif | ||
|
||
#endif /* _ASM_RISCV_ASM_H */ |
Oops, something went wrong.