Commit graph

438 commits

Author SHA1 Message Date
bunnie
a19fc87687 clean up warnings, and fix some hosted mode issues 2021-08-15 00:46:16 +08:00
bunnie
ee4368e747 gateware update code in place 2021-08-13 06:00:21 +08:00
bunnie
8b83fb7c65 remove heapless, go to libstd for all collections!!!!
*fistpump*
2021-08-04 01:25:32 +08:00
bunnie
68ea69c2ed Merge branch 'bunnie-dev' into main 2021-08-03 17:22:10 +08:00
bunnie
f638d01289 fix a minor issue in hosted mode 2021-08-03 16:57:54 +08:00
bunnie
d86c78eea8 partial progress on self-signing 2021-08-03 04:58:34 +08:00
Sean Cross
b86e0a65cd services: recognize xous as a hardware OS
Support `xous` as a valid OS. This allows us to build the entire kernel
under this target.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:11:48 +08:00
bunnie
17be958d87 convert defacement to an XOR
this ensures that "all back" dialog boxes that are fake
are also defaced (as opposed to just drawing black, which
would not deface a "fake" dialog box).
2021-07-29 22:13:44 +08:00
bunnie
8b992bbe38 fix shorter-than-one-line text fitting problem
right character gets cut off, but it's because the cursor is
the top left of the last character. add one character height plus
margin to the shortening, because the margin itself could be 0
in many case.
2021-07-29 01:02:44 +08:00
bunnie
8cdf3c148b clean up warnings before merge to main 2021-07-28 23:58:15 +08:00
bunnie
e60478d8d3 checkbox and radiobox now working. 2021-07-28 23:00:25 +08:00
bunnie
1a65cd3389 password dialog box basic layout is kind of there
a little ugly, but...this has already taken too long.
2021-07-27 04:40:12 +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
47c1a98d13 fix the aesthetics of the suspend screen 2021-07-03 21:46:58 +08:00
bunnie
00be94d913 devboot mode support 2021-07-03 21:08:39 +08:00
Sean Cross
a99839ecd6 xous: mark MemoryRange fields as private
Mark the private fields in a `MemoryRange` struct as being private. This
allows us to perform operations on the memory range armed with the
knowledge that the entire range is valid and unaliased.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-06-24 17:41:16 +08:00
bunnie
f4fbe84b78 improve redraw performance on menu
it helps to actually redraw the menu instead of relying
upon status updates to redo the Ux.
2021-06-20 00:44:59 +08:00
bunnie
c0d4cbe81d make the menu object more generic; demo with emoji selection 2021-06-19 04:44:21 +08:00
bunnie
2b5ba61552 add some useful messages on boot for the hosted mode users 2021-06-19 01:05:42 +08:00
bunnie
aa967a5a17 quiet up hosted mode build warnings 2021-06-18 22:37:08 +08:00
bunnie
62c9737bbc tenuous addition of a menu object
things don't crash, but...haven't really validated if they work, either!
2021-06-18 04:10:41 +08:00
bunnie
eee9f4e765 refactor xous-names to permit only a fixed number of connections
this prevents less trusted processes from connecting to servers
after the kernel initializations are done.

this works so long as we don't have disconnects from the kernel
servers. In order to support disconnects we will also need a
way to re-enumerate the SID to guarantee that we don't have a re-use
problem. But for now, the kernel is not designed with any practical
disconnect mechanism; there is no code that calls the Quit mechanism
on any server.
2021-06-15 17:41:14 +08:00
bunnie
0db9ad9e6f add status bar extension to inform of security states
- inverted text indicates a trusted message. policy is enforced in the GAM.
- we don't have a way to lock the USB port yet; but at least now it's communicated.
2021-06-13 04:40:50 +08:00
bunnie
fadc9c29ab Merge remote-tracking branch 'origin/master' into bunnie-dev 2021-06-02 03:59:25 +08:00
bunnie
30aa794f30 add reference counting on connections between servers
the connection number is re-used for all objects created
within a process space, so you can't `Drop` the connection
immediately when an object goes out of scope. You have to
make sure all instance of the object go out of scope. This
patch adds reference counting to all the objects so that
the `Drop` function works as intended.
2021-05-21 16:24:30 +08:00
Sean Cross
eb7895d601 xous: add a return code to TerminateProcess
As part of this refactor, make `terminate_process()` a divergent call.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:01:00 +08:00
bunnie
7fb7402fe0 clean up some trailing whitespace 2021-05-16 03:06:11 +08:00
Andrew
a68b24ab9c #41: Stop iterator when y exceeds one pixel beyond quadrant bounds. 2021-05-09 12:45:24 -07: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
05df98d1c1 disable suspend/resume support in hosted mode
hosted mode doesn't have suspend/resume support, and it's
not worth debugging subtle issues on that side of the fence
that seem to be OS-dependent.
2021-05-02 16:10:51 +08:00
bunnie
8b29fc4dd3 make the sleep note screen a little more aesthetic 2021-05-02 03:57:40 +08:00
bunnie
0ca2f58c6e add a note to indicate if we're in cold sleep
it's not terribly aesthetic right now, but we can fix that later.
2021-05-02 03:36:54 +08:00
bunnie
b17753ce8b retrofit the rest of the servers for suspend/resume
we can now do suspend/resume in the xous chat!
2021-05-02 01:38:44 +08:00
bunnie
fc4ae9851f revert braille-specific debug config 2021-04-16 18:57:34 +08:00
bunnie
d807098ed1 more mods for the braille branch 2021-04-16 05:34:08 +08:00
bunnie
35353f38dd bring benchmarks to v0.8 and record benchmark results 2021-04-07 00:45:11 +08:00
bunnie
ca349ec1b0 clean up minor bugs and other issues 2021-04-06 22:38:11 +08:00
bunnie
9ba2fb134c refactor most major modules, but Xous now crashes 2021-04-05 23:50:00 +08:00
bunnie
659b050c0e put the borrow in the right place :-/ 2021-04-04 02:17:14 +08:00
bunnie
8786b6db7b should be borrowing the name server object to make connections 2021-04-04 02:15:29 +08:00
bunnie
bd54b48f8f initial cut of a major refactor of the keyboard server
- debounce is now in hardware (requires latest version of betrusted-soc)
- key events originate from an interrupt context and propagate through
  to the listeners as messages
- attempt to reduce the use of heapless::Vec; there is an awkward
interposer step still between the array methodology and the Vec
methodology

I'm not sure if trying to eliminate the Vec is a good idea,
because...I'm finding that we're just re-implementing Vec, but
much worse.

However, for the purpose of movement of data across
IPC boundaries, it's more robust to use primitive types,
because serializing Vec is not possible without either
forking the heapless crate to derive the rkyv traits; or, we'd
have to do some probably quite dangerous conversion of the Vec
to a raw slice which also doesn't feel nice.
2021-04-04 01:42:30 +08:00
bunnie
aa04241aa4 restrict visibility of Opcode 2021-04-03 00:57:30 +08:00
bunnie
b9ff993845 refactor graphics server 2021-04-03 00:53:30 +08:00
bunnie
470b5c6440 finalize API refactor for xous-names 2021-03-30 02:13:23 +08:00
Sean Cross
fdce58d06e ipc: convert project to use xous-ipc
This rewrites the entire project so that most runnable projects now use
`xous-ipc` instead of `xous::String` where possible.

This also removes `rkyv` from the list of dependencies in `xous-rs`.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-26 20:22:33 +08:00
bunnie
db5e56fd1a futzing with structures to try and figure out a threading issue 2021-03-18 16:21:43 +08:00
bunnie
ea8b208a15 finalize rkyv 0.4.1 refactor 2021-03-18 03:54:48 +08:00
bunnie
d68e3e8cf4 an attempt to refactor to rkyv 0.4.1
unfortunately, it looks like deserialize requires an alloc??
2021-03-16 02:02:53 +08:00
bunnie
0950467a37 Merge branch 'hardware' of https://github.com/betrusted-io/xous-core into hardware 2021-03-13 18:15:37 +08:00
bunnie
5c1940a019 change the name of the window 2021-03-13 18:15:30 +08:00
Sean Cross
e1890b1717 graphics-server: buffer keypresses
Buffer keypresses so that keys are not lost. This improves
responsiveness, although there are still kernel plumbing issues.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-03-13 18:01:12 +08:00
bunnie
685f36af41 commit that shows the bug fixed 2021-03-11 22:35:57 +08:00
bunnie
307df04e8b a commit that exhibits the string bug 2021-03-11 22:33:57 +08:00
bunnie
d2ef03b7e2 intermediate commit to try and lock in a bug 2021-03-11 22:32:05 +08:00
bunnie
443e4a1444 remove draw_order from TextView
We can't support this anyways, because the textviews are
immediately drawn on call by the calling app
2021-03-11 18:52:10 +08:00
bunnie
7db6f857dd change boot screen to be more informative 2021-03-11 04:09:35 +08:00
bunnie
835bee2c75 lay in foundations to support the sleep function 2021-03-11 01:45:54 +08:00
bunnie
63159e50db wire up some function keys in hosted mode, add some fun glyphs for testing 2021-03-10 01:58:38 +08:00
bunnie
ab277a6cdd fix less than one line check criteria 2021-03-10 01:36:40 +08:00
bunnie
44c1b66b8b fix border width arg 2021-03-10 01:25:36 +08:00
bunnie
a9a7ac435f add support for rounded rectangle text bubbles and dynamic sizing
this makes more more natural chat-style text bubble interactions
2021-03-10 00:25:14 +08:00
bunnie
a4a96c9c56 add ellpsis support to textview 2021-03-09 02:23:49 +08:00
bunnie
f495b40fd8 insertion/deletion of text with back/forward buttons working now 2021-03-07 03:43:46 +08:00
bunnie
49d6018e5e new feature: backspace (*gasp* iknowrite?)
harder than it looks with utf8 and variable-width characters
2021-03-06 19:37:22 +08:00
bunnie
547dbbfe6b fix carriage return emulation and handling 2021-03-06 03:26:13 +08:00
bunnie
0cc1f9f5fb it doesn't look that impressive, but there's a lot of plumbing now. 2021-03-06 01:10:18 +08:00
bunnie
5d1fba4015 fix intersects algorithm
"duh"
2021-03-05 17:15:14 +08:00
bunnie
470abb3e7d fix rectangle intersection missing case 2021-03-05 00:56:22 +08:00
bunnie
313f12acbb clean up warnings 2021-03-03 22:38:20 +08:00
bunnie
8f809c2a51 start layering in the IME front end and prediction APIs 2021-03-03 14:53:33 +08:00
bunnie
96a19baa8d state before refactor of status to own process 2021-03-02 19:25:41 +08:00
bunnie
d1609d2a31 another commit checkpoint. somehow, i have a race condition now. 2021-03-01 15:08:08 +08:00
bunnie
5917ff4664 add object drawing to the GAM abstraction layer 2021-03-01 04:01:33 +08:00
bunnie
bee1f796ee add rounded rectangle drawing 2021-03-01 01:49:22 +08:00
bunnie
1ee538cda8 clean up test hanzi characters now that we have the planes built in 2021-02-27 15:53:31 +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
d7e1959fed disintegrated fonts working 2021-02-27 14:35:53 +08:00
bunnie
0dc40f4185 attempt to separate fontmaps and loader out of kernel 2021-02-27 02:12:19 +08:00
bunnie
6528bc77d4 refactor GAM to use rkyv 2021-02-19 04:02:29 +08:00
bunnie
c5e6391e22 remove mention of Sendable and the ipc.rs module 2021-02-18 02:01:11 +08:00
bunnie
0af72ffb6d clean up Sendable references and warnings 2021-02-17 23:29:20 +08:00
Sean Cross
7d9fdb9c0d services: graphics: fix unused import warnings in op
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:52:23 +08:00
Sean Cross
f962be1f3c services: graphics: text: fix unused import warnings
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:51:59 +08:00
Sean Cross
5d59fccbc0 services: graphics: fix warnings in lib
Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-17 20:51:05 +08:00
bunnie
2b003f8a7d intermediate checkin 2021-02-16 00:28:44 +08:00
bunnie
07b3dd9afa add PID printout to every service as it starts 2021-02-15 19:16:21 +08:00
bunnie
af012c48dc getting a little further with the port, but still crashing on a borrow message 2021-02-15 04:42:30 +08:00
bunnie
fc8290cdb4 futzing around and something is kind of working on xous-string port to rkyv 2021-02-15 00:05:42 +08:00
Sean Cross
374e411b74 cargo: use resolver 2 to fix graphics issue
The graphics server has an issue where something upstream is activating
the "std" feature on "log", which prevents us from compiling anything
that includes the "log" crate. Which is everything.

Use resolver "2", which requires Rust 1.51 or newer.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-02-10 15:00:16 +08:00
bunnie
75cd321175 great usize extinction event - graphics-server 2021-01-22 00:33:49 +08:00
bunnie
87501444c5 the great usize extinction event: remove usize from blitstr 2021-01-22 00:27:45 +08:00
bunnie
cc6992c3df implement "imports" methodology
This commit simplifies managing git-repo hosted dependencies, so
there is a single location for changing the package path.
2021-01-20 16:22:38 +08:00
bunnie
53713baaa6 trying to debug why lend_mut() isn't working 2021-01-20 03:18:13 +08:00
bunnie
f247e557e8 now to the point of testing the general message flow in hosted mode 2021-01-19 18:58:57 +08:00
bunnie
54d299daf8 the other half of the previous commit 2021-01-19 17:10:52 +08:00
bunnie
757812423c refactor graphics-server api crate organization 2021-01-19 17:10:31 +08:00
bunnie
086a4da862 refactor TextView into graphics-server 2021-01-19 04:54:54 +08:00
bunnie
b72d2f2bb3 refactoring of interfaces 2021-01-19 00:05:33 +08:00
bunnie
73286828c8 more GAM API fleshing out; now to the point of updating a TextView 2021-01-18 04:12:40 +08:00
bunnie
cc66c3911a starting to lay out initial framework for the graphical abstraction manager (GAM) 2021-01-17 04:02:08 +08:00
bunnie
72b8d6a3de add keyboard input emulation in hosted mode 2021-01-13 23:17:09 +08:00
bunnie
18fbd046f6 use git version of blitstr 2021-01-13 04:42:06 +08:00
bunnie
95cbf42cf2 refactor frame buffer to use double buffering 2021-01-13 04:39:04 +08:00
bunnie
2958858a3a refactor to use UTRA for control registers 2021-01-13 01:17:43 +08:00
bunnie
ea78de8014 convert all services to use xous-names server 2021-01-09 02:12:01 +08:00
Sean Cross
147100fa38 graphics-server: minifb: use iterators for drawing the screen
This removes the bounds checks that were being performed, and goes for a
pure iterator approach.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-01-07 20:30:42 +08:00
bunnie
ec675eefb4 cleanup warnings 2021-01-05 04:45:23 +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
6b39946d31 fix git refs for push to master 2020-12-13 02:10:44 +08:00
bunnie
95719852b3 Merge remote-tracking branch 'betrusted/master' into hardware 2020-12-12 12:58:06 +08:00
Sean Cross
25e4d16de3 xous-os: rename CreateServer to CreateServerWithAddress
Servers will, by default, get randomly-assigned SIDs. Certain servers
will want to have well-known SIDs, such as the log server or the
nameserver. These will use a separate call in order to perform this
priveledged operation.

A subsequent patch will add `CreateServer`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-12-04 20:33:33 +08:00
bunnie
bcb52f1a59 eliminate unused code 2020-12-03 23:58:26 +08:00
bunnie
bd64323f36 revert to local repo for builds 2020-12-03 01:54:21 +08:00
bunnie
72ed8cd35d refer to pushed gitref for merge to main 2020-12-03 01:52:20 +08:00
bunnie
c0842517f6 major refactor of the graphics-server API
- remove redundant Rect/Rectangle implementations
- refactor Lines and Circles
- add DrawStyle to the message passing regimen
- depracate modal Styles; now every object has a DrawStyle shipped with it
- remove unused/redundant API calls
2020-12-03 01:48:10 +08:00
bunnie
cbf3ffa4a4 refer to the latest blitstr commit ref for public distribution 2020-11-28 02:08:15 +08:00
bunnie
5cd1bf7012 incorporate blitstr for string drawing 2020-11-28 02:05:55 +08:00
bunnie
c05153b5af add dirty bit set to put_pixel() 2020-11-27 17:21:31 +08:00
bunnie
2c3aef886c remove final vestiges of debug.rs, deprecate 4-uart support 2020-11-27 17:12:49 +08:00
bunnie
7ba75b14f9 add ability to render strings on multiple lines 2020-11-27 03:33:44 +08:00
bunnie
bc832b3a50 fix interrupt pending clear issue in debug module
during conversion to documented interrupts from Litex a case was
missed.
2020-11-24 22:44:19 +08:00
Sean Cross
958fa96fde Merge branch 'master' of github.com:betrusted-io/xous-core 2020-11-23 19:32:31 +08:00
Sean Cross
0732075869 graphics-server: bounds-check the circle drawing
Otherwise we could overflow the buffer.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-11-23 19:31:52 +08:00
bunnie
1aa01fdf5d confirm sleep works, some minor fixup to UTRA style usage 2020-11-23 19:02:02 +08:00
bunnie
d26c80582e clean up gfx server API, allow for string size setting 2020-11-23 15:42:58 +08:00
bunnie
41d7f2a0e5 add ScreenSize message, add hanzi test to boot screen 2020-11-23 14:55:56 +08:00
bunnie
a2670a7537 minor tweaks to improve the rendering of the bouncyball 2020-11-23 03:49:09 +08:00
bunnie
2d5bd20c16 bouncing ball "招财猫"-like totem now working 2020-11-23 03:18:43 +08:00
bunnie
16e9f43015 add circle drawing to graphics 2020-11-23 00:40:40 +08:00
bunnie
710abce418 fixup to latest soc.svd register documentation standard 2020-11-22 03:45:44 +08:00
Sean Cross
1ffc440565 graphics-server: use log-server for all message printing
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 21:27:06 +08:00
Sean Cross
9192775e5e graphics-server: use String for String opcode
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 11:19:17 +08:00
Sean Cross
af1a7f5ba5 graphics-server: first general merge of gfxlib
Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:22:03 +08:00
Sean Cross
7607b0f9ee graphics-server: remove embedded-graphics from backends
Use native drawing for these platforms.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:21:06 +08:00
Sean Cross
a2fd6b0438 graphics-server: remove dependency on embedded-graphics
The graphics server will implement its own routines.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-10-30 10:20:19 +08:00
bunnie
5cf8e9e3bc Merge remote-tracking branch 'origin/master' into ticktimer 2020-10-14 15:30:47 +08:00
bunnie
1d23d2c1f7 unify debug.rs and move to UTRA format 2020-10-14 03:40:44 +08:00
bunnie
523d18f5ab refactor "examples" -> "services" 2020-10-14 02:04:21 +08:00