bunnie
ccb3e495e1
hoist net thread exhaustion check to before we check the poll interval
2022-05-06 14:15:53 +08:00
bunnie
9893e70759
fix warning
2022-05-06 13:45:22 +08:00
bunnie
71e41d4b0a
fix buffer length check computation
2022-05-06 13:45:22 +08:00
bunnie
413b7153ac
refactor wait timer for net pump
2022-05-06 13:44:03 +08:00
bunnie
15d16ab490
add warnings to remind about moving USB disable to the usbdev server once it's possible
2022-05-06 13:40:32 +08:00
bunnie
bee8334b3b
flesh out usb driver
2022-05-06 13:40:12 +08:00
bunnie
709c087337
refactor wait timer for net pump
2022-05-06 13:35:33 +08:00
bunnie
9354932483
fix buffer length check computation
2022-05-06 13:34:59 +08:00
bunnie
382f2ae306
fix warning
2022-05-06 04:00:55 +08:00
bunnie
2a4dd67564
hoist net thread exhaustion check to before we check the poll interval
2022-05-06 04:00:20 +08:00
bunnie
fd2aa438c0
still struggling a bit to get basic USB connectivity test to pass
2022-05-05 20:51:48 +08:00
bunnie
3133d386c4
cleanup type problems incurred while fixing +Send trait on core types
2022-05-03 01:13:24 +08:00
bunnie
322de782d7
ensure all allocs meet the 16-byte alignment criteria
2022-05-02 23:15:52 +08:00
bunnie
c12d9cbe8f
working through the usb endpoint descriptor allocator
2022-05-02 22:59:33 +08:00
bunnie
467254fa81
lay down some initial data structures to talk to the UDC
2022-04-27 02:41:07 +08:00
bunnie
a7684343f2
add first commands to toggle core connectivity
2022-04-27 01:22:53 +08:00
bunnie
5f2eef3afd
initial toy repl for usb debugging
2022-04-27 00:53:58 +08:00
bunnie
9768503087
Merge branch 'main' into usbdev
2022-04-25 18:44:37 +08:00
bunnie
33a3cfa7c2
fix typo
2022-04-25 18:34:31 +08:00
bunnie
a9b2dd535a
add a note to remind about the purpose of the unsub test command
2022-04-25 18:32:09 +08:00
bunnie
d23dbd1db8
add an explicit test of the unsub path
...
normally you would never use this, this would cause the
connection manager to muck up.
2022-04-25 18:30:43 +08:00
bunnie
969b4ec868
refactor net firewall to use .forward() method
2022-04-25 18:30:24 +08:00
bunnie
8d28f130ea
fix a missing case for hardware not caught by hosted mode
2022-04-24 21:53:18 +08:00
bunnie
f8246b14f5
run rustfmt on the modals crate
2022-04-24 21:40:42 +08:00
bunnie
547783d195
Merge pull request #150 from nworbnhoj/qrcode
...
enable notification modal text + qrcode
2022-04-24 21:36:38 +08:00
bunnie
62d56fb70b
Merge pull request #149 from nworbnhoj/index
...
modal selected index support
2022-04-24 21:27:08 +08:00
nworbnhoj
0e561802ce
enable notification modal text + qrcode
...
change the notification modal to accept the primary message and an
Option of independent text to display as a qrcode
pub fn show_notification(&self, notification: &str, qrtext:Option<&str>) -> Result<(), xous::Error> {}
2022-04-24 21:29:15 +10:00
nworbnhoj
2070236695
minor refinements requested on PR
2022-04-24 20:09:43 +10:00
nworbnhoj
e879ff4b17
modal selected index support
...
Support for:
- obtaining the index of the selected radiobutton & checkbox
- adding a Vec<&str> of items
2022-04-24 08:28:02 +10:00
bunnie
ce5a81878c
fix for issue #145
2022-04-24 00:16:27 +08:00
Sean Cross
f0f1b72e0c
log-server: refactor to use stack-allocated buffers
...
Instead of having a single, shared buffer, simply stack-allocate the log
buffers.
This paves the way in the future to allow for buffers that are
larger-sized and span multiple pages. But most importantly it alleviates
inter-thread locking and contention when passing messages.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-23 12:46:20 +08:00
Sean Cross
234c169809
log-server: allow maximum-length buffers to be printed
...
Previously, we would reject buffers that were the maximum allowed size.
This is reported in #141 .
Allow these maximally-sized buffers to be printed, since they don't end
up causing a problem.
Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-23 12:45:27 +08:00
bunnie
8d0e3e6958
Merge branch 'main' into usbdev
2022-04-22 19:41:03 +08:00
bunnie
987f40f5de
minor fixes to multi-modals input
...
- track field heights using the drawing height directly
- use an &mut reference in the text processing section so changes stick
- other minor cosmetic improvements
2022-04-22 17:44:25 +08:00
bunnie
34c2ffe1a3
fix password entry to work with the new return type
...
also requires a call to `reset_action_payloads` for the
number of field elements to be recorded correctly!
2022-04-22 17:43:26 +08:00
bunnie
55197e97f4
fix white space
2022-04-22 15:56:11 +08:00
bunnie
4ddd414ed6
fix modals API in the PDDB migration code
2022-04-22 15:55:15 +08:00
bunnie
dd462aebb2
remove trailing/open white spaces
2022-04-22 15:54:43 +08:00
bunnie
2c3143f790
Merge branch 'main' into multi-text-modals
2022-04-22 15:54:18 +08:00
bunnie
bac6c25bfe
conversion toward standard testing method
2022-04-22 15:10:51 +08:00
bunnie
c3e5b23dd3
Merge branch 'main' into usbdev
2022-04-21 17:56:28 +08:00
bunnie
012a4d4673
Merge pull request #138 from vmedea/minifb-0.23
...
Update minifb to 0.23.0
2022-04-20 20:19:09 +02:00
bunnie
ee39b9643e
add a timeout for the network to disconnect before starting update
...
this is to avoid panics due to malformed "packets" being received
as the EC is updating and not working correctly.
2022-04-21 01:22:17 +08:00
Mara Huldra
aa360a9733
Update minifb to 0.23.0
...
Minifb 0.23 fixes a serious wayland keyboard issue.
2022-04-20 18:28:16 +02:00
bunnie
38d6765586
fix remaining bugs in migration, tested and passing on CI + real hardware
2022-04-20 03:48:05 +08:00
bunnie
b3c89e5f09
add migration of secret basis for v1->v2; fix some interior mutability issues
...
Probably nobody is really using secret Bases right now, but it's
probably a good idea to lay out all the infrastructure and start
testing it for when it comes time to do it with data that really
matters.
2022-04-19 04:50:15 +08:00
bunnie
2596a35fe0
Merge branch 'main' into bunnie-dev
2022-04-19 02:05:46 +08:00
bunnie
f4f0812fb4
refactor API to use the None encoding for 0 on NonZeroUsize MemoryMessage fields
...
at the suggestion of @xobs, requires a new libstd to work with this.
2022-04-19 01:32:36 +08:00
bunnie
4ba34bbd58
intermediate work on v1->v2 migration, need to set aside to fix a libstd problem
2022-04-19 00:45:10 +08:00
bunnie
c8a38b4bf5
fix representation of va in pagetable so we're not burning 12 bits on 0's
...
this is a v2 fix, incompatible with v1
2022-04-19 00:44:45 +08:00
bunnie
7553053f29
v0.0.2.1 initial implementation - still needs migration code
...
Previous version was v0.0.1.1
New version is v0.0.2.1 (don't ask me why I skipped v0.0.2.0)
The most significant change is that the key derivation for the basis
is now split into two keys. One key is used for the page table ECB
encoding, and a different key is used for the data AES-GCM-SIV encoding.
This is because someone much smarter than me looked at my scheme
and said it is very dangerous to use the same key for two different
types of ciphers. This person is correct, so it had to be rectified.
For the System Basis, the keys are encrypted using the root keys
wrapper API. In this case, we simply create two random keys, one for
the page table, and one for the data region, and wrap them using
the root keys API.
For user secret Basis, the derived keys are sent through HKDF
with two different "info" strings to derive a pair of keys from
a common password.
In case the cryptographer who looked at this is reading along,
note that the basis name is encoded as a fixed-length, 0-padded
record, so, we don't encode the length of the basis in the hash
used to derive the keys. When I explained the scheme I thought
I was using a variable-length basis name to derive the key, but
when I checked the code, it's always 64 bytes long, and bytes
that are not used are 0-padded, so, I think we don't need the
length encoding field.
2022-04-18 15:59:15 +08:00
bunnie
c85f853e08
clean up use statements
2022-04-17 23:03:31 +08:00
bunnie
2fbb522c06
modify the web server to use mpsc, multiple workers
...
This is basically the Rust example for the web server, with
some tweaks. Add a command to make the device buzz when
a particular URL is hit, and to wait before responding when
another one is hit.
2022-04-17 18:50:10 +08:00
bunnie
89ceba9674
tweak some parameters and debug infos
...
total threads in the net crate are around 10 right now, 32 max, so
increasing the sleeping thread limit to 16, since every now and then
we get exhaustion notes.
2022-04-17 18:49:27 +08:00
bunnie
ecd875e64f
remove the legacy files
2022-04-17 05:00:51 +08:00
bunnie
12190b9184
strip out the legacy xous Tcp stack implementation
2022-04-17 04:59:10 +08:00
bunnie
f2bd4a6193
fix listener address and also remove the forced timeout on read
2022-04-17 04:58:55 +08:00
bunnie
a97b548f94
implement Shutdown for TcpStream
2022-04-17 04:07:54 +08:00
bunnie
b3d83c8494
migrate to std::TcpListener in tests
2022-04-17 04:07:13 +08:00
bunnie
806b09ec0d
apply TcpStream fixes
...
- allow for zero-length tx/rx returns
- implement "shutdown" function, which is different from close:
shutdown requires any pending connections to return Ok(0) immediately,
but the socket is not dropped.
2022-04-17 04:06:05 +08:00
bunnie
9eb35ddd49
Merge remote-tracking branch 'origin/main' into bunnie-dev
2022-04-16 06:28:29 +08:00
bunnie
a555f0380e
initial tcplistener draft
2022-04-16 06:26:08 +08:00
Gianguido Sorà
d06c6dcb32
modals: refuse to build modal if no fields have been provided
2022-04-13 16:59:17 +02:00
Gianguido Sorà
0c17bb6e34
modals: get rid of fields_amt value in alert modal builder, can be inferred
2022-04-13 16:57:36 +02:00
Gianguido Sorà
63cbe0e26f
shellchat: style change in demo modals command
2022-04-13 15:52:14 +02:00
Gianguido Sorà
c2e619949c
status: use new multi-text modals to take time
2022-04-13 15:50:07 +02:00
Gianguido Sorà
8375fdf801
shellchat: update demo modals command to new interface
2022-04-13 15:49:51 +02:00
Gianguido Sorà
89c768625d
modals: add builder-based interface to present alerts with text fields inside
2022-04-13 15:49:31 +02:00
Gianguido Sorà
08bbce93f6
modal: add method to return a vec of payloads
...
content() automatically filters out non-dirty items
2022-04-13 15:48:46 +02:00
Gianguido Sorà
c702025283
gam: add dirty bool to TextEntryPayloads
...
Useful to filter out unused entries.
2022-04-13 15:47:26 +02:00
bunnie
5d2c65cb6c
fix missing update to display in panic handler
2022-04-10 16:57:04 +08:00
bunnie
46624addd0
clean up comments and review panic handler before push
2022-04-10 15:52:57 +08:00
bunnie
9254d6830a
your host desires not your guru meditations
...
ommmmmmmmm
2022-04-10 04:47:34 +08:00
bunnie
7353c3ab9c
add guru meditations
2022-04-10 04:42:02 +08:00
bunnie
3f962b6bb0
make progress updates fail gracefully on server queue full
...
Progress updates can come at a right too high for the renderer
to keep up, so instead of deadlocking, we discard update messages
that are too frequent.
2022-04-08 18:55:56 +08:00
bunnie
3ef2dae2f0
revert test config and make chinese text also render qr code
2022-04-08 16:05:42 +08:00
bunnie
b4dad54315
fix missing unlock() statement at end of modals
2022-04-08 15:58:59 +08:00
bunnie
fb4ce334c4
missed an instance in a demo app
2022-04-08 15:27:40 +08:00
bunnie
cd8c762c55
patch up QR code PR, change method signature as discussed
...
now any modal notification can also render as a QR code
2022-04-08 15:19:56 +08:00
bunnie
679fde33a7
Merge pull request #137 from nworbnhoj/qrcode
...
add as_qrcode to Notification modal
2022-04-08 14:28:26 +08:00
nworbnhoj
8c5c2228d2
Merge branch 'main' into qrcode
2022-04-08 16:22:19 +10:00
nworbnhoj
2a957e55cd
add as_qrcode to Notification modal
2022-04-08 14:16:15 +10:00
bunnie
bc55e7db5f
update the skeleton to the more recent practices
2022-04-08 01:33:31 +08:00
Gianguido Sorà
ec9fdb0e42
make text entry work
...
pro tip: make sure your types are synchronized between Buffer calls!
2022-04-07 17:05:19 +02:00
Gianguido Sorà
8dd41a1ffa
adapt interface to newer modals
2022-04-07 16:39:16 +02:00
Gianguido Sorà
8123393a7d
Merge branch 'main' into feature/multi-text-modals
2022-04-07 16:39:03 +02:00
bunnie
d49c35dc0c
verify that unmount callbacks are working
2022-04-07 17:58:37 +08:00
bunnie
52d56f39f1
wire up PDDB key unmount callbacks (oops)
2022-04-07 17:37:25 +08:00
bunnie
12ced30f40
fix a minor typo
2022-04-07 17:37:20 +08:00
bunnie
6ac4ef292b
add basis mount/unmount to pddb shell commands, fix some UX formatting
2022-04-07 15:32:47 +08:00
bunnie
1ad7c43f81
refactor pddb ux thread to use deferred response messaging
2022-04-07 14:46:44 +08:00
bunnie
28de1b27a6
add some documentation to modals
2022-04-07 14:24:10 +08:00
bunnie
c97a00ed1f
refactor validator to not create a new single-use server
2022-04-07 04:38:38 +08:00
bunnie
f720f3175c
refactor main loop to use deferred responses
...
I think things could be compactified even further, but this is a
first-step "merge the threads and break as few things as possible"
pass. Would like to get @gsora's multi-line boxes merged into this
new system before doing even more optimization.
2022-04-07 04:04:37 +08:00
bunnie
360e50a8bb
refactor locking to use deferred responses
2022-04-07 02:19:37 +08:00
bunnie
1261d73451
remove execution gate server and use deferred callback idiom instead
...
reduces one connection on all PIDs that require suspend/resume
callbacks; lightens kernel by about 16k runtime load
2022-04-07 01:13:49 +08:00
bunnie
c36d0d4111
remove an unnecessary xns registration
2022-04-07 00:20:07 +08:00
bunnie
92c6a93147
eliminate yield loop on blocking mount poller
2022-04-07 00:04:25 +08:00
bunnie
b75df1efb3
annotate rationale on multiple variants of pddb mount calls
2022-04-06 23:46:39 +08:00
bunnie
1b25f4c11d
fix hosted mode
2022-04-06 13:38:44 +08:00