aboutsummaryrefslogtreecommitdiff
path: root/lib/mmio.c
diff options
context:
space:
mode:
authorHarry Liebel <Harry.Liebel@arm.com>2014-04-01 19:19:22 +0100
committerHarry Liebel <Harry.Liebel@arm.com>2014-04-24 13:55:56 +0100
commitcd116d177b76dbb333ed2aa0cb47a0c17678f0c2 (patch)
treee5dd1b80ad8caf1dd8b7087c382810d41ef8db30 /lib/mmio.c
parent12ae170e24f521420169d03da69c2965dc511e43 (diff)
downloadarm-trusted-firmware-cd116d177b76dbb333ed2aa0cb47a0c17678f0c2.tar.gz
Add TrustZone (TZC-400) driver
The TZC-400 performs security checks on transactions to memory or peripherals. Separate regions can be created in the address space each with individual security settings. Limitations: This driver does not currently support raising an interrupt on access violation. Change-Id: Idf8ed64b4d8d218fc9b6f9d75acdb2cd441d2449
Diffstat (limited to 'lib/mmio.c')
-rw-r--r--lib/mmio.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/mmio.c b/lib/mmio.c
index b654be7..1350609 100644
--- a/lib/mmio.c
+++ b/lib/mmio.c
@@ -30,6 +30,16 @@
#include <stdint.h>
+void mmio_write_8(uintptr_t addr, uint8_t value)
+{
+ *(volatile uint8_t*)addr = value;
+}
+
+uint8_t mmio_read_8(uintptr_t addr)
+{
+ return *(volatile uint8_t*)addr;
+}
+
void mmio_write_32(uintptr_t addr, uint32_t value)
{
*(volatile uint32_t*)addr = value;