Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
de4fc982
Unverified
Commit
de4fc982
authored
6 years ago
by
Soby Mathew
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1666 from pmanish87/mp2/manish_local
plat/arm: Support direct Linux kernel boot in AArch32
parents
9c10e348
ed2c4f4a
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
v2.1
v2.1-rc1
v2.1-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bl32/sp_min/sp_min_main.c
+2
-0
bl32/sp_min/sp_min_main.c
docs/user-guide.rst
+6
-5
docs/user-guide.rst
plat/arm/common/arm_common.mk
+8
-5
plat/arm/common/arm_common.mk
plat/arm/common/sp_min/arm_sp_min_setup.c
+13
-0
plat/arm/common/sp_min/arm_sp_min_setup.c
with
29 additions
and
10 deletions
+29
-10
bl32/sp_min/sp_min_main.c
View file @
de4fc982
...
@@ -101,6 +101,8 @@ static void copy_cpu_ctx_to_smc_stx(const regs_t *cpu_reg_ctx,
...
@@ -101,6 +101,8 @@ static void copy_cpu_ctx_to_smc_stx(const regs_t *cpu_reg_ctx,
smc_ctx_t
*
next_smc_ctx
)
smc_ctx_t
*
next_smc_ctx
)
{
{
next_smc_ctx
->
r0
=
read_ctx_reg
(
cpu_reg_ctx
,
CTX_GPREG_R0
);
next_smc_ctx
->
r0
=
read_ctx_reg
(
cpu_reg_ctx
,
CTX_GPREG_R0
);
next_smc_ctx
->
r1
=
read_ctx_reg
(
cpu_reg_ctx
,
CTX_GPREG_R1
);
next_smc_ctx
->
r2
=
read_ctx_reg
(
cpu_reg_ctx
,
CTX_GPREG_R2
);
next_smc_ctx
->
lr_mon
=
read_ctx_reg
(
cpu_reg_ctx
,
CTX_LR
);
next_smc_ctx
->
lr_mon
=
read_ctx_reg
(
cpu_reg_ctx
,
CTX_LR
);
next_smc_ctx
->
spsr_mon
=
read_ctx_reg
(
cpu_reg_ctx
,
CTX_SPSR
);
next_smc_ctx
->
spsr_mon
=
read_ctx_reg
(
cpu_reg_ctx
,
CTX_SPSR
);
next_smc_ctx
->
scr
=
read_ctx_reg
(
cpu_reg_ctx
,
CTX_SCR
);
next_smc_ctx
->
scr
=
read_ctx_reg
(
cpu_reg_ctx
,
CTX_SCR
);
...
...
This diff is collapsed.
Click to expand it.
docs/user-guide.rst
View file @
de4fc982
...
@@ -728,11 +728,12 @@ Arm development platform specific build options
...
@@ -728,11 +728,12 @@ Arm development platform specific build options
-
``
ARM_LINUX_KERNEL_AS_BL33
``:
The
Linux
kernel
expects
registers
x0
-
x3
to
-
``
ARM_LINUX_KERNEL_AS_BL33
``:
The
Linux
kernel
expects
registers
x0
-
x3
to
have
specific
values
at
boot
.
This
boolean
option
allows
the
Trusted
Firmware
have
specific
values
at
boot
.
This
boolean
option
allows
the
Trusted
Firmware
to
have
a
Linux
kernel
image
as
BL33
by
preparing
the
registers
to
these
to
have
a
Linux
kernel
image
as
BL33
by
preparing
the
registers
to
these
values
before
jumping
to
BL33
.
This
option
defaults
to
0
(
disabled
).
For
now
,
values
before
jumping
to
BL33
.
This
option
defaults
to
0
(
disabled
).
For
it
only
supports
AArch64
kernels
.
``
RESET_TO_BL31
``
must
be
1
when
using
it
.
AArch64
``
RESET_TO_BL31
``
and
for
AArch32
``
RESET_TO_SP_MIN
``
must
be
1
when
If
this
option
is
set
to
1
,
``
ARM_PRELOADED_DTB_BASE
``
must
be
set
to
the
using
it
.
If
this
option
is
set
to
1
,
``
ARM_PRELOADED_DTB_BASE
``
must
be
set
location
of
a
device
tree
blob
(
DTB
)
already
loaded
in
memory
.
The
Linux
to
the
location
of
a
device
tree
blob
(
DTB
)
already
loaded
in
memory
.
The
Image
address
must
be
specified
using
the
``
PRELOADED_BL33_BASE
``
option
.
Linux
Image
address
must
be
specified
using
the
``
PRELOADED_BL33_BASE
``
option
.
-
``
ARM_RECOM_STATE_ID_ENC
``:
The
PSCI1
.0
specification
recommends
an
encoding
-
``
ARM_RECOM_STATE_ID_ENC
``:
The
PSCI1
.0
specification
recommends
an
encoding
for
the
construction
of
composite
state
-
ID
in
the
power
-
state
parameter
.
for
the
construction
of
composite
state
-
ID
in
the
power
-
state
parameter
.
...
...
This diff is collapsed.
Click to expand it.
plat/arm/common/arm_common.mk
View file @
de4fc982
...
@@ -86,11 +86,14 @@ $(eval $(call assert_boolean,ARM_LINUX_KERNEL_AS_BL33))
...
@@ -86,11 +86,14 @@ $(eval $(call assert_boolean,ARM_LINUX_KERNEL_AS_BL33))
$(eval
$(call
add_define,ARM_LINUX_KERNEL_AS_BL33))
$(eval
$(call
add_define,ARM_LINUX_KERNEL_AS_BL33))
ifeq
(${ARM_LINUX_KERNEL_AS_BL33},1)
ifeq
(${ARM_LINUX_KERNEL_AS_BL33},1)
ifneq
(${ARCH},aarch64)
ifeq
(${ARCH},aarch64)
$(error
"ARM_LINUX_KERNEL_AS_BL33 is only available in AArch64."
)
ifneq
(${RESET_TO_BL31},1)
endif
$(error
"ARM_LINUX_KERNEL_AS_BL33 is only available if RESET_TO_BL31=1."
)
ifneq
(${RESET_TO_BL31},1)
endif
$(error
"ARM_LINUX_KERNEL_AS_BL33 is only available if RESET_TO_BL31=1."
)
else
ifneq
(${RESET_TO_SP_MIN},1)
$(error
"ARM_LINUX_KERNEL_AS_BL33 is only available if RESET_TO_SP_MIN=1."
)
endif
endif
endif
ifndef
PRELOADED_BL33_BASE
ifndef
PRELOADED_BL33_BASE
$(error
"PRELOADED_BL33_BASE must be set if ARM_LINUX_KERNEL_AS_BL33 is used."
)
$(error
"PRELOADED_BL33_BASE must be set if ARM_LINUX_KERNEL_AS_BL33 is used."
)
...
...
This diff is collapsed.
Click to expand it.
plat/arm/common/sp_min/arm_sp_min_setup.c
View file @
de4fc982
...
@@ -82,6 +82,19 @@ void arm_sp_min_early_platform_setup(void *from_bl2, uintptr_t tos_fw_config,
...
@@ -82,6 +82,19 @@ void arm_sp_min_early_platform_setup(void *from_bl2, uintptr_t tos_fw_config,
bl33_image_ep_info
.
spsr
=
arm_get_spsr_for_bl33_entry
();
bl33_image_ep_info
.
spsr
=
arm_get_spsr_for_bl33_entry
();
SET_SECURITY_STATE
(
bl33_image_ep_info
.
h
.
attr
,
NON_SECURE
);
SET_SECURITY_STATE
(
bl33_image_ep_info
.
h
.
attr
,
NON_SECURE
);
# if ARM_LINUX_KERNEL_AS_BL33
/*
* According to the file ``Documentation/arm/Booting`` of the Linux
* kernel tree, Linux expects:
* r0 = 0
* r1 = machine type number, optional in DT-only platforms (~0 if so)
* r2 = Physical address of the device tree blob
*/
bl33_image_ep_info
.
args
.
arg0
=
0U
;
bl33_image_ep_info
.
args
.
arg1
=
~
0U
;
bl33_image_ep_info
.
args
.
arg2
=
(
u_register_t
)
ARM_PRELOADED_DTB_BASE
;
# endif
#else
/* RESET_TO_SP_MIN */
#else
/* RESET_TO_SP_MIN */
/*
/*
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help