Lines Matching +full:protect +full:- +full:exec
2 * SRAM protect-exec region helper functions
4 * Copyright (C) 2017 Texas Instruments Incorporated - https://www.ti.com/
33 unsigned long base = (unsigned long)part->base; in sram_check_protect_exec()
34 unsigned long end = base + block->size; in sram_check_protect_exec()
37 dev_err(sram->dev, in sram_check_protect_exec()
38 "SRAM pool marked with 'protect-exec' is not page aligned and will not be created.\n"); in sram_check_protect_exec()
39 return -ENOMEM; in sram_check_protect_exec()
48 list_add_tail(&part->list, &exec_pool_list); in sram_add_protect_exec()
55 * sram_exec_copy - copy data to a protected executable region of sram
66 * of 'protect-exec' pools which are normal sram pools but are always set
67 * read-only and executable except when copying data to them, at which point
68 * they are set to read-write non-executable, to make sure no memory is
69 * writeable and executable at the same time. This region must be page-aligned
77 * making use of this functionality that guarantees a safe copy of exec
92 if (p->pool == pool) in sram_exec_copy()
103 base = (unsigned long)part->base; in sram_exec_copy()
106 mutex_lock(&part->lock); in sram_exec_copy()
124 mutex_unlock(&part->lock); in sram_exec_copy()
129 mutex_unlock(&part->lock); in sram_exec_copy()