aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2017-04-17Add a short delay to osMailAlloc, since we're no longer calling it in an ISR.Paul Selkirk
2017-04-17Use default SysTick interrupt priority.Paul Selkirk
We really don't want SysTick_Handler, which runs the task scheduler, to run at a higher priority than SVC_Handler, which runs supposedly-atomic operations like mutex locking and unlocking. I've seen a mutex lock/unlock mismatch which I think is due to interrupting rt_mut_release at a particularly inopportune moment.
2017-04-17Merge remote-tracking branch 'origin/uart_rx_thread' into ksngPaul Selkirk
2017-04-16Switch to libhal's CRC-32 code.Rob Austein
2017-04-15Missing include files, doh.Rob Austein
2017-04-15sw/stm32 Makefiles are a mess.Rob Austein
Apparently it's easier to duplicate source files into multiple project directories than to write Makefiles that do something sane. Feh.
2017-04-15Move hal_log() support to separate module.Rob Austein
2017-04-15Logging implementation for Alpha hardware.Rob Austein
2017-04-12Handle race condition while fetching key metadata for display.Rob Austein
Fetching a list of keys and all of their metadata isn't an atomic process, nor, probably, should it be, so we need to cope with things like a key being deleted via the RPC interface while we're fetching its metadata for display on the console interface.
2017-04-11Track API changes on sw/libhal pkcs8 branch.Rob Austein
2017-04-01Change RPC UART to have a high-priority thread monitoring a large(ish) DMAPaul Selkirk
buffer, because we've observed out-of-order receives under load.
2017-03-02Try to be a bit more robust in the face of normal errors.Paul Selkirk
If hal_rpc_server_dispatch() returns an XDR decode error because the request packet was too short, don't call Error_Handler() and kill the dispatch thread, just drop the request. Add more ibuf_queue entries, but don't panic and kill the dispatch thread if we can't get one, just drop the incoming character (which will lead to an XDR decode error if/when we finally get an ibuf).
2017-02-23Add --pin and --quiet options.Paul Selkirk
2017-02-23Speed up file upload enormously.Paul Selkirk
We need to start with a long serial timeout, in order to catch the reboot messages for a firmware upload (this has to be done through the bootloader). But once we start sending the file, cut the serial timeout to 1ms. (I've tested it down to 1us, but that may not work for everyone, and it doesn't improve performance in a statistically significant way.) This brings the time to upload a 4.5MB bitstream from 38:23 to 1:25.
2017-02-22Refactor flash code.Paul Selkirk
2017-02-21Use libcli return codes where appropriate; show whether PINs are set.Paul Selkirk
2017-02-21Use bulk erase in the one place it makes sense.Paul Selkirk
2017-02-20Move dangerous auto_erase functionality to where it's actually used.Paul Selkirk
2017-02-19Remove unnecessary delays in flash code.Paul Selkirk
2017-02-19Simplify spiflash test code slightly, add keystore test code.Paul Selkirk
2017-02-15Add performance tests for spiflash_n25q128.cPaul Selkirk
2017-02-15Add n25q128_erase_bulkPaul Selkirk
2017-02-02Add locking around keystore operations.Rob Austein
2016-12-23Don't wrap key number in "keystore show keys".Rob Austein
2016-12-21Initialize PINs before trying to use them in bootloader.Rob Austein
2016-12-21Rewrite core upload loop to simplify and fix race conditions.Rob Austein
The main loop in cryptech_upload:send_file() was much more complicated than necessary, and also contained some hidden assumptions about serial I/O timing which happened to fail on the first two machines I tested. We already had a perfectly good buffered-input function, so rewrote to use that, and simplified control structure in the process. In theory, the new code should work in any environment where the old one did, but this has not yet been confirmed.
2016-12-20Flush output to serial device after writing.Rob Austein
2016-12-20Merge branch 'master' into ksngRob Austein
Bootloader DFU fixes.