Commit graph

10340 commits

Author SHA1 Message Date
Sean Cross
04055c1bf5 xous: add StringBuffer
This is a simple lendable StringBuffer variant of String that is
suitable for sending across process boundaries.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-12 21:22:15 +08:00
Sean Cross
b74396cfe7 syscall: add return_memory_offset_valid()
This sets the `valid` field in addition to the `offset` field when
returning a MemoryMessage.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-12 21:22:15 +08:00
Sean Cross
32d740aa15 xous: run cargo fmt on definitions
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-12 21:22:15 +08:00
bunnie
69576695bf give a little more time for the suspend
right now some graphics ops aren't completing.
2021-05-11 16:51:52 +08:00
bunnie
6bcae7bb99
Merge pull request #68 from betrusted-io/bunnie-dev
Bunnie dev
2021-05-11 15:08:53 +08:00
bunnie
77106b8919 Merge branch 'master' of github.com:betrusted-io/xous-core into bunnie-dev 2021-05-11 15:03:59 +08:00
bunnie
57e73c788f
Merge pull request #67 from andrewtron3000/master
#41: Stop iterator when y exceeds one pixel beyond quadrant bounds.
2021-05-11 15:01:35 +08:00
bunnie
74d8e42c7f Merge commit 'a68b24ab9c19f5f0b518f67ad1d7c11528d59b57' into bunnie-dev 2021-05-11 14:46:34 +08:00
Sean Cross
9a9cd25414 kernel: debug: add help screen to debug output
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 19:37:30 +08:00
Sean Cross
1b7ee904b2 kernel: print running total of memory usage size
Print the total of all processes in the system.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 15:09:46 +08:00
Sean Cross
7087fbe823 Cargo: add hooks to reduce binary size
These can be turned on if we want to reduce the size of our binaries.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 15:09:24 +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
5bca939c37 kernel: mem: fix build on hosted mode
Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:42:53 +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
Sean Cross
0962453812 xous: definitions: make SID a [u32; 4]
This has a well-defined C representation, and is more portable than the
tuple format.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
49904988c3 kernel: debug: add simple uart interface
Wire up the interrupt handler to allow printing various debug
information.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
1b85d8a4de kernel: format syscalls as hex
This improves readability, particuarly when addresses are involved.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
040759af25 kernel: services: add process_name(pid)
Add a function to determine the name of a process.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
1818256f5e kernel: mem: add ram_used_by() function
This can be used to determine the amount of ram used by a particular
process ID.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
5b92dd9874 kernel: services: use exception stack for kernel interrupts
When the kernel is processing an interrupt, use the exception stack.
This ensures that the kernel interrupt handler can switch processes
without having its stack go away.

This is used for debug information.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
ce66a6bde2 kernel: riscv: add exception const to mem
The address of the exception page is now available for use as a standard
variable.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
5bd9e40ace kernel: riscv: add print_thread_* family
These calls can be used to print out thread information for debugging.
This augments the existing `print_thread()` call, which has been renamed
to `print_current_thread()`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Sean Cross
2e4fb672ab arguments: document and add pnam tag
The `PNam` tag stores information in the kernel about process names.
This can be used at runtime to discover what process maps to what
program name.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-10 14:37:33 +08:00
Andrew
a68b24ab9c #41: Stop iterator when y exceeds one pixel beyond quadrant bounds. 2021-05-09 12:45:24 -07:00
bunnie
4bb355aec6
Merge pull request #66 from betrusted-io/bunnie-dev
merge in codec
2021-05-09 01:22:47 +08:00
bunnie
08a86749fe fix hosted mode bugs 2021-05-09 01:13:16 +08:00
bunnie
a8a35fa434 roll back heapless crate on ime-frontend 2021-05-08 23:55:08 +08:00
bunnie
a24803354c refactor xous-names to eliminate heapless
see issue #30
2021-05-08 23:34:08 +08:00
bunnie
391122823d refactor heapless version in attempt to debug issue that cropped up in xous-names
somehow, updating the toolchain has broken the FnvIndexMap implementation
2021-05-08 18:44:23 +08:00
bunnie
b904a114fe this commit crashes on boot 2021-05-08 16:40:44 +08:00
bunnie
7f7bdbff88 this will play the long sample. and it works! :) 2021-05-08 03:41:04 +08:00
bunnie
15fc4a6c36 audio working, trying out longer samples 2021-05-08 03:14:14 +08:00
bunnie
fe6b417643 checkpoint 2021-05-08 01:13:30 +08:00
bunnie
ab67cf46b2 fix path to renode 2021-05-07 23:43:52 +08:00
bunnie
46fa8fa01e extend shellchat to allow for multiple callback registrations 2021-05-07 16:22:06 +08:00
bunnie
b3a60faec2 audio checkpoint 2021-05-07 15:09:51 +08:00
bunnie
7dd66a4c18 playback is mostly working and stable 2021-05-07 05:42:39 +08:00
bunnie
adc7f8e98d cleanup the i2c API
condense async/sync methods into a single one and decide which
is which based upon the presence of an Option<callback>
2021-05-06 14:03:06 +08:00
bunnie
b50aa60591 clean up some visibilities and warnings, get rid of the old, bad API 2021-05-06 05:13:23 +08:00
bunnie
bc82dbd157 transition i2c api on codec, finally found the damn race condition 2021-05-06 05:05:17 +08:00
bunnie
75bb4805b1 clean up RTC server to use the new I2C API 2021-05-06 04:16:31 +08:00
bunnie
b596c40dd6 refactor I2C to have work queue, cleaner (but untested) APIs 2021-05-06 03:40:04 +08:00
bunnie
bb5bc1d212 refactor i2c to break out the i2c machine to a separate server
the concurrency issues on I2C are getting hairy, and it was probably a
dubious decision from the start to merge I2C into the LLIO block; but
originally this was motivated by the idea of keeping all the
"miscellaneous slow stuff" in one process to keep the memory footprint
small and make code a bit more readable.

Keeping I2C in the same process space as the LLIO but splitting it
into its own thread and server splits the difference, by giving us
more options to deal with the concurrency, without inflating the size
of the kernel binary and allocating a lot of extra static data.
2021-05-06 00:45:14 +08:00
bunnie
c0d72c282b increase process limit 2021-05-06 00:44:32 +08:00
bunnie
eb75299dd0
Update README.md 2021-05-06 00:44:01 +08:00
bunnie
fe86207469 make docs reflect the error message actually thrown 2021-05-06 00:41:38 +08:00
bunnie
f975884f1e increase server limit to 128 2021-05-06 00:41:27 +08:00
Sean Cross
23e759ffd8 kernel: fix multi-page lending
Due to several errors, multi-page lending did not work properly.

To begin with, if a page was not allocated then it would not be able to
be sent. That is, if you allocated 8192 bytes but only ever accessed the
first 4096 bytes, then an error would be encountered when lending the
unaccessed upper page.

Furthermore, due to a striding error in accessing pointers, half-pages
were treated as full pages.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-05 10:58:12 +08:00
bunnie
ea06df6879 test case for >1 page lends not working 2021-05-05 01:37:25 +08:00
bunnie
e7e7711f2d remove unused buffer package 2021-05-05 01:37:03 +08:00