快乐虾
http://blog.csdn.net/lights_joy/
lights@hb165.com
本文适用于
ADI bf561 DSP
uclinux-2008r1.5-rc3 (移植到vdsp5)
Visual DSP++ 5.0(update 5)
欢迎转载,但请保留作者信息
/*
* load the current thread pointer and stack
*/
r1.l = _init_thread_union;
r1.h = _init_thread_union;
r2.l = 0x2000;
r2.h = 0x0000;
r1 = r1 + r2;
sp = r1;
usp = sp;
fp = sp;
在此之前,SP一直使用4k的scratch pad,现在终于要进入正题了。可以将uclinux内核的初始化阶段也看成一个线程,用一个表示线程的全局结构来表示它,这就是init_thread_union。
/*
* Initial thread structure.
*
* We need to make sure that this is 8192-byte aligned due to the
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry.
*/
union thread_union init_thread_union
__attribute__ ((__section__(".data.init_task"))) = {
INIT_THREAD_INFO(init_task)};
它是一个thread_union,定义如下:
union thread_union {
struct thread_info thread_info;
unsigned long stack[THREAD_SIZE/sizeof(long)];
};
thread_info由低向高排列,stack则从高往低使用,因此在head.s中,将sp设置为指向init_thread_union的最高位置。
/*
* Size of kernel stack for each process. This must be a power of 2...
*/
#define THREAD_SIZE 8192 /* 2 pages */
8192的16进制即为0x2000。
head.s分析(1):保存u-boot传递过来的指针(2009-1-19)
head.s分析(2):SYSCFG配置(2009-1-19)
head.s分析(3):数据及指针寄存器清0(2009-1-19)
head.s分析(4):关闭CACHE(2009-01-19)
head.s分析(5):关闭串口(2009-01-19)
head.s分析(6):栈指针初始化(2009-01-19)
head.s分析(7):init_early_exception_vectors(2009-1-19)
head.s分析(8):配置PLL及SDRAM(2009-01-20)
head.s分析(9):EBIU配置(2009-01-20)
head.s分析(10):转入中断15(2009-01-20)
head.s分析(11):关闭WATCHDOG(2009-01-20)
head.s分析(12):bss段清0(2009-01-20)
head.s分析(13):代码段前空间清0(2009-01-20)
head.s分析(14):L2空间清0(2009-01-20)
head.s分析(15):复制u-boot传递的参数(2009-01-20)
head.s分析(16):取_rambase和_ramstart的值(2009-1-20)
分享到:
相关推荐
arm-linux head.S 源代码分析 arm-linux head.S 源代码分析
[root@head-kib ~]# cd /usr/local/kibana-6.5.4-linux-x86_64/config/ [root@head-kib config]# vim kibana.yml server.port: 5601 server.host: 123.57.251.57 elasticsearch.url: ...
关于Linux启动项bootsect、setup、head的阅读心得,和常遇的问题与解决。
该文档主要是elasticsearch7.x版本的安装及集群配置,配合head,ik插件的安装。【备注,配置参数更新如下: cluster.name: es-7 node.name: t-1 network.host: 10.96.141.45 http.port: 9200 transport.tcp.port: ...
Linux 0.00 intel 汇编语法,包含boot.s,head.s,以及编译添加汇编地址的对应文件,可通过NASM进行编译,
[Head.First.Design.Patterns].Head.First.Design.Patterns.7z [Head.First.Design.Patterns].Head.First.Design.Patterns.7z [Head.First.Design.Patterns].Head.First.Design.Patterns.7z [Head.First.Design....
head.S.s
写0磁头全部磁道镜像: write L head0 image files to all reserved cylinders. 写1磁头全部磁道镜像: write L head1 image files to all reserved cylinders. 保存硬盘全部文件: Save L ALL SA backups. (ROM、...
写0磁头全部磁道镜像: write L head0 image files to all reserved cylinders. 写1磁头全部磁道镜像: write L head1 image files to all reserved cylinders. 保存硬盘全部文件: Save L ALL SA backups. (ROM、...
Head.First.JavaScript.Programming(2014.3)Head.First.JavaScript.Programming(2014.3)Head.First.JavaScript.Programming(2014.3)
如果只让ff看见用:root body .head{color:#000;} 如果只让ff、IE8看见用html>/**/body .head{color:#000;} 如果只是不让ie6看见用html>body .head{color:#000;} 即对IE 6无效 如果只是不让ff、IE8看见用*body .head{...
作者:Brett.D.McLaughlin 目录: Intro xxiii 1 Great Software Begins Here: well-designed apps rock 1 2 Give Them What They Want: gathering requirements 55 3 I Love You, You’re Perfect......
.asp,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE;.asa,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE .pl,C:\Perl\bin\perlis.dll,5,GET,HEAD,POST,TRACE;.cgi,C:\Perl\bin\perlis...
linux源码分析之cpu初始化 kernel/head.s
ElasticSearch-head(后续简称es-head)是ElasticSearch的一个插件,提供了es 的可视化操作界面.