딥 네트워크 - 딥러닝 모델 분석/네트웍 통신/카메라 3A 튜닝 분야

WINCE 어드레스 맵핑 .... 본문

Kernel Porting/Windows 관련

WINCE 어드레스 맵핑 ....

파란새 2008. 2. 8. 17:30



// BANK_A BOOT AREA
#define  OEM_MEM_BOOTLOADER_START  0x00000000
#define  OEM_MEM_BOOTLOADER_SIZE  0x200
#define  OEM_MEM_BOOTLOADER_SAVE_START  0x00008000
#define  OEM_MEM_BOOTLOADER_SAVE_SIZE  0x200
#define  OEM_MEM_PAGE_TABLE_START  0x00010000
#define  OEM_MEM_PAGE_TABLE_SIZE  0x1000
#define  OEM_MEM_BOOTARG_START  0x00018000
#define  OEM_MEM_BOOTARG_SIZE  0x600
#define  OEM_MEM_MBOOT_START  0x00020000
#define  OEM_MEM_MBOOT_SIZE  0x3f800
#define  OEM_MEM_IMAGE_SHARE_ARGS_PA_START  0x00080000
#define  OEM_MEM_IMAGE_SHARE_ARGS_PA_SIZE  0x180000
#define  OEM_MEM_OSIMAGE_START  0x80200000
#define  OEM_MEM_NANDSAVE_BUFFER_START  0x83900000


#include <windows.h>

#include <bsp.h>

typedef void (ApplicationFunction)(void);
#define ApplicationStart ((ApplicationFunction*)OEM_MEM_MBOOT_START)

extern"C"
extern void ReadNand( unsigned int* Dst, unsigned int NANDPage, int Size4 );

extern"C"
void BootMain(void)
{
 // Nand use fixed power
 // Nand interface is not shared any gpio
 // NAND_nWP seted to Low ( only read, write protected ) but Anything will do.
 //--------------------------------------------------------------------------
 // Read copy from NAND Flash
 ReadNand( (unsigned int*)OEM_MEM_MBOOT_START, OEM_NAND_MBOOT_START, OEM_NAND_MBOOT_SIZE);

 for (register int i=0; i<OEM_NAND_BOOTLOADER_SIZE; i++)  //copy bootloader except cpu vectors area for nand save
  *(unsigned char*)(i+OEM_MEM_BOOTLOADER_SAVE_START)= *(unsigned char *)(i);

 //--------------------------------------------------------------------------
 // go to MultiBootloader
 ApplicationStart();
}




OEM_SYSTEM_ADDRTABLE.h

// Virtual,  Physical,  Size(MB)
// Hole Space Address
 0x80000000,  0x00000000,    64,   // BANK_A
 0x88000000,  0x40000000,    32,   // BANK_B
 0x90200000,  0x80000000,     1,   // nSCS0
 0x90300000,  0x84000000,     1,   // nSCS1
 0x90400000,  0x88000000,     1,   // nSCS2
 0x90500000,  0x8c000000,     1,   // DTK:EthernetI/O
 0x90600000,  0x8d000000,     1,   // DTK:EthernetMem
 0x90700000,  0x8e000000,     1,   // DTK:SRAM
 0x90800000,  0x8f000000,     1,   // DTK:Debug
 0x90900000,  0x9c000000,     1,   // NANDFlash
 0x94000000,  0xa0000000,    64,   // PCMCIA#0IO
 0x98000000,  0xa4000000,    64,   // PCMCIA#1
 0x9c000000,  0xa8000000,    64,   // PCMCIA#0MEM
 0x90a00000,  0xbc000000,     1,   // IDE
 0x90000000,  0xc0000000,     1,   // NOMALIO
 0x90100000,  0xe0000000,     1,   // FASTIO
 0,



#include <windows.h>
#include <mes_mp2530f.h>
#include <OEM_SYSTEM.h>

const DWORD g_oalAddressTable[] = {
 #include "OEM_SYSTEM_ADDRTABLE.h"
};

extern void KernelStart(PDWORD pAddress);

void BootMain(PDWORD pAddressTable)
{
 KernelStart(pAddressTable);
}