;
; Copyright (c) Microsoft Corporation.  All rights reserved.
;
;
; Use of this source code is subject to the terms of the Microsoft end-user
; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
; If you did not accept the terms of the EULA, you are not authorized to use
; this source code. For a copy of the EULA, please see the LICENSE.RTF on your
; install media.
;

MEMORY

IF IMGMULTIXIP !

#define    NKNAME      NK
#define    NKSTART     80020000
#define    NKLEN       03FE0000				; Max size (it will be autosized)
      
#define    RAMNAME     RAM
#define    RAMSTART    84000000
#define    RAMLEN      01F00000

;-----------------------------------------------------
;   NAME        ADDRESS     SIZE            TYPE
;-----------------------------------------------------
    $(NKNAME)   $(NKSTART)  $(NKLEN)        RAMIMAGE
    $(RAMNAME)  $(RAMSTART) $(RAMLEN)       RAM

ENDIF IMGMULTIXIP !



IF IMGMULTIXIP

#define CHAIN_ADDRESS	85EFF000

;-----------------------------------------------------
;   NAME        ADDRESS         SIZE            TYPE
;-----------------------------------------------------
IF WINCEDEBUG = retail
    XIPKERNEL   80020000				002E0000        RAMIMAGE    ; 
    NK          80300000				03D00000        NANDIMAGE   ; Max size (it will be autosized)
    RAM         80300000				05BFF000        RAM         ; Max size (it will be autosized)
    CHAIN		$(CHAIN_ADDRESS)		00001000		RESERVED
ELSE
    XIPKERNEL   80020000				006E0000        RAMIMAGE
    NK          80700000				03900000        NANDIMAGE
    RAM         80700000				058FF000        RAM
	CHAIN		$(CHAIN_ADDRESS)		00001000		RESERVED

ENDIF
ENDIF IMGMULTIXIP

PTS             80004000    00004000    RESERVED
ARGS            80000800    00001000    RESERVED

CMM_1           85F00000    02000000    RESERVED    ; 800x480x4x4 + 800x480x4
DMA             87F00000    00100000    RESERVED

CONFIG


; @CESYSGEN IF NK_NKNOCOMP
; @CESYSGEN ENDIF NK_NKNOCOMP
; @CESYSGEN IF !NK_NKNOCOMP
    COMPRESSION=ON
; @CESYSGEN ENDIF !NK_NKNOCOMP


    KERNELFIXUPS=ON
    AUTOSIZE=ON

IF SYSGEN_FSROMONLY
    FSRAMPERCENT=0x00000004     ; ROM-only File System - No ObjectStore
ELSE
    FSRAMPERCENT=0x20202020;0x80808080     ; RAM and ROM File System - 50% of RAM is allocated for the ObjectStore
ENDIF


IF IMGPROFILER   
    PROFILE=ON
ENDIF
IF IMGPROFILER !
    PROFILE=OFF
ENDIF

;
; ROMFLAGS is a bitmask of options for the kernel
;   ROMFLAGS    0x0001      Disallow Paging
;   ROMFLAGS    0x0010      Trust Module only
;
IF IMGMULTIXIP !

IF IMGTRUSTROMONLY
    ROMFLAGS=10
ELSE
    ROMFLAGS=00
ENDIF IMGTRUSTROMONLY

    ROMSTART = $(NKSTART)
    ROMWIDTH = 32
    ROMSIZE = $(NKLEN)

ENDIF IMGMULTIXIP !

IF IMGMULTIXIP
    RAM_AUTOSIZE=OFF
    ROM_AUTOSIZE=OFF
    DLLADDR_AUTOSIZE=ON

    XIPSCHAIN=$(CHAIN_ADDRESS)

    AUTOSIZE_ROMGAP=10000
    AUTOSIZE_DLLADDRGAP=0
    AUTOSIZE_DLLDATAADDRGAP=0
    AUTOSIZE_DLLCODEADDRGAP=0

    ROMFLAGS=0

#include "$(_TARGETPLATROOT)\FILES\MultipleXIP.bib"
ENDIF IMGMULTIXIP

