bunnie
a4a2d12d57
refactoring the order of format events; consolidate fscb init op
...
try to condense ops that we anticipate calling in other places
into helper functions.
add AAD to the fscb.
2021-11-09 04:57:12 +08:00
bunnie
6f522b0844
tag Rust issue onto a wart in the LLIO API crate for better tracking
2021-11-01 04:18:53 +08:00
bunnie
65bad96f52
fix killbounce & formatting
...
sleep killbounce wouldn't work because we started limiting the
number of connections to the LLIO.
This change makes connections to the LLIO unlimited, but perhaps later
on we should split out the I2C bus into a separate security domain,
so that the LLIO's unlimited connection policy doesn't introduce a
risk into a rogue process being able to overwrite the RTC contents.
2021-10-30 02:14:31 +08:00
bunnie
7de925d3f1
add maintenance notes around the fix for https://github.com/rust-lang/rust/issues/90195
2021-10-23 17:50:33 +08:00
bunnie
c245e78255
Merge remote-tracking branch 'origin/main' into bunnie-dev
2021-10-23 17:45:24 +08:00
Sean Cross
adccb61e43
services: llio: work around rkyv bug in rust 1.56
...
A bug in the type system appeared that prevents using constants in rkyv
arrays. Hardcode the value instead.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-10-23 17:25:41 +08:00
bunnie
ec538025a8
changes to bring us up to date with rust 1.56. still not building.
2021-10-23 17:08:48 +08:00
bunnie
3d1c216706
make interrupt events a try_send type, so they don't cause deadlock
...
this will help mitigate interrupt storms, e.g. if someone tries a
ping flood attack.
2021-10-21 00:03:08 +08:00
bunnie
b93109cad2
cleaning up net event loop, still figuring out APIs and integration
...
currently there is some issue with ARPs not sure where it's breaking,
suspect issue on EC side...
2021-10-11 05:21:01 +08:00
bunnie
74a3c6df44
disastrous first draft of figuring out how to integrate smoltcp using a ping example.
2021-10-10 01:57:31 +08:00
bunnie
b43eb56346
add some skeleton for a net crate; testing COM interrupts
2021-10-08 20:01:13 +08:00
bunnie
f0c33bc99c
tighten up operator flow for factory tests
2021-10-04 17:25:49 +08:00
bunnie
87228ad747
basically working OQC test
2021-09-19 01:06:21 +08:00
bunnie
dfc6444d78
add killkey test to the self test suite
2021-09-14 20:15:03 +08:00
bunnie
dbab3d2b27
adjust L2 cache flush region to 512k
...
although te cache is only 128k, experiments show that the cache
is not reliably flushed until 512k is written. Not sure why...
2021-08-29 18:28:25 +08:00
bunnie
e2ce3cad2c
make sure that the power states get set correctly early in the resume process
2021-08-27 15:47:27 +08:00
bunnie
47fef3c2d0
clean out debug messages and scaffolding
2021-08-24 01:48:30 +08:00
bunnie
387b5d22e5
another fix for issue #75 : llio resume failure
...
Found the following KP on resume. This time it looks like it's
failing in a syscall, during a send_message call. There's no
more visibility into what causes this, so this commit tries to clean
up some loose ends in the resume path that could send messages before
the system is ready. Namely, the console mux call got condensed into
an abridged version that doesn't send log messages (you couldn't see
them anyways...), and the I2C engine now pauses suspend until
the current transaction at hand completes. I suspect it's quite
likely that it's the I2C engine that's causing the issues...
LLIO -> PID 14
Jumping to loader...
PROGRAM HALT: CPU Exception on PID 14: Store page fault of 0x00000000 at 0x0003a02e
Current thread 2:
Thread 2:
PC:0003a02e SP:7ffff170 RA:00036290
GP:00000000 TP:60000000
T0:00000000 T1:000000f0 T2:00000030
T3:00000080 T4:000000f4 T5:ffffffff T6:0000008f
S0:7ffff1d0 S1:7ffff228 S2:00000007 S3:00000007
S4:00000001 S5:00000004 S6:00037996 S7:00010e34
S8:00011548 S9:000101bc S10:7fffff4c S11:0003c000
A0:0000000e A1:00000000 A2:00000004 A3:00000000
A4:00000000 A5:00000000 A6:00000000 A7:00000000
0003a028 <_xous_syscall>:
3a028: 00000073 ecall
3a02c: 4282 lw t0,0(sp)
3a02e: 00a2a023 sw a0,0(t0)
3a032: 00b2a223 sw a1,4(t0)
3a036: 00c2a423 sw a2,8(t0)
3a03a: 00d2a623 sw a3,12(t0)
3a03e: 00e2a823 sw a4,16(t0)
3a042: 00f2aa23 sw a5,20(t0)
3a046: 0102ac23 sw a6,24(t0)
3a04a: 0112ae23 sw a7,28(t0)
3a04e: 8082 ret
0003623c <_ZN4xous7syscall12send_message17h44786a68889a5f1dE>:
pub fn send_message(connection: CID, message: Message) -> core::result::Result<Result, Error> {
3623c: 7175 addi sp,sp,-144
3623e: c706 sw ra,140(sp)
36240: c522 sw s0,136(sp)
36242: c326 sw s1,132(sp)
36244: 84aa mv s1,a0
36246: 4549 li a0,18
crate::arch::syscall(call)
36248: 4214 lw a3,0(a2)
3624a: 4258 lw a4,4(a2)
3624c: 04a10023 sb a0,64(sp)
36250: c2ae sw a1,68(sp)
36252: c4b6 sw a3,72(sp)
36254: c6ba sw a4,76(sp)
36256: 4608 lw a0,8(a2)
36258: 464c lw a1,12(a2)
3625a: 4a14 lw a3,16(a2)
3625c: 4a50 lw a2,20(a2)
3625e: c8aa sw a0,80(sp)
36260: caae sw a1,84(sp)
36262: ccb6 sw a3,88(sp)
36264: ceb2 sw a2,92(sp)
let mut ret = crate::Result::Ok;
36266: d082 sw zero,96(sp)
let args = call.as_args();
36268: 0828 addi a0,sp,24
3626a: 008c addi a1,sp,64
3626c: 00000097 auipc ra,0x0
36270: 8da080e7 jalr -1830(ra) # 35b46 <_ZN4xous7syscall7SysCall7as_args17h7e6c318e8a926fa8E>
args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], &mut ret,
36274: 4562 lw a0,24(sp)
36276: 45f2 lw a1,28(sp)
36278: 5602 lw a2,32(sp)
3627a: 5692 lw a3,36(sp)
3627c: 5722 lw a4,40(sp)
3627e: 57b2 lw a5,44(sp)
36280: 5842 lw a6,48(sp)
36282: 58d2 lw a7,52(sp)
36284: 1080 addi s0,sp,96
_xous_syscall(
36286: c022 sw s0,0(sp)
36288: 00004097 auipc ra,0x4
3628c: da0080e7 jalr -608(ra) # 3a028 <_xous_syscall>
crate::Result::Error(e) => Err(e),
36290: 5586 lw a1,96(sp)
36292: 5516 lw a0,100(sp)
36294: 4605 li a2,1
36296: 00c59563 bne a1,a2,362a0 <_ZN4xous7syscall12send_message17h44786a68889a5f1dE+0x64>
Err(e) => Err(e),
3629a: c0c8 sw a0,4(s1)
2021-08-24 01:39:48 +08:00
bunnie
80cae0d446
intermediate progress on issue #74
...
still not fixed, but things are leaned up.
2021-08-23 05:12:21 +08:00
bunnie
abd8eadfd8
modify the console behavior to better capture panics on resume
...
switches to kernel console on suspend, keeps it in kernel
console on resume for a few hundred ms before switching back
to our original setting
2021-08-22 14:28:06 +08:00
bunnie
799bb6050e
add jtag commands, reboot after burn
2021-08-11 06:15:04 +08:00
bunnie
35e7cfe89e
jtag server now reporting ID
2021-08-10 22:46:00 +08:00
bunnie
bdd70f9502
stash to figure out build issue
2021-08-10 22:41:22 +08:00
bunnie
7921b0216f
try to improve system stability in debug modes
2021-08-04 22:40:53 +08:00
bunnie
8b83fb7c65
remove heapless, go to libstd for all collections!!!!
...
*fistpump*
2021-08-04 01:25:32 +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
91fe69ca27
add some real-hardware tests for spinor writes
...
definitely still bugs.
need to sleep on it.
2021-07-18 02:36:31 +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
84a2e9f768
fix status bar so that it redraws out of suspend/resume
...
the bootloader modifies the screen, so all elements must
be redrawn regardless of the pervious state change!
2021-07-11 18:47:19 +08:00
bunnie
6825e2e7e8
reset the i2c machine every new transaction
2021-06-25 03:41:42 +08:00
bunnie
75dca6bd4c
checkin for a rollback to sanity check some things
2021-06-25 02:09:42 +08:00
bunnie
afa55055ea
add serial console mux setting
2021-06-24 13:52:44 +08:00
bunnie
aa967a5a17
quiet up hosted mode build warnings
2021-06-18 22:37:08 +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
b9f3182bb9
mods for hosted mode to work again
2021-06-02 03:45:15 +08:00
bunnie
25e6bced00
add power-on utilization reporting
...
there is now an extra field in the status bar that gives
the %'age of time that the clocks are running.
2021-06-02 01:08:31 +08:00
bunnie
ee2e38be05
add commands to help manage wfi/power debugging
2021-06-01 17:02:30 +08:00
bunnie
52c32cc4d1
auto-powerdown of sha block when not in use
2021-05-30 00:12:18 +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
08a86749fe
fix hosted mode bugs
2021-05-09 01:13:16 +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
f8979d6341
intermediate progress on audio. doesn't compile.
2021-05-04 02:22:35 +08:00