;
; 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.
;
;------------------------------------------------------------------------------
; Copyright (C) 2004-2007, Freescale Semiconductor, Inc. All Rights Reserved.
; THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
; AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT 
;------------------------------------------------------------------------------
;
;
;     OS MEMORY MAP                       BOOTLOADER MEMORY MAP
;
;                   +---- 8800.0000 ----+
;       ARGS (4 KB) |                   | 
;                   +---- 8800.1000 ----+
;    CSPDDK (32 KB) |                   |
;                   +---- 8800.9000     | 
;                   |                   |
;       PP (2012 KB)|                   |
;                   |                   | 
;                   +---- 8820.0000 ----+
;                   |                   |
;                   |                   |
;                   |                   |
;   NK Code (47 MB) |                   |
;                   |                   |
;                   |                   |
;                   |                   |
;    **auto-size**  +---- 88B1.0000     |
;                   |                   | 
;                   |                   |
;                   |                   |
;   NK RAM (70 MB)  |                   |
;                   |                   |
;                   |                   |
;                   |                   |
;                   |                   |
;                   |                   |
;                   +---- 8F700000 -----+
;                   |                   |
;    IPU (9 MB)     |                   |
;                   |                   |
;                   |                   |
;                   +---- 9000.0000 ----+
;
;------------------------------------------------------------------------------


;**************************** MEMORY SECTION ***************************
MEMORY

IF IMGFLASH !

; --------------------------- RAM image (Windows CE) -------------------
;   Start Addr      End Addr        Mem Type    Region Name     Size
;   0x88000000      0x88000FFF      SDRAM       ARGS              4 KB
;   0x88001000      0x88008FFF      SDRAM       CSPDDK           32 KB
;   0x88009000      0x881FFFFF      SDRAM       PP             2012 KB
;   0x88000000      0x881FFFFF      SDRAM       reserved          2 MB
;   0x88200000      0x8B0FFFFF      SDRAM       NK               47 MB
;   0x8B100000      0x8FDFFFFF      SDRAM       RAM              70 MB
;   0x8FE00000      0x8FFFFFFF      SDRAM       IPU               9 MB
; ----------------------------------------------------------------------

    #define NK_START    88200000
    #define NK_SIZE     02F00000
    #define RAM_START   8B100000
    #define RAM_SIZE    04600000

ENDIF

IF IMGFLASH

; --------------------------- FLASH image (Windows CE) -----------------
;
;   Flash Images (XIP or relocation) are not supported in this BSP.
;
; ----------------------------------------------------------------------

ENDIF



; ---------------------  Reserved Region Mapping ------------------------
;                   Name        Address      Size        Type
                    ARGS        88000000     00001000    RESERVED
                    CSPDDK      88001000     00008000    RESERVED
                    PP          88009000     001F7000    RESERVED
                    IPU         8F700000     00900000    RESERVED

; ----------------------- Windows CE image ------------------------------
;                   Name        Address      Size        Type
                    NK          $(NK_START)  $(NK_SIZE)  RAMIMAGE
                    RAM         $(RAM_START) $(RAM_SIZE) RAM



; This fix-up variable is a bitfield that can be used to initialize
; the OAL debug zones per oal_log.h.  Uncomment the line and
; change the hexidecimal bits to enable the desired zones.  The
; default value (0x0000000B) enables the OAL_LOG_ERROR,
; OAL_LOG_WARN, and OAL_LOG_INFO zones, and will be used by
; OEMInit if the line remains commented out.
;
;  nk.exe:initialOALLogZones     00000000 0000000B         FIXUPVAR

; This fix-up variable determines the amount of memory the BSP reserves
; for Watson dump capture (see also the OEMInit() function in the OAL).
; The current default behavior is to default to zero unless the image has
; SYSGEN_WATSON_DMPGEN defined, then the default size is 300KB (0x4B000).
;
; If WATSONBUFFERSIZE is defined, use its value.  Otherwise use 300KB.
;
; @CESYSGEN IF CE_MODULES_OSAXST0
#if $(WATSONBUFFERSIZE)!=$()
    nk.exe:dwOEMDrWatsonSize  00000000  $(WATSONBUFFERSIZE) FIXUPVAR
#else
    nk.exe:dwOEMDrWatsonSize  00000000  0x4B000             FIXUPVAR
#endif
; @CESYSGEN ENDIF CE_MODULES_OSAXST0

;**************************** CONFIG SECTION ***************************
CONFIG

; ---------------------- All Image Types Settings ----------------------
;   KERNELFIXUPS = ON (sections to which the kernel can write are 
;                      relocated to the start of RAM)
;   SRE = ON (Romimage.exe produces an .sre file)
; ----------------------------------------------------------------------
    KERNELFIXUPS=ON

; --------------------------- RAM image --------------------------------
;   AUTOSIZE = ON (allows NK and RAM space to resize automatically)
;   ROMSIZE  = 0x04000000 (64 MB)
;   ROMSTART = 0x88000000 (SDRAM virtual address base)
;   ROMWIDTH = 32 (32-bit wide memory, entire image in one file)
;
; Note:  Since we run the bootloader with MMU on, we do not need to
;        adjust virtual addresses back to physical.  If we need
;        to adjust to physical, the calculation would look something
;        like this:
;
;   ROMOFFSET = (SDRAM_PHYSICAL_START - ROMSTART) % 0x100000000
;             = (0x80200000 - 0x88200000) % 0x100000000 = 0xF8000000
; ----------------------------------------------------------------------
IF IMGFLASH !
    AUTOSIZE=ON
    ROMSTART=88200000
    ;ROMSIZE=04000000
    ;ROMWIDTH=32
    ROMOFFSET=F8000000
ENDIF

IF IMGFLASH
;
; Flash Images (XIP or relocation) are not supported in this BSP.
;
ENDIF

; @CESYSGEN IF !NK_NKNOCOMP
    COMPRESSION=ON
; @CESYSGEN ENDIF !NK_NKNOCOMP
; @CESYSGEN IF NK_NKNOCOMP
    COMPRESSION=OFF
; @CESYSGEN ENDIF NK_NKNOCOMP

DLLADDR_AUTOSIZE=ON

; --------------------- Profiling kernel support -----------------------
;   PROFILE = ON  (includes profiler structure and symbols in image)
;   PROFILE = OFF (does not include profiler structure and symbols)
; ----------------------------------------------------------------------
IF IMGPROFILER
   PROFILE=ON
ELSE
   PROFILE=OFF
ENDIF

;
; ROMFLAGS is a bitmask of options for the kernel
;   ROMFLAGS    0x0001  Disallow Paging
;   ROMFLAGS    0x0002  Not all KMode
;   ROMFLAGS    0x0010  Trust Module only
;
IF IMGTRUSTROMONLY
    ROMFLAGS=10
ELSE
    ROMFLAGS=0
ENDIF


; EOF config.bib
