| /optee_os/core/tee/ |
| H A D | tee_time_generic.c | 14 TEE_Time offs; member 22 const TEE_Time **offs, bool *positive) in tee_time_ta_get_offs() argument 29 *offs = &tee_time_offs[n].offs; in tee_time_ta_get_offs() 38 const TEE_Time *offs, bool positive) in tee_time_ta_set_offs() argument 46 tee_time_offs[n].offs = *offs; in tee_time_ta_set_offs() 58 tee_time_offs[tee_time_num_offs].offs = *offs; in tee_time_ta_set_offs() 67 const TEE_Time *offs; in tee_time_get_ta_time() local 72 res = tee_time_ta_get_offs(uuid, &offs, &positive); in tee_time_get_ta_time() 81 TEE_TIME_ADD(t, *offs, t2); in tee_time_get_ta_time() 87 TEE_TIME_SUB(t, *offs, t2); in tee_time_get_ta_time() [all …]
|
| /optee_os/core/kernel/ |
| H A D | dt.c | 27 const struct dt_driver *dt_find_compatible_driver(const void *fdt, int offs) in dt_find_compatible_driver() argument 37 if (!fdt_node_check_compatible(fdt, offs, in dt_find_compatible_driver() 47 bool dt_have_prop(const void *fdt, int offs, const char *propname) in dt_have_prop() argument 51 prop = fdt_getprop(fdt, offs, propname, NULL); in dt_have_prop() 100 int dt_map_dev(const void *fdt, int offs, vaddr_t *base, size_t *size, in dt_map_dev() argument 111 st = fdt_get_status(fdt, offs); in dt_map_dev() 115 if (fdt_reg_info(fdt, offs, &pbase, &sz)) in dt_map_dev() 193 int fdt_get_reg_props_by_index(const void *fdt, int offs, int index, in fdt_get_reg_props_by_index() argument 206 reg = (const uint32_t *)fdt_getprop(fdt, offs, "reg", &len); in fdt_get_reg_props_by_index() 210 if (fdt_find_cached_parent_reg_cells(fdt, offs, &addr_ncells, in fdt_get_reg_props_by_index() [all …]
|
| H A D | console.c | 97 int offs; in get_console_node_from_dt() local 103 offs = find_chosen_node(fdt); in get_console_node_from_dt() 104 if (offs < 0) { in get_console_node_from_dt() 109 prop = fdt_get_property(fdt, offs, "stdout-path", NULL); in get_console_node_from_dt() 135 offs = fdt_path_offset(fdt, uart); in get_console_node_from_dt() 136 if (offs >= 0) { in get_console_node_from_dt() 138 *offs_out = offs; in get_console_node_from_dt() 160 int offs; in configure_console_from_dt() local 167 if (get_console_node_from_dt(fdt, &offs, &uart, &parms)) in configure_console_from_dt() 170 dt_drv = dt_find_compatible_driver(fdt, offs); in configure_console_from_dt() [all …]
|
| H A D | boot.c | 14 static uint64_t get_dt_val_and_advance(const void *data, size_t *offs, in get_dt_val_and_advance() argument 22 memcpy(&v, (const uint8_t *)data + *offs, sizeof(v)); in get_dt_val_and_advance() 23 *offs += sizeof(v); in get_dt_val_and_advance() 28 memcpy(&v, (const uint8_t *)data + *offs, sizeof(v)); in get_dt_val_and_advance() 29 *offs += sizeof(v); in get_dt_val_and_advance() 54 int offs = 0; in get_nsec_memory_helper() local 67 offs = fdt_node_offset_by_prop_value(fdt, offs, "device_type", in get_nsec_memory_helper() 69 if (offs < 0) in get_nsec_memory_helper() 72 if (fdt_get_status(fdt, offs) != (DT_STATUS_OK_NSEC | in get_nsec_memory_helper() 76 prop = fdt_getprop(fdt, offs, "reg", &len); in get_nsec_memory_helper()
|
| H A D | ree_fs_ta.c | 64 size_t offs; member 230 params[1].u.memref.offs = 0; in rpc_load() 253 size_t offs = 0; in ree_fs_ta_open() local 288 offs = shdr_sz; in ree_fs_ta_open() 293 if (offs > ta_size) { in ree_fs_ta_open() 298 res = shdr_load_pub_key(shdr, offs, (const void *)ta, in ree_fs_ta_open() 304 if (ADD_OVERFLOW(offs, shdr->img_size, &offs) || in ree_fs_ta_open() 305 ADD_OVERFLOW(offs, pub_key.name_size, &offs) || in ree_fs_ta_open() 306 offs > ta_size) { in ree_fs_ta_open() 323 shdr = shdr_alloc_and_copy(offs, ta, ta_size); in ree_fs_ta_open() [all …]
|
| /optee_os/scripts/ |
| H A D | sign_encrypt.py | 477 offs = 0 478 self.shdr = self.inf[offs:offs + SHDR_SIZE] 481 offs += SHDR_SIZE 494 self.img_digest = self.inf[offs:offs + hash_size] 495 offs += hash_size 496 self.sig = self.inf[offs:offs + sig_size] 497 offs += sig_size 500 self.ta_uuid = self.inf[offs:offs + UUID_SIZE] 501 offs += UUID_SIZE 502 self.ta_version = self.inf[offs:offs + 4] [all …]
|
| H A D | ts_bin_to_c.py | 75 offs = s2.header['sh_offset'] - s2.header['sh_addr'] 77 offs = offs + symbol.entry['st_value'] 78 offs = offs + 20 # Flags offset in ta_head 79 f.seek(offs)
|
| /optee_os/lib/libmbedtls/core/ |
| H A D | aes_ctr.c | 136 size_t offs = 0; in mbedtls_aes_crypt_ctr() local 146 output[offs] = stream_block[*nc_off] ^ input[offs]; in mbedtls_aes_crypt_ctr() 147 offs++; in mbedtls_aes_crypt_ctr() 149 if (offs == length) in mbedtls_aes_crypt_ctr() 153 if ((length - offs) >= 16) { in mbedtls_aes_crypt_ctr() 154 size_t block_count = (length - offs) / 16; in mbedtls_aes_crypt_ctr() 156 crypto_accel_aes_ctr_be_enc(output + offs, input + offs, in mbedtls_aes_crypt_ctr() 159 offs += block_count * 16; in mbedtls_aes_crypt_ctr() 162 while (offs < length) { in mbedtls_aes_crypt_ctr() 165 output[offs] = stream_block[*nc_off] ^ input[offs]; in mbedtls_aes_crypt_ctr() [all …]
|
| H A D | des_ecb.c | 65 size_t offs = 0; in mbed_des_ecb_update() local 70 for (offs = 0; offs < len; offs += block_size) { in mbed_des_ecb_update() 71 if (mbedtls_des_crypt_ecb(&c->des_ctx, data + offs, dst + offs)) in mbed_des_ecb_update()
|
| H A D | des3_ecb.c | 73 size_t offs = 0; in mbed_des3_ecb_update() local 78 for (offs = 0; offs < len; offs += block_size) { in mbed_des3_ecb_update() 79 if (mbedtls_des3_crypt_ecb(&c->des3_ctx, data + offs, in mbed_des3_ecb_update() 80 dst + offs)) in mbed_des3_ecb_update()
|
| H A D | aes_ecb.c | 72 size_t offs = 0; in mbed_aes_ecb_update() local 77 for (offs = 0; offs < len; offs += block_size) { in mbed_aes_ecb_update() 79 data + offs, dst + offs)) in mbed_aes_ecb_update()
|
| /optee_os/core/arch/arm/kernel/ |
| H A D | boot.c | 440 unsigned long offs = boot_mmu_config.map_offset; in undo_init_relocation() local 442 vaddr_t addr_end = (vaddr_t)__init_end - offs - TEE_LOAD_ADDR; in undo_init_relocation() 443 vaddr_t addr_start = (vaddr_t)__init_start - offs - TEE_LOAD_ADDR; in undo_init_relocation() 454 *ptr -= offs; in undo_init_relocation() 634 int offs; in add_optee_dt_node() local 642 offs = fdt_path_offset(dt->blob, "/firmware"); in add_optee_dt_node() 643 if (offs < 0) { in add_optee_dt_node() 644 offs = add_dt_path_subnode(dt, "/", "firmware"); in add_optee_dt_node() 645 if (offs < 0) in add_optee_dt_node() 649 offs = fdt_add_subnode(dt->blob, offs, "optee"); in add_optee_dt_node() [all …]
|
| /optee_os/core/include/kernel/ |
| H A D | dt.h | 111 const struct dt_driver *dt_find_compatible_driver(const void *fdt, int offs); 128 int dt_map_dev(const void *fdt, int offs, vaddr_t *base, size_t *size, 139 bool dt_have_prop(const void *fdt, int offs, const char *propname); 169 paddr_t fdt_reg_base_address(const void *fdt, int offs); 175 size_t fdt_reg_size(const void *fdt, int offs); 186 int fdt_reg_info(const void *fdt, int offs, paddr_t *base, size_t *size); 193 int fdt_get_status(const void *fdt, int offs); 344 int offs __unused) in dt_find_compatible_driver() 349 static inline int dt_map_dev(const void *fdt __unused, int offs __unused, in dt_map_dev() 357 int offs __unused) in fdt_reg_base_address() [all …]
|
| /optee_os/core/pta/ |
| H A D | secstor_ta_mgmt.c | 46 size_t offs; in install_ta() local 80 offs = SHDR_GET_SIZE(shdr); in install_ta() 81 memcpy(&bs_ta, nw + offs, sizeof(bs_ta)); in install_ta() 91 offs += sizeof(bs_ta); in install_ta() 98 property.bin_size = nw_size - offs; in install_ta() 105 while (offs < nw_size) { in install_ta() 106 size_t l = MIN(buf_size, nw_size - offs); in install_ta() 108 memcpy(buf, nw + offs, l); in install_ta() 115 offs += l; in install_ta()
|
| /optee_os/core/mm/ |
| H A D | boot_mem.c | 183 static void *add_offs(void *p, size_t offs) in add_offs() argument 186 return (uint8_t *)p + offs; in add_offs() 189 static void *add_offs_or_null(void *p, size_t offs) in add_offs_or_null() argument 193 return (uint8_t *)p + offs; in add_offs_or_null() 196 void boot_mem_relocate(size_t offs) in boot_mem_relocate() argument 202 boot_mem_desc = add_offs(boot_mem_desc, offs); in boot_mem_relocate() 204 boot_mem_desc->orig_mem_start += offs; in boot_mem_relocate() 205 boot_mem_desc->orig_mem_end += offs; in boot_mem_relocate() 206 boot_mem_desc->mem_start += offs; in boot_mem_relocate() 207 boot_mem_desc->mem_end += offs; in boot_mem_relocate() [all …]
|
| H A D | vm.c | 296 size_t offs, size_t pad_begin, size_t pad_end, in vm_map_pad() argument 323 reg->offset = offs; in vm_map_pad() 854 size_t offs = 0; in map_kinit() local 859 thread_get_user_kcode(&mobj, &offs, &va, &sz); in map_kinit() 865 mobj, offs); in map_kinit() 870 thread_get_user_kdata(&mobj, &offs, &va, &sz); in map_kinit() 873 mobj, offs); in map_kinit() 937 phys_offs += mem->offs; in param_mem_to_user_va() 971 ret = CMP_TRILEAN(m0->offs, m1->offs); in cmp_param_mem() 998 mem[n].offs = ROUNDDOWN(phys_offs + param->u[n].mem.offs, in vm_map_param() [all …]
|
| /optee_os/core/drivers/clk/ |
| H A D | fixed_clk.c | 28 static TEE_Result fixed_clock_probe(const void *fdt, int offs, in fixed_clock_probe() argument 37 name = fdt_get_name(fdt, offs, NULL); in fixed_clock_probe() 51 freq = fdt_getprop(fdt, offs, "clock-frequency", NULL); in fixed_clock_probe() 64 res = clk_dt_register_clk_provider(fdt, offs, clk_dt_get_simple_clk, in fixed_clock_probe()
|
| /optee_os/core/pta/tests/ |
| H A D | fs_htree.c | 31 uint8_t vers, size_t *offs, size_t *size) in test_get_offs_size() argument 71 *offs = sizeof(struct tee_fs_htree_image) * vers; in test_get_offs_size() 76 *offs = pbn * TEST_BLOCK_SIZE + in test_get_offs_size() 84 *offs = pbn * TEST_BLOCK_SIZE; in test_get_offs_size() 98 size_t offs = 0; in test_read_init() local 101 res = test_get_offs_size(type, idx, vers, &offs, &sz); in test_read_init() 105 op->params[0].u.value.b = offs; in test_read_init() 122 size_t offs = op->params[0].u.value.b; in test_read_final() local 125 if (offs + sz <= a->data_len) in test_read_final() 127 else if (offs <= a->data_len) in test_read_final() [all …]
|
| /optee_os/core/include/mm/ |
| H A D | vm.h | 31 size_t offs, size_t pad_begin, size_t pad_end, 41 struct mobj *mobj, size_t offs) in vm_map() argument 43 return vm_map_pad(uctx, va, len, prot, flags, mobj, offs, 0, 0, 0); in vm_map() 80 struct mobj **mobj, size_t *offs); 99 uint16_t *prot, size_t *offs);
|
| /optee_os/core/crypto/ |
| H A D | signed_hdr.c | 20 struct shdr *shdr_alloc_and_copy(size_t offs, const void *img, size_t img_size) in shdr_alloc_and_copy() argument 28 if (ADD_OVERFLOW(offs, sizeof(struct shdr), &end) || end > img_size) in shdr_alloc_and_copy() 31 shdr_size = SHDR_GET_SIZE((const struct shdr *)(img_va + offs)); in shdr_alloc_and_copy() 32 if (!shdr_size || ADD_OVERFLOW(offs, shdr_size, &end) || end > img_size) in shdr_alloc_and_copy() 41 memcpy(shdr, (const uint8_t *)img + offs, shdr_size); in shdr_alloc_and_copy() 165 res = crypto_bignum_bin2bn(base + pub_exp->offs, pub_exp->size, key->e); in load_rsa_key() 168 res = crypto_bignum_bin2bn(base + modulus->offs, modulus->size, key->n); in load_rsa_key() 193 if (ADD_OVERFLOW(attrs[n].offs, attrs[n].size, &end) || in check_attrs() 261 TEE_Result shdr_load_pub_key(const struct shdr *shdr, size_t offs, in shdr_load_pub_key() argument 279 if (ADD_OVERFLOW(shdr->img_size, offs, &end) || end > ns_img_size) in shdr_load_pub_key() [all …]
|
| /optee_os/core/drivers/ |
| H A D | openedges_omc.c | 79 static void omc_write32(uint8_t filter, uint32_t offs, uint32_t val) in omc_write32() argument 83 io_write32(tzc.base + filter_offs + offs, val); in omc_write32() 86 static uint32_t omc_read32(uint8_t filter, uint32_t offs) in omc_read32() argument 90 return io_read32(tzc.base + filter_offs + offs); in omc_read32() 93 static void omc_write64(uint8_t filter, uint32_t offs, uint64_t val) in omc_write64() argument 97 io_write64(tzc.base + filter_offs + offs, val); in omc_write64() 100 static uint64_t omc_read64(uint8_t filter, uint32_t offs) in omc_read64() argument 104 return io_read64(tzc.base + filter_offs + offs); in omc_read64()
|
| /optee_os/ldelf/ |
| H A D | sys.c | 61 uint32_t handle, size_t offs, size_t pad_begin, in sys_map_ta_bin() argument 64 return _ldelf_map_bin(va, num_bytes, handle, offs, in sys_map_ta_bin() 70 size_t offs) in sys_copy_from_ta_bin() argument 72 return _ldelf_cp_from_bin(dst, offs, num_bytes, handle); in sys_copy_from_ta_bin()
|
| /optee_os/core/lib/zlib/ |
| H A D | inftrees.c | 60 unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ local 142 offs[1] = 0; 144 offs[len + 1] = offs[len] + count[len]; 148 if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
|
| /optee_os/core/drivers/rstctrl/ |
| H A D | stm32_rstctrl.c | 90 TEE_Result stm32_rstctrl_provider_probe(const void *fdt, int offs, in stm32_rstctrl_provider_probe() argument 97 fdt_fill_device_info(fdt, &info, offs); in stm32_rstctrl_provider_probe() 102 return rstctrl_register_provider(fdt, offs, stm32_rstctrl_get_dev, in stm32_rstctrl_provider_probe()
|
| /optee_os/core/drivers/clk/sam/ |
| H A D | at91_sckc.c | 30 static TEE_Result sckc_pmc_setup(const void *fdt __unused, int offs, in sckc_pmc_setup() argument 49 res = clk_dt_register_clk_provider(fdt, offs, clk_dt_get_simple_clk, in sckc_pmc_setup()
|