From 0e028eeb6cc73444865908230bcfbfcd247b27c5 Mon Sep 17 00:00:00 2001 From: Niklas Hauser Date: Wed, 14 Dec 2016 16:03:19 +0000 Subject: [PATCH] Add MPS2 target ACLs --- source/main-hw.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/source/main-hw.h b/source/main-hw.h index 4d50db4..255698c 100644 --- a/source/main-hw.h +++ b/source/main-hw.h @@ -76,6 +76,29 @@ {(void *) 0x42000000, 0x01000000, UVISOR_TACLDEF_PERIPH}, /* FIXME */ \ } +#elif defined(TARGET_MPS2) + +#define MAIN_LED USERLED1 +#define SECURE_LED USERLED2 +#define LED_ON true +#define LED_OFF false +#define SECURE_SWITCH USERSW1 +#define SECURE_SWITCH_PULL PullUp + +#define MAIN_ACL(acl_list_name) \ + static const UvisorBoxAclItem acl_list_name[] = { \ + {CMSDK_GPIO0, sizeof(*CMSDK_GPIO0), UVISOR_TACLDEF_PERIPH}, \ + {CMSDK_GPIO1, sizeof(*CMSDK_GPIO1), UVISOR_TACLDEF_PERIPH}, \ + {CMSDK_UART0, sizeof(*CMSDK_UART0), UVISOR_TACLDEF_PERIPH}, \ + {CMSDK_UART1, sizeof(*CMSDK_UART1), UVISOR_TACLDEF_PERIPH}, \ + {CMSDK_UART2, sizeof(*CMSDK_UART2), UVISOR_TACLDEF_PERIPH}, \ + {CMSDK_DUALTIMER, sizeof(*CMSDK_DUALTIMER), UVISOR_TACLDEF_PERIPH}, \ + } + +#else /* Target-specific settings */ + +#error "Unsupported target. Check out the README.md file to see the list of supported targets." + #endif /* Target-specific settings */ #endif /* __UVISOR_HELLOWORLD_MAIN_HW_H__ */