summaryrefslogtreecommitdiff
path: root/memory.h
blob: e5bd073db23c0fc0706902021df39d999a65c181 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * Copyright (C) 2010 Tobias Klauser <tklauser@distanz.ch>
 *
 * This file is part of nios2sim-ng.
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License. See the file "COPYING" in the main directory of this archive
 * for more details.
 */

#ifndef _MEMORY_H_
#define _MEMORY_H_

struct memory {
	uint32_t *base;
	size_t size;

	uint32_t image_base;
};

#define IMAGE_BASE_UNINITIALIZED	UINT32_MAX

extern uint8_t memory_get_byte(struct memory *mem, int32_t offset);

extern void memory_dump(struct memory *mem, uint32_t offset, size_t count);

#endif /* _MEMORY_H_ */