kernelboot2.c

来自「嵌入式实时操作系统内核」· C语言 代码 · 共 67 行

C
67
字号
//Kernel Boot File:
//Copyright (c) 2008 www.evvei.com, All Rights Reserved.
//_____________________________________________________________________________________
//File Name: KernelBoot2.c
//Abstract:  This file is the "c" example source code for samsung s3c44b0x processor
//           for boot to the e-kernel.
//

#include "..\library\kernel.h"


//Kernel stack space definition in application data space.
//Not that, user can also space a special area in memory for kernel stack space.
//It's strongly recommended that use the internal memory as the kernel stack space if
//there is some internal memory space in target processor.because the internal memory
//has faster access rate than that of the extenal memory space. this can increase the
//efficiency of the e-kernel.
BYTE  KernelStackSpace[20480];


//Startup information data structure definition for e-kernel.
KSTARTUP  StartupInfo;


VOID KernelBootContinue()
{
    
    //Fill in the startup information data structure.
    StartupInfo.KernelCode     =  0x656b3031;
    StartupInfo.ProcessorCode  =  0x03041101;
    StartupInfo.UserCode       =  0x00000000;
    StartupInfo.LicenceCode    =  0x00000000;
    
    StartupInfo.VectorConfig   =  FALSE;
    StartupInfo.MemoryMode     =  TRUE;
    
    StartupInfo.kernelStack      =  (VOID *)KernelStackSpace;
    StartupInfo.KernelStackSize  =  20480;
    
    StartupInfo.physicalMemoryStart = (VOID *)0x00000000;
    StartupInfo.physicalMemoryEnd   = (VOID *)0x00100000;
    
    StartupInfo.textSection  = (VOID *)0x00000000;
    StartupInfo.TextSize     = 0x00020000;
    
    StartupInfo.dataSection  = (VOID *)0x00026000;
    StartupInfo.DataSize     = 0x00040000;
    
    StartupInfo.dynamicStoreSection  = (VOID *)0x00010000;
    StartupInfo.DynamicStoreSize     = 0x00800000;
    
    StartupInfo.HardClockFrequency = 40;
    StartupInfo.SoftClockFrequency = 32;
    
    StartupInfo.DefaultTimeslice =  1;
    
    //Kernel Startup.
    KernelStartup(&StartupInfo);
}

     





⌨️ 快捷键说明

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