Commit graph

10340 commits

Author SHA1 Message Date
bunnie
a62251e563
Merge pull request #301 from betrusted-io/tmarble/issue-300
mtxcli: chat room updates asynchronously
2023-01-20 15:16:53 +08:00
Tom Marble
168b1a7f5c
mtxcli: chat room updates asynchronously
Added more predefined scalar messages
Checks WiFi status
Spawns separate thread for client_sync (reading the network)
Most all log messages are now INFO (to be shown by default)

Closes #300

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-19 21:59:50 -06:00
bunnie
20270609b9 fix cached state to match disk state in UX for edit/delete in passwords 2023-01-20 05:06:16 +08:00
bunnie
d811ef0d2e fix deletion UX in vault 2023-01-20 02:00:35 +08:00
bunnie
329569803d note that lock device also has a reboot aspect to it in the menu 2023-01-20 00:15:03 +08:00
bunnie
fb648b4e21 Merge branch 'maybe-fix-delete' into main 2023-01-19 23:53:49 +08:00
bunnie
0d65d9a7ca chore: fix another typo 2023-01-19 15:04:00 +08:00
bunnie
71294f7591 add a missing sync after key deletion 2023-01-19 14:46:25 +08:00
bunnie
8f85aefa27 chore: fix typo :P 2023-01-19 00:30:49 +08:00
bunnie
573dd55d94
Merge pull request #298 from betrusted-io/issue-287-bis
Issue 287: reduces mtxcli memory consumption
2023-01-18 19:33:02 +08:00
bunnie
3bbe868e18
Merge pull request #296 from plaurent/feat/shellchat-pddb-edit
add pddb edit (types pddb write <k> <v>)
2023-01-18 19:08:43 +08:00
Sean Cross
8bde1326ff Cargo: remove packing from main workspace
This should fix an issue in CI builds.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-01-18 09:12:50 +08:00
Sean Cross
dc4ca79834 services: pddb: use an enum for file types
Rather than hardcoding numbers, use an enum with the constant values.
This will make it easier to reason about what the constants mean.

Signed-off-by: Sean Cross <sean@xobs.io>
2023-01-18 09:06:16 +08:00
Tom Marble
277d014f39 Updates for #287
Allows a variable to be set to the EMPTY string
- by not setting a value `/set myvar`

During initialization now verifies that PDDB is mounted.

Added warnings for PDDB not mounted and WiFi not connected.
- the WiFi check is not yet implemented

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-17 12:23:02 -06:00
Tom Marble
e9f21396aa Completes fix for #287
Adds migrations framework
Delays mtxcli initialization until first user input, because we know:
- PDDB is mounted
- Timer is stable
- User actually using mtxcli
Adds send_async_msg scalar_async_msg
- basis for automatically updating chatroom

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-17 12:23:02 -06:00
Tom Marble
c213dfb745 WIP: Fix mtxcli excessive memory usage #287
Adds migrations framework
- Migration for v0.9.11-0120: update the filter

Filter
- narrow filter to only the fields and events for the current room

Introduces "read only" variables (e.g. __version).

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-17 12:23:02 -06:00
Tom Marble
a042deb462 WIP #287: Adds /heap command to mtxcli
Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-17 12:23:02 -06:00
bunnie
d65f16b533 add the verifier and lockfile updates 2023-01-18 01:13:29 +08:00
bunnie
232a4b6c6c bump xous version 2023-01-18 00:02:46 +08:00
bunnie
b275660a71 add an "endcap" to the kernel region
This works around https://github.com/SpinalHDL/VexRiscv/issues/296
2023-01-17 23:07:05 +08:00
bunnie
3417046e7b cleanup memset command a bit more
- we don't need a general memset call -- just a zero page call
- use native rust semantics to embody the call. some alignment checking is
done on the arguments on the way in and out that seem worth it
- the unrolled loop doesn't pay off because we're at the limit of
write bandwidth on the CPU at this point. we would need write-back
caches to gain more performance through unrolling.
2023-01-17 23:05:20 +08:00
bunnie
a2f7c19eac bump release notes 2023-01-17 04:46:51 +08:00
Vihaan Jim
d8c0f740a4 Merge branch 'main' of https://github.com/betrusted-io/xous-core 2023-01-16 13:57:13 -05:00
Vihaan Jim
4d5e8496de merge 2023-01-16 13:56:28 -05:00
bunnie
7be4a88a9b fix scheduler bug (credit: @xobs)
@xobs found a scheduler bug that would trigger a runnable process
search every time a scalar message returned. This fixes the problem,
causing the quantum to go back to the caller as intended.

Improves performance on the syscall by about 40%.
2023-01-17 02:11:48 +08:00
bunnie
aa48476937 Unroll loop for initializing memory in kernel
This also changes the initialization method from using `u8`
to `u32`.

The loop is unrolled to one iteration per cache line.
2023-01-17 02:10:46 +08:00
Patryk Laurent
6045f8a05b type chars rather than bytes 2023-01-15 08:10:55 -08:00
bunnie
8b5dfca749 chore: trim some unused comment-code that I forgot to clean before 2023-01-15 14:24:23 +08:00
Patryk Laurent
e36a9287ce add pddb edit (types pddb write <k> <v>) 2023-01-14 15:10:50 -08:00
bunnie
f66e53c54a respond to StartStop command with Done immediately
nothing to sync up on eject, since it's all already in RAM.
2023-01-15 02:39:03 +08:00
bunnie
0155306b85
Merge pull request #295 from gsora/fix/msc-macos
usb-device-xous: don't set device-wide class on mass-storage
2023-01-15 02:05:21 +08:00
Gianguido Sorà
b2494e92fc
usb-device-xous: don't set device-wide class on mass-storage
Setting it to zero (default if not set) makes mass-storage work under
macOS.
2023-01-14 18:53:48 +01:00
bunnie
c0d442f275 refactor reset() routine to be more comprehensive
The original implementation didn't keep around some key data,
so we had to read the old version of the record and update parameters
assuming that the USB descriptors didn't change too much.

Unfortunately with the mass storage option, the description can
change quite a bit, so we have to reconsitute it from scratch.
Basically, we re-do the `alloc()` call in the reset routine,
playing it reverse so that we setup all the higher-number
endpoints before doing ep0 last.

This hopefully fixes a stability issue for usb hid mode when
mass storage is enabled as a build option.
2023-01-15 01:00:53 +08:00
bunnie
af4b394e7d minor edit - make mass storage explicit in match option 2023-01-15 01:00:41 +08:00
bunnie
ee81c70018 refactor multi-view support
- use new SpinalUsbDevice::new() interface instead of cloning
- put the blank "key-up" event on keyboard events after the
core is switched to, instead of at boot.
- add some more appropriate debug statements to help track
view switching in debug logs
2023-01-14 19:10:21 +08:00
bunnie
df1b9d9f8d refactor SpinalUsbDevice new method
Instead of making it once and then cloning it (which is a bit
unclear what's going on), make it so that the shared memory
ranges are allocated in the caller's scope, and then create
the structure "clean".

Also add a static AtomicBool to track interrupt init state,
since that can be only called once.
2023-01-14 19:08:51 +08:00
bunnie
b13671b3bb add some debug output on asserts 2023-01-14 19:08:32 +08:00
bunnie
7021116a37 remove debug print 2023-01-14 19:07:56 +08:00
bunnie
f5a45bc017 cleanup some edge cases in handling poll events, suspend/resume
also fixes allocation ordering for EPs
2023-01-14 02:33:16 +08:00
bunnie
5faf7f50e6
Merge pull request #293 from gsora/fix/just-two-bulk
mass-storage: just use two bulk endpoints
2023-01-14 01:54:37 +08:00
Gianguido Sorà
96582fdf2a
mass-storage: just use two bulk endpoints
For some unknown reason, just adding a second bulk endpoint descriptor makes enumeration
fail on essentially all operating systems.

Adding three endpoints is no issue though, but since we want to avoid wasting resources around
here, writing 0x42 at the end of the last bulk endpoint... fixes everything.

Tested under Linux, Windows, OpenBSD, FreeBSD.
2023-01-13 18:15:05 +01:00
bunnie
0aae50fa82
Merge pull request #288 from plaurent/feat/shellchat-subcommand-pddb-copy
A "copy" subcommand for shellchat pddb
2023-01-14 00:31:37 +08:00
bunnie
26a3adcc01 integrate "chain" fully; use "chain" feature only for bulk endpoints
bulk endpoints have a different behavior now than interrupt
endpoints; bulk endpoints have chained descriptors so that the
hardware automatically responds to multiple USB packets quickly.

interrupt endpoints also have subtly different way of handling
data readiness, which is incompatible with the block device layer
as implemented.
2023-01-14 00:09:16 +08:00
bunnie
7d641641cd turn on mass-storage by default for app-image
this is to facilitate easier testing on bleeding-edge build
2023-01-14 00:08:42 +08:00
bunnie
02cd24e799 fix mass-storage feature missing in shellchat 2023-01-14 00:08:30 +08:00
bunnie
26f12990f1 change default disk size to 256kiB, mostly to economize on RAM
since we don't have a clear use case for this yet and it's just
for testing on bleeding-edge, make a very small disk just so it's
easier for people to do testing, but not so big that it's a burden
on the system.

later on we can make this dynamically sizeable/allocateable only
e.g., only when the disk is required
2023-01-14 00:07:11 +08:00
Patryk Laurent
0cd2010780 use closure/return to avoid deep indents 2023-01-12 21:12:56 -08:00
bunnie
c67a32b28c v2p table shouldn't be in the index
this is a temporary file related to performance profiling. added to .gitignore.
2023-01-13 03:01:39 +08:00
bunnie
afb2858eb5 Merge branch 'gsora-feat/usb-mass-storage' into main 2023-01-13 02:59:48 +08:00
bunnie
c631963a4b Merge branch 'feat/usb-mass-storage' of github.com:gsora/xous-core into gsora-feat/usb-mass-storage 2023-01-13 02:59:17 +08:00