- consolidate armv_init_ccnt into arm_init_ccnt, which is general
- move armv_handleOverflowIRQ definition to benchmark.h
(no need for extra header)
- clean up definition of armv_handleOverflowIRQ
- Move identical definitions from armv6 and armv7 to common arm code.
- Remove excessive #ifdef guards - let the compiler throw it away if
it isn't used
Always handle overflow irqs from the cycle counter if overflow irqs are
enabled, not just when we are updating the log. Otherwise if logging
isn't enabled but the counter overflows the kernel will be stuck in a
interrupt handling loop.
Fixes a case where a thread can go from Running->Inactive->Restart and use a restart PC
that is out of date. An out of date restart PC occurs when a thread was transitioned to
running after being in a blocked state, but was never scheduled and so did not execute
the traps code that updates the restart PC.
A 'more correct' fix would be to update the restart PC when a thread is first transitioned
to Running, but this results in lots of unnecessary update as
* Frequently immediately schedule a thread after it is transitioned to running, making
the update to restart PC completely redundant as it gets immediately overwritten
* Rarely suspend threads making all the updates a 'high' cost for fixing an infrequent
operation
As a result this solution lazily fixes the restart PC only when we enter a state where
we might need a correct restart PC, which currently in the kernel is only when we
go from Running->Inactive, which can only happen in `suspend`
hardware.c was defined for both 32 and 64 bit arm kernels. However, the
only difference in the file is the register used in setNextPC. Add this
register as a #define in registerset.h, move hardware.c to be common for
both 32- and 64-bit arm.
init_freemem sets up available regions of memory for the hardware that
seL4 is booting on. Previously this function was duplicated across
architectures, with minor duplication.
This change provides a top-level init_freemem suitable for all
architectures.
- arm/riscv: change get_avail_p_reg to return whole p_reg array
- update all architectures to use new init_freemem.
- wrap init_freemem calls with arch_init_freemem for each arch, where
arch_init_freemem sets up the available and reserved regions of memory
which are passed to init_freemem.
The idle thread is not managed at user-level and so it can instead be
statically allocated. This simplifies the boot code and increments
towards being easier to formally verify.
Persuant to the fact that userspace cannot save and restore the debug coprocessor,
there is no point in delivering a fault message to userspace when CP14 is accessed.
The debug coprocessor must be entirely handled by the kernel, and a new hardware
accessor and manipulation capability must be designed and implemented now.
The memory used for the irq cnode is never available to the user. As a
result this memory can be allocated statically, simplifying the
bootcode.
- remove allocation of irq cnode
- add static init
- generate irq cnode size from cmake for arm
- add static constants for riscv, x86 as there is no variability at the
moment.
We now support receiving a DTB from the ELF loader and passing it on
to userspace in extra bootinfo. We still support booting without a DTB,
though - the device tree address is set to zero in the boot code and no
extra bootinfo region is provided.
This allows for arm headers to be generated for an arm platform
in include/plat/default that specifies the following:
- maxIRQ
- TIMER_CLOCK_HZ
- the timer header to use
- the interrupt controller header to use
This changes the comments regarding the size of the TCB to be more
generally accurate to help manually determine the size of the TCB for
different configurations.
This commit updates the aarch64 build to pass the c-parser.
- replace 0b constants with decimal
- remove empty array definition
- replace __uint128_t with uint64_t, and double the array size
- remove variable shadowing
No further verification guarantees are provided for aarch64 code.