diff options
Diffstat (limited to 'src/arch/x86/memset.c')
-rw-r--r-- | src/arch/x86/memset.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/arch/x86/memset.c b/src/arch/x86/memset.c index 17963426c0..fc09a9bd52 100644 --- a/src/arch/x86/memset.c +++ b/src/arch/x86/memset.c @@ -4,6 +4,8 @@ #include <string.h> #include <stdint.h> +#include <stdbool.h> +#include <asan.h> typedef uint32_t op_t; @@ -12,6 +14,11 @@ void *memset(void *dstpp, int c, size_t len) int d0; unsigned long int dstp = (unsigned long int) dstpp; +#if (ENV_ROMSTAGE && CONFIG(ASAN_IN_ROMSTAGE)) || \ + (ENV_RAMSTAGE && CONFIG(ASAN_IN_RAMSTAGE)) + check_memory_region((unsigned long)dstpp, len, true, _RET_IP_); +#endif + /* This explicit register allocation improves code very much indeed. */ register op_t x asm("ax"); |