Sean Cross
6d7660b76a
loader: debug: fix minor clippy warning
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-06 11:55:56 +08:00
Sean Cross
f7f7ac2ee0
loader: add small comment
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 12:50:20 +08:00
Sean Cross
c5445da5d2
loader: only pre-allocate the first stack page
...
For each program, only allocate the first stack page. This will ensure
we don't use too much stack.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 12:48:14 +08:00
bunnie
4c777976ac
clear RAM on a cold boot
...
since the RAM is battery backed and persistent, it's probably
a good idea just to zero-ize it before using it on a cold boot.
2021-07-22 03:03:27 +08:00
Sean Cross
7c0e6ba81d
loader: print an error on invalid public key
...
Instead of silently panicking, print an error to the screen and /then/
panic.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-13 20:07:11 +08:00
bunnie
a4f8346c34
reflect the latest fixes to the secure boot process
...
also patch up some issues with sha512 reset and loose
ends on docs and updates
2021-07-13 00:46:31 +08:00
bunnie
5d62af49a5
simple signature checks in the bootloader now
...
checks xous.img as a single blob before accepting it.
2021-07-12 17:16:22 +08:00
bunnie
2b19f31da9
set the stage for simple signature validation on the kernel
2021-07-12 02:26:50 +08:00
bunnie
8007eabd54
Merge branch 'main' of github.com:betrusted-io/xous-core into main
2021-07-11 04:15:26 +08:00
bunnie
1949c1bbc9
a semblance of sanity, finally
2021-07-09 23:01:50 +08:00
Sean Cross
d96b6c15c8
loader: ensure stack is 16-byte aligned
...
The stack must be 16-byte aligned in order for `u32` to work properly,
as the compiler assumes these values are aligned.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-07-07 14:32:08 +08:00
bunnie
6c697de512
add l2 cache support (suspend/resume flushing)
...
also noted some performance benchmark improvements
2021-07-05 17:05:10 +08:00
bunnie
a70b858812
convert to using the urandom interface
2021-06-11 16:29:25 +08:00
Sean Cross
ff46015127
loader: increase stack size to main process
...
The graphics server has been observed to explode stack. This increases
the start size of the stack to prevent this from happening.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 15:08:46 +08:00
Sean Cross
e43f333faa
loader: don't map the stack into the kernel
...
This prevents the stack from getting claimed by the kernel, or handed
out to another process.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
bunnie
46fe3885dc
cleanup more turds left over during the bringup of suspend/resume
2021-05-01 00:35:32 +08:00
bunnie
260b154741
clean up some boot process holdovers
2021-04-30 23:28:31 +08:00
bunnie
640ddb48e8
suspend/resume now works to hardware
2021-04-30 19:29:36 +08:00
bunnie
7053c2b7c6
able to detect the clean suspend, now figuring out how to resume
2021-04-30 05:00:03 +08:00
bunnie
0e2d57c9fb
retrofit the kernel and loader to handle resume
...
and now the even harder debuggening begins...zomg o_O
2021-04-30 01:55:38 +08:00
bunnie
bbcf698ff3
flesh out a simple touch-and-go suspend/resume demo loop
...
now the debuggening begins. lord help us.
2021-04-29 02:56:53 +08:00
bunnie
805d7c79a2
add some preliminary bits for the loader to detect suspend/resume
2021-04-29 00:22:38 +08:00
bunnie
d2e9d35d37
modify loader to block out suspend resume pages per Xobs review
2021-04-27 18:47:55 +08:00
bunnie
7f6abaea6a
Revert "relocate top of kernel memory to save two pages for suspend/resume"
...
This reverts commit 36429de62f .
Turns out there is a better way to do this.
2021-04-27 18:16:33 +08:00
bunnie
36429de62f
relocate top of kernel memory to save two pages for suspend/resume
2021-04-27 03:51:38 +08:00
Sean Cross
c5ca371e08
loader: fix debug warnings
...
These warnings appeared as part of a change in Rust 1.50.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-12 17:15:52 +08:00
Sean Cross
8b06017c66
loader: fix double-allocation of memory regions
...
Due to an error in how small regions were loaded, memory was mapped to
the wrong offset. This didn't affect us for the most part, since these
small regions were mostly in the backtrace report which we don't usually
hit.
With this patch, we now can verify that processes are loaded correctly.
For example:
(gdb) compare-sections
Section .rodata, range 0x100e0 -- 0x13bdc: matched.
Section .eh_frame, range 0x13bdc -- 0x15040: matched.
Section .text, range 0x16040 -- 0x2dd6e: matched.
Section .sdata, range 0x2ed70 -- 0x2ed78: matched.
Section .data, range 0x2ed78 -- 0x2eda4: matched.
(gdb)
Signed-off-by: Sean Cross <sean@xobs.io>
2021-04-12 17:15:44 +08:00
Sean Cross
10e65db748
loader: limit the kernel to 4 kB
...
Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-14 18:29:45 +08:00
bunnie
838fa25bad
get rid of the awful dummy arg hack and use #used directive to keep font maps in loader
2021-02-27 14:52:21 +08:00
bunnie
0dc40f4185
attempt to separate fontmaps and loader out of kernel
2021-02-27 02:12:19 +08:00
Sean Cross
50e72bf837
loader: disable interrupts in the kernel
...
This disables interrupts when the kernel is running.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 16:49:38 +08:00
Sean Cross
47e0b85b1b
loader: fix kernel text section ownership
...
The text section of the kernel should be owned by the kernel itself. Due
to a typo, only the last page of the text section was being marked as
owned by the text section.
This marks the remainder of the section as being owned by the kernel.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-08 19:37:15 +08:00
Sean Cross
e12a02b1c5
loader: assign sections to process ownership
...
This ensures these addresses aren't re-used and handed out again by
memory allocation.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-07 20:28:20 +08:00
Sean Cross
7b50d00eb8
repo: run cargo fmt
...
This reformats line endings to be consistent, and reinforces the
contents of `.gitattributes`.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-03 18:31:51 +08:00
bunnie
1d23d2c1f7
unify debug.rs and move to UTRA format
2020-10-14 03:40:44 +08:00
bunnie
10aacd76c4
move to utra
2020-10-13 04:38:21 +08:00
bunnie
5deeebae3b
the loader seems to be working now.
2020-09-26 00:03:46 +08:00
Sean Cross
723529ba20
wip: working on getting message passing working
...
The goal is to get a basic message passing engine working that will also
function as a device that works on real hardware.
This is still reworking it to function correctly on a desktop system.
Once that is working, it will be reworked to function once again on
hardware.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-15 18:13:10 +08:00
Sean Cross
c1c31dbfe4
loader: fix most clippy warnings
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-15 12:03:59 +08:00
Sean Cross
aec047b944
loader: add test for minielf spanning a page
...
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-06 15:34:18 +08:00
Sean Cross
73ad16d367
loader: fix loading when init spans pages
...
Due to an issue withow MiniELF files were loaded, one page was mapped to
two addresses rather than having two adjacent addresses mapped. This
occurred when a small section spanned two pages.
This has now been corrected, and an additional test binary will be added
to demonstrate the issue.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-06 15:29:37 +08:00
Sean Cross
8c3f931445
messaging: first message passing example
...
THis commit allows us to pass Scalar messages between processes.
Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-30 16:07:58 +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
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
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
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