⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 image_cfg.h

📁 freescale i.mx31 BSP CE5.0全部源码
💻 H
字号:
//------------------------------------------------------------------------------
//
// 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-2006, Freescale Semiconductor, Inc. All Rights Reserved
//  THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
//  BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
//  FREESCALE SEMICONDUCTOR, INC.
//
//------------------------------------------------------------------------------
//
//  File:  image_cfg.h
//
//  Defines configuration parameters used to create the NK and Bootloader
//  program images.
//
//------------------------------------------------------------------------------
#ifndef __IMAGE_CFG_H
#define __IMAGE_CFG_H

#if __cplusplus
extern "C" {
#endif

//------------------------------------------------------------------------------
//  RESTRICTION
//
//  This file is a configuration file. It should ONLY contain simple #define
//  directives defining constants. This file is included by other files that
//  only support simple substitutions.
//
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
//  NAMING CONVENTION
//
//  The IMAGE_ naming convention ...
//
//  IMAGE_<NAME>_<SECTION>_<MEMORY_DEVICE>_[OFFSET|SIZE|START|END]
//
//      <NAME>          - WINCE, BOOT, SHARE
//      <SECTION>       - section name: user defined
//      <MEMORY_DEVICE> - the memory device the block resides on
//      OFFSET          - number of bytes from memory device start address
//      SIZE            - maximum size of the block
//      START           - start address of block    (device address + offset)
//      END             - end address of block      (start address  + size - 1)
//
//------------------------------------------------------------------------------
#define IMAGE_BOOT_RAM_PA_START         CSP_BASE_MEM_PA_CSD0
#define IMAGE_BOOT_NOR_PA_START         CSP_BASE_MEM_PA_CS0

#define IMAGE_SHARE_ARGS_UA_START       OALPAtoVA(IMAGE_BOOT_RAM_PA_START, FALSE)
#define IMAGE_SHARE_ARGS_CA_START       OALPAtoVA(IMAGE_BOOT_RAM_PA_START, TRUE)
#define IMAGE_SHARE_ARGS_SIZE           0x00001000

#define IMAGE_WINCE_CODE_RAM_CA_START   ((DWORD)OALPAtoVA(IMAGE_BOOT_RAM_PA_START, TRUE) + 0x00100000)

//------------------------------------------------------------------------------
// Internal RAM Mapping (16K)
#define IMAGE_SHARE_IRAM_PA_START       CSP_BASE_MEM_PA_IRAM
#define IMAGE_SHARE_IRAM_SIZE           (16*1024)

// 4K reserved for OEM
#define IMAGE_SHARE_IRAM_OEM_OFFSET     (0)
#define IMAGE_SHARE_IRAM_OEM_PA_START   (IMAGE_SHARE_IRAM_PA_START+IMAGE_SHARE_IRAM_OEM_OFFSET)
#define IMAGE_SHARE_IRAM_OEM_SIZE       (4*1024)

// 4K reserved for SDMA data structures
#define IMAGE_SHARE_IRAM_SDMA_OFFSET    (4*1024)
#define IMAGE_SHARE_IRAM_SDMA_PA_START  (IMAGE_SHARE_IRAM_PA_START+IMAGE_SHARE_IRAM_SDMA_OFFSET)
#define IMAGE_SHARE_IRAM_SDMA_SIZE      (4*1024)

// 8K reserved for internal audio buffers
#define IMAGE_SHARE_IRAM_AUDIO_OFFSET   (8*1024)
#define IMAGE_SHARE_IRAM_AUDIO_PA_START (IMAGE_SHARE_IRAM_PA_START+IMAGE_SHARE_IRAM_AUDIO_OFFSET)
#define IMAGE_SHARE_IRAM_AUDIO_SIZE     (8*1024)

//------------------------------------------------------------------------------
// SDMA defines
#define IMAGE_SHARE_SDMA_PA_START       (IMAGE_BOOT_RAM_PA_START+0x1000)
#define IMAGE_SHARE_SDMA_UA_START       OALPAtoVA(IMAGE_SHARE_SDMA_PA_START, FALSE)
#define IMAGE_SHARE_SDMA_CA_START       OALPAtoVA(IMAGE_SHARE_SDMA_PA_START, TRUE)
#define IMAGE_SHARE_SDMA_SIZE           0x00008000

//------------------------------------------------------------------------------
// EBOOT defines
#define IMAGE_EBOOT_CODE_CA_START       OALPAtoVA(IMAGE_BOOT_NOR_PA_START, TRUE)
#define IMAGE_EBOOT_CODE_SIZE           0x00040000

#define IMAGE_EBOOT_NANDCACHE_CA_START  ((DWORD)IMAGE_SHARE_ARGS_CA_START + IMAGE_SHARE_ARGS_SIZE)
#define IMAGE_EBOOT_NANDCACHE_SIZE      0x00005000
//------------------------------------------------------------------------------


//------------------------------------------------------------------------------
//  SDRAM MEMORY (a la PMC)
//------------------------------------------------------------------------------

//
// Shared Args definitions
//
#define IMAGE_SHARE_ARGS_RAM_OFFSET      0
#define IMAGE_SHARE_ARGS_RAM_START       (IMAGE_BOOT_RAM_PA_START + IMAGE_SHARE_ARGS_RAM_OFFSET)
#define IMAGE_SHARE_ARGS_RAM_SIZE        0x00001000

//
// Stack space for boot process
//
#define IMAGE_BOOT_STACK_RAM_OFFSET      (IMAGE_SHARE_ARGS_RAM_OFFSET + IMAGE_SHARE_ARGS_RAM_SIZE)
#define IMAGE_BOOT_STACK_RAM_START       (IMAGE_BOOT_RAM_PA_START + IMAGE_BOOT_STACK_RAM_OFFSET)
#define IMAGE_BOOT_STACK_RAM_SIZE        0x0003B000

//
// Page table
//
#define IMAGE_SHARE_PAGETABLE_RAM_OFFSET (IMAGE_BOOT_STACK_RAM_OFFSET + IMAGE_BOOT_STACK_RAM_SIZE)
#define IMAGE_SHARE_PAGETABLE_RAM_START  (IMAGE_BOOT_RAM_PA_START + IMAGE_SHARE_PAGETABLE_RAM_OFFSET)
#define IMAGE_SHARE_PAGETABLE_RAM_SIZE   0x00004000

//
// Bootloader image memory
//
#define IMAGE_BOOT_BLDRIMAGE_RAM_OFFSET  (IMAGE_SHARE_PAGETABLE_RAM_OFFSET + IMAGE_SHARE_PAGETABLE_RAM_SIZE)
#define IMAGE_BOOT_BLDRIMAGE_RAM_START   (IMAGE_BOOT_RAM_PA_START + IMAGE_BOOT_BLDRIMAGE_RAM_OFFSET)
#define IMAGE_BOOT_BLDRIMAGE_SIZE        0x00040000

//
// RAM used during boot process
//
#define IMAGE_BOOT_RAM_RAM_OFFSET        (IMAGE_BOOT_BLDRIMAGE_RAM_OFFSET + IMAGE_BOOT_BLDRIMAGE_SIZE)
#define IMAGE_BOOT_RAM_RAM_START         (IMAGE_BOOT_RAM_PA_START + IMAGE_BOOT_RAM_RAM_OFFSET)
#define IMAGE_BOOT_RAM_RAM_SIZE          0x00080000

//
// Bootloader (shared?) display memory
//
#define IMAGE_BOOT_DISPLAY_RAM_OFFSET    (127*1024*1024)    // Last 1MB of SDRAM
#define IMAGE_BOOT_DISPLAY_RAM_START     (IMAGE_BOOT_RAM_PA_START + IMAGE_BOOT_DISPLAY_RAM_OFFSET)
#define IMAGE_BOOT_DISPLAY_RAM_SIZE      0x00100000 // 320 x 240 x 2 (plus lots of reserve)

//
// Run-time image memory
//
#define IMAGE_WINCE_NK_RAM_OFFSET        (0x00100000)
#define IMAGE_WINCE_NK_RAM_START         (IMAGE_BOOT_RAM_PA_START + IMAGE_WINCE_NK_RAM_OFFSET)
// AUTOSIZE is enabled, so there is no SIZE value

//
// Recovery image memory
//
#define IMAGE_WINCE_RECOVERY_RAM_OFFSET  IMAGE_WINCE_NK_RAM_OFFSET
#define IMAGE_WINCE_RECOVERY_RAM_START   (IMAGE_BOOT_RAM_PA_START + IMAGE_WINCE_RECOVERY_RAM_OFFSET)
// AUTOSIZE is enabled, so there is no SIZE value


//
// RAM Image area definitions - shared between bootloader and recovery image
// (temporary RAM for storing images destined for booting by the recovery image)
//
#define IMAGE_SHARE_RAMIMG_RAM_OFFSET    0x00200000
#define IMAGE_SHARE_RAMIMG_RAM_START     (IMAGE_BOOT_RAM_PA_START + IMAGE_SHARE_RAMIMG_RAM_OFFSET)
#define IMAGE_SHARE_RAMIMG_RAM_SIZE      0x03E00000 // Must be at least large enough for the nk image. 16MB is overkill for retail.


//------------------------------------------------------------------------------
//  FLASH MEMORY (a la PMC)
//------------------------------------------------------------------------------

//
// Bootloader flash definitions
//
#define IMAGE_BOOT_BLDRIMAGE_FLASH_OFFSET   0
#define IMAGE_BOOT_BLDRIMAGE_FLASH_START    (IMAGE_BOOT_NOR_PA_START + IMAGE_BOOT_BLDRIMAGE_FLASH_OFFSET)

//
// configuration block definitions
//
#define IMAGE_WINCE_CONFIG_FLASH_OFFSET     IMAGE_BOOT_BLDRIMAGE_SIZE
#define IMAGE_WINCE_CONFIG_FLASH_START      (IMAGE_BOOT_NOR_PA_START + IMAGE_WINCE_CONFIG_FLASH_OFFSET)
#define IMAGE_WINCE_CONFIG_FLASH_SIZE       0x00020000                  // 128KByte config block

//
// DRM block definitions
//
#define IMAGE_WINCE_DRM_FLASH_OFFSET        (IMAGE_WINCE_CONFIG_FLASH_OFFSET + IMAGE_WINCE_CONFIG_FLASH_SIZE)
#define IMAGE_WINCE_DRM_FLASH_START         (IMAGE_BOOT_NOR_PA_START + IMAGE_WINCE_DRM_FLASH_OFFSET)
#define IMAGE_WINCE_DRM_FLASH_SIZE          0x00020000                  // 128KByte config block

//
// Recovery image definitions
//
#define IMAGE_RECOVERY_FLASH_OFFSET         (IMAGE_WINCE_DRM_FLASH_OFFSET + IMAGE_WINCE_DRM_FLASH_SIZE)
#define IMAGE_RECOVERY_FLASH_START          (IMAGE_BOOT_NOR_PA_START + IMAGE_RECOVERY_FLASH_OFFSET)
#define IMAGE_RECOVERY_SIZE                 0x00180000 // 1.5MByte

//------------------------------------------------------------------------------

#if __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -