📄 stage2_boot.c
字号:
/*
Nand Test: Read/Write and Block Verification for 1550 Nand flash controller
Pb1550 supports NAND control on NANDCS1 and NANDCS0 from the control CPLD.
*/
/********************************************************************/
#include "example.h"
typedef uint32 NandDevice;
void __attribute__((section(".stage2"))) init_system(void)
{
dcacheFlush();
icacheFlush();
tlbInit();
cpuIrqInit();
/* Allow interrupts to occur (though all masked) */
cpuEnableIrqs(STATUS_IE);
}
int __attribute__((section(".stage2"))) load_booter()
{
extern uint32 _text, _end;
NandDevice* nand_device;
if(nand_device = (NandDevice*) nand_initialize())
{
nand_read(&_text, &_end - &_text, 1, 0);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -