2016-03-18 00:52:54 +01:00
|
|
|
/* intelmetool
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013-2015 Damien Zammit <damien@zamaudio.com>
|
|
|
|
*
|
|
|
|
* 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
|
2019-02-23 02:38:15 +01:00
|
|
|
* the License, or (at your option) any later version.
|
2016-03-18 00:52:54 +01:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <sys/mman.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#ifndef __DARWIN__
|
|
|
|
extern int fd_mem;
|
2016-12-27 15:24:02 +01:00
|
|
|
extern void *map_physical(off_t phys_addr, size_t len);
|
2016-03-18 00:52:54 +01:00
|
|
|
extern void unmap_physical(void *virt_addr, size_t len);
|
2016-12-27 15:24:02 +01:00
|
|
|
extern void *map_physical_exact(off_t phys_addr, void *mapto, size_t len);
|
2016-03-18 00:52:54 +01:00
|
|
|
#endif
|