Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef _GPXE_INIT_H
  2. #define _GPXE_INIT_H
  3. #include <gpxe/tables.h>
  4. /**
  5. * An initialisation function
  6. *
  7. * Initialisation functions are called exactly once, as part of the
  8. * call to initialise().
  9. */
  10. struct init_fn {
  11. void ( * initialise ) ( void );
  12. };
  13. /** Declare an initialisation functon */
  14. #define __init_fn( init_order ) \
  15. __table ( struct init_fn, init_fns, init_order )
  16. /** @defgroup initfn_order Initialisation function ordering
  17. * @{
  18. */
  19. #define INIT_EARLY 01 /**< Early initialisation */
  20. #define INIT_NORMAL 02 /**< Normal initialisation */
  21. /** @} */
  22. /**
  23. * A startup/shutdown function
  24. *
  25. * Startup and shutdown functions may be called multiple times, as
  26. * part of the calls to startup() and shutdown().
  27. */
  28. struct startup_fn {
  29. void ( * startup ) ( void );
  30. void ( * shutdown ) ( void );
  31. };
  32. /** Declare a startup/shutdown function */
  33. #define __startup_fn( startup_order ) \
  34. __table ( struct startup_fn, startup_fns, startup_order )
  35. /** @defgroup startfn_order Startup/shutdown function ordering
  36. *
  37. * Shutdown functions are called in the reverse order to startup
  38. * functions.
  39. *
  40. * @{
  41. */
  42. #define STARTUP_EARLY 01 /**< Early startup */
  43. #define STARTUP_NORMAL 02 /**< Normal startup */
  44. /** @} */
  45. /* Use double digits to avoid problems with "10" < "9" on alphabetic sort */
  46. #define INIT_CONSOLE 02
  47. #define INIT_GDBSYM 03
  48. #define INIT_CPU 04
  49. #define INIT_TIMERS 05
  50. #define INIT_LOADBUF 08
  51. #define INIT_PCMCIA 09
  52. extern void initialise ( void );
  53. extern void startup ( void );
  54. extern void shutdown ( void );
  55. #endif /* _GPXE_INIT_H */