Commit graph

10340 commits

Author SHA1 Message Date
Sean Cross
9a10f50ce1 kernel: services: keep track of current pid
Currently we use the ASID inside the MMU to figure out the current PID.
We should also keep track of what we think it is, for consistency.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 21:28:01 +08:00
Sean Cross
845cef3771 kernel: services: add servers to SYSTEM_SERVICES
This array will be used to keep track of what servers are running.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 16:58:15 +08:00
Sean Cross
4cd6a5d64d log: call create_server syscall
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 15:58:22 +08:00
Sean Cross
5a1bcf4c21 xous-rs: implement create_server syscall
The kernel doesn't have this wired up yet, but the syscall works.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 15:57:58 +08:00
Sean Cross
c8ccbe27c1 emulation: add initial files for lcd and keyboard
keyboard doesn't work yet, possibly due to upstream bug.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 15:44:44 +08:00
Sean Cross
672896a1a3 log: use claim_interrupt wrapper
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 15:42:11 +08:00
Sean Cross
9508201db9 xous-rs: add claim_interrupt wrapper
Rather than calling the raw function, add a wrapper for programs to use.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-14 15:41:44 +08:00
Sean Cross
7a3e038e6b syscall: add intial CreateServer call
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 22:41:25 +08:00
Sean Cross
c2008e5fe8 syscall: implement map_memory wrapper
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 20:33:08 +08:00
Sean Cross
5ce653882e log: add log example
Note: does not currently log

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 20:32:44 +08:00
Sean Cross
1ba52da9a3 shell: don't specify an address
Since we can now omit virtual addresses, use this feature when
allocating the UART.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 12:45:15 +08:00
Sean Cross
08e416c776 kernel: support omitting virtual address when mapping
This forms the basis for message passing.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 12:44:23 +08:00
Sean Cross
967464df93 kernel: mem: rename last memory address variable
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 09:52:53 +08:00
Sean Cross
fb3da7294c mem: turn function comment into rustdoc
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-13 08:32:44 +08:00
Sean Cross
4bb3f6db68 Merge branch 'master' of github.com:betrusted-io/xous-core 2020-03-13 08:30:55 +08:00
Sean Cross
f0d4e44254 kernel: processtable: add "last_default_address"
This will be used to accelerate allocations for ranges.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 17:02:03 +08:00
Sean Cross
87676c0fc5 mem: start implementing find_virtual_address()
Right now it just returns the address, which is exactly what we had
before.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 17:01:40 +08:00
Sean Cross
c1b575507d mem: better handling of memory alloc failures
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 16:51:14 +08:00
Sean Cross
36faa8354f riscv: mem: silence warnings when print-debug is disabled
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 16:50:55 +08:00
Sean Cross
5aa3358bc0 tools: generate byte addresses for mini elf files
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 15:29:26 +08:00
Sean Cross
1b83177b8a loader: implement byte-addressing for init elf files
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 15:29:10 +08:00
Sean Cross
8e515f2846 arguments: use byte-sized granularity for IniE
This is required, as ELF sections can start on byte boundaries.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 15:28:28 +08:00
Sean Cross
e1d97d88ca loader: use all 24 bits for IniE size
Because ELF files can operate at byte offsets, we must use the full
byte-addressible address for sections.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 15:04:07 +08:00
Sean Cross
829570713f README: update info on running renode
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-12 13:33:37 +08:00
Sean Cross
09890a2ca3 riscv: use upstream riscv module
Still pulling from git, as the version number hasn't been bumped yet.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-11 17:49:03 +08:00
Sean Cross
17dd2dcd6f shell: increase dummy allocations
In order to test dummy allocations, increase these sizes.

Note that this also causes an error in release mode.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 17:32:01 +08:00
Sean Cross
45656b36cd loader: correct comment on init section
This assert is getting triggered due to a bug.  The error message is
missing a closing ")".

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 17:31:30 +08:00
Sean Cross
62cb867ad5 emulation: litex_timer_32: remove dead code
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 17:30:58 +08:00
Sean Cross
c09b140306 examples: shell: use 32-bit timer csr
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 16:41:48 +08:00
Sean Cross
8b57b8c36b emulation: add 32-bit litex timer
Litex uses 32-bit CSRs, so add a version of the litex timer module that
uses 32-bit CSRs.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 16:41:07 +08:00
Sean Cross
fdb17116f6 README: fix quickstart
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 14:45:18 +08:00
Sean Cross
5708bcb89a emulation: fix paths for boot.resc
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 14:44:12 +08:00
Sean Cross
4645816674 tools: elf: add comment and dead code for alignment fixing
This issue was spotted when the kernel address was wrong.  This fixed
the test, but was indicative of something else being wrong.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 14:43:15 +08:00
Sean Cross
edf723e107 create-image: verify the kernel image address is sane
Rust inconsistently applies linker scripts.  Verify the image being
added has a script that makes sense.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 14:42:01 +08:00
Sean Cross
36dbc97a61 tools: pad inie and xkrn tags to 4-bytes
This fixes an issue where images were not word-aligned.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 13:12:27 +08:00
Sean Cross
279e0131c8 csr.csv: add emulation file
This is used to define the emulation target.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:50:14 +08:00
Sean Cross
a1fee3dedf cargo: add shell and rename tools
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:46:33 +08:00
Sean Cross
6959b4ef77 tools: rename from xous-tools
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:46:20 +08:00
Sean Cross
b9effd701b shell: add example shell
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:46:05 +08:00
Sean Cross
f50ec67553 initial commit
This pulls together many disparate repositories into one xous-core
repository.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:13:05 +08:00