9os

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 50ccbf08218f54596f63da520cb7b7a5394bf4d2
parent 6b03f25de75f1bf33737529975ba0af447051f1a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun,  9 Aug 2020 08:53:20 +0200

build: Remove unused target directory

This directory is not used anymore and it had duplicated
code from the kernel directory.

Change-Id: I418a156a3ee933f35742b6538d9990599593de05

Diffstat:
MMakefile | 6++----
Mscripts/rules.mk | 2+-
Dtarget/Makefile | 11-----------
Dtarget/hosted/.gitignore | 2--
Dtarget/hosted/9os | 12------------
Dtarget/hosted/Makefile | 27---------------------------
Dtarget/hosted/arch.c | 73-------------------------------------------------------------------------
Dtarget/hosted/hosted.h | 3---
Dtarget/hosted/kernel.c | 93-------------------------------------------------------------------------------
Dtarget/hosted/lock.c | 1-
Dtarget/lock.c | 32--------------------------------
Dtarget/native/.gitignore | 5-----
Dtarget/native/9os | 11-----------
Dtarget/native/Makefile | 35-----------------------------------
Dtarget/native/arch.h | 11-----------
Dtarget/native/arch.s | 195-------------------------------------------------------------------------------
Dtarget/native/cache.c | 88-------------------------------------------------------------------------------
Dtarget/native/crt-kernel.s | 45---------------------------------------------
Dtarget/native/debug_lock.c | 1-
Dtarget/native/kernel.c | 160-------------------------------------------------------------------------------
Dtarget/native/lock.s | 26--------------------------
Dtarget/native/mksysreg | 42------------------------------------------
Dtarget/native/mkver | 9---------
Dtarget/native/sysreg.lst | 8--------
24 files changed, 3 insertions(+), 895 deletions(-)

diff --git a/Makefile b/Makefile @@ -2,11 +2,9 @@ PROJECTDIR = . include scripts/rules.mk -DIRS = src target +DIRS = src -all: target - -target: src +all: src src: lib bin diff --git a/scripts/rules.mk b/scripts/rules.mk @@ -6,7 +6,7 @@ include $(PROJECTDIR)/config/toolchain/$(TOOL).mk INCDIR = $(PROJECTDIR)/include LIBDIR = $(PROJECTDIR)/lib BINDIR = $(PROJECTDIR)/bin -TARGETDIR = $(PROJECTDIR)/target/$(MODE) +TARGETDIR = $(PROJECTDIR)/src/kernel/arch/$(MODE) DRVDIR = $(PROJECTDIR)/drivers FSDIR = $(PROJECTDIR)/fs SRCDIR = $(PROJECTDIR)/src diff --git a/target/Makefile b/target/Makefile @@ -1,11 +0,0 @@ -.POSIX: -PROJECTDIR=.. -include $(PROJECTDIR)/scripts/rules.mk - -DIRS=hosted native - -all: - +@cd $(MODE) && $(MAKE) - -clean: - $(FORALL) diff --git a/target/hosted/.gitignore b/target/hosted/.gitignore @@ -1,2 +0,0 @@ -romtab.c -ramtab.c diff --git a/target/hosted/9os b/target/hosted/9os @@ -1,12 +0,0 @@ -dev - root - uart - dummyuart base=0x1c0c0000,clk=24000000,cfg=b115200 l8 #t0 - dummyuart base=0x1c0c0100,clk=24000000 #t1 - cons - blk - dummyblk - ar -blob - bios 0x100,0x400 -end diff --git a/target/hosted/Makefile b/target/hosted/Makefile @@ -1,27 +0,0 @@ -.POSIX: -PROJECTDIR = ../.. -include $(PROJECTDIR)/scripts/rules.mk - -CRT = $(LIBDIR)/crt.o - -ROMOBJS = arch.o \ - lock.o \ - kernel.o \ - $(CRT) \ - $(SRCDIR)/kernel/builtin.o \ - -TARGET = $(BINDIR)/kernel.elf - -all: $(TARGET) $(BINDIR)/blkfile - -$(DIRS): FORCE - cd $@ && $(MAKE) - -$(BINDIR)/kernel.elf: $(ROMOBJS) $(LIBDEP) - $(LD) $(PROJ_LDFLAGS) $(ROMOBJS) $(PROJ_LDLIBS) -o $@ - -$(BINDIR)/blkfile: - dd bs=512 count=2 if=/dev/zero of=$(BINDIR)/blkfile - -clean: - rm -f $(BINDIR)/blkfile diff --git a/target/hosted/arch.c b/target/hosted/arch.c @@ -1,73 +0,0 @@ -#include <setjmp.h> -#include <stdio.h> -#include <stdlib.h> - -#include <9os/9os.h> - -#include "hosted.h" - -jmp_buf recover; - -noreturn void abort(void); -noreturn void longjmp(jmp_buf env, int val); -struct trapframe *(*getframe)(void); -int halted; - -void -dohalt(void) -{ - halted = 1; - abort(); -} - -void -doswtch(struct trapframe *fp) -{ - longjmp(recover, 1); -} - -void -dopanic(void) -{ - struct trapframe *fp; - - fp = (getframe) ? (*getframe)() : NULL; - trap(fp); - abort(); -} - -uint8_t -inm8(void *addr) -{ - return 0; -} - -uint16_t -inm16(void *addr) -{ - return 0; -} - -uint32_t -inm32(void *addr) -{ - return 0; -} - -uint8_t -outm8(uint8_t val, void *addr) -{ - return 0; -} - -uint16_t -outm16(uint16_t val, void *addr) -{ - return 0; -} - -uint32_t -outm32(uint32_t val, void *addr) -{ - return 0; -} diff --git a/target/hosted/hosted.h b/target/hosted/hosted.h @@ -1,3 +0,0 @@ -extern jmp_buf recover; -extern int halted; -extern struct trapframe *(*getframe)(void); diff --git a/target/hosted/kernel.c b/target/hosted/kernel.c @@ -1,93 +0,0 @@ -#include <setjmp.h> -#include <stdlib.h> -#include <string.h> - -#include <libk.h> -#include <9os/9os.h> -#include <9os/kernel.h> - -#include "hosted.h" - -static struct trapframe *frame(void); - -struct trapframe trapframe, *framep; -struct trapframe *(*getframe)(void) = frame; - -static struct trapframe * -frame(void) -{ - return framep; -} - -void * -alloc(size_t size) -{ - static int lock; - void *p; - - if (size == 0) { - lock = 1; - return NULL; - } - - if (lock) - panic("alloc"); - - if ((p = malloc(size)) == NULL) - panic("alloc"); - return p; -} - -static void -imach(void) -{ - if (setjmp(recover)) - exit(EXIT_FAILURE); - framep = &trapframe; -} - -static void -namespace(void) -{ - int fd; - static char setin[] = "addin /dev/uart0/raw\n"; - static char setout[] = "addout /dev/uart0/raw\n"; - - /* Standard input set to 0 */ - if ((kin = open("#c/raw", O_READ)) < 0) - panic("open:#c/raw read"); - - /* Standard output set to 1 */ - if ((kout = open("#c/raw", O_WRITE)) < 0) - panic("open:#c/raw write"); - - /* Standard error set to 2 */ - if ((kerr = open("#c/raw", O_WRITE)) < 0) - panic("open:#c/raw write"); - - if (bind("#t0", "/dev/uart0") < 0) - panic("bind:/dev/uart0"); - if (bind("#c", "/dev/cons") < 0) - panic("bind:/dev/cons"); - if (bind("#b", "/dev/blk") < 0) - panic("bind:/dev/blk"); - - if ((fd = open("/dev/cons/ctl", O_WRITE)) < 0) - panic("open:/dev/cons/ctl write"); - if (write(fd, setin, sizeof(setin)) < 0) - panic("write:setin"); - if (write(fd, setout, sizeof(setout)) < 0) - panic("write:setout"); - if (close(fd) < 0) - panic("close:/dev/cons/ctl"); -} - -int -main(int argc, char *argv[]) -{ - imach(); - idev(); - namespace(); - - return debug(); -} diff --git a/target/hosted/lock.c b/target/hosted/lock.c @@ -1 +0,0 @@ -#include "../lock.c" diff --git a/target/lock.c b/target/lock.c @@ -1,32 +0,0 @@ -#include <9os/9os.h> - -void -lock(mutex_t *mutex) -{ - if (!mutex) - panic("lock segfault"); - if (*mutex) - panic("deadlock"); - *mutex = 1; -} - -void -unlock(mutex_t *mutex) -{ - if (!mutex) - panic("unlock segfault"); - if (!*mutex) - panic("unlock"); - *mutex = 0; -} - -int -trylock(mutex_t *mutex) -{ - if (!mutex) - panic("trylock segfault"); - if (*mutex) - return 0; - *mutex = 1; - return 1; -} diff --git a/target/native/.gitignore b/target/native/.gitignore @@ -1,5 +0,0 @@ -sysreg.h -sysreg.s -version.h -romtab.c -ramtab.c diff --git a/target/native/9os b/target/native/9os @@ -1,11 +0,0 @@ -dev - root - uart - pl011 base=0x1C090000,clk=24000000,rate=115200 - pl011 base=0x1c0c0000,clk=24000000,rate=115200 - cons - fip - blk -blob - fip.bin 0x8000000,0x80000 -end diff --git a/target/native/Makefile b/target/native/Makefile @@ -1,35 +0,0 @@ -.POSIX: -PROJECTDIR = ../.. -include $(PROJECTDIR)/scripts/rules.mk - -KERNELOBJS =\ - kernel-crt.o \ - kernel.o \ - arch.o \ - debug_lock.o \ - sysreg.o \ - $(SRCDIR)/romfw/builtin.o \ - cache.o \ - -TARGET = $(BINDIR)/kernel.bin - -all: $(TARGET) - -kernel.o.o: sysreg.h version.h -cache.o: sysreg.h - -sysreg.h: sysreg.lst - mksysreg -h sysreg.lst - -sysreg.s: sysreg.lst - mksysreg -s sysreg.lst - -version.h: - mkver - -$(BINDIR)/romfw.elf: $(ROMOBJS) $(LIBDEP) - $(LD) $(PROJ_LDFLAGS) $(LINKSCRIPT) $(ROMOBJS) $(PROJ_LDLIBS) -o $@ - -clean: - rm -f $(TARGET:.bin=.elf) - rm -f sysreg.h sysreg.s version.h diff --git a/target/native/arch.h b/target/native/arch.h @@ -1,11 +0,0 @@ -enum barrier_type { - ISB, - DSB_SY, -}; - -extern void wsysreg(enum sysreg, unsigned long long v); -extern unsigned long long rsysreg(enum sysreg); -extern void barrier(enum barrier_type type); -extern void invdcachesetway(void *addr); -extern void invdcache(void); -extern void invicache(void); diff --git a/target/native/arch.s b/target/native/arch.s @@ -1,195 +0,0 @@ - .file "arch.s" - - .text - .globl panic,dohalt,intr,dopanic - .globl barrier,vectbl,doswtch,inm8,inm16,inm32 - .globl outm8,outm16,outm32 - .globl invdcachesetway,invicache,vectbl,doswtch - .globl inm8,inm16,inm32,outm8,outm16,outm32 - -intr: - cmp x0,#0 - b.ne 1f - msr daifset,#15 - ret -1: - msr daifclr,#15 - ret - -barrier: - adr x1, 1f - lsl x0, x0, #3 - add x1, x1, x0 - br x1 - -1: - isb - ret - dsb sy - ret - -invdcachesetway: - dc isw,x0 - ret - -invicache: - ic iallu - ret - -badinst: - adr x0,badimsg - b panic - - .section .rodata -badimsg: - .asciz "invalid instruction" - - .text -inm8: - ldrb w0,[x0] - ret - -inm16: - ldrh w0,[x0] - ret - -inm32: - ldr w0,[x0] - ret - -outm8: - strb w0,[x1] - ret - -outm16: - strh w0,[x1] - ret - -outm32: - str w0,[x1] - ret - -dohalt: - msr daifset,#15 - wfe - b dohalt - -dopanic: -exception: - msr spsel,#1 - stp x0,x1,[sp,#-16*(19-0)] - stp x2,x3,[sp,#-16*(19-1)] - stp x4,x5,[sp,#-16*(19-2)] - stp x6,x7,[sp,#-16*(19-3)] - stp x8,x9,[sp,#-16*(19-4)] - stp x10,x11,[sp,#-16*(19-5)] - stp x12,x13,[sp,#-16*(19-6)] - stp x14,x15,[sp,#-16*(19-7)] - stp x16,x17,[sp,#-16*(19-8)] - stp x18,x19,[sp,#-16*(19-9)] - stp x20,x21,[sp,#-16*(19-10)] - stp x22,x23,[sp,#-16*(19-11)] - stp x24,x25,[sp,#-16*(19-12)] - stp x26,x27,[sp,#-16*(19-13)] - stp x28,x29,[sp,#-16*(19-14)] - - mrs x9,ELR_EL3 - stp x9,x30,[sp,#-16*(19-15)] - - mrs x9,SPSR_EL3 - mrs x10,ESR_EL3 - stp x9,x10,[sp,#-16*(19-16)] - - mov x9,sp - mrs x10,FAR_EL3 - stp x9,x10,[sp,#-16*(19-17)] - - mrs x9,scr_el3 - mov x10,#0 /* unused */ - stp x9,x10,[sp,#-16*(19-18)] - - sub sp,sp,#16*19 - mov x0,sp - mov x29,#0 - bl trap - adr x0,outsync - b panic - - .section .rodata -outsync: - .asciz "out of sync" - - .text -doswtch: - ldp x9,x10,[x0,#16*18] - msr SCR_EL3,x9 - - ldp x9,x10,[x0,#16*17] - msr FAR_EL3,x10 - mov sp,x9 - - ldp x9,x10,[x0,#16*16] - msr ESR_EL3,x10 - msr SPSR_EL3,x9 - - ldp x9,x30,[x0,#16*15] - msr ELR_EL3,x9 - - ldp x28,x29,[x0,#16*14] - ldp x26,x27,[x0,#16*13] - ldp x24,x25,[x0,#16*12] - ldp x22,x23,[x0,#16*11] - ldp x20,x21,[x0,#16*10] - ldp x18,x19,[x0,#16*9] - ldp x16,x17,[x0,#16*8] - ldp x14,x15,[x0,#16*7] - ldp x12,x13,[x0,#16*6] - ldp x10,x11,[x0,#16*5] - ldp x8,x9,[x0,#16*4] - ldp x6,x7,[x0,#16*3] - ldp x4,x5,[x0,#16*2] - ldp x2,x3,[x0,#16*1] - ldp x0,x1,[x0,#16*0] - - eret - - .align 11 -vectbl: - /* Current EL with SP0 */ - b exception /* Sync */ - .align 7 - b exception /* IRQ/vIRQ */ - .align 7 - b exception /* FIQ/vFIQ */ - .align 7 - b exception /* SError/VSError */ - - /* Current EL with SPx */ - .align 7 - b exception /* Sync */ - .align 7 - b exception /* IRQ/vIRQ */ - .align 7 - b exception /* FIQ/vFIQ */ - .align 7 - b exception /* SError/VSError */ - - /* Lower EL using AArch64 */ - .align 7 - b exception /* Sync */ - .align 7 - b exception /* IRQ/vIRQ */ - .align 7 - b exception /* FIQ/vFIQ */ - .align 7 - b exception /* SError/VSError */ - - /* Lower EL using AArch32 */ - .align 7 - b exception /* Sync */ - .align 7 - b exception /* IRQ/vIRQ */ - .align 7 - b exception /* FIQ/vFIQ */ - .align 7 - b exception /* SError/VSError */ diff --git a/target/native/cache.c b/target/native/cache.c @@ -1,88 +0,0 @@ -#include <9os/9os.h> - -#include "sysreg.h" -#include "arch.h" - -#define NR_LEVELS 7 - -/* clidr_el1 */ -#define LOC_SHIFT 24 -#define LOC_MASK 0x7 /* level of coherence */ -#define CTYPE_MASK 0x7 /* cache type */ - -/* ccsidr_el1 */ -#define NSETS_SHIFT 13 -#define NSETS_MASK 0x7fff /* (number of sets in cache) - 1 */ -#define NWAYS_SHIFT 3 -#define NWAYS_MASK 0x3ff /* (associativty of cache) - 1 */ -#define LINE_MASK 0x7 /* log2(cache line in bytes) - 4 */ - -/* csselr_el1 */ -#define LEVEL_SHIFT 1 /* cache level required */ - -static unsigned -log2(unsigned long long v, unsigned width) -{ - unsigned nbits, i = width; - - for (nbits = 0; i-- > 0; nbits++) { - if ((v & (1ull << i)) != 0) - break; - } - return width - nbits - 1; -} - -static void -invdcachelvl(unsigned l) -{ - unsigned long long ccsidr; - unsigned nsets, nways, size, shift, i, j; - - wsysreg(CSSELR_EL1, l << LEVEL_SHIFT); - barrier(ISB); - - ccsidr = rsysreg(CCSIDR_EL1); - nsets = ((ccsidr >> NSETS_SHIFT) & NSETS_MASK) + 1; - nways = ((ccsidr >> NWAYS_SHIFT) & NWAYS_MASK) + 1; - size = (ccsidr & LINE_MASK) + 4; - shift = 32 - log2(nways, 32); - - for (i = 0; i < nways; i++) { - for (j = 0; j < nsets; j++) { - uintptr_t addr; - - addr = (uintptr_t)i << shift | j << size | l << 1; - invdcachesetway((void *)addr); - } - } - barrier(DSB_SY); -} - -void -invdcache(void) -{ - unsigned long long clidr; - unsigned l; - enum cachetype { - NOCACHE, - ICACHE, - DCACHE, - HARVARD, - UNIFIED - } type; - - barrier(DSB_SY); - - clidr = rsysreg(CLIDR_EL1); - if (((clidr >> LOC_SHIFT) & LOC_MASK) == 0) - return; - - for (l = 0; l < NR_LEVELS; l++) { - type = clidr & CTYPE_MASK; - if (type == NOCACHE || type == ICACHE) - continue; - - invdcachelvl(l); - clidr >>= 3; - } -} diff --git a/target/native/crt-kernel.s b/target/native/crt-kernel.s @@ -1,45 +0,0 @@ - - .file "crt.s" - .text - .globl _start - -_start: - adr x0,vectbl - msr VBAR_EL3,x0 - isb - - /* Differentiate between cold and warm boot (FVP only) */ - mrs x2, mpidr_el1 - ldr x1,=0x1c100000 - str w2, [x1, 0x10] - ldr w2, [x1, 0x10] - ubfx w2, w2, 24, 2 - cmp w2, 2 - beq warm - cmp w2, 3 - beq warm - - ldr x0,=end /* Setup an initial stack */ - mov x1,#0x100f /* 1 page + 15 */ - add x0,x0,x1 - bic x0,x0,#0xf /* Align to 16 bytes */ - mov sp,x0 - - ldr x0,=edata /* BSS clean */ - mov x1,#0 - ldr x2,=end - sub x2,x2,x0 - bl memset - - bl main - adr x0,outsync - b panic - -warm: - /* Hardcoded address of BL2 at EL3 */ - ldr x0,=0x4022000 - br x0 - - .section .rodata -outsync: - .asciz "out of sync" diff --git a/target/native/debug_lock.c b/target/native/debug_lock.c @@ -1 +0,0 @@ -#include "../lock.c" diff --git a/target/native/kernel.c b/target/native/kernel.c @@ -1,160 +0,0 @@ -#include <errno.h> -#include <stdlib.h> -#include <string.h> - -#include <libk.h> -#include <limits.h> -#include <9os/9os.h> -#include <9os/kernel.h> - -#include "version.h" -#include "sysreg.h" -#include "arch.h" - -#define ENVSIZ 512 -#define STACKSIZ 1792 -#define HEAPSIZ 1792 - -/* TODO: Move these constants to a autogenerated file */ -#define BL2BASE ((void *) 0x4022000) -#define BL33BASE ((void *) 0x88000000) -#define DTBBASE ((void *) 0x82000000) - - -typedef struct mach Mach; - -char **_environ; -struct trapframe trapframe, *framep; - -struct mach { - void *sp; - size_t stacksiz; - void *env; - size_t envsiz; -}; - -void * -alloc(size_t size) -{ - static char heap[HEAPSIZ]; - static char *base = heap; - static int lock; - char *bp; - - if (size == 0) { - lock = 1; - return NULL; - } - - if (lock) - panic("alloc"); - - bp = base; - if (&bp[size] > &heap[HEAPSIZ]) - return NULL; - base += size; - return bp; -} - -static void -imach(Mach *mp, void *stackp) -{ - framep = &trapframe; - memset(framep, 0, sizeof(*framep)); - - mp->sp = stackp; - mp->stacksiz = STACKSIZ; - mp->env = stackp + ENVSIZ; - mp->envsiz = ENVSIZ; - - _environ = mp->env; - - framep->r[SP] = (unsigned long long)mp->sp; - framep->r[ELR] = 0x4022000; - framep->r[SPSR] = 0xf << 6 | 0xd; - - rmctab = &romtab; - - invicache(); - invdcache(); -} - -static void -info(Mach *mp) -{ - dbg(kout, - "romfw: version %s\n" - "env = %p, envsiz = 0x%zx\n" - "sp = %p, stacksiz = 0x%zx\n", - RCODEVERSION, - mp->env, mp->envsiz, - mp->sp, mp->stacksiz); -} - -static void -namespace(void) -{ - int fd; - static char setin[] = "addin /dev/uart0/raw\n"; - static char setout[] = "addout /dev/uart0/raw\n"; - - /* Standard input set to 0 */ - if ((kin = open("#c/raw", O_READ)) < 0) - panic("open:#c/raw read"); - - /* Standard output set to 1 */ - if ((kout = open("#c/raw", O_WRITE)) < 0) - panic("open:#c/raw write"); - - /* Standard error set to 2 */ - if ((kerr = open("#c/raw", O_WRITE)) < 0) - panic("open:#c/raw write"); - - if (bind("#c", "/dev/cons") < 0) { - panic("bind:/dev/cons"); - if (bind("#t0", "/dev/uart0") < 0) { - panic("bind:/dev/uart0"); - if (bind("#t1", "/dev/uart3") < 0) { - panic("bind:/dev/uart3"); - - if ((fd = open("/dev/cons/ctl", O_WRITE)) < 0) { - panic("open:/dev/cons/ctl write"); - if (write(fd, setin, sizeof(setin)) < 0) { - panic("write:setin"); - if (write(fd, setout, sizeof(setout)) < 0) { - panic("write:setout"); - if (close(fd) < 0) { - panic("close:/dev/cons/ctl"); - - if (mount("#F", "/fip", "/blobs/fip.bin") < 0) { - panic("mount:/fip"); - - return; -} - -void -loadfip(void) -{ - if (loadimg("/fip/bl2.bin", BL2BASE, NULL) < 0) - panic("bl2 missing"); - if (loadimg("/fip/bl33.bin", BL33BASE, NULL) < 0) - panic("bl33 missing"); - if (loadimg("/fip/hw.cfg", DTBBASE, NULL) < 0) - panic("dtb missing"); -} - -void -main(void *stackp) -{ - Mach mach; - - imach(&mach, stackp); - idev(); - intr(IENABLE); - barrier(ISB); - namespace(); - info(&mach); - debug(); - loadfip(); - swtch(framep); -} diff --git a/target/native/lock.s b/target/native/lock.s @@ -1,26 +0,0 @@ -.globl lock,unlock,trylock - -/* - * Those functions are currently not used for two reasons: - * 1- We don't have caches and mmu enabled - * 2- We are executing only one execution thread. - */ - -lock: - mov w2,#1 - sevl -1: - wfe - mov w1,wzr - casa w1,w2,[x0] - cbnz w1,1b - ret - -unlock: - stlr wzr,[x0] - sev - ret - -trylock: // TODO: implement trylock - mov w0,#1 - ret diff --git a/target/native/mksysreg b/target/native/mksysreg @@ -1,42 +0,0 @@ -#/bin/sh - -set -e -trap 'r=$?;rm -f $$.tmp;exit $r' EXIT HUP INT QUIT TERM - -for i -do - case $i in - -h) - shift - awk 'BEGIN {print "enum sysreg {"} - NF == 2 {printf "\t%s,\n", $1} - END {print "};"}' $@ > $$.tmp && - mv $$.tmp sysreg.h - ;; - -s) - shift - cat <<EOF > $$.tmp && mv $$.tmp sysreg.s - .file "sysreg.s" - - .text - .globl rsysreg,wsysreg -rsysreg: - adr x1,1f - lsl x0,x0,#3 - add x1,x1,x0 - br x1 -1: -$(awk 'NF == 2 {printf "\tmrs\tx0,%s\n\tret\n\n", $2}' $@) - - -wsysreg: - adr x2,1f - lsl x0,x0,#3 - add x2,x2,x0 - br x2 -1: -$(awk 'NF == 2 {printf "\tmsr\t%s,x1\n\tret\n\n", $2}' $@) -EOF - ;; - esac -done diff --git a/target/native/mkver b/target/native/mkver @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e -trap 'r=$?;rm -f $$.tmp;exit $r' EXIT HUP INT QUIT TERM - -git show-ref HEAD | -awk '{printf("#define RCODEVERSION \"%s\"\n", - substr($1, 1, 8)) -}' > $$.tmp && mv $$.tmp version.h diff --git a/target/native/sysreg.lst b/target/native/sysreg.lst @@ -1,8 +0,0 @@ -ACTLR_EL3 S3_6_C1_C0_1 -SCTLR_EL3 S3_6_C1_C0_0 -RVBAR_EL3 S3_6_C12_C0_1 -VBAR_EL3 S3_6_C12_C0_0 -TPIDR_EL3 S3_6_C13_C0_2 -CLIDR_EL1 S3_1_C0_C0_1 -CCSIDR_EL1 S3_1_C0_C0_0 -CSSELR_EL1 S3_2_C0_C0_0