# NG memory map for devkit 1
# (Defined here because these values are shared by the makefiles as
# well as the header files.)

NG_ADDR_MAP = $(ROOT)/usr/include/make/NGaddrs

# The size of DDR in the real system is 64M. 12M is available
# for the IOP's use:  0x1340_0000 - 0x1400_0000
# The available 12M is split into 192 logical pages of 64K.

# Pages 0 - 1             : DI hole  (128K)
# Pages 2 - 3             : MMU_TTB/boot1 RSVD (128K)
# Pages 4 - 6             : OHO, OH1, EHC DMA 
# Pages 7 - 10            : OH0, OH1, EHC code 
# Page  11                : ppcboot (64K)
# Pages 12 - 19           : Shared (512K)
# Pages 20 - 23           : DI  (256K)
# Pages 24 - 25           : ES  (128K)
# Pages 26 - 31           : FS  (384K)
# Pages 32 - 33           : Crypto (128K)
# Page  34                : SD0 (64K)
# Pages 35 - 36           : USBEth (128K)
# Page  37 - 44           : Syscall (512K)
# Pages 45 - 84           : OSLaunch (2560K)
# Pages 85 - 115          : Apps/Free (1984K)
# Pages 116 - 123         : Iobufs (512K)
# Pages 124 - 139         : Net (1024K)

# External resource managers (sizes fixed)
# Pages 140 - 147         : SSL (512K)
# Pages 148 - 149         : STM (128K)
# Pages 150 - 153         : NCD (256K)
# Pages 154 - 161         : KD  (512K)
# Pages 162 - 163         : WD  (128K)
# Pages 164 - 191         : WL  (1792K)

# Define virtual address spaces
# 0x2000_0000 - 0x2010_0000     FS
# 0x2010_0000 - 0x2020_0000     ES
# 0x2020_0000 - 0x2030_0000     DI
# 0x2030_0000 - 0x2040_0000     STM
# 0x2040_0000 - 0x2050_0000     SD0

#Define beginning and end of GDDR3 available to the IOP
#Leave top 1M uncached for device use (note the granularity of 
#this region is 1M). This will go away or change later.
MK_IOP_GDDR3_START=0x13400000
MK_IOP_GDDR3_CACHED_START=0x13500000
MK_IOP_GDDR3_END=0x14000000

# XXX horti
# DI_DMA region needs to be outside the MEM CG 
# boundary, since it's accessed via IO_MEM. lomem
# doesn't know about this yet. The temporary hack is
# to start the CG boundary at Page 1, leaving page 0 for
# DI_DMA.

# Page 0 - 1                   : DI_DMA region 
MK_DI_DMA_START=0x13400000 
MK_DI_DMA_SIZE=0x20000

# Pages 2 - 3         : Kernel Data/ boot1 reserved
MK_KERNEL_DATA_START=0x13420000

#Reuse page 1 - 2 as reserved space. OK because only boot1
# uses this
MK_RSVD_START=0x13420000

# Page 4              : OH0 dma  (64K)
MK_OH0_START=0x13440000

# Page 5              : OH1 dma (64K)
MK_OH1_START=0x13450000

# Page 6              : EHC dma  (64K)
MK_EHC_START=0x13460000

# Page 7              : OH0 (64K)
MK_OH0_TXT_START=0x13470000

# Page 8              : OH1 (64K)
MK_OH1_TXT_START=0x13480000

# Page 9 - 10          : EHC (128K)
MK_EHC_TXT_START=0x13490000

# Page 11              : PPCBoot  (64K)
MK_PPCBOOT_START=0x134b0000

# Pages 12 - 19        : Shared    (512K)
MK_SHARED_START=0x134c0000
MK_SHARED_SIZE=0x80000

# Pages 20 - 23           : DI       (256K)
MK_DI_VIRT_START=0x20200000
MK_DI_PHYS_START=0x13540000

# Pages 24 - 25          : ES        (128K)
MK_ET_VIRT_START=0x20100000
MK_ET_PHYS_START=0x13580000

# Pages 26 - 31           : FS      (384K)
MK_FS_VIRT_START=0x20000000
MK_FS_PHYS_START=0x135a0000

# Pages 32 - 33           : Crypto   (128K)
MK_CRYPTO_START=0x13600000

# Page  34                : SD0       (64K)
MK_SD0_VIRT_START=0x20400000
MK_SD0_PHYS_START=0x13620000

# Page  35 - 36          : USBETH   (128K)
MK_USBETH_START=0x13630000

# Pages 37 - 44          : SYSCALL_STACK (512K)
MK_SYSCALL_STACK_START=0x13650000

# Pages 45 - 84          : OSLaunch   (2560K)
MK_OSLAUNCH_START=0x136d0000

# The apps space is used for test apps. In a real system, the apps
# space is also used as an extension of the OS re-launch buffer
# Pages 85 - 115        : Apps  (1984K)     
MK_APPS_START=0x13950000

# Pages 116 - 123        : iobufs (512K)
MK_IOBUF0_START=0x13b40000

# Pages 124 - 139        : NET    (1024K) 
MK_NET_START=0x13bc0000

# Pages 140 - 147        : SSL (512K)
MK_SSL_START=0x13cc0000

# Pages 148 - 149         : STM    (128K)     
MK_STM_VIRT_START=0x20300000
MK_STM_PHYS_START=0x13d40000

# Pages 150 - 153         : NCD  (256K)     
MK_NCD_START=0x13d60000

# Pages 154 - 161         : KD    (512K)     
MK_KD_START=0x13da0000

# Pages 162 - 163         : WD    (128K)     
MK_WD_START=0x13e20000

# Pages 164 - 191         : WL    (1792K)     
MK_WL_START=0x13e40000

##########################################
#Here's a dump of the page addresses for easy reference
#Start address: 0x13400000
#End address: 0x14000000
#IPC start address:0x133e0000
#IPC size:0x00020000
#Page size: 64KB
#Number of pages: 192
#Page 0 = 0x13400000
#Page 1 = 0x13410000
#Page 2 = 0x13420000
#Page 3 = 0x13430000
#Page 4 = 0x13440000
#Page 5 = 0x13450000
#Page 6 = 0x13460000
#Page 7 = 0x13470000
#Page 8 = 0x13480000
#Page 9 = 0x13490000
#Page 10 = 0x134a0000
#Page 11 = 0x134b0000
#Page 12 = 0x134c0000
#Page 13 = 0x134d0000
#Page 14 = 0x134e0000
#Page 15 = 0x134f0000
#Page 16 = 0x13500000
#Page 17 = 0x13510000
#Page 18 = 0x13520000
#Page 19 = 0x13530000
#Page 20 = 0x13540000
#Page 21 = 0x13550000
#Page 22 = 0x13560000
#Page 23 = 0x13570000
#Page 24 = 0x13580000
#Page 25 = 0x13590000
#Page 26 = 0x135a0000
#Page 27 = 0x135b0000
#Page 28 = 0x135c0000
#Page 29 = 0x135d0000
#Page 30 = 0x135e0000
#Page 31 = 0x135f0000
#Page 32 = 0x13600000
#Page 33 = 0x13610000
#Page 34 = 0x13620000
#Page 35 = 0x13630000
#Page 36 = 0x13640000
#Page 37 = 0x13650000
#Page 38 = 0x13660000
#Page 39 = 0x13670000
#Page 40 = 0x13680000
#Page 41 = 0x13690000
#Page 42 = 0x136a0000
#Page 43 = 0x136b0000
#Page 44 = 0x136c0000
#Page 45 = 0x136d0000
#Page 46 = 0x136e0000
#Page 47 = 0x136f0000
#Page 48 = 0x13700000
#Page 49 = 0x13710000
#Page 50 = 0x13720000
#Page 51 = 0x13730000
#Page 52 = 0x13740000
#Page 53 = 0x13750000
#Page 54 = 0x13760000
#Page 55 = 0x13770000
#Page 56 = 0x13780000
#Page 57 = 0x13790000
#Page 58 = 0x137a0000
#Page 59 = 0x137b0000
#Page 60 = 0x137c0000
#Page 61 = 0x137d0000
#Page 62 = 0x137e0000
#Page 63 = 0x137f0000
#Page 64 = 0x13800000
#Page 65 = 0x13810000
#Page 66 = 0x13820000
#Page 67 = 0x13830000
#Page 68 = 0x13840000
#Page 69 = 0x13850000
#Page 70 = 0x13860000
#Page 71 = 0x13870000
#Page 72 = 0x13880000
#Page 73 = 0x13890000
#Page 74 = 0x138a0000
#Page 75 = 0x138b0000
#Page 76 = 0x138c0000
#Page 77 = 0x138d0000
#Page 78 = 0x138e0000
#Page 79 = 0x138f0000
#Page 80 = 0x13900000
#Page 81 = 0x13910000
#Page 82 = 0x13920000
#Page 83 = 0x13930000
#Page 84 = 0x13940000
#Page 85 = 0x13950000
#Page 86 = 0x13960000
#Page 87 = 0x13970000
#Page 88 = 0x13980000
#Page 89 = 0x13990000
#Page 90 = 0x139a0000
#Page 91 = 0x139b0000
#Page 92 = 0x139c0000
#Page 93 = 0x139d0000
#Page 94 = 0x139e0000
#Page 95 = 0x139f0000
#Page 96 = 0x13a00000
#Page 97 = 0x13a10000
#Page 98 = 0x13a20000
#Page 99 = 0x13a30000
#Page 100 = 0x13a40000
#Page 101 = 0x13a50000
#Page 102 = 0x13a60000
#Page 103 = 0x13a70000
#Page 104 = 0x13a80000
#Page 105 = 0x13a90000
#Page 106 = 0x13aa0000
#Page 107 = 0x13ab0000
#Page 108 = 0x13ac0000
#Page 109 = 0x13ad0000
#Page 110 = 0x13ae0000
#Page 111 = 0x13af0000
#Page 112 = 0x13b00000
#Page 113 = 0x13b10000
#Page 114 = 0x13b20000
#Page 115 = 0x13b30000
#Page 116 = 0x13b40000
#Page 117 = 0x13b50000
#Page 118 = 0x13b60000
#Page 119 = 0x13b70000
#Page 120 = 0x13b80000
#Page 121 = 0x13b90000
#Page 122 = 0x13ba0000
#Page 123 = 0x13bb0000
#Page 124 = 0x13bc0000
#Page 125 = 0x13bd0000
#Page 126 = 0x13be0000
#Page 127 = 0x13bf0000
#Page 128 = 0x13c00000
#Page 129 = 0x13c10000
#Page 130 = 0x13c20000
#Page 131 = 0x13c30000
#Page 132 = 0x13c40000
#Page 133 = 0x13c50000
#Page 134 = 0x13c60000
#Page 135 = 0x13c70000
#Page 136 = 0x13c80000
#Page 137 = 0x13c90000
#Page 138 = 0x13ca0000
#Page 139 = 0x13cb0000
#Page 140 = 0x13cc0000
#Page 141 = 0x13cd0000
#Page 142 = 0x13ce0000
#Page 143 = 0x13cf0000
#Page 144 = 0x13d00000
#Page 145 = 0x13d10000
#Page 146 = 0x13d20000
#Page 147 = 0x13d30000
#Page 148 = 0x13d40000
#Page 149 = 0x13d50000
#Page 150 = 0x13d60000
#Page 151 = 0x13d70000
#Page 152 = 0x13d80000
#Page 153 = 0x13d90000
#Page 154 = 0x13da0000
#Page 155 = 0x13db0000
#Page 156 = 0x13dc0000
#Page 157 = 0x13dd0000
#Page 158 = 0x13de0000
#Page 159 = 0x13df0000
#Page 160 = 0x13e00000
#Page 161 = 0x13e10000
#Page 162 = 0x13e20000
#Page 163 = 0x13e30000
#Page 164 = 0x13e40000
#Page 165 = 0x13e50000
#Page 166 = 0x13e60000
#Page 167 = 0x13e70000
#Page 168 = 0x13e80000
#Page 169 = 0x13e90000
#Page 170 = 0x13ea0000
#Page 171 = 0x13eb0000
#Page 172 = 0x13ec0000
#Page 173 = 0x13ed0000
#Page 174 = 0x13ee0000
#Page 175 = 0x13ef0000
#Page 176 = 0x13f00000
#Page 177 = 0x13f10000
#Page 178 = 0x13f20000
#Page 179 = 0x13f30000
#Page 180 = 0x13f40000
#Page 181 = 0x13f50000
#Page 182 = 0x13f60000
#Page 183 = 0x13f70000
#Page 184 = 0x13f80000
#Page 185 = 0x13f90000
#Page 186 = 0x13fa0000
#Page 187 = 0x13fb0000
#Page 188 = 0x13fc0000
#Page 189 = 0x13fd0000
#Page 190 = 0x13fe0000
#Page 191 = 0x13ff0000
####################################
