Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
e17ee157
U
U-Boot.Mirror
项目概览
OS
/
U-Boot.Mirror
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
U-Boot.Mirror
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e17ee157
编写于
2月 24, 2009
作者:
G
Graeme Russ
提交者:
Wolfgang Denk
3月 20, 2009
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add basic relocation to i386 port
Signed-off-by:
N
Graeme Russ
<
graeme.russ@gmail.com
>
上级
8c63d476
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
77 addition
and
5 deletion
+77
-5
cpu/i386/interrupts.c
cpu/i386/interrupts.c
+2
-2
cpu/i386/start.S
cpu/i386/start.S
+41
-0
include/configs/sc520_cdp.h
include/configs/sc520_cdp.h
+2
-0
include/configs/sc520_spunk.h
include/configs/sc520_spunk.h
+2
-0
lib_i386/board.c
lib_i386/board.c
+27
-0
lib_i386/interrupts.c
lib_i386/interrupts.c
+2
-2
lib_i386/timer.c
lib_i386/timer.c
+1
-1
未找到文件。
cpu/i386/interrupts.c
浏览文件 @
e17ee157
...
...
@@ -53,8 +53,8 @@ asm ("idt_ptr:\n"
void
set_vector
(
u8
intnum
,
void
*
routine
)
{
idt
[
intnum
].
base_high
=
(
u16
)((
u32
)(
routine
)
>>
16
);
idt
[
intnum
].
base_low
=
(
u16
)((
u32
)(
routine
)
&
0xffff
);
idt
[
intnum
].
base_high
=
(
u16
)((
u32
)(
routine
+
gd
->
reloc_off
)
>>
16
);
idt
[
intnum
].
base_low
=
(
u16
)((
u32
)(
routine
+
gd
->
reloc_off
)
&
0xffff
);
}
...
...
cpu/i386/start.S
浏览文件 @
e17ee157
...
...
@@ -173,7 +173,41 @@ bss_fail:
jmp
die
bss_ok
:
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
/
*
indicate
progress
*/
movw
$
0x06
,
%
ax
movl
$
.
progress6
,
%
ebp
jmp
show_boot_progress_asm
.
progress6
:
/
*
copy
text
section
to
ram
,
size
must
be
4
-
byte
aligned
*/
movl
$CONFIG_SYS_BL_START_RAM
,
%
edi
/*
destination
address
*/
movl
$TEXT_BASE
,
%
esi
/*
source
address
*/
movl
$
_i386boot_text_size
,
%
ecx
/*
number
of
bytes
to
copy
*/
movl
%
ecx
,
%
eax
andl
$
3
,
%
eax
jz
text_copy
/*
Already
4
-
byte
aligned
*/
subl
$
4
,
%
eax
/*
Add
extra
bytes
to
size
*/
addl
%
eax
,
%
ecx
text_copy
:
shrl
$
2
,
%
ecx
/*
copy
4
byte
each
time
*/
cld
cmpl
$
0
,
%
ecx
je
text_ok
text_segment
:
movsl
loop
text_segment
jmp
text_ok
text_fail
:
/
*
indicate
(
lack
of
)
progress
*/
movw
$
0x86
,
%
ax
movl
$
.
progress5a
,
%
ebp
jmp
show_boot_progress_asm
.
progress5a
:
jmp
die
text_ok
:
#endif
wbinvd
...
...
@@ -183,7 +217,14 @@ bss_ok:
jmp
show_boot_progress_asm
.
progress4
:
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
/
*
Jump
to
the
RAM
copy
of
start_i386boot
*/
movl
$start_i386boot
,
%
ebp
addl
$
(
CONFIG_SYS_BL_START_RAM
-
TEXT_BASE
),
%
ebp
call
*%
ebp
/*
Enter
,
U
-
boot
!
*/
#else
call
start_i386boot
/*
Enter
,
U
-
boot
!
*/
#endif
/
*
indicate
(
lack
of
)
progress
*/
movw
$
0x85
,
%
ax
...
...
include/configs/sc520_cdp.h
浏览文件 @
e17ee157
...
...
@@ -28,6 +28,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
#define CONFIG_SKIP_RELOCATE_UBOOT
#define GRUSS_TESTING
/*
* High Level Configuration Options
...
...
include/configs/sc520_spunk.h
浏览文件 @
e17ee157
...
...
@@ -28,6 +28,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
#define CONFIG_SKIP_RELOCATE_UBOOT
/*
* High Level Configuration Options
* (easy to change)
...
...
lib_i386/board.c
浏览文件 @
e17ee157
...
...
@@ -225,6 +225,9 @@ void start_i386boot (void)
static
bd_t
bd_data
;
init_fnc_t
**
init_fnc_ptr
;
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
cmd_tbl_t
*
p
;
#endif
show_boot_progress
(
0x21
);
gd
=
&
gd_data
;
...
...
@@ -238,6 +241,10 @@ void start_i386boot (void)
gd
->
baudrate
=
CONFIG_BAUDRATE
;
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
/* Need to set relocation offset here for interrupt initialization */
gd
->
reloc_off
=
CONFIG_SYS_BL_START_RAM
-
TEXT_BASE
;
#endif
for
(
init_fnc_ptr
=
init_sequence
,
i
=
0
;
*
init_fnc_ptr
;
++
init_fnc_ptr
,
i
++
)
{
show_boot_progress
(
0xa130
|
i
);
...
...
@@ -247,6 +254,26 @@ void start_i386boot (void)
}
show_boot_progress
(
0x23
);
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
for
(
p
=
&
__u_boot_cmd_start
;
p
!=
&
__u_boot_cmd_end
;
p
++
)
{
ulong
addr
;
addr
=
(
ulong
)
(
p
->
cmd
)
+
gd
->
reloc_off
;
p
->
cmd
=
(
int
(
*
)(
struct
cmd_tbl_s
*
,
int
,
int
,
char
*
[]))
addr
;
addr
=
(
ulong
)(
p
->
name
)
+
gd
->
reloc_off
;
p
->
name
=
(
char
*
)
addr
;
if
(
p
->
usage
!=
NULL
)
{
addr
=
(
ulong
)(
p
->
usage
)
+
gd
->
reloc_off
;
p
->
usage
=
(
char
*
)
addr
;
}
#ifdef CONFIG_SYS_LONGHELP
if
(
p
->
help
!=
NULL
)
{
addr
=
(
ulong
)(
p
->
help
)
+
gd
->
reloc_off
;
p
->
help
=
(
char
*
)
addr
;
}
#endif
}
#endif
/* configure available FLASH banks */
size
=
flash_init
();
display_flash_config
(
size
);
...
...
lib_i386/interrupts.c
浏览文件 @
e17ee157
...
...
@@ -70,12 +70,12 @@ void irq_install_handler(int irq, interrupt_handler_t *handler, void *arg)
if
(
irq_handlers
[
irq
].
handler
!=
NULL
)
printf
(
"irq_install_handler: 0x%08lx replacing 0x%08lx
\n
"
,
(
ulong
)
handler
,
(
ulong
)
handler
+
gd
->
reloc_off
,
(
ulong
)
irq_handlers
[
irq
].
handler
);
status
=
disable_interrupts
();
irq_handlers
[
irq
].
handler
=
handler
;
irq_handlers
[
irq
].
handler
=
handler
+
gd
->
reloc_off
;
irq_handlers
[
irq
].
arg
=
arg
;
irq_handlers
[
irq
].
count
=
0
;
...
...
lib_i386/timer.c
浏览文件 @
e17ee157
...
...
@@ -51,7 +51,7 @@ int register_timer_isr (timer_fnc_t *isr_func)
if
(
new_func
==
NULL
)
return
1
;
new_func
->
isr_func
=
isr_func
;
new_func
->
isr_func
=
isr_func
+
gd
->
reloc_off
;
new_func
->
next
=
NULL
;
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录