Root/libubb/include/ubb/physmem.h

1/*
2 * physmem.h - Physical memory translator and allocator
3 *
4 * Written 2013 by Werner Almesberger
5 * Copyright 2013 Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef UBB_PHYSMEM_H
14#define UBB_PHYSMEM_H
15
16#include <sys/types.h>
17
18
19struct physmem_vec {
20    unsigned long addr;
21    size_t len;
22};
23
24
25void *physmem_malloc(size_t size);
26void *physmem_calloc(size_t size);
27int physmem_xlat(const void *v, size_t len,
28    struct physmem_vec *vec, int vec_len);
29int physmem_flush(const void *data, size_t size);
30
31#endif /* !UBB_PHYSMEM_H */
32

Archive Download this file

Branches:
master



interactive