Some of the structures, notably 'cmd', in the lib console stuff are a
little too generically named and have collided with some other code
so prefix the names a bit more cleanly with console_
The change is largely mechanical, and folks with out of tree code can
easily switch by renaming:
cmd -> console_cmd
cmd_args -> console_cmd_args
cmd_block -> console_cmd_block
console_cmd -> console_cmd_func
Apologies if this breaks you but it should be pretty easy to fix.
As specified in ST reference manual RM0091, the prescaling factor
applied by timers is 1 plus the value in the corresponding prescaler
register. (See section 17.4.11 for TIM1, and analogous sections for
other timers.)
This change causes stm32_timer_capture_setup to take the prescaling
factor as input rather than the register value.
-Stop using 512 bytes of bss and use a proper printf output
routine if the user wants to override it.
-Add a test case for unittest itself to see what the failure printfs
look like and make sure the test registration is working.
Refactor the two linker scripts to put .sdata at the end of the data segment
and .sbss at the start of the bss segment to try to maximize the reach of
the global pointer.
Also generally tries to clean up and align the two linker scripts as a new
golden standard for other architectures.
Can't remember precisely what this fixes to be honest, but I
remember there was some sort of recursion on one of the targets on
one of the versions of the compiler.
No need to malloc this memory if it's always going to be initialized
anyway. Add history disabling switch to a few targets to make sure both
builds are tested.
Nothing was using console_register_commands so just move the command
block into a read only section. Remove the linked list stuff but add a
block name to print in its place.
Mostly deduplicating x86-32 and x86-64 code since virtually all of it
can be shared.
Fixed up some cpuid usage which was not properly marking registers as
clobber.
Been carrying this flag around for years but from sleuthing around in
the compiler it seems to only exist as the opposite to -fno-inline which
has an actual effect. Only reason -finline would do anything would be to
cancel a previous -fno-inline switch.
From looking at the dissassembly the compiler wasn't doing a good job
with the overly complicated version shared with the larger arm cores.
Simplify it by recognizing that you can save the state directly from
PRIMASK and restore it more simply.
This lets some arches return a 64bit counter.
As a result of fixing this, removed -Wno-format switch in the test app
which caused the need to fix a lot of printfs.
Haven't built for a pre-armv6 or v6 + thumb machine in a long time and
the effort needed to maintain that is not really worth it. Officially
remove the old support code.
Now you need to include arch/atomic.h to get to the atomic routines.
This simplifies a recusion issue in the way arch/ops.h included
arch_ops. Also just generally makes things cleaner.
Easy to do except for the legacy compile case for i386, in which case we
have to start defining fallthrough atomic routines that the compiler
will call.
At the moment only implement __atomic_fetch_add_4 since its the only one
in use.
Previously, was relying on a regular definition with the arch_ops.h code
overriding it with a static inline. This has been annoying for some
years since it forces the declarations to be in order. Change it to
simple declare an inline wrapper around an arch_ routine that does
whatever it needs to do.
Start using PHDRS and MAXPAGESIZE, remove some extraneous stuff.
Possible we can combine a lot of these linker scripts for various arches
if we're careful.
Implements both SV39 and SV48. No 32bit support yet.
Currently implements basic setup of paging in start.S by mapping a large
chunk of memory into both an identity map and to the bottom of the
kernel address space. Run the kernel out of this physical mapping.
Added basic arch mmu support for querying existing paging structures and
mapping 4K pages. No unmap support as of yet.
System boots with mmu on when running supervisor test on qemu. Untested
on real hardware as of yet.
Was always this way for some reason, which would tend to print the
calling routine that called the routine that paniced, which was of
dubious use. Simplify the panic logic and just call it as a standard
varargs routine.