1/*
2 * Copyright (C) 2020-2022 The opuntiaOS Project Authors.
3 * + Contributed by Nikita Melekhin <nimelehin@gmail.com>
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9#ifndef _BOOT_LIBBOOT_ABI_DRIVERS_H
10#define _BOOT_LIBBOOT_ABI_DRIVERS_H
11
12#include <libboot/types.h>
13
14#define MASKDEFINE(N, P, S) \
15 N##_POS = (P), \
16 N##_SIZE = (S), \
17 N##_MASK = ((~(~0 << (S))) << (P))
18
19#define TOKEN_PASTE_IMPL(x, y) x##y
20#define TOKEN_PASTE(x, y) TOKEN_PASTE_IMPL(x, y)
21#define SKIP(x, y) char TOKEN_PASTE(prefix, __LINE__)[y - x - 8]
22
23struct drive_desc {
24 void* init;
25 void* read;
26 void* write;
27};
28typedef struct drive_desc drive_desc_t;
29
30struct fs_desc {
31 void* read;
32};
33typedef struct fs_desc fs_desc_t;
34
35#endif // _BOOT_LIBBOOT_ABI_DRIVERS_H