Age | Commit message (Collapse) | Author |
|
This commit introduces the initial implementation of Virtual System
Resources (VSRs). Virtual system resources enable specific subsystems to
control global state while the VSR acts as a middle man between the
process, and the actual resource itself. This allows the products of
certain operations to be routed to either the global state or a local
(per-process) "shallow copy" whose data and side effects are only
visible through that process. An example of something this would be
useful for is some sort of transparent access control mechanism where
if a process should not modify global system-wide state, it can at least
modify the state for itself.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Adds compatibility flags for c_iflag as well as improved documentation
for the defines.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Improve naming consistency
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce a mechanism to repeat the last command using the "!!"
shorthand.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Reports the CPU online percentage given how many cores are online and
how many cores are offline.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce reporting of the number of halted cores for the scheduler
accounting logic.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Give each core a bit that indicates whether the core is online or
halted. We also provide a cpu_halt() which marks the core as offline.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The NOP (no operation) instruction simply tells the processor to do nothing.
This can be useful for various things such as padding, timing, etc.
--
nop
nop
nop
...
--
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Ensure that after every instruction, we undo any potential side effects
or operations upon the X0 register. The "Registers" section of the
OSMX64 spec states that X0 is a 64-bit, always-zero and readonly
register. All writes to this register are to be ignored by the
processor.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Implement a hash table used to store a maximum of 128 labels.
This commit adds functions such as label_enter() to add labels
to the table, label_lookup() to lookup labels as well as various
utility functions used internally by the assembler.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces encoding logic for 4 additional instructions:
- MROB (Mask Register Over [byte])
- MROW (Mask Register Over [word])
- MROD (Mask Register Over [dword])
- MROQ (Mask Register Over [qword])
This instruction is used to fill a register with a specific length of
zeros or ones. For example, to fill a register (e.g., x2) with 16-bits
of 1s:
--
!!
!! Clear bits x2[7:0]... Mrrp,,
!! mrow!!
!!
mrow x2, #1
--
Similarly, an operand of zero sets it to zero. For example, to clear an
entire 64-bit register with zeros. Something like this can be done:
--
mroq x1, #0
--
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
A label is like a pin on a map with a number attached to it. OASM keeps track
of a number referred to as the psuedo instruction pointer (PIP). This value is
initially zero by default and is incremented every instruction. The purpose of
this value is to pin a location in the code and mark it to be at a specific address
so that further references to that label would be translated to the previous PIP value
at the time of encountering the label.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce comments, example usage:
--
!!
!! Double the X5 register by using the
!! MUL instruction.
!!
mul x5, 2 !! wow
--
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add support for interpreting the BR (branch) instruction. This
instruction takes in a single register operand containing an address to
reassign the instruction pointer to.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The addr_t type represents any kind of memory address. We also assign
paddr_t to addr_t.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|