diff options
Diffstat (limited to 'src/loader/inc/impl')
-rw-r--r-- | src/loader/inc/impl/all.h | 23 | ||||
-rw-r--r-- | src/loader/inc/impl/mb1.h | 8 |
2 files changed, 26 insertions, 5 deletions
diff --git a/src/loader/inc/impl/all.h b/src/loader/inc/impl/all.h new file mode 100644 index 0000000..366b1b3 --- /dev/null +++ b/src/loader/inc/impl/all.h @@ -0,0 +1,23 @@ +// MIT License, Copyright (c) 2021 Marvin Borner + +#ifndef IMPL_ALL_H +#define IMPL_ALL_H + +#include <def.h> + +enum impl_type { + IMPL_NONE, + IMPL_MB1, + IMPL_MB2, +}; + +struct impl { + enum impl_type type; + void *start; // Of header/entry +}; + +#include <dev.h> + +u8 impl_detect(struct dev *dev, const char *path); + +#endif diff --git a/src/loader/inc/impl/mb1.h b/src/loader/inc/impl/mb1.h index fa0efc1..fcaf048 100644 --- a/src/loader/inc/impl/mb1.h +++ b/src/loader/inc/impl/mb1.h @@ -1,13 +1,11 @@ // MIT License, Copyright (c) 2021 Marvin Borner -#ifndef MB1_H -#define MB1_H +#ifndef IMPL_MB1_H +#define IMPL_MB1_H #include <def.h> #include <dev.h> -#define MB1_MAGIC 0x1badb002 - -u8 mb1_probe(struct dev *dev); +u8 mb1_detect(struct dev *dev, const char *path); #endif |