2013-01-16 04:30:02 +02:00
|
|
|
/*
|
|
|
|
* 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>
|
|
|
|
|
|
|
|
|
2013-01-16 15:15:24 +02:00
|
|
|
struct physmem_vec {
|
|
|
|
unsigned long addr;
|
|
|
|
size_t len;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-01-16 04:30:02 +02:00
|
|
|
void *physmem_malloc(size_t size);
|
|
|
|
void *physmem_calloc(size_t size);
|
2013-01-16 15:29:46 +02:00
|
|
|
int physmem_xlat(void *v, size_t len, struct physmem_vec *vec, int vec_len);
|
2013-01-16 04:30:02 +02:00
|
|
|
int physmem_flush(const void *data, size_t size);
|
|
|
|
|
|
|
|
#endif /* !UBB_PHYSMEM_H */
|