Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2017-5715 AArch64 #2072

Merged
merged 5 commits into from
Jan 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions core/arch/arm/arm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ endif
# See also https://developer.arm.com/-/media/Files/pdf/Cache_Speculation_Side-channels.pdf
# Variant 2
CFG_CORE_WORKAROUND_SPECTRE_BP ?= y
# Same as CFG_CORE_WORKAROUND_SPECTRE_BP but targeting exceptions from
# secure EL0 instead of non-secure world.
CFG_CORE_WORKAROUND_SPECTRE_BP_SEC ?= $(CFG_CORE_WORKAROUND_SPECTRE_BP)

CFG_CORE_RWDATA_NOEXEC ?= y
CFG_CORE_RODATA_NOEXEC ?= n
Expand Down
20 changes: 19 additions & 1 deletion core/arch/arm/include/arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,29 @@

#include <util.h>

/* MIDR definitions */
#define MIDR_PRIMARY_PART_NUM_SHIFT 4
#define MIDR_PRIMARY_PART_NUM_WIDTH 12

#define MIDR_IMPLEMENTER_SHIFT 24
#define MIDR_IMPLEMENTER_WIDTH 8
#define MIDR_IMPLEMENTER_ARM 0x41

#define CORTEX_A7_PART_NUM 0xC07
#define CORTEX_A8_PART_NUM 0xC08
#define CORTEX_A9_PART_NUM 0xC09
#define CORTEX_A15_PART_NUM 0xC0F
#define CORTEX_A17_PART_NUM 0xC0E
#define CORTEX_A57_PART_NUM 0xD07
#define CORTEX_A72_PART_NUM 0xD08
#define CORTEX_A73_PART_NUM 0xD09
#define CORTEX_A75_PART_NUM 0xD0A

/* MPIDR definitions */
#define MPIDR_CPU_MASK 0xff
#define MPIDR_CLUSTER_SHIFT 8
#define MPIDR_CLUSTER_MASK (0xff << MPIDR_CLUSTER_SHIFT)


/* CLIDR definitions */
#define CLIDR_LOUIS_SHIFT 21
#define CLIDR_LOC_SHIFT 24
Expand Down
17 changes: 0 additions & 17 deletions core/arch/arm/include/arm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,6 @@
#include <stdint.h>
#include <util.h>

#define CORTEX_A7_PART_NUM 0xC07
#define CORTEX_A8_PART_NUM 0xC08
#define CORTEX_A9_PART_NUM 0xC09
#define CORTEX_A15_PART_NUM 0xC0F
#define CORTEX_A17_PART_NUM 0xC0E
#define CORTEX_A57_PART_NUM 0xD07
#define CORTEX_A72_PART_NUM 0xD08
#define CORTEX_A73_PART_NUM 0xD09
#define CORTEX_A75_PART_NUM 0xD0A

#define MIDR_PRIMARY_PART_NUM_SHIFT 4
#define MIDR_PRIMARY_PART_NUM_WIDTH 12

#define MIDR_IMPLEMENTER_SHIFT 24
#define MIDR_IMPLEMENTER_WIDTH 8
#define MIDR_IMPLEMENTER_ARM 0x41

#define CPSR_MODE_MASK ARM32_CPSR_MODE_MASK
#define CPSR_MODE_USR ARM32_CPSR_MODE_USR
#define CPSR_MODE_FIQ ARM32_CPSR_MODE_FIQ
Expand Down
Loading