From c212597336fd055de854043b83425cbdf1f42603 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 26 Mar 2017 15:42:52 +0300 Subject: [block] Add dummy SAN device Add a dummy SAN device which allows the "sanhook" command to be tested even when no SAN booting capability is present on the platform. This allows substantial portions of the SAN boot code to be run in Linux under Valgrind. Signed-off-by: Michael Brown --- src/include/ipxe/dummy_sanboot.h | 18 ++++++++++++++++++ src/include/ipxe/errfile.h | 1 + src/include/ipxe/sanboot.h | 1 + 3 files changed, 20 insertions(+) create mode 100644 src/include/ipxe/dummy_sanboot.h (limited to 'src/include') diff --git a/src/include/ipxe/dummy_sanboot.h b/src/include/ipxe/dummy_sanboot.h new file mode 100644 index 000000000..9c9d942aa --- /dev/null +++ b/src/include/ipxe/dummy_sanboot.h @@ -0,0 +1,18 @@ +#ifndef _IPXE_DUMMY_SANBOOT_H +#define _IPXE_DUMMY_SANBOOT_H + +/** @file + * + * Dummy SAN device + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#ifdef SANBOOT_DUMMY +#define SANBOOT_PREFIX_dummy +#else +#define SANBOOT_PREFIX_dummy __dummy_ +#endif + +#endif /* _IPXE_DUMMY_SANBOOT_H */ diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h index cd5c1959c..703f45652 100644 --- a/src/include/ipxe/errfile.h +++ b/src/include/ipxe/errfile.h @@ -73,6 +73,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #define ERRFILE_pixbuf ( ERRFILE_CORE | 0x00210000 ) #define ERRFILE_efi_block ( ERRFILE_CORE | 0x00220000 ) #define ERRFILE_sanboot ( ERRFILE_CORE | 0x00230000 ) +#define ERRFILE_dummy_sanboot ( ERRFILE_CORE | 0x00240000 ) #define ERRFILE_eisa ( ERRFILE_DRIVER | 0x00000000 ) #define ERRFILE_isa ( ERRFILE_DRIVER | 0x00010000 ) diff --git a/src/include/ipxe/sanboot.h b/src/include/ipxe/sanboot.h index 3e7ed1c80..c2e57f716 100644 --- a/src/include/ipxe/sanboot.h +++ b/src/include/ipxe/sanboot.h @@ -90,6 +90,7 @@ struct san_device { /* Include all architecture-independent sanboot API headers */ #include +#include #include /* Include all architecture-dependent sanboot API headers */ -- cgit v1.2.3-55-g7522