Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
daf90626
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
daf90626
编写于
1月 16, 2007
作者:
P
pbrook
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM ELF loader.
git-svn-id:
svn://svn.savannah.nongnu.org/qemu/trunk@2320
c046a42c-6fe2-441c-8c8c-71466251a162
上级
5856de80
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
36 addition
and
26 deletion
+36
-26
hw/arm_boot.c
hw/arm_boot.c
+32
-22
hw/integratorcp.c
hw/integratorcp.c
+1
-1
hw/realview.c
hw/realview.c
+1
-1
hw/versatilepb.c
hw/versatilepb.c
+1
-1
vl.h
vl.h
+1
-1
未找到文件。
hw/arm_boot.c
浏览文件 @
daf90626
...
...
@@ -64,42 +64,52 @@ static void set_kernel_args(uint32_t ram_size, int initrd_size,
stl_raw
(
p
++
,
0
);
}
void
arm_load_kernel
(
int
ram_size
,
const
char
*
kernel_filename
,
void
arm_load_kernel
(
CPUState
*
env
,
int
ram_size
,
const
char
*
kernel_filename
,
const
char
*
kernel_cmdline
,
const
char
*
initrd_filename
,
int
board_id
)
{
int
kernel_size
;
int
initrd_size
;
int
n
;
uint64_t
entry
;
/* Load the kernel. */
if
(
!
kernel_filename
)
{
fprintf
(
stderr
,
"Kernel image must be specified
\n
"
);
exit
(
1
);
}
kernel_size
=
load_image
(
kernel_filename
,
phys_ram_base
+
KERNEL_LOAD_ADDR
);
if
(
kernel_size
<
0
)
{
fprintf
(
stderr
,
"qemu: could not load kernel '%s'
\n
"
,
kernel_filename
);
e
xit
(
1
)
;
}
if
(
initrd_filename
)
{
initrd_size
=
load_image
(
initrd_filename
,
phys_ram_base
+
INITRD_LOAD_ADDR
);
if
(
initrd_size
<
0
)
{
fprintf
(
stderr
,
"qemu: could not load initrd '%s'
\n
"
,
initrd
_filename
);
kernel_size
=
load_elf
(
kernel_filename
,
0
,
&
entry
);
if
(
kernel_size
)
{
/* An ELF image. Jump to the entry point. */
e
nv
->
regs
[
15
]
=
entry
&
0xfffffffe
;
env
->
thumb
=
entry
&
1
;
}
else
{
/* Raw binary image. Assume it is a Limux zImage. */
kernel_size
=
load_image
(
kernel_filename
,
phys_ram_base
+
KERNEL_LOAD_ADDR
);
if
(
kernel_size
<
0
)
{
fprintf
(
stderr
,
"qemu: could not load kernel '%s'
\n
"
,
kernel
_filename
);
exit
(
1
);
}
}
else
{
initrd_size
=
0
;
if
(
initrd_filename
)
{
initrd_size
=
load_image
(
initrd_filename
,
phys_ram_base
+
INITRD_LOAD_ADDR
);
if
(
initrd_size
<
0
)
{
fprintf
(
stderr
,
"qemu: could not load initrd '%s'
\n
"
,
initrd_filename
);
exit
(
1
);
}
}
else
{
initrd_size
=
0
;
}
bootloader
[
1
]
|=
board_id
&
0xff
;
bootloader
[
2
]
|=
(
board_id
>>
8
)
&
0xff
;
bootloader
[
5
]
=
KERNEL_ARGS_ADDR
;
bootloader
[
6
]
=
KERNEL_LOAD_ADDR
;
for
(
n
=
0
;
n
<
sizeof
(
bootloader
)
/
4
;
n
++
)
stl_raw
(
phys_ram_base
+
(
n
*
4
),
bootloader
[
n
]);
set_kernel_args
(
ram_size
,
initrd_size
,
kernel_cmdline
);
}
bootloader
[
1
]
|=
board_id
&
0xff
;
bootloader
[
2
]
|=
(
board_id
>>
8
)
&
0xff
;
bootloader
[
5
]
=
KERNEL_ARGS_ADDR
;
bootloader
[
6
]
=
KERNEL_LOAD_ADDR
;
for
(
n
=
0
;
n
<
sizeof
(
bootloader
)
/
4
;
n
++
)
stl_raw
(
phys_ram_base
+
(
n
*
4
),
bootloader
[
n
]);
set_kernel_args
(
ram_size
,
initrd_size
,
kernel_cmdline
);
}
hw/integratorcp.c
浏览文件 @
daf90626
...
...
@@ -509,7 +509,7 @@ static void integratorcp_init(int ram_size, int vga_ram_size, int boot_device,
}
pl110_init
(
ds
,
0xc0000000
,
pic
,
22
,
0
);
arm_load_kernel
(
ram_size
,
kernel_filename
,
kernel_cmdline
,
arm_load_kernel
(
env
,
ram_size
,
kernel_filename
,
kernel_cmdline
,
initrd_filename
,
0x113
);
}
...
...
hw/realview.c
浏览文件 @
daf90626
...
...
@@ -127,7 +127,7 @@ static void realview_init(int ram_size, int vga_ram_size, int boot_device,
/* 0x68000000 PCI mem 1. */
/* 0x6c000000 PCI mem 2. */
arm_load_kernel
(
ram_size
,
kernel_filename
,
kernel_cmdline
,
arm_load_kernel
(
env
,
ram_size
,
kernel_filename
,
kernel_cmdline
,
initrd_filename
,
0x33b
);
}
...
...
hw/versatilepb.c
浏览文件 @
daf90626
...
...
@@ -250,7 +250,7 @@ static void versatile_init(int ram_size, int vga_ram_size, int boot_device,
/* 0x101f3000 UART2. */
/* 0x101f4000 SSPI. */
arm_load_kernel
(
ram_size
,
kernel_filename
,
kernel_cmdline
,
arm_load_kernel
(
env
,
ram_size
,
kernel_filename
,
kernel_cmdline
,
initrd_filename
,
board_id
);
}
...
...
vl.h
浏览文件 @
daf90626
...
...
@@ -1317,7 +1317,7 @@ void *arm_gic_init(uint32_t base, void *parent, int parent_irq);
/* arm_boot.c */
void
arm_load_kernel
(
int
ram_size
,
const
char
*
kernel_filename
,
void
arm_load_kernel
(
CPUState
*
env
,
int
ram_size
,
const
char
*
kernel_filename
,
const
char
*
kernel_cmdline
,
const
char
*
initrd_filename
,
int
board_id
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录