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
0f22bef3
Commit
0f22bef3
authored
7 years ago
by
Scott Branden
Committed by
GitHub
7 years ago
Browse files
Options
Download
Plain Diff
Merge branch 'integration' into tf_issue_461
parents
53d9c9c8
dd454b40
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
v2.0
v2.0-rc0
v1.6
v1.6-rc1
v1.6-rc0
v1.5
v1.5-rc3
v1.5-rc2
v1.5-rc1
v1.5-rc0
v1.4
v1.4-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
132
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
drivers/arm/tzc/tzc_common_private.h
+11
-5
drivers/arm/tzc/tzc_common_private.h
drivers/arm/tzc/tzc_dmc500.c
+4
-4
drivers/arm/tzc/tzc_dmc500.c
drivers/cadence/uart/aarch64/cdns_console.S
+20
-4
drivers/cadence/uart/aarch64/cdns_console.S
drivers/console/aarch32/console.S
+17
-1
drivers/console/aarch32/console.S
drivers/console/aarch32/skeleton_console.S
+22
-1
drivers/console/aarch32/skeleton_console.S
drivers/console/aarch64/console.S
+17
-1
drivers/console/aarch64/console.S
drivers/console/aarch64/skeleton_console.S
+21
-1
drivers/console/aarch64/skeleton_console.S
drivers/io/io_storage.c
+5
-4
drivers/io/io_storage.c
drivers/ti/uart/aarch64/16550_console.S
+17
-7
drivers/ti/uart/aarch64/16550_console.S
include/common/aarch32/asm_macros.S
+33
-0
include/common/aarch32/asm_macros.S
include/common/aarch32/el3_common_macros.S
+1
-1
include/common/aarch32/el3_common_macros.S
include/drivers/console.h
+2
-1
include/drivers/console.h
include/lib/aarch32/arch.h
+2
-0
include/lib/aarch32/arch.h
include/lib/aarch32/arch_helpers.h
+2
-0
include/lib/aarch32/arch_helpers.h
include/lib/aarch64/arch.h
+14
-0
include/lib/aarch64/arch.h
include/lib/cpus/aarch32/cortex_a53.h
+92
-0
include/lib/cpus/aarch32/cortex_a53.h
include/lib/cpus/aarch32/cortex_a57.h
+103
-0
include/lib/cpus/aarch32/cortex_a57.h
include/lib/cpus/aarch32/cortex_a72.h
+78
-0
include/lib/cpus/aarch32/cortex_a72.h
include/lib/el3_runtime/context_mgmt.h
+2
-2
include/lib/el3_runtime/context_mgmt.h
include/lib/smcc.h
+1
-0
include/lib/smcc.h
with
464 additions
and
32 deletions
+464
-32
drivers/arm/tzc/tzc_common_private.
c
→
drivers/arm/tzc/tzc_common_private.
h
View file @
0f22bef3
/*
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2016
-2017
, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
...
...
@@ -28,6 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __TZC_COMMON_PRIVATE_H__
#define __TZC_COMMON_PRIVATE_H__
#include <arch.h>
#include <arch_helpers.h>
#include <mmio.h>
...
...
@@ -190,8 +193,9 @@
nsaid_permissions); \
}
#if DEBUG
static
unsigned
int
_tzc_read_peripheral_id
(
uintptr_t
base
)
#if ENABLE_ASSERTIONS
static
inline
unsigned
int
_tzc_read_peripheral_id
(
uintptr_t
base
)
{
unsigned
int
id
;
...
...
@@ -203,7 +207,7 @@ static unsigned int _tzc_read_peripheral_id(uintptr_t base)
}
#ifdef AARCH32
static
unsigned
long
long
_tzc_get_max_top_addr
(
int
addr_width
)
static
inline
unsigned
long
long
_tzc_get_max_top_addr
(
int
addr_width
)
{
/*
* Assume at least 32 bit wide address and initialize the max.
...
...
@@ -232,4 +236,6 @@ static unsigned long long _tzc_get_max_top_addr(int addr_width)
(UINT64_MAX >> (64 - (addr_width)))
#endif
/* AARCH32 */
#endif
#endif
/* ENABLE_ASSERTIONS */
#endif
/* __TZC_COMMON_PRIVATE_H__ */
This diff is collapsed.
Click to expand it.
drivers/arm/tzc/tzc_dmc500.c
View file @
0f22bef3
/*
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2016
-2017
, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
...
...
@@ -33,7 +33,7 @@
#include <mmio.h>
#include <tzc_dmc500.h>
#include "tzc_common.h"
#include "tzc_common_private.
c
"
#include "tzc_common_private.
h
"
/*
* Macros which will be used by common core functions.
...
...
@@ -257,7 +257,7 @@ void tzc_dmc500_set_action(tzc_action_t action)
static
void
validate_plat_driver_data
(
const
tzc_dmc500_driver_data_t
*
plat_driver_data
)
{
#if
DEBUG
#if
ENABLE_ASSERTIONS
int
i
;
unsigned
int
dmc_id
;
uintptr_t
dmc_base
;
...
...
@@ -273,7 +273,7 @@ static void validate_plat_driver_data(
dmc_id
=
_tzc_read_peripheral_id
(
dmc_base
);
assert
(
dmc_id
==
DMC500_PERIPHERAL_ID
);
}
#endif
/*
DEBUG
*/
#endif
/*
ENABLE_ASSERTIONS
*/
}
...
...
This diff is collapsed.
Click to expand it.
drivers/cadence/uart/aarch64/cdns_console.S
View file @
0f22bef3
/*
*
Copyright
(
c
)
2016
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2016
-
2017
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
...
@@ -31,9 +31,10 @@
#include <asm_macros.S>
#include <cadence/cdns_uart.h>
.
globl
console_core_init
.
globl
console_core_putc
.
globl
console_core_getc
.
globl
console_core_init
.
globl
console_core_putc
.
globl
console_core_getc
.
globl
console_core_flush
/
*
-----------------------------------------------
*
int
console_core_init
(
unsigned
long
base_addr
,
...
...
@@ -125,3 +126,18 @@ getc_error:
mov
w0
,
#-
1
ret
endfunc
console_core_getc
/
*
---------------------------------------------
*
int
console_core_flush
(
uintptr_t
base_addr
)
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
In
:
x0
-
console
base
address
*
Out
:
return
-
1
on
error
else
return
0
.
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
func
console_core_flush
/
*
Placeholder
*/
mov
w0
,
#
0
ret
endfunc
console_core_flush
This diff is collapsed.
Click to expand it.
drivers/console/aarch32/console.S
View file @
0f22bef3
/*
*
Copyright
(
c
)
2016
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2016
-
2017
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
...
@@ -33,6 +33,7 @@
.
globl
console_uninit
.
globl
console_putc
.
globl
console_getc
.
globl
console_flush
/
*
*
The
console
base
is
in
the
data
section
and
not
in
.
bss
...
...
@@ -112,3 +113,18 @@ func console_getc
ldr
r0
,
[
r1
]
b
console_core_getc
endfunc
console_getc
/
*
---------------------------------------------
*
int
console_flush
(
void
)
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output. It returns 0
*
upon
successful
completion
,
otherwise
it
*
returns
-
1
.
*
Clobber
list
:
r0
,
r1
*
---------------------------------------------
*/
func
console_flush
ldr
r1
,
=
console_base
ldr
r0
,
[
r1
]
b
console_core_flush
endfunc
console_flush
This diff is collapsed.
Click to expand it.
drivers/console/aarch32/skeleton_console.S
View file @
0f22bef3
/*
*
Copyright
(
c
)
2016
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2016
-
2017
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
...
@@ -38,6 +38,7 @@
.
globl
console_core_init
.
globl
console_core_putc
.
globl
console_core_getc
.
globl
console_core_flush
/
*
-----------------------------------------------
*
int
console_core_init
(
uintptr_t
base_addr
,
...
...
@@ -109,3 +110,23 @@ getc_error:
mov
r0
,
#-
1
bx
lr
endfunc
console_core_getc
/
*
---------------------------------------------
*
int
console_core_flush
(
uintptr_t
base_addr
)
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
In
:
r0
-
console
base
address
*
Out
:
return
-
1
on
error
else
return
0
.
*
Clobber
list
:
r0
,
r1
*
---------------------------------------------
*/
func
console_core_flush
cmp
r0
,
#
0
beq
flush_error
/
*
Insert
implementation
here
*/
mov
r0
,
#
0
bx
lr
flush_error
:
mov
r0
,
#-
1
bx
lr
endfunc
console_core_flush
This diff is collapsed.
Click to expand it.
drivers/console/aarch64/console.S
View file @
0f22bef3
/*
*
Copyright
(
c
)
2015
-
201
6
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2015
-
201
7
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
...
@@ -33,6 +33,7 @@
.
globl
console_uninit
.
globl
console_putc
.
globl
console_getc
.
globl
console_flush
/
*
*
The
console
base
is
in
the
data
section
and
not
in
.
bss
...
...
@@ -111,3 +112,18 @@ func console_getc
ldr
x0
,
[
x1
,
:
lo12
:
console_base
]
b
console_core_getc
endfunc
console_getc
/
*
---------------------------------------------
*
int
console_flush
(
void
)
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output. It returns 0
*
upon
successful
completion
,
otherwise
it
*
returns
-
1
.
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
func
console_flush
adrp
x1
,
console_base
ldr
x0
,
[
x1
,
:
lo12
:
console_base
]
b
console_core_flush
endfunc
console_flush
This diff is collapsed.
Click to expand it.
drivers/console/aarch64/skeleton_console.S
View file @
0f22bef3
/*
*
Copyright
(
c
)
2015
-
201
6
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2015
-
201
7
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
...
@@ -38,6 +38,7 @@
.
globl
console_core_init
.
globl
console_core_putc
.
globl
console_core_getc
.
globl
console_core_flush
/
*
-----------------------------------------------
*
int
console_core_init
(
uintptr_t
base_addr
,
...
...
@@ -104,3 +105,22 @@ getc_error:
mov
w0
,
#-
1
ret
endfunc
console_core_getc
/
*
---------------------------------------------
*
int
console_core_flush
(
uintptr_t
base_addr
)
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
In
:
x0
-
console
base
address
*
Out
:
return
-
1
on
error
else
return
0
.
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
func
console_core_flush
cbz
x0
,
flush_error
/
*
Insert
implementation
here
*/
mov
w0
,
#
0
ret
flush_error
:
mov
w0
,
#-
1
ret
endfunc
console_core_flush
This diff is collapsed.
Click to expand it.
drivers/io/io_storage.c
View file @
0f22bef3
/*
* Copyright (c) 2014, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2014
-2017
, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
...
...
@@ -51,8 +51,8 @@ static const io_dev_info_t *devices[MAX_IO_DEVICES];
/* Number of currently registered devices */
static
unsigned
int
dev_count
;
#if
DEBUG
/* Extra validation functions only used in debug builds */
/* Extra validation functions only used when asserts are enabled */
#if
ENABLE_ASSERTIONS
/* Return a boolean value indicating whether a device connector is valid */
static
int
is_valid_dev_connector
(
const
io_dev_connector_t
*
dev_con
)
...
...
@@ -89,7 +89,8 @@ static int is_valid_seek_mode(io_seek_mode_t mode)
return
((
mode
!=
IO_SEEK_INVALID
)
&&
(
mode
<
IO_SEEK_MAX
));
}
#endif
/* End of debug-only validation functions */
#endif
/* ENABLE_ASSERTIONS */
/* End of extra validation functions only used when asserts are enabled */
/* Open a connection to a specific device */
...
...
This diff is collapsed.
Click to expand it.
drivers/ti/uart/aarch64/16550_console.S
View file @
0f22bef3
/*
*
Copyright
(
c
)
2015
-
201
6
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2015
-
201
7
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
Redistribution
and
use
in
source
and
binary
forms
,
with
or
without
*
modification
,
are
permitted
provided
that
the
following
conditions
are
met
:
...
...
@@ -35,6 +35,7 @@
.
globl
console_core_init
.
globl
console_core_putc
.
globl
console_core_getc
.
globl
console_core_flush
/
*
-----------------------------------------------
*
int
console_core_init
(
unsigned
long
base_addr
,
...
...
@@ -114,9 +115,6 @@ func console_core_putc
b.ne
1
b
mov
w2
,
#
0xD
/*
'\r'
*/
str
w2
,
[
x1
,
#
UARTTX
]
ldr
w2
,
[
x1
,
#
UARTFCR
]
orr
w2
,
w2
,
#
UARTFCR_TXCLR
str
w2
,
[
x1
,
#
UARTFCR
]
/
*
Check
if
the
transmit
FIFO
is
full
*/
2
:
ldr
w2
,
[
x1
,
#
UARTLSR
]
...
...
@@ -124,9 +122,6 @@ func console_core_putc
cmp
w2
,
#(
UARTLSR_TEMT
|
UARTLSR_THRE
)
b.ne
2
b
str
w0
,
[
x1
,
#
UARTTX
]
ldr
w2
,
[
x1
,
#
UARTFCR
]
orr
w2
,
w2
,
#
UARTFCR_TXCLR
str
w2
,
[
x1
,
#
UARTFCR
]
ret
putc_error
:
mov
w0
,
#-
1
...
...
@@ -153,3 +148,18 @@ getc_error:
mov
w0
,
#-
1
ret
endfunc
console_core_getc
/
*
---------------------------------------------
*
int
console_core_flush
(
uintptr_t
base_addr
)
*
Function
to
force
a
write
of
all
buffered
*
data
that
hasn
't been output.
*
In
:
x0
-
console
base
address
*
Out
:
return
-
1
on
error
else
return
0
.
*
Clobber
list
:
x0
,
x1
*
---------------------------------------------
*/
func
console_core_flush
/
*
Placeholder
*/
mov
w0
,
#
0
ret
endfunc
console_core_flush
This diff is collapsed.
Click to expand it.
include/common/aarch32/asm_macros.S
View file @
0f22bef3
...
...
@@ -134,4 +134,37 @@
.
space
SPINLOCK_ASM_SIZE
.
endm
/
*
*
Helper
macro
to
OR
the
bottom
32
bits
of
`
_val
`
into
`
_reg_l
`
*
and
the
top
32
bits
of
`
_val
`
into
`
_reg_h
`
.
If
either
the
bottom
*
or
top
word
of
`
_val
`
is
zero
,
the
corresponding
OR
operation
*
is
skipped
.
*/
.
macro
orr64_imm
_reg_l
,
_reg_h
,
_val
.
if
(
\
_val
>>
32
)
orr
\
_reg_h
,
\
_reg_h
,
#(
\
_val
>>
32
)
.
endif
.
if
(
\
_val
&
0xffffffff
)
orr
\
_reg_l
,
\
_reg_l
,
#(
\
_val
&
0xffffffff
)
.
endif
.
endm
/
*
*
Helper
macro
to
bitwise
-
clear
bits
in
`
_reg_l
`
and
*
`
_reg_h
`
given
a
64
bit
immediate
`
_val
`
.
The
set
bits
*
in
the
bottom
word
of
`
_val
`
dictate
which
bits
from
*
`
_reg_l
`
should
be
cleared
.
Similarly
,
the
set
bits
in
*
the
top
word
of
`
_val
`
dictate
which
bits
from
`
_reg_h
`
*
should
be
cleared
.
If
either
the
bottom
or
top
word
of
*
`
_val
`
is
zero
,
the
corresponding
BIC
operation
is
skipped
.
*/
.
macro
bic64_imm
_reg_l
,
_reg_h
,
_val
.
if
(
\
_val
>>
32
)
bic
\
_reg_h
,
\
_reg_h
,
#(
\
_val
>>
32
)
.
endif
.
if
(
\
_val
&
0xffffffff
)
bic
\
_reg_l
,
\
_reg_l
,
#(
\
_val
&
0xffffffff
)
.
endif
.
endm
#endif /* __ASM_MACROS_S__ */
This diff is collapsed.
Click to expand it.
include/common/aarch32/el3_common_macros.S
View file @
0f22bef3
...
...
@@ -148,7 +148,7 @@
_init_memory
,
_init_c_runtime
,
_exception_vectors
/
*
Make
sure
we
are
in
Secure
Mode
*/
#if
ASM
_ASSERTION
#if
ENABLE
_ASSERTION
S
ldcopr
r0
,
SCR
tst
r0
,
#
SCR_NS_BIT
ASM_ASSERT
(
eq
)
...
...
This diff is collapsed.
Click to expand it.
include/drivers/console.h
View file @
0f22bef3
/*
* Copyright (c) 2013-201
4
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
7
, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
...
...
@@ -38,6 +38,7 @@ int console_init(uintptr_t base_addr,
void
console_uninit
(
void
);
int
console_putc
(
int
c
);
int
console_getc
(
void
);
int
console_flush
(
void
);
#endif
/* __CONSOLE_H__ */
This diff is collapsed.
Click to expand it.
include/lib/aarch32/arch.h
View file @
0f22bef3
...
...
@@ -394,12 +394,14 @@
#define HCR p15, 4, c1, c1, 0
#define HCPTR p15, 4, c1, c1, 2
#define CNTHCTL p15, 4, c14, c1, 0
#define CNTKCTL p15, 0, c14, c1, 0
#define VPIDR p15, 4, c0, c0, 0
#define VMPIDR p15, 4, c0, c0, 5
#define ISR p15, 0, c12, c1, 0
#define CLIDR p15, 1, c0, c0, 1
#define CSSELR p15, 2, c0, c0, 0
#define CCSIDR p15, 1, c0, c0, 0
#define DBGOSDLR p14, 0, c1, c3, 4
/* Debug register defines. The format is: coproc, opt1, CRn, CRm, opt2 */
#define HDCR p15, 4, c1, c1, 1
...
...
This diff is collapsed.
Click to expand it.
include/lib/aarch32/arch_helpers.h
View file @
0f22bef3
...
...
@@ -209,6 +209,8 @@ DEFINE_SYSOP_FUNC(wfe)
DEFINE_SYSOP_FUNC
(
sev
)
DEFINE_SYSOP_TYPE_FUNC
(
dsb
,
sy
)
DEFINE_SYSOP_TYPE_FUNC
(
dmb
,
sy
)
DEFINE_SYSOP_TYPE_FUNC
(
dmb
,
st
)
DEFINE_SYSOP_TYPE_FUNC
(
dmb
,
ld
)
DEFINE_SYSOP_TYPE_FUNC
(
dsb
,
ish
)
DEFINE_SYSOP_TYPE_FUNC
(
dsb
,
ishst
)
DEFINE_SYSOP_TYPE_FUNC
(
dmb
,
ish
)
...
...
This diff is collapsed.
Click to expand it.
include/lib/aarch64/arch.h
View file @
0f22bef3
...
...
@@ -261,6 +261,16 @@
#define DISABLE_ALL_EXCEPTIONS \
(DAIF_FIQ_BIT | DAIF_IRQ_BIT | DAIF_ABT_BIT | DAIF_DBG_BIT)
/*
* RMR_EL3 definitions
*/
#define RMR_EL3_RR_BIT (1 << 1)
#define RMR_EL3_AA64_BIT (1 << 0)
/*
* HI-VECTOR address for AArch32 state
*/
#define HI_VECTOR_BASE (0xFFFF0000)
/*
* TCR defintions
...
...
@@ -419,6 +429,10 @@
#define EC_BITS(x) (x >> ESR_EC_SHIFT) & ESR_EC_MASK
/* Reset bit inside the Reset management register for EL3 (RMR_EL3) */
#define RMR_RESET_REQUEST_SHIFT 0x1u
#define RMR_WARM_RESET_CPU (1u << RMR_RESET_REQUEST_SHIFT)
/*******************************************************************************
* Definitions of register offsets, fields and macros for CPU system
* instructions.
...
...
This diff is collapsed.
Click to expand it.
include/lib/cpus/aarch32/cortex_a53.h
0 → 100644
View file @
0f22bef3
/*
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of ARM nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __CORTEX_A53_H__
#define __CORTEX_A53_H__
/* Cortex-A53 midr for revision 0 */
#define CORTEX_A53_MIDR 0x410FD030
/* Retention timer tick definitions */
#define RETENTION_ENTRY_TICKS_2 0x1
#define RETENTION_ENTRY_TICKS_8 0x2
#define RETENTION_ENTRY_TICKS_32 0x3
#define RETENTION_ENTRY_TICKS_64 0x4
#define RETENTION_ENTRY_TICKS_128 0x5
#define RETENTION_ENTRY_TICKS_256 0x6
#define RETENTION_ENTRY_TICKS_512 0x7
/*******************************************************************************
* CPU Extended Control register specific definitions.
******************************************************************************/
#define CPUECTLR p15, 1, c15
/* Instruction def. */
#define CPUECTLR_SMP_BIT (1 << 6)
#define CPUECTLR_CPU_RET_CTRL_SHIFT 0
#define CPUECTLR_CPU_RET_CTRL_MASK (0x7 << CPUECTLR_CPU_RET_CTRL_SHIFT)
#define CPUECTLR_FPU_RET_CTRL_SHIFT 3
#define CPUECTLR_FPU_RET_CTRL_MASK (0x7 << CPUECTLR_FPU_RET_CTRL_SHIFT)
/*******************************************************************************
* CPU Memory Error Syndrome register specific definitions.
******************************************************************************/
#define CPUMERRSR p15, 2, c15
/* Instruction def. */
/*******************************************************************************
* CPU Auxiliary Control register specific definitions.
******************************************************************************/
#define CPUACTLR p15, 0, c15
/* Instruction def. */
#define CPUACTLR_DTAH (1 << 24)
/*******************************************************************************
* L2 Auxiliary Control register specific definitions.
******************************************************************************/
#define L2ACTLR p15, 1, c15, c0, 0
/* Instruction def. */
#define L2ACTLR_ENABLE_UNIQUECLEAN (1 << 14)
#define L2ACTLR_DISABLE_CLEAN_PUSH (1 << 3)
/*******************************************************************************
* L2 Extended Control register specific definitions.
******************************************************************************/
#define L2ECTLR p15, 1, c9, c0, 3
/* Instruction def. */
#define L2ECTLR_RET_CTRL_SHIFT 0
#define L2ECTLR_RET_CTRL_MASK (0x7 << L2ECTLR_RET_CTRL_SHIFT)
/*******************************************************************************
* L2 Memory Error Syndrome register specific definitions.
******************************************************************************/
#define L2MERRSR p15, 3, c15
/* Instruction def. */
#endif
/* __CORTEX_A53_H__ */
This diff is collapsed.
Click to expand it.
include/lib/cpus/aarch32/cortex_a57.h
0 → 100644
View file @
0f22bef3
/*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of ARM nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __CORTEX_A57_H__
#define __CORTEX_A57_H__
/* Cortex-A57 midr for revision 0 */
#define CORTEX_A57_MIDR 0x410FD070
/* Retention timer tick definitions */
#define RETENTION_ENTRY_TICKS_2 0x1
#define RETENTION_ENTRY_TICKS_8 0x2
#define RETENTION_ENTRY_TICKS_32 0x3
#define RETENTION_ENTRY_TICKS_64 0x4
#define RETENTION_ENTRY_TICKS_128 0x5
#define RETENTION_ENTRY_TICKS_256 0x6
#define RETENTION_ENTRY_TICKS_512 0x7
/*******************************************************************************
* CPU Extended Control register specific definitions.
******************************************************************************/
#define CPUECTLR p15, 1, c15
/* Instruction def. */
#define CPUECTLR_SMP_BIT (1 << 6)
#define CPUECTLR_DIS_TWD_ACC_PFTCH_BIT (1 << 38)
#define CPUECTLR_L2_IPFTCH_DIST_MASK (0x3 << 35)
#define CPUECTLR_L2_DPFTCH_DIST_MASK (0x3 << 32)
#define CPUECTLR_CPU_RET_CTRL_SHIFT 0
#define CPUECTLR_CPU_RET_CTRL_MASK (0x7 << CPUECTLR_CPU_RET_CTRL_SHIFT)
/*******************************************************************************
* CPU Memory Error Syndrome register specific definitions.
******************************************************************************/
#define CPUMERRSR p15, 2, c15
/* Instruction def. */
/*******************************************************************************
* CPU Auxiliary Control register specific definitions.
******************************************************************************/
#define CPUACTLR p15, 0, c15
/* Instruction def. */
#define CPUACTLR_DIS_LOAD_PASS_DMB (1 << 59)
#define CPUACTLR_GRE_NGRE_AS_NGNRE (1 << 54)
#define CPUACTLR_DIS_OVERREAD (1 << 52)
#define CPUACTLR_NO_ALLOC_WBWA (1 << 49)
#define CPUACTLR_DCC_AS_DCCI (1 << 44)
#define CPUACTLR_FORCE_FPSCR_FLUSH (1 << 38)
#define CPUACTLR_DIS_STREAMING (3 << 27)
#define CPUACTLR_DIS_L1_STREAMING (3 << 25)
#define CPUACTLR_DIS_INDIRECT_PREDICTOR (1 << 4)
/*******************************************************************************
* L2 Control register specific definitions.
******************************************************************************/
#define L2CTLR p15, 1, c9, c0, 3
/* Instruction def. */
#define L2CTLR_DATA_RAM_LATENCY_SHIFT 0
#define L2CTLR_TAG_RAM_LATENCY_SHIFT 6
#define L2_DATA_RAM_LATENCY_3_CYCLES 0x2
#define L2_TAG_RAM_LATENCY_3_CYCLES 0x2
/*******************************************************************************
* L2 Extended Control register specific definitions.
******************************************************************************/
#define L2ECTLR p15, 1, c9, c0, 3
/* Instruction def. */
#define L2ECTLR_RET_CTRL_SHIFT 0
#define L2ECTLR_RET_CTRL_MASK (0x7 << L2ECTLR_RET_CTRL_SHIFT)
/*******************************************************************************
* L2 Memory Error Syndrome register specific definitions.
******************************************************************************/
#define L2MERRSR p15, 3, c15
/* Instruction def. */
#endif
/* __CORTEX_A57_H__ */
This diff is collapsed.
Click to expand it.
include/lib/cpus/aarch32/cortex_a72.h
0 → 100644
View file @
0f22bef3
/*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of ARM nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __CORTEX_A72_H__
#define __CORTEX_A72_H__
/* Cortex-A72 midr for revision 0 */
#define CORTEX_A72_MIDR 0x410FD080
/*******************************************************************************
* CPU Extended Control register specific definitions.
******************************************************************************/
#define CPUECTLR p15, 1, c15
/* Instruction def. */
#define CPUECTLR_SMP_BIT (1 << 6)
#define CPUECTLR_DIS_TWD_ACC_PFTCH_BIT (1 << 38)
#define CPUECTLR_L2_IPFTCH_DIST_MASK (0x3 << 35)
#define CPUECTLR_L2_DPFTCH_DIST_MASK (0x3 << 32)
/*******************************************************************************
* CPU Memory Error Syndrome register specific definitions.
******************************************************************************/
#define CPUMERRSR p15, 2, c15
/* Instruction def. */
/*******************************************************************************
* CPU Auxiliary Control register specific definitions.
******************************************************************************/
#define CPUACTLR p15, 0, c15
/* Instruction def. */
#define CPUACTLR_DISABLE_L1_DCACHE_HW_PFTCH (1 << 56)
#define CPUACTLR_NO_ALLOC_WBWA (1 << 49)
#define CPUACTLR_DCC_AS_DCCI (1 << 44)
/*******************************************************************************
* L2 Control register specific definitions.
******************************************************************************/
#define L2CTLR p15, 1, c9, c0, 3
/* Instruction def. */
#define L2CTLR_DATA_RAM_LATENCY_SHIFT 0
#define L2CTLR_TAG_RAM_LATENCY_SHIFT 6
#define L2_DATA_RAM_LATENCY_3_CYCLES 0x2
#define L2_TAG_RAM_LATENCY_2_CYCLES 0x1
#define L2_TAG_RAM_LATENCY_3_CYCLES 0x2
/*******************************************************************************
* L2 Memory Error Syndrome register specific definitions.
******************************************************************************/
#define L2MERRSR p15, 3, c15
/* Instruction def. */
#endif
/* __CORTEX_A72_H__ */
This diff is collapsed.
Click to expand it.
include/lib/el3_runtime/context_mgmt.h
View file @
0f22bef3
...
...
@@ -87,7 +87,7 @@ void cm_set_context_by_mpidr(uint64_t mpidr,
******************************************************************************/
static
inline
void
cm_set_next_context
(
void
*
context
)
{
#if
DEBUG
#if
ENABLE_ASSERTIONS
uint64_t
sp_mode
;
/*
...
...
@@ -98,7 +98,7 @@ static inline void cm_set_next_context(void *context)
:
"=r"
(
sp_mode
));
assert
(
sp_mode
==
MODE_SP_EL0
);
#endif
#endif
/* ENABLE_ASSERTIONS */
__asm__
volatile
(
"msr spsel, #1
\n
"
"mov sp, %0
\n
"
...
...
This diff is collapsed.
Click to expand it.
include/lib/smcc.h
View file @
0f22bef3
...
...
@@ -58,6 +58,7 @@
#define SMC_64 1
#define SMC_32 0
#define SMC_OK 0
#define SMC_UNK 0xffffffff
#define SMC_TYPE_FAST ULL(1)
#define SMC_TYPE_STD 0
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
6
7
Next
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