-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5844622
commit 0156992
Showing
19 changed files
with
359 additions
and
13 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
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
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
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,32 @@ | ||
#include <am.h> | ||
#include <amdev.h> | ||
|
||
void __am_vga_init(); | ||
void __am_timer_init(); | ||
|
||
int _ioe_init() { | ||
__am_vga_init(); | ||
__am_timer_init(); | ||
return 0; | ||
} | ||
|
||
size_t __am_timer_read(uintptr_t reg, void *buf, size_t size); | ||
size_t __am_video_read(uintptr_t reg, void *buf, size_t size); | ||
size_t __am_video_write(uintptr_t reg, void *buf, size_t size); | ||
size_t __am_input_read(uintptr_t reg, void *buf, size_t size); | ||
|
||
size_t _io_read(uint32_t dev, uintptr_t reg, void *buf, size_t size) { | ||
switch (dev) { | ||
case _DEV_INPUT: return __am_input_read(reg, buf, size); | ||
case _DEV_TIMER: return __am_timer_read(reg, buf, size); | ||
case _DEV_VIDEO: return __am_video_read(reg, buf, size); | ||
} | ||
return 0; | ||
} | ||
|
||
size_t _io_write(uint32_t dev, uintptr_t reg, void *buf, size_t size) { | ||
switch (dev) { | ||
case _DEV_VIDEO: return __am_video_write(reg, buf, size); | ||
} | ||
return 0; | ||
} |
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 |
---|---|---|
@@ -1,13 +1,41 @@ | ||
#include <am.h> | ||
#include <stdio.h> | ||
|
||
_Area _heap = {}; | ||
/*_Area _heap = {};*/ | ||
|
||
void _trm_init() { | ||
} | ||
/*void _trm_init() {*/ | ||
/*}*/ | ||
|
||
/*void _putc(char ch) {*/ | ||
/*}*/ | ||
|
||
/*void _halt(int code) {*/ | ||
/*while (1);*/ | ||
/*}*/ | ||
extern char _heap_start; | ||
extern char _heap_end; | ||
int main(const char *args); | ||
|
||
_Area _heap = { | ||
.start = &_heap_start, | ||
.end = &_heap_end, | ||
}; | ||
|
||
void _putc(char ch) { | ||
putchar(ch); | ||
} | ||
|
||
void _halt(int code) { | ||
extern void _exit(int status); | ||
_exit(code); | ||
|
||
// should not reach here | ||
while (1); | ||
} | ||
|
||
void _trm_init() { | ||
extern const char _start; | ||
const char *mainargs = &_start - 0x100000; | ||
int ret = main(mainargs); | ||
_halt(ret); | ||
} |
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,5 @@ | ||
NAME = coremark-am | ||
APP = /home/qyzhang/Projects/ics-2019/nexus-am/apps/coremark/build/coremark-x86-navy | ||
OBJS = /home/qyzhang/Projects/ics-2019/nexus-am/apps/coremark/build/x86-navy//./src/core_list_join.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/coremark/build/x86-navy//./src/core_util.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/coremark/build/x86-navy//./src/core_matrix.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/coremark/build/x86-navy//./src/core_state.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/coremark/build/x86-navy//./src/core_portme.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/coremark/build/x86-navy//./src/core_main.o /home/qyzhang/Projects/ics-2019/nexus-am/am/build/am-x86-navy.a /home/qyzhang/Projects/ics-2019/nexus-am/libs/klib/build/klib-x86-navy.a | ||
LIBS += libndl | ||
include /home/qyzhang/Projects/ics-2019/navy-apps/Makefile.app |
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,5 @@ | ||
NAME = dhrystone-am | ||
APP = /home/qyzhang/Projects/ics-2019/nexus-am/apps/dhrystone/build/dhrystone-x86-navy | ||
OBJS = /home/qyzhang/Projects/ics-2019/nexus-am/apps/dhrystone/build/x86-navy//dry.o /home/qyzhang/Projects/ics-2019/nexus-am/am/build/am-x86-navy.a /home/qyzhang/Projects/ics-2019/nexus-am/libs/klib/build/klib-x86-navy.a | ||
LIBS += libndl | ||
include /home/qyzhang/Projects/ics-2019/navy-apps/Makefile.app |
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,5 @@ | ||
NAME = litenes-am | ||
APP = /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/litenes-x86-navy | ||
OBJS = /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/mmc.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/memory.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/f1.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/sky_destroyer.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/spartanx.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/kungfu.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/stargate.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/karateka.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/mario.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/pacman.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/bomberman.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/starforce.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/tetris.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/lunar_pool.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/exerion.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/pinball.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/roms/gen/balloon.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/ppu.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/cpu.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/psg.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/common.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/cpu-addressing.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/litenes/build/x86-navy//./src/fce.o /home/qyzhang/Projects/ics-2019/nexus-am/am/build/am-x86-navy.a /home/qyzhang/Projects/ics-2019/nexus-am/libs/klib/build/klib-x86-navy.a | ||
LIBS += libndl | ||
include /home/qyzhang/Projects/ics-2019/navy-apps/Makefile.app |
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,5 @@ | ||
NAME = microbench-am | ||
APP = /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/microbench-x86-navy | ||
OBJS = /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/sieve/sieve.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/queen/queen.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/bf/bf.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/ssort/ssort.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/dinic/dinic.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/lzip/lzip.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/lzip/quicklz.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/md5/md5.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/fib/fib.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/qsort/qsort.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/bench.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/microbench/build/x86-navy//./src/15pz/15pz.o /home/qyzhang/Projects/ics-2019/nexus-am/am/build/am-x86-navy.a /home/qyzhang/Projects/ics-2019/nexus-am/libs/klib/build/klib-x86-navy.a | ||
LIBS += libndl | ||
include /home/qyzhang/Projects/ics-2019/navy-apps/Makefile.app |
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,5 @@ | ||
NAME = slider-am | ||
APP = /home/qyzhang/Projects/ics-2019/nexus-am/apps/slider/build/slider-x86-navy | ||
OBJS = /home/qyzhang/Projects/ics-2019/nexus-am/apps/slider/build/x86-navy//main.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/slider/build/x86-navy//image.o /home/qyzhang/Projects/ics-2019/nexus-am/am/build/am-x86-navy.a /home/qyzhang/Projects/ics-2019/nexus-am/libs/klib/build/klib-x86-navy.a | ||
LIBS += libndl | ||
include /home/qyzhang/Projects/ics-2019/navy-apps/Makefile.app |
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,5 @@ | ||
NAME = typing-am | ||
APP = /home/qyzhang/Projects/ics-2019/nexus-am/apps/typing/build/typing-x86-navy | ||
OBJS = /home/qyzhang/Projects/ics-2019/nexus-am/apps/typing/build/x86-navy//game.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/typing/build/x86-navy//draw.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/typing/build/x86-navy//font.o /home/qyzhang/Projects/ics-2019/nexus-am/apps/typing/build/x86-navy//keyboard.o /home/qyzhang/Projects/ics-2019/nexus-am/am/build/am-x86-navy.a /home/qyzhang/Projects/ics-2019/nexus-am/libs/klib/build/klib-x86-navy.a | ||
LIBS += libndl | ||
include /home/qyzhang/Projects/ics-2019/navy-apps/Makefile.app |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
\chapter{开发环境} | ||
\section{硬件配置} | ||
|
||
\hustfigure{figure/neofetch.png}{\texttt{neofetch}命令输出}{fig:neofetch} | ||
|
||
\section{软件配置} | ||
\begin{luacode} | ||
env = require("sysenv") | ||
local cmds = {"gcc", "nvim", "ld", "python"} | ||
local cmds = {"gcc", "nvim", "python"} | ||
env.print_sysversion(cmds) | ||
\end{luacode} |
Oops, something went wrong.