diff options
author | Michael Brown | 2017-04-26 21:02:23 +0200 |
---|---|---|
committer | Michael Brown | 2017-04-26 21:15:39 +0200 |
commit | 648657b7762a9439879691e610f77afee4c56bcb (patch) | |
tree | 3bd4f02b3c3f69432a0ec162ccd56e873d77b06b /src/include/ipxe | |
parent | [block] Provide sandev_read() and sandev_write() as global symbols (diff) | |
download | ipxe-648657b7762a9439879691e610f77afee4c56bcb.tar.gz ipxe-648657b7762a9439879691e610f77afee4c56bcb.tar.xz ipxe-648657b7762a9439879691e610f77afee4c56bcb.zip |
[block] Provide abstraction to allow system to be quiesced
When performing a SAN boot via INT 13, there is no way for the
operating system to indicate that it has finished using the INT 13 SAN
device. We therefore have no opportunity to clean up state before the
loaded operating system's native drivers take over. This can cause
problems when booting Windows, which tends not to be forgiving of
unexpected system state.
Windows will typically write a flag to the SAN device as the last
action before transferring control to the native drivers. We can use
this as a heuristic to bring the system to a quiescent state (without
performing a full shutdown); this provides us an opportunity to
temporarily clean up state that could otherwise prevent a successful
Windows boot.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r-- | src/include/ipxe/quiesce.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/ipxe/quiesce.h b/src/include/ipxe/quiesce.h new file mode 100644 index 00000000..00b530b8 --- /dev/null +++ b/src/include/ipxe/quiesce.h @@ -0,0 +1,31 @@ +#ifndef _IPXE_QUIESCE_H +#define _IPXE_QUIESCE_H + +/** @file + * + * Quiesce system + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <ipxe/tables.h> + +/** A quiescer */ +struct quiescer { + /** Quiesce system */ + void ( * quiesce ) ( void ); + /** Unquiesce system */ + void ( * unquiesce ) ( void ); +}; + +/** Quiescer table */ +#define QUIESCERS __table ( struct quiescer, "quiescers" ) + +/** Declare a quiescer */ +#define __quiescer __table_entry ( QUIESCERS, 01 ) + +extern void quiesce ( void ); +extern void unquiesce ( void ); + +#endif /* _IPXE_QUIESCE_H */ |