aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-12-23 11:29:29 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-12-23 11:29:29 +0000
commit2b17172903e9829979e45ff388a58ea1b0ff80fd (patch)
tree4cb240392248842398264139cf7119c2788c7778 /os/hal
parent1abe0779f51d974ac3c9dcb9a552f0b5095f40dc (diff)
downloadChibiOS-2b17172903e9829979e45ff388a58ea1b0ff80fd.tar.gz
ChibiOS-2b17172903e9829979e45ff388a58ea1b0ff80fd.tar.bz2
ChibiOS-2b17172903e9829979e45ff388a58ea1b0ff80fd.zip
Crypto-related changes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12482 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h15
-rw-r--r--os/hal/ports/STM32/STM32L4xx+/platform.mk1
-rw-r--r--os/hal/ports/STM32/STM32L4xx+/stm32_registry.h9
-rw-r--r--os/hal/ports/STM32/STM32L4xx/platform.mk1
-rw-r--r--os/hal/ports/STM32/STM32L4xx/stm32_registry.h9
5 files changed, 23 insertions, 12 deletions
diff --git a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h
index 94eae3fd7..7ec84fc4f 100644
--- a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h
+++ b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h
@@ -54,7 +54,7 @@
* @note The default is @p FALSE.
*/
#if !defined(STM32_CRY_USE_HASH1) || defined(__DOXYGEN__)
-#define STM32_CRY_USE_HASH1 FALSE
+#define STM32_CRY_USE_HASH1 TRUE
#endif
/** @} */
@@ -63,7 +63,7 @@
/*===========================================================================*/
#if (STM32_CRY_USE_CRYP1 == TRUE) || (STM32_CRY_USE_HASH1 == TRUE) || \
- (STM32_CRY_USE_RNG1 == TRUE) || defined (__DOXYGEN__)
+ defined (__DOXYGEN__)
#define STM32_CRY_ENABLED1 TRUE
#else
#define STM32_CRY_ENABLED1 FALSE
@@ -77,10 +77,6 @@
#define STM32_HAS_HASH1 FALSE
#endif
-#if !defined (STM32_HAS_RNG1)
-#define STM32_HAS_RNG1 FALSE
-#endif
-
#if STM32_CRY_USE_CRYP1 && !STM32_HAS_CRYP1
#error "CRYP1 not present in the selected device"
#endif
@@ -89,12 +85,8 @@
#error "HASH1 not present in the selected device"
#endif
-#if STM32_CRY_USE_RNG1 && !STM32_HAS_RNG1
-#error "RNG1 not present in the selected device"
-#endif
-
#if !STM32_CRY_ENABLED1
-#error "CRY driver activated but no CRYP or HASH or RNG peripheral assigned"
+#error "CRY driver activated but no CRYP or HASH peripheral assigned"
#endif
/**
@@ -135,7 +127,6 @@
#define CRY_LLD_SUPPORTS_HMAC_SHA256 FALSE
#define CRY_LLD_SUPPORTS_HMAC_SHA512 FALSE
#endif
-#endif
/** @} */
/*===========================================================================*/
diff --git a/os/hal/ports/STM32/STM32L4xx+/platform.mk b/os/hal/ports/STM32/STM32L4xx+/platform.mk
index d86232d53..53288ba6e 100644
--- a/os/hal/ports/STM32/STM32L4xx+/platform.mk
+++ b/os/hal/ports/STM32/STM32L4xx+/platform.mk
@@ -23,6 +23,7 @@ endif
# Drivers compatible with the platform.
include $(CHIBIOS)/os/hal/ports/STM32/LLD/ADCv3/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/CANv1/driver.mk
+include $(CHIBIOS)/os/hal/ports/STM32/LLD/CRYPv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/DACv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/DMAv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/EXTIv1/driver.mk
diff --git a/os/hal/ports/STM32/STM32L4xx+/stm32_registry.h b/os/hal/ports/STM32/STM32L4xx+/stm32_registry.h
index 2e0b885b7..9566155fd 100644
--- a/os/hal/ports/STM32/STM32L4xx+/stm32_registry.h
+++ b/os/hal/ports/STM32/STM32L4xx+/stm32_registry.h
@@ -62,6 +62,15 @@
nvicEnableVector(STM32_RTC_ALARM_NUMBER, STM32_IRQ_EXTI18_PRIORITY); \
} while (false)
+#if defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx) || \
+ defined(__DOXYGEN__)
+#define STM32_HAS_HASH1 TRUE
+#define STM32_HAS_AES1 TRUE
+#else
+#define STM32_HAS_HASH1 FALSE
+#define STM32_HAS_AES1 FALSE
+#endif
+
/*===========================================================================*/
/* STM32L4yyxx+. */
/*===========================================================================*/
diff --git a/os/hal/ports/STM32/STM32L4xx/platform.mk b/os/hal/ports/STM32/STM32L4xx/platform.mk
index d261132a5..74d951175 100644
--- a/os/hal/ports/STM32/STM32L4xx/platform.mk
+++ b/os/hal/ports/STM32/STM32L4xx/platform.mk
@@ -23,6 +23,7 @@ endif
# Drivers compatible with the platform.
include $(CHIBIOS)/os/hal/ports/STM32/LLD/ADCv3/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/CANv1/driver.mk
+include $(CHIBIOS)/os/hal/ports/STM32/LLD/CRYPv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/DACv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/DMAv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/EXTIv1/driver.mk
diff --git a/os/hal/ports/STM32/STM32L4xx/stm32_registry.h b/os/hal/ports/STM32/STM32L4xx/stm32_registry.h
index a2e911592..a707bab48 100644
--- a/os/hal/ports/STM32/STM32L4xx/stm32_registry.h
+++ b/os/hal/ports/STM32/STM32L4xx/stm32_registry.h
@@ -62,6 +62,15 @@
nvicEnableVector(STM32_RTC_ALARM_NUMBER, STM32_IRQ_EXTI18_PRIORITY); \
} while (false)
+#if defined(STM32L486xx) || defined(STM32L4A6xx) || \
+ defined(__DOXYGEN__)
+#define STM32_HAS_HASH1 TRUE
+#define STM32_HAS_AES1 TRUE
+#else
+#define STM32_HAS_HASH1 FALSE
+#define STM32_HAS_AES1 FALSE
+#endif
+
/*===========================================================================*/
/* STM32L432xx. */
/*===========================================================================*/