1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-19 06:10:17 +02:00
ben-blinkenlights/libubb/include/ubb/physmem.h
Werner Almesberger c796ab1c54 libubb/physmem.c (physmem_xlat): make "v" "const"
Since we may use the buffer as well for reading only, there is no point in
pretending physmem_xlat itself would try to write to it.
2013-01-26 20:42:33 -03:00

32 lines
763 B
C

/*
* physmem.h - Physical memory translator and allocator
*
* Written 2013 by Werner Almesberger
* Copyright 2013 Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef UBB_PHYSMEM_H
#define UBB_PHYSMEM_H
#include <sys/types.h>
struct physmem_vec {
unsigned long addr;
size_t len;
};
void *physmem_malloc(size_t size);
void *physmem_calloc(size_t size);
int physmem_xlat(const void *v, size_t len,
struct physmem_vec *vec, int vec_len);
int physmem_flush(const void *data, size_t size);
#endif /* !UBB_PHYSMEM_H */