summaryrefslogtreecommitdiffstats
path: root/src/include/image.h
blob: 3483fe095c8abe1ff76d0e43e8cf3966376184c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef IMAGE_H
#define IMAGE_H

#include "stdint.h"
#include "io.h"
#include <gpxe/tables.h>
#include "dev.h"

struct image {
	char *name;
	int ( * probe ) ( physaddr_t data, off_t len, void **context );
	int ( * load ) ( physaddr_t data, off_t len, void *context );
	int ( * boot ) ( void *context );
};

#define __image_start		__table_start(image)
#define __image			__table(image,01)
#define __default_image		__table(image,02)
#define __image_end		__table_end(image)

/* Functions in image.c */

extern void print_images ( void );
extern int autoload ( struct dev *dev, struct image **image, void **context );

#endif /* IMAGE_H */