Commit graph

9 commits

Author SHA1 Message Date
bunnie
46fe3885dc cleanup more turds left over during the bringup of suspend/resume 2021-05-01 00:35:32 +08:00
bunnie
260b154741 clean up some boot process holdovers 2021-04-30 23:28:31 +08:00
bunnie
640ddb48e8 suspend/resume now works to hardware 2021-04-30 19:29:36 +08:00
Sean Cross
2786ad697b kernel: get scalar message passing working again
This gets basic scalar message passing working again. With this, the
following operations may be performed:

    * Starting a server
    * Connecting to a server
    * Sending a scalar message

Care must be taken to not overflow a server's queue, particularly if
writers are faster than readers.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-16 16:34:49 +08:00
Sean Cross
21c46de60e kernel: move to allow hosted init
This prepares for new calls to init SystemServices and the MemoryManager
so that they can be initialized with something other than a
KernelArguments struct.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-03 18:28:22 +08:00
Sean Cross
dafec2bb89 kernel: make contexts first-class
Due to an initial misunderstanding of how the RISC-V is architected,
contexts were going to be an emergent property of the kernel.

However, after further consideration, contexts must now be baked into
the kernel.  Switching between contexts can be handled by the scheduler,
but the kernel must keep track of processor registers.

Keep track of context IDs and ensure they are sane.  With this patch,
interrupts work, as does basic context switching.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-27 12:30:29 +08:00
Sean Cross
fa22d9bad8 kernel: fix isr context handling
We were loading both the context and the banked context, which resulted
in an invalid context being selected.  This caused a cascading failure.

Load only the lower halfword in order to correctly enter the interrupt
context.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-24 15:24:19 +08:00
Sean Cross
022bedc8e3 kernel: refactor processes to support banking
We now have a concept of context banking.  When an interrupt fires, the
process context is banked.

As part of this, process-level data is now stored in the page within the
process itself.  This reduces memory consumption and allows us to have
features such as a hash within each process itself.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-16 18:22:59 +08:00
Sean Cross
f50ec67553 initial commit
This pulls together many disparate repositories into one xous-core
repository.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-03-10 12:13:05 +08:00