1/*
2 * Copyright 2008, Fran��ois Revol, revol@free.fr. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef AMIGA_MEMORY_MAP_H
6#define AMIGA_MEMORY_MAP_H
7
8
9/* the DMA-accessible RAM */
10#define AMIGA_CHIPRAM_BASE			0x00000000
11//XXX:
12/* actually, the first 2kB aren't usable */
13//#define AMIGA_CHIPRAM_BASE			0x00001000
14#define AMIGA_CHIPRAM_MAX			0x00e00000
15#define AMIGA_CHIPRAM_LAST						\
16	(AMIGA_CHIPRAM_BASE + (AMIGA_CHIPRAM_MAX - 1))
17
18#define AMIGA_ROM_BASE			0x00f80000
19#define AMIGA_ROM_MAX			0x00080000
20#define AMIGA_ROM_LAST						\
21	(AMIGA_ROM_BASE + (AMIGA_ROM_MAX - 1))
22
23/* some reserved ST I/O there... */
24
25/* cartridge ROM */
26#define AMIGA_CARTROM_BASE			0x00fa0000
27#define AMIGA_CARTROM_MAX			0x00020000
28#define AMIGA_CARTROM_LAST						\
29	(AMIGA_CARTROM_BASE + (AMIGA_CARTROM_MAX - 1))
30
31#define AMIGA_SYSROM_BASE			0x00fc0000
32#define AMIGA_SYSROM_MAX			0x00030000
33#define AMIGA_SYSROM_LAST						\
34	(AMIGA_SYSROM_BASE + (AMIGA_SYSROM_MAX - 1))
35
36/* more ST I/O there... */
37
38/* the fast, non-DMA-accessible RAM */
39#define AMIGA_FASTRAM_BASE			0x01000000
40// max on TT,
41// but there is nothing beyond until SHADOW_BASE
42//#define AMIGA_FASTRAM_MAX			0x00400000
43#define AMIGA_FASTRAM_MAX			0xfe000000
44#define AMIGA_FASTRAM_LAST						\
45	(AMIGA_FASTRAM_BASE + (AMIGA_FASTRAM_MAX - 1))
46
47
48
49/* due to ST legacy (24 bit addressing), IO is actually there */
50#define AMIGA_SHADOW_BASE			0xff000000
51
52#define AMIGA_IO_BASE				(AMIGA_SHADOW_BASE + 0x00f00000)
53#define AMIGA_IO_MAX				0x00100000
54#define AMIGA_IO_LAST							\
55	(AMIGA_IO_BASE + (AMIGA_IO_MAX - 1))
56
57
58
59
60
61/* physical memory layout as used by the bootloader */
62
63//#define AMIGA_ZBEOS_STACK_BASE		0x00040000
64#define AMIGA_ZBEOS_STACK_BASE		0x00060000
65#define AMIGA_ZBEOS_STACK_END		0x00080000
66
67/* from .prg shell.S will copy itself there
68 * must stay in sync with src/system/ldscripts/m68k/boot_prg_amiga_m68k.ld
69 */
70#define AMIGA_ZBEOS_BASE			0x00080000
71#define AMIGA_ZBEOS_MAX				0x00080000
72#define AMIGA_ZBEOS_LAST						\
73	(AMIGA_ZBEOS_BASE + (AMIGA_ZBEOS_MAX - 1))
74
75
76#define AMIGA_STRAM_VIRT_BASE
77
78#endif	/* AMIGA_MEMORY_MAP_H */
79