📄 scatter_load.c
字号:
/**************************************************************************************
*
* Project Name : S3C6410 Validation
*
* Copyright 2006 by Samsung Electronics, Inc.
* All rights reserved.
*
* Project Description :
* This software is only for validating functions of the S3C6410.
* Anybody can use this software without our permission.
*
*--------------------------------------------------------------------------------------
*
* File Name : scatter_load.c
*
* File Description : This file implements the scatterloading function.
*
* Author : Haksoo,Kim
* Dept. : AP Development Team
* Created Date : 2007/02/16
* Version : 0.1
*
* History
* - Created(Haksoo,Kim 2007/02/16)
*
**************************************************************************************/
#if (USE_SCATTER_LOAD==1)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "option.h"
void ScatterMemcpy (volatile u32* d, volatile u32* s, u32 l)
{
volatile u32 i;
for (i=0,l/=4 ; i<l ; i++)
d[i] = s[i];
}
void ScatterMemset (volatile u32* d, u32 v, u32 l)
{
volatile u32 i;
for (i=0,l/=4 ; i<l ; i++)
d[i] = v;
}
void ScatterLoad (void)
{
extern u32 Load$$DRAM$$Base, Image$$DRAM$$Base, Image$$DRAM$$Length, Image$$DRAM$$ZI$$Base, Image$$DRAM$$ZI$$Length;
if (&Load$$DRAM$$Base != &Image$$DRAM$$Base)
ScatterMemcpy(&Image$$DRAM$$Base, &Load$$DRAM$$Base, (u32)&Image$$DRAM$$Length);
if ((u32)&Image$$DRAM$$ZI$$Length != 0)
ScatterMemset(&Image$$DRAM$$ZI$$Base, 0, (u32)&Image$$DRAM$$ZI$$Length);
return;
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -