u-boot/arch
Rasmus Villemoes 10107efedd sandbox: add SIGALRM-based watchdog device
In order to test that U-Boot actually maintains the watchdog device(s)
during long-running busy-loops, such as those where we wait for the
user to stop autoboot, we need a watchdog device that actually does
something during those loops; we cannot test that behaviour via the DM
test framework.

So introduce a relatively simple watchdog device which is simply based
on calling the host OS' alarm() function; that has the nice property
that a new call to alarm() simply sets a new deadline, and alarm(0)
cancels any existing alarm. These properties are precisely what we
need to implement start/reset/stop. We install our own handler so that
we get a known message printed if and when the watchdog fires, and by
just invoking that handler directly, we get expire_now for free.

The actual calls to the various OS functions (alarm, signal, raise)
need to be done in os.c, and since the driver code cannot get access
to the values of SIGALRM or SIG_DFL (that would require including a
host header, and that's only os.c which can do that), we cannot simply
do trivial wrappers for signal() and raise(), but instead create
specialized functions just for use by this driver.

Apart from enabling this driver for sandbox{,64}_defconfig, also
enable the wdt command which was useful for hand-testing this new
driver (especially with running u-boot under strace).

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2022-10-24 11:10:21 +02:00
..
arc treewide: Drop bootm_headers_t typedef 2022-09-29 16:07:57 -04:00
arm First set of u-boot-at91 fixes for the 2023.01 cycle 2022-10-21 08:33:48 -04:00
m68k treewide: Drop bootm_headers_t typedef 2022-09-29 16:07:57 -04:00
microblaze treewide: Drop bootm_headers_t typedef 2022-09-29 16:07:57 -04:00
mips treewide: Drop image_header_t typedef 2022-09-29 16:07:57 -04:00
nios2 treewide: Drop bootm_headers_t typedef 2022-09-29 16:07:57 -04:00
powerpc common/board_f: introduce arch_setup_dest_addr() 2022-10-06 21:05:17 -04:00
riscv riscv: andes_plic.c: use modified IPI scheme 2022-10-20 15:23:41 +08:00
sandbox sandbox: add SIGALRM-based watchdog device 2022-10-24 11:10:21 +02:00
sh treewide: Drop bootm_headers_t typedef 2022-09-29 16:07:57 -04:00
x86 dm: treewide: Use uclass_first_device_err when accessing one device 2022-10-17 21:17:12 -06:00
xtensa treewide: Drop bootm_headers_t typedef 2022-09-29 16:07:57 -04:00
.gitignore
Kconfig sandbox: Convert to use driver model for SCSI 2022-09-25 13:59:50 -06:00
Kconfig.nxp Convert CONFIG_SYS_FSL_NUM_CC_PLLS to Kconfig 2022-08-12 16:10:49 -04:00
u-boot-elf.lds