aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-06Merge branch 'profiling'Paul Selkirk
2017-12-14Revert a clean up 'fix' which actually broke FPGA upload.Paul Selkirk
2017-10-17Overhaul UART APIPaul Selkirk
MGMT is the default UART, and no one should have to explicitly refer to the UART unless they need USER (hsm.c:hal_serial_send_char). The default UART is now exposed in the header file, so that the default-using functions can be macros, which saves a few bytes in code space, and a few microseconds in function call overhead.
2017-10-15Cleanup: All drivers return HAL_StatusTypeDef rather than magic values.Paul Selkirk
Note: This affects libhal/ks_token.c, which uses the keystore driver directly.
2017-10-11Cleanup 'unused parameter' warnings, a couple of which are actual coding errors.Paul Selkirk
2017-10-11Cleanup: signed/unsigned mismatches, mostly in loop countersPaul Selkirk
2017-10-11Cleanup: Remove useless (unsigned < 0) test.Paul Selkirk
2017-09-21cleanupPaul Selkirk
2017-09-21Make fmc-test less chatty.Paul Selkirk
2017-09-07Rebase branch 'profiling' from masterPaul Selkirk
2017-09-07Add task_yield_maybePaul Selkirk
2017-09-07Duh, actually build task_metricsPaul Selkirk
2017-09-07Sigh, right offset for the wrong register. Get the PC (the address wePaul Selkirk
interrupted) rather than LR (the return address from the function we interrupted). Also, change u_short and u_int to unsigned short and unsigned int, since gcc recently decided that those aren't part of the C99 standard. Finally, add profilable versions of memcpy, memset, and friends, because they get called a lot in the course of unit testing, and it would be nice to know who's calling them.
2017-09-07Correct offset to get the PC.Paul Selkirk
A previous version of this code ran over the RTOS, where threads used the Process Stack, while the SysTick interrupt used the Main Stack. Now everything's on the main stack, so we need to account for 2 extra words that SysTick_Handler pushes on the stack at entry.
2017-09-07Port profiling code, using a new SysTick hook and new CLI commands.Paul Selkirk
2017-09-07Copy profiling code from MCUOnEclipse.Paul Selkirk
2017-09-07Add some task metrics.Paul Selkirk
2017-08-31CleanupPaul Selkirk
2017-08-31Withdraw SysTick_hook (commit 9ffead1), because it turns out there was ↵Paul Selkirk
already a user-callback mechanism with HAL_SYSTICK_IRQHandler() and HAL_SYSTICK_Callback().
2017-07-31Report UART receive queue length, so we can tune it.Paul Selkirk
2017-07-31Adapt uart_rx_thread to the post-thread tasking model, because we're stillPaul Selkirk
subject to the same forces that made it a good idea in the first place. commit 2b6b9f8 Change RPC UART to have a high-priority thread monitoring a large(ish) DMA buffer, because we've observed out-of-order receives under load.
2017-07-31Add a generic SysTick hook, to call a function on every 1ms tick, because ↵Paul Selkirk
it's easier than setting up a dedicated timer.
2017-06-17Fix optimization settings in HSM's build of libtfm.Rob Austein
2017-05-28Stub out hal_allocate_static_memory() to avoid linker error.Rob Austein
This is a quick fix, so that we can get on with testing the ks9 branch changes. A better fix in the long run might be to add a third keystore ("ks_pin_read_only", or some such) which implemented the bare minimum interface that the bootloader needs and left everything else unimplemented. This would require a bit of refactoring the current PIN code to make it work right with both the bootloader's abbreivated keystore and the normal token keystore. Probably worth doing, but a bit of a can of worms, so postponing for now.
2017-05-28Track API changes in libhal ks9 branch.Rob Austein
2017-05-24Add task_yield_maybePaul Selkirk
2017-05-24Duh, actually build task_metricsPaul Selkirk
2017-05-13Merge branch 'task_metrics' into profilingPaul Selkirk
2017-05-10Sigh, right offset for the wrong register. Get the PC (the address wePaul Selkirk
interrupted) rather than LR (the return address from the function we interrupted). Also, change u_short and u_int to unsigned short and unsigned int, since gcc recently decided that those aren't part of the C99 standard. Finally, add profilable versions of memcpy, memset, and friends, because they get called a lot in the course of unit testing, and it would be nice to know who's calling them.
2017-05-06Correct offset to get the PC.Paul Selkirk
A previous version of this code ran over the RTOS, where threads used the Process Stack, while the SysTick interrupt used the Main Stack. Now everything's on the main stack, so we need to account for 2 extra words that SysTick_Handler pushes on the stack at entry.
2017-05-05Port profiling code, using a new SysTick hook and new CLI commands.Paul Selkirk
2017-05-04Copy profiling code from MCUOnEclipse.Paul Selkirk
2017-05-03Add some task metrics.Paul Selkirk
2017-05-02Merge branch 'init_cleanup' into no-rtosPaul Selkirk
Clean up Makefiles and initialization code.
2017-05-01Remove bogus counting-loop version of HAL_Delay.Paul Selkirk
2017-05-01Add HAL_Delay as an alias for task_delay, but don't wedge if the tasker ↵Paul Selkirk
isn't running yet.
2017-05-01Addendum to commit e0e97a5: Remove all references to the tasker from cli-test.Paul Selkirk
2017-04-30Need stdint.h if we're going to use uint32_t.Rob Austein
2017-04-30Merge branch 'ksng' into no-rtosRob Austein
Required minor manual intervention to resolve merge issues git had no way of understanding: git is clever, but not quite clever enough to understand that a commit in branch had removed the entire RTOS that a commit in the other branch was using. No big deal, just a couple of osDelay() calls needing conversion to HAL_Delay() or task_delay().
2017-04-29Add minimal mutexes to the minimal tasking systemPaul Selkirk
2017-04-29cli-test doesn't use the tasker, even though it might have previously used a ↵Paul Selkirk
semaphore from the rtos
2017-04-29Add task_delay.Paul Selkirk
2017-04-29Simplify hsm makefile.Paul Selkirk
2017-04-29Port cli-test to the new task API.Paul Selkirk
2017-04-29Remove exception handlders that I probably shouldn't have defined in the ↵Paul Selkirk
first place.
2017-04-29Remove rtos source files.Paul Selkirk
2017-04-27Replace the RTOS with a simple cooperative tasker.Paul Selkirk
There are no priorities and no preemption, so tasks run in a round-robin fashion, and explicitly yield control.
2017-04-27Refactor cryptech_upload to work either directly or via cryptech_muxd.Rob Austein
2017-04-26Add support for hal_sleep().Rob Austein
2017-04-17Rewrite the wait-for-ready loop in uart_send_bytes() to actually work.Paul Selkirk