aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/fs/load.h
blob: 468501c0cd2891e0681a14175d0c4cdc7eceb0c1 (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
27
28
29
30
31
32
33
34
35
#ifndef MELVIX_LOAD_H
#define MELVIX_LOAD_H

#include <stdint.h>

uint32_t userspace;

struct font *font;

struct font {
	uint16_t font_32[758][32];
	uint16_t font_24[758][24];
	uint8_t font_16[758][16];
	uint16_t cursor[19];
};

void load_binaries();

typedef struct {
	char *name;

	void *(*probe)(uint8_t *buf);

	uint8_t (*start)(uint8_t *buf, void *priv);
} loader_t;

void loader_init();

void register_loader(loader_t *load);

uint8_t exec_start(uint8_t *buf);

uint32_t loader_get_unused_load_location();

#endif