| /optee_os/core/drivers/firewall/ |
| H A D | firewall.c | 85 assert(fw && fw->ctrl && fw->ctrl->ops); in firewall_set_configuration() 87 if (!fw->ctrl->ops->set_conf) in firewall_set_configuration() 90 return fw->ctrl->ops->set_conf(fw); in firewall_set_configuration() 96 assert(fw && fw->ctrl && fw->ctrl->ops); in firewall_set_memory_configuration() 98 if (!fw->ctrl->ops->set_memory_conf) in firewall_set_memory_configuration() 101 return fw->ctrl->ops->set_memory_conf(fw, paddr, size); in firewall_set_memory_configuration() 106 assert(fw && fw->ctrl && fw->ctrl->ops); in firewall_check_access() 108 if (!fw->ctrl->ops->check_access) in firewall_check_access() 111 return fw->ctrl->ops->check_access(fw); in firewall_check_access() 116 assert(fw && fw->ctrl && fw->ctrl->ops); in firewall_acquire_access() [all …]
|
| /optee_os/core/include/mm/ |
| H A D | mobj.h | 27 const struct mobj_ops *ops; member 63 if (mobj && mobj->ops && mobj->ops->get_va) in mobj_get_va() 64 return mobj->ops->get_va(mobj, offset, len); in mobj_get_va() 71 if (mobj && mobj->ops && mobj->ops->get_pa) in mobj_get_pa() 72 return mobj->ops->get_pa(mobj, offs, granule, pa); in mobj_get_pa() 78 if (mobj && mobj->ops && mobj->ops->get_phys_offs) in mobj_get_phys_offs() 79 return mobj->ops->get_phys_offs(mobj, granule); in mobj_get_phys_offs() 85 if (mobj && mobj->ops && mobj->ops->get_mem_type) in mobj_get_mem_type() 86 return mobj->ops->get_mem_type(mobj, mt); in mobj_get_mem_type() 92 if (mobj && mobj->ops && mobj->ops->matches) in mobj_matches() [all …]
|
| H A D | fobj.h | 23 const struct fobj_ops *ops; member 123 return fobj->ops->load_page(fobj, page_idx, va); in fobj_load_page() 140 return fobj->ops->save_page(fobj, page_idx, va); in fobj_save_page() 148 if (fobj && fobj->ops->get_iv_vaddr) in fobj_get_iv_vaddr() 149 return fobj->ops->get_iv_vaddr(fobj, page_idx); in fobj_get_iv_vaddr() 203 fobj->ops->free(fobj); in fobj_put()
|
| /optee_os/core/drivers/crypto/crypto_api/ |
| H A D | drvcrypt.c | 13 TEE_Result drvcrypt_register(enum drvcrypt_algo_id algo_id, void *ops) in drvcrypt_register() argument 17 ops); in drvcrypt_register() 18 crypt_algo[algo_id] = ops; in drvcrypt_register() 22 CRYPTO_TRACE("Fail to register module id %d with 0x%p", algo_id, ops); in drvcrypt_register() 26 void drvcrypt_register_change(enum drvcrypt_algo_id algo_id, void *ops) in drvcrypt_register_change() argument 28 CRYPTO_TRACE("Change registered module id %d with 0x%p", algo_id, ops); in drvcrypt_register_change() 29 crypt_algo[algo_id] = ops; in drvcrypt_register_change()
|
| /optee_os/core/include/drivers/ |
| H A D | rtc.h | 61 const struct rtc_ops *ops; member 185 if (rtc_device->ops->set_offset) in rtc_get_info() 190 if (rtc_device->ops->set_alarm) in rtc_get_info() 204 return rtc_device->ops->get_time(rtc_device, tm); in rtc_get_time() 209 if (!rtc_device || !rtc_device->ops->set_time) in rtc_set_time() 220 return rtc_device->ops->set_time(rtc_device, tm); in rtc_set_time() 225 if (!rtc_device || !rtc_device->ops->get_offset) in rtc_get_offset() 228 return rtc_device->ops->get_offset(rtc_device, offset); in rtc_get_offset() 233 if (!rtc_device || !rtc_device->ops->set_offset) in rtc_set_offset() 236 return rtc_device->ops->set_offset(rtc_device, offset); in rtc_set_offset() [all …]
|
| H A D | wdt.h | 16 const struct wdt_ops *ops; member 58 if (!wdt_chip->ops->init) in watchdog_init() 61 return wdt_chip->ops->init(wdt_chip, min_timeout, max_timeout); in watchdog_init() 67 wdt_chip->ops->start(wdt_chip); in watchdog_start() 72 if (wdt_chip && wdt_chip->ops->stop) in watchdog_stop() 73 wdt_chip->ops->stop(wdt_chip); in watchdog_stop() 79 wdt_chip->ops->ping(wdt_chip); in watchdog_ping() 85 wdt_chip->ops->set_timeout(wdt_chip, timeout); in watchdog_settimeout() 96 if (!wdt_chip || !wdt_chip->ops->get_timeleft) in watchdog_gettimeleft() 99 return wdt_chip->ops->get_timeleft(wdt_chip, is_started, timeleft); in watchdog_gettimeleft()
|
| H A D | rstctrl.h | 42 const struct rstctrl_ops *ops; member 85 return rstctrl->ops->assert_level(rstctrl, to_us); in rstctrl_assert_to() 96 return rstctrl->ops->deassert_level(rstctrl, to_us); in rstctrl_deassert_to() 112 if (rstctrl->ops->get_name) in rstctrl_name() 113 return rstctrl->ops->get_name(rstctrl); in rstctrl_name() 138 static inline bool rstctrl_ops_is_valid(const struct rstctrl_ops *ops) in rstctrl_ops_is_valid() argument 140 return ops && ops->assert_level && ops->deassert_level; in rstctrl_ops_is_valid()
|
| H A D | gpio.h | 76 const struct gpio_ops *ops; member 116 static inline bool gpio_ops_is_valid(const struct gpio_ops *ops) in gpio_ops_is_valid() argument 118 return ops->set_direction && ops->get_direction && ops->get_value && in gpio_ops_is_valid() 119 ops->set_value; in gpio_ops_is_valid() 124 gpio->chip->ops->set_direction(gpio->chip, gpio->pin, dir); in gpio_set_direction() 129 return gpio->chip->ops->get_direction(gpio->chip, gpio->pin); in gpio_get_direction() 137 gpio->chip->ops->set_value(gpio->chip, gpio->pin, value); in gpio_set_value() 144 value = gpio->chip->ops->get_value(gpio->chip, gpio->pin); in gpio_get_value() 154 assert(!gpio || (gpio->chip && gpio->chip->ops)); in gpio_put() 156 if (gpio && gpio->chip->ops->put) in gpio_put() [all …]
|
| H A D | nvmem.h | 43 const struct nvmem_ops *ops; member 127 if (cell->ops->put_cell) in nvmem_put_cell() 128 cell->ops->put_cell(cell); in nvmem_put_cell() 139 if (!cell->ops->read_cell) in nvmem_cell_read() 142 return cell->ops->read_cell(cell, data); in nvmem_cell_read()
|
| H A D | i2c.h | 93 const struct i2c_ctrl_ops *ops; member 121 if (!i2c_dev->ctrl->ops->write) in i2c_write() 124 return i2c_dev->ctrl->ops->write(i2c_dev, buf, len); in i2c_write() 139 if (!i2c_dev->ctrl->ops->read) in i2c_read() 142 return i2c_dev->ctrl->ops->read(i2c_dev, buf, len); in i2c_read() 163 if (!i2c_dev->ctrl->ops->smbus) in i2c_smbus_raw() 169 return i2c_dev->ctrl->ops->smbus(i2c_dev, dir, proto, cmd_code, buf, in i2c_smbus_raw()
|
| /optee_os/core/drivers/crypto/crypto_api/include/ |
| H A D | drvcrypt_acipher.h | 112 static inline TEE_Result drvcrypt_register_rsa(const struct drvcrypt_rsa *ops) in drvcrypt_register_rsa() argument 114 return drvcrypt_register(CRYPTO_RSA, (void *)ops); in drvcrypt_register_rsa() 180 static inline TEE_Result drvcrypt_register_ecc(struct drvcrypt_ecc *ops) in drvcrypt_register_ecc() argument 182 return drvcrypt_register(CRYPTO_ECC, (void *)ops); in drvcrypt_register_ecc() 203 static inline TEE_Result drvcrypt_register_dh(struct drvcrypt_dh *ops) in drvcrypt_register_dh() argument 205 return drvcrypt_register(CRYPTO_DH, (void *)ops); in drvcrypt_register_dh() 234 static inline TEE_Result drvcrypt_register_dsa(struct drvcrypt_dsa *ops) in drvcrypt_register_dsa() argument 236 return drvcrypt_register(CRYPTO_DSA, (void *)ops); in drvcrypt_register_dsa() 260 *ops) in drvcrypt_register_x25519() 262 return drvcrypt_register(CRYPTO_X25519, (void *)ops); in drvcrypt_register_x25519() [all …]
|
| /optee_os/core/arch/arm/plat-hikey/ |
| H A D | spi_test.c | 32 pd.chip.ops->set_interrupt(NULL, GPIO6_2, in spi_cs_callback() 34 pd.chip.ops->set_direction(NULL, GPIO6_2, GPIO_DIR_OUT); in spi_cs_callback() 44 pd.chip.ops->set_value(NULL, GPIO6_2, value); in spi_cs_callback() 93 pd.chip.ops->configure(&pd.chip); in spi_test_with_manual_cs_control() 94 pd.chip.ops->start(&pd.chip); in spi_test_with_manual_cs_control() 105 res = pd.chip.ops->txrx8(&pd.chip, tx, rx, len); in spi_test_with_manual_cs_control() 124 res = pd.chip.ops->txrx8(&pd.chip, tx, rx, len); in spi_test_with_manual_cs_control() 142 res = pd.chip.ops->txrx8(&pd.chip, tx, rx, len); in spi_test_with_manual_cs_control() 154 pd.chip.ops->end(&pd.chip); in spi_test_with_manual_cs_control() 183 pd.chip.ops->configure(&pd.chip); in spi_test_with_registered_cs_cb() [all …]
|
| /optee_os/core/drivers/clk/ |
| H A D | clk.c | 34 struct clk *clk_alloc(const char *name, const struct clk_ops *ops, in clk_alloc() argument 49 clk->ops = ops; in clk_alloc() 62 if (!clk || !clk->ops) in clk_check() 65 if (clk->ops->set_parent && !clk->ops->get_parent) in clk_check() 68 if (clk->num_parents > 1 && !clk->ops->get_parent) in clk_check() 83 if (clk->ops->get_rate) in clk_compute_rate_no_lock() 84 clk->rate = clk->ops->get_rate(clk, parent_rate); in clk_compute_rate_no_lock() 108 pidx = clk->ops->get_parent(clk); in clk_init_parent() 149 if (clk->ops->disable) in clk_disable_no_lock() 150 clk->ops->disable(clk); in clk_disable_no_lock() [all …]
|
| /optee_os/core/include/kernel/ |
| H A D | interrupt.h | 35 const struct itr_ops *ops; member 220 chip->ops->mask(chip, itr_num); in interrupt_mask() 232 chip->ops->unmask(chip, itr_num); in interrupt_unmask() 242 chip->ops->enable(chip, itr_num); in interrupt_enable() 252 chip->ops->disable(chip, itr_num); in interrupt_disable() 261 return chip->ops->raise_pi; in interrupt_can_raise_pi() 270 return chip->ops->raise_sgi; in interrupt_can_raise_sgi() 279 return chip->ops->set_affinity; in interrupt_can_set_affinity() 288 return chip->ops->set_wake; in interrupt_can_set_wake() 299 chip->ops->raise_pi(chip, itr_num); in interrupt_raise_pi() [all …]
|
| /optee_os/core/drivers/wdt/ |
| H A D | watchdog.c | 12 if (!chip->ops->start || !chip->ops->ping || !chip->ops->set_timeout) in watchdog_register()
|
| /optee_os/core/drivers/crypto/se050/core/ |
| H A D | cipher.c | 24 return ctx->ops->init(dinit->ctx, mode, in do_init() 34 return ctx->ops->update(ctx, dupdate->last, dupdate->src.data, in do_update() 42 ctx->ops->final(ctx); in do_final() 49 ctx->ops->free_ctx(ctx); in do_free() 57 src_ctx->ops->copy_state(dst_ctx, src_ctx); in do_copy_state()
|
| /optee_os/core/drivers/crypto/stm32/ |
| H A D | cipher.c | 60 const struct ip_cipher_ops *ops; member 131 res = ctx->ops->init(ctx, mode, key, key_len, NULL, 0, iv, in saes_init() 158 return ctx->ops->update(ctx, last_block, src, len, dst); in saes_update() 170 ctx->ops->final(ctx); in saes_final() 186 fb_ctx->ops->copy_state(dst_ip_ctx->saes.fallback_ctx, fb_ctx); in saes_copy_state() 209 return c->ops->init(&c->ip_ctx, !dinit->encrypt, dinit->key1.data, in stm32_cipher_initialize() 219 return c->ops->update(&c->ip_ctx, dupdate->last, dupdate->src.data, in stm32_cipher_update() 227 if (c->ops->final) in stm32_cipher_final() 228 c->ops->final(&c->ip_ctx); in stm32_cipher_final() 236 src_c->ops->copy_state(&dst_c->ip_ctx, &src_c->ip_ctx); in stm32_cipher_copy_state() [all …]
|
| /optee_os/core/arch/arm/plat-vexpress/ |
| H A D | main.c | 113 if (!cons->ops->getchar || !cons->ops->have_rx_data) in read_console() 116 while (cons->ops->have_rx_data(cons)) { in read_console() 117 int ch __maybe_unused = cons->ops->getchar(cons); in read_console() 137 console_data.chip.ops->rx_intr_disable(&console_data.chip); in console_itr_cb() 184 console_data.chip.ops->rx_intr_enable(&console_data.chip); in yielding_console_notif() 188 console_data.chip.ops->rx_intr_enable(&console_data.chip); in yielding_console_notif() 204 bool have_itr_ctrl = console_data.chip.ops->rx_intr_enable && in init_console_itr() 205 console_data.chip.ops->rx_intr_disable; in init_console_itr()
|
| /optee_os/core/pta/bcm/ |
| H A D | gpio.c | 75 gc->ops->set_direction(NULL, gpio_num, GPIO_DIR_OUT); in pta_gpio_config() 76 gc->ops->set_value(NULL, gpio_num, 0); in pta_gpio_config() 78 gc->ops->set_direction(NULL, gpio_num, GPIO_DIR_IN); in pta_gpio_config() 118 if (gc->ops->get_direction(NULL, gpio_num) != GPIO_DIR_OUT) { in pta_gpio_set() 123 gc->ops->set_value(NULL, gpio_num, val); in pta_gpio_set() 126 gc->ops->get_value(NULL, gpio_num)); in pta_gpio_set() 157 params[1].value.a = gc->ops->get_value(NULL, gpio_num); in pta_gpio_get()
|
| H A D | wdt.c | 54 wd_pd.chip.ops->start(&wd_pd.chip); in pta_wd_config() 72 wd_pd.chip.ops->start(&wd_pd.chip); in pta_wd_start() 90 wd_pd.chip.ops->ping(&wd_pd.chip); in pta_wd_ping() 108 wd_pd.chip.ops->stop(&wd_pd.chip); in pta_wd_stop() 129 wd_pd.chip.ops->set_timeout(&wd_pd.chip, timeout); in pta_wd_set_timeout()
|
| /optee_os/core/crypto/ |
| H A D | crypto.c | 83 assert(c && c->ops); in hash_ops() 85 return c->ops; in hash_ops() 181 assert(c && c->ops); in cipher_ops() 183 return c->ops; in cipher_ops() 330 assert(c && c->ops); in mac_ops() 332 return c->ops; in mac_ops() 402 assert(c && c->ops); in ae_ops() 404 return c->ops; in ae_ops() 748 assert(key->ops && key->ops->free); in crypto_acipher_free_ecc_public_key() 750 key->ops->free(key); in crypto_acipher_free_ecc_public_key() [all …]
|
| /optee_os/core/kernel/ |
| H A D | interrupt.c | 27 return chip && is_unpaged(chip) && chip->ops && in itr_chip_is_valid() 28 is_unpaged((void *)chip->ops) && in itr_chip_is_valid() 29 chip->ops->mask && is_unpaged(chip->ops->mask) && in itr_chip_is_valid() 30 chip->ops->unmask && is_unpaged(chip->ops->unmask) && in itr_chip_is_valid() 31 chip->ops->enable && chip->ops->disable; in itr_chip_is_valid() 45 if (!itr_chip_is_valid(chip) || !chip->ops->configure) in itr_chip_init() 136 if (!chip->ops->configure) { in interrupt_configure() 141 chip->ops->configure(chip, itr_num, type, prio); in interrupt_configure() 153 assert(hdl && hdl->chip->ops && is_unpaged(hdl) && in add_configure_handler()
|
| /optee_os/core/lib/libtomcrypt/ |
| H A D | shake.c | 56 const struct crypto_hash_ops *ops) in do_shake_alloc_ctx() argument 63 ctx->ctx.ops = ops; in do_shake_alloc_ctx() 81 assert(sc->ctx.ops == dc->ctx.ops); in do_sha3_copy_state()
|
| /optee_os/core/arch/arm/plat-stm/ |
| H A D | main.c | 71 cons->ops->putc(cons, '\r'); in console_putc() 72 cons->ops->putc(cons, ch); in console_putc() 81 if (cons->ops->flush) in console_flush() 82 cons->ops->flush(cons); in console_flush()
|
| /optee_os/core/mm/ |
| H A D | mobj.c | 131 assert(mobj->ops == &mobj_phys_ops); in to_mobj_phys() 171 moph->mobj.ops = &mobj_phys_ops; in mobj_phys_init() 225 assert(mobj->ops == &mobj_virt_ops); in mobj_virt_assert_type() 228 struct mobj mobj_virt = { .ops = &mobj_virt_ops, .size = SIZE_MAX }; 331 assert(mobj->ops == &mobj_shm_ops); in to_mobj_shm() 347 m->mobj.ops = &mobj_shm_ops; in mobj_shm_alloc() 381 m->mobj.ops = &mobj_with_fobj_ops; in mobj_with_fobj_alloc() 394 assert(mobj && mobj->ops == &mobj_with_fobj_ops); in to_mobj_with_fobj() 446 if (!f->fobj->ops->get_pa) { in mobj_with_fobj_get_pa() 451 p = f->fobj->ops->get_pa(f->fobj, offs / SMALL_PAGE_SIZE) + in mobj_with_fobj_get_pa() [all …]
|