4 #include <types/types.h>
8 bool (*probe)(struct platform *, void *);
9 int (*load_config)(struct platform *, struct config *);
10 int (*save_config)(struct platform *, struct config *);
11 uint16_t dhcp_arch_id;
15 int platform_init(void *ctx);
16 int platform_fini(void);
17 const struct platform *platform_get(void);
19 /* configuration interface */
20 const struct config *config_get(void);
21 int config_set(struct config *config);
22 void config_set_autoboot(bool autoboot_enabled);
24 /* for use by the platform-specific storage code */
25 void config_set_defaults(struct config *config);
27 #define __platform_ptrname(_n) __platform_ ## _n
28 #define _platform_ptrname(_n) __platform_ptrname(_n)
30 #define register_platform(p) \
31 static __attribute__((section("platforms"))) \
32 __attribute__((used)) \
33 struct platform * _platform_ptrname(__COUNTER__) = &p;
35 #endif /* PLATFORM_H */