├── .github └── workflows │ └── quic-organization-repolinter.yml ├── LICENSE ├── README.md ├── common └── manifest │ └── qti_manifest-app_mode-unlicensed.bin ├── qcc711_sdk ├── bin │ ├── btcfg_app_mode.bin │ └── btss_patch_app_mode.bin ├── iar │ ├── Qualcomm │ │ ├── qcc710.i79 │ │ └── qcc710.menu │ ├── apps │ │ ├── appsGeneral.ewd │ │ ├── appsGeneral.ewp │ │ ├── appsPeripheral.ewd │ │ ├── appsPeripheral.ewp │ │ └── settings │ │ │ ├── appsGeneral_Debug.JLinkScript │ │ │ ├── appsGeneral_Debug.jlink │ │ │ ├── appsGeneral_Release.JLinkScript │ │ │ ├── appsGeneral_Release.jlink │ │ │ ├── appsPeripheral_Debug.JLinkScript │ │ │ ├── appsPeripheral_Debug.jlink │ │ │ ├── appsPeripheral_Release.JLinkScript │ │ │ ├── appsPeripheral_Release.jlink │ │ │ └── pre_reset_cspy.mac │ ├── libs │ │ ├── libBLE.ewp │ │ ├── libCMSIS.ewp │ │ ├── libCrypto.ewp │ │ ├── libPeripheral.ewp │ │ ├── libPlatform.ewp │ │ ├── libPlatform_tools.ewp │ │ └── libQCLI.ewp │ ├── qcc710_Apps.eww │ ├── qcc710_Loader │ │ ├── qcc710_Loader.board │ │ ├── qcc710_Loader.flash │ │ ├── qcc710_Loader.mac │ │ └── qcc710_Loader.out │ ├── qcc710_Tools.eww │ ├── readme.txt │ └── tools │ │ ├── settings │ │ ├── pre_reset_cspy.mac │ │ ├── toolsFlashLoader.dnx │ │ ├── toolsFlashLoader_Debug.JLinkScript │ │ ├── toolsFlashLoader_Debug.jlink │ │ ├── toolsFlashLoader_Release.JLinkScript │ │ ├── toolsFlashLoader_Release.jlink │ │ ├── toolsNVMProgrammer_Debug.JLinkScript │ │ ├── toolsNVMProgrammer_Debug.jlink │ │ ├── toolsNVMProgrammer_Release.JLinkScript │ │ ├── toolsNVMProgrammer_Release.jlink │ │ ├── toolsOTP_Debug.JLinkScript │ │ ├── toolsOTP_Debug.jlink │ │ ├── toolsOTP_Release.JLinkScript │ │ ├── toolsOTP_Release.jlink │ │ ├── toolsQCC710Programmer_Debug.JLinkScript │ │ ├── toolsQCC710Programmer_Debug.jlink │ │ ├── toolsQCC710Programmer_Release.JLinkScript │ │ ├── toolsQCC710Programmer_Release.jlink │ │ ├── toolsSecureLoader_Debug.JLinkScript │ │ ├── toolsSecureLoader_Debug.jlink │ │ ├── toolsSecureLoader_Release.JLinkScript │ │ └── toolsSecureLoader_Release.jlink │ │ ├── toolsBLE_DTM.ewd │ │ ├── toolsBLE_DTM.ewp │ │ ├── toolsFlashLoader.ewd │ │ ├── toolsFlashLoader.ewp │ │ ├── toolsNVMProgrammer.ewd │ │ ├── toolsNVMProgrammer.ewp │ │ ├── toolsOTP.ewd │ │ ├── toolsOTP.ewp │ │ ├── toolsQCC710Programmer.ewd │ │ ├── toolsQCC710Programmer.ewp │ │ ├── toolsSecureLoader.ewd │ │ └── toolsSecureLoader.ewp ├── notice.txt ├── qapi │ ├── ble │ │ ├── qapi_ble_atttypes.h │ │ ├── qapi_ble_bas.h │ │ ├── qapi_ble_basetypes.h │ │ ├── qapi_ble_bastypes.h │ │ ├── qapi_ble_bsc.h │ │ ├── qapi_ble_btapityp.h │ │ ├── qapi_ble_btbtypes.h │ │ ├── qapi_ble_bttypes.h │ │ ├── qapi_ble_ctes.h │ │ ├── qapi_ble_ctestypes.h │ │ ├── qapi_ble_debug.h │ │ ├── qapi_ble_dis.h │ │ ├── qapi_ble_distypes.h │ │ ├── qapi_ble_dtm.h │ │ ├── qapi_ble_errors.h │ │ ├── qapi_ble_gap.h │ │ ├── qapi_ble_gaps.h │ │ ├── qapi_ble_gapstypes.h │ │ ├── qapi_ble_gatt.h │ │ ├── qapi_ble_gatttype.h │ │ ├── qapi_ble_hci.h │ │ ├── qapi_ble_hci_vs.h │ │ ├── qapi_ble_hci_vstypes.h │ │ ├── qapi_ble_hcicommt.h │ │ ├── qapi_ble_hcitypes.h │ │ ├── qapi_ble_hciusbt.h │ │ ├── qapi_ble_l2cap.h │ │ ├── qapi_ble_ots.h │ │ ├── qapi_ble_otstypes.h │ │ └── qapi_ble_smtypes.h │ ├── common │ │ ├── qapi_status.h │ │ ├── qapi_types.h │ │ └── qapi_version.h │ ├── crypto │ │ ├── qapi_crypto.h │ │ ├── qapi_crypto_common.h │ │ ├── qapi_firmware_update.h │ │ ├── qapi_fuse.h │ │ └── qapi_rot.h │ ├── peripherals │ │ ├── qapi_appi2c.h │ │ ├── qapi_duc.h │ │ ├── qapi_flash.h │ │ ├── qapi_ftc.h │ │ ├── qapi_gpio.h │ │ ├── qapi_i2c.h │ │ ├── qapi_led.h │ │ ├── qapi_m2mdma.h │ │ ├── qapi_sense.h │ │ ├── qapi_spi.h │ │ ├── qapi_timer.h │ │ └── qapi_uart.h │ └── platform │ │ ├── qapi_debug.h │ │ ├── qapi_heap.h │ │ ├── qapi_mfg.h │ │ ├── qapi_mtp.h │ │ ├── qapi_nvm.h │ │ ├── qapi_nvm_rot.h │ │ ├── qapi_power.h │ │ ├── qapi_radio.h │ │ ├── qapi_task.h │ │ └── qapi_wdog.h ├── src │ ├── CMSIS │ │ ├── Core │ │ │ └── Include │ │ │ │ ├── cmsis_compiler.h │ │ │ │ ├── cmsis_gcc.h │ │ │ │ ├── cmsis_iccarm.h │ │ │ │ ├── cmsis_version.h │ │ │ │ └── core_cm3.h │ │ └── Device │ │ │ └── QC │ │ │ └── QCC710 │ │ │ ├── Include │ │ │ ├── qcc710.h │ │ │ └── system_qcc710.h │ │ │ └── Source │ │ │ ├── GCC │ │ │ ├── gcc_arm.ld │ │ │ ├── gcc_arm_ram.ld │ │ │ └── startup_qcc710.s │ │ │ ├── IAR │ │ │ ├── iar_arm.icf │ │ │ ├── iar_arm_ram.icf │ │ │ ├── icfeditor.xml │ │ │ └── startup_qcc710.s │ │ │ ├── startup_qcc710.c │ │ │ └── system_qcc710.c │ ├── ble │ │ ├── inc │ │ │ ├── BASAPI_cb_m3.h │ │ │ ├── BASAPI_cb_params.h │ │ │ ├── BASAPI_params.h │ │ │ ├── BSCAPI_cb_m3.h │ │ │ ├── BSCAPI_cb_params.h │ │ │ ├── BSCAPI_mnl_util.h │ │ │ ├── BSCAPI_params.h │ │ │ ├── CTESAPI_cb_m3.h │ │ │ ├── CTESAPI_cb_params.h │ │ │ ├── CTESAPI_params.h │ │ │ ├── DISAPI_cb_m3.h │ │ │ ├── DISAPI_cb_params.h │ │ │ ├── DISAPI_params.h │ │ │ ├── GAPAPI_cb_m3.h │ │ │ ├── GAPAPI_cb_params.h │ │ │ ├── GAPAPI_mnl_util.h │ │ │ ├── GAPAPI_params.h │ │ │ ├── GAPSAPI_cb_m3.h │ │ │ ├── GAPSAPI_cb_params.h │ │ │ ├── GAPSAPI_params.h │ │ │ ├── GATTAPI_cb_m3.h │ │ │ ├── GATTAPI_cb_params.h │ │ │ ├── GATTAPI_mnl_util.h │ │ │ ├── GATTAPI_params.h │ │ │ ├── HCIAPI_cb_m3.h │ │ │ ├── HCIAPI_cb_params.h │ │ │ ├── HCIAPI_params.h │ │ │ ├── L2CAPAPI_cb_m3.h │ │ │ ├── L2CAPAPI_cb_params.h │ │ │ ├── L2CAPAPI_mnl_util.h │ │ │ ├── L2CAPAPI_params.h │ │ │ ├── Radio_params.h │ │ │ ├── callback.h │ │ │ ├── id_list.h │ │ │ ├── ipc.h │ │ │ ├── ipc_types.h │ │ │ ├── manual_ids.h │ │ │ └── qipc.h │ │ └── src │ │ │ ├── BASAPI_cb_m3.c │ │ │ ├── BASAPI_funcs_m3.c │ │ │ ├── BSCAPI_cb_m3.c │ │ │ ├── BSCAPI_funcs_m3.c │ │ │ ├── BSCAPI_funcs_m3_mnl.c │ │ │ ├── CTESAPI_cb_m3.c │ │ │ ├── CTESAPI_funcs_m3.c │ │ │ ├── DISAPI_cb_m3.c │ │ │ ├── DISAPI_funcs_m3.c │ │ │ ├── DISAPI_funcs_m3_mnl.c │ │ │ ├── DTM_funcs_m3_mnl.c │ │ │ ├── GAPAPI_cb_m3.c │ │ │ ├── GAPAPI_cb_m3_mnl.c │ │ │ ├── GAPAPI_funcs_m3.c │ │ │ ├── GAPAPI_funcs_m3_mnl.c │ │ │ ├── GAPSAPI_cb_m3.c │ │ │ ├── GAPSAPI_funcs_m3.c │ │ │ ├── GAPSAPI_funcs_m3_mnl.c │ │ │ ├── GATTAPI_cb_m3.c │ │ │ ├── GATTAPI_cb_m3_mnl.c │ │ │ ├── GATTAPI_funcs_m3.c │ │ │ ├── GATTAPI_funcs_m3_mnl.c │ │ │ ├── HCIAPI_cb_m3.c │ │ │ ├── HCIAPI_funcs_m3.c │ │ │ ├── HCIAPI_funcs_m3_mnl.c │ │ │ ├── HCI_VS_API_funcs_m3_mnl.c │ │ │ ├── L2CAPAPI_cb_m3.c │ │ │ ├── L2CAPAPI_cb_m3_mnl.c │ │ │ ├── L2CAPAPI_funcs_m3.c │ │ │ ├── L2CAPAPI_funcs_m3_mnl.c │ │ │ ├── callback.c │ │ │ ├── ipc.c │ │ │ └── qipc.c │ ├── common │ │ ├── crypto │ │ │ └── inc │ │ │ │ ├── packed.h │ │ │ │ ├── tme_access_control_interface.h │ │ │ │ ├── tme_crypto_digest_interface.h │ │ │ │ ├── tme_crypto_ecc_interface.h │ │ │ │ ├── tme_crypto_ex_interface.h │ │ │ │ ├── tme_crypto_hmac_interface.h │ │ │ │ ├── tme_crypto_keys_interface.h │ │ │ │ ├── tme_crypto_params.h │ │ │ │ ├── tme_crypto_rng_interface.h │ │ │ │ ├── tme_ipc_access_control_common.h │ │ │ │ ├── tme_ipc_callback_utils.h │ │ │ │ ├── tme_ipc_crypto_common.h │ │ │ │ ├── tme_ipc_fwup_common.h │ │ │ │ ├── tme_ipc_msg_uid_mapping.h │ │ │ │ ├── tme_ipc_nvm.h │ │ │ │ ├── tme_ipc_nvm_common.h │ │ │ │ ├── tme_ipc_nvm_utils.h │ │ │ │ ├── tme_ipc_rot_feature_common.h │ │ │ │ ├── tme_ipc_utils.h │ │ │ │ ├── tme_macchiato_interface.h │ │ │ │ ├── tme_nvm_interface.h │ │ │ │ ├── tme_patch_version_interface.h │ │ │ │ ├── tme_types.h │ │ │ │ └── tme_update_interface.h │ │ ├── mproc │ │ │ ├── glink │ │ │ │ ├── inc │ │ │ │ │ ├── glink_internal.h │ │ │ │ │ ├── glink_list.h │ │ │ │ │ ├── glink_os_utils.h │ │ │ │ │ ├── xport_qmp.h │ │ │ │ │ └── xport_qmp_config.h │ │ │ │ └── src │ │ │ │ │ ├── glink_api.c │ │ │ │ │ └── xport_qmp.c │ │ │ └── inc │ │ │ │ └── glink.h │ │ ├── temcom │ │ │ ├── inc │ │ │ │ ├── TmeErrorCodes.h │ │ │ │ ├── TmeMessagesUids.h │ │ │ │ ├── Tmecom.h │ │ │ │ └── TmecomClient.h │ │ │ └── src │ │ │ │ ├── TmecomClient.c │ │ │ │ ├── qapi_rot.c │ │ │ │ └── qapi_rot_feature.c │ │ └── temfuse │ │ │ ├── inc │ │ │ ├── TmeFuseClient.h │ │ │ └── TmeFusePlatformApis.h │ │ │ └── src │ │ │ ├── TmeFuseClient.c │ │ │ └── TmeFusePlatformApis.c │ ├── crypto │ │ ├── inc │ │ │ └── tme_ipc_crypto.h │ │ └── src │ │ │ ├── qapi_crypto.c │ │ │ ├── qapi_crypto_cmn.c │ │ │ ├── qapi_firmware_update.c │ │ │ ├── qapi_fuse.c │ │ │ ├── tme_ipc_access_control.c │ │ │ ├── tme_ipc_callback_utils.c │ │ │ ├── tme_ipc_crypto.c │ │ │ ├── tme_ipc_crypto_cmn.c │ │ │ ├── tme_ipc_fwup.c │ │ │ ├── tme_ipc_msg_uid_mapping.c │ │ │ ├── tme_ipc_msg_uid_mapping_cmn.c │ │ │ ├── tme_ipc_nvm.c │ │ │ ├── tme_ipc_nvm_cmn.c │ │ │ ├── tme_ipc_nvm_utils.c │ │ │ ├── tme_ipc_rot_feature.c │ │ │ └── tme_ipc_utils.c │ ├── demo │ │ ├── general │ │ │ ├── ble │ │ │ │ ├── bas_demo.c │ │ │ │ ├── bas_demo.h │ │ │ │ ├── ble_demo.c │ │ │ │ └── ble_demo.h │ │ │ ├── crypto │ │ │ │ ├── crypto_demo.c │ │ │ │ ├── crypto_demo.h │ │ │ │ ├── fwup_demo.c │ │ │ │ ├── fwup_demo.h │ │ │ │ ├── rot_demo.c │ │ │ │ ├── rot_demo.h │ │ │ │ ├── rot_demo_utils.c │ │ │ │ └── rot_demo_utils.h │ │ │ ├── platform │ │ │ │ ├── mfg_demo.c │ │ │ │ ├── mfg_demo.h │ │ │ │ ├── nvm_demo.c │ │ │ │ ├── nvm_demo.h │ │ │ │ ├── plat_demo.c │ │ │ │ └── plat_demo.h │ │ │ └── sample_gen.c │ │ ├── peripherals │ │ │ ├── appi2c │ │ │ │ ├── appi2c_demo.c │ │ │ │ └── appi2c_demo.h │ │ │ ├── epd │ │ │ │ ├── dualepd_demo.c │ │ │ │ ├── epd_demo.c │ │ │ │ ├── epd_demo.h │ │ │ │ └── image.h │ │ │ ├── flash │ │ │ │ ├── flash_demo.c │ │ │ │ └── flash_demo.h │ │ │ ├── ftc │ │ │ │ ├── ftc_demo.c │ │ │ │ └── ftc_demo.h │ │ │ ├── gpio │ │ │ │ ├── gpio_demo.c │ │ │ │ └── gpio_demo.h │ │ │ ├── i2c │ │ │ │ ├── i2c_demo.c │ │ │ │ └── i2c_demo.h │ │ │ ├── m2mdma │ │ │ │ ├── m2mdma_demo.c │ │ │ │ └── m2mdma_demo.h │ │ │ ├── mfp │ │ │ │ ├── mfp_demo.c │ │ │ │ └── mfp_demo.h │ │ │ ├── sample_periph.c │ │ │ ├── sensor_duc │ │ │ │ ├── sensor_duc_demo.c │ │ │ │ └── sensor_duc_demo.h │ │ │ ├── smps │ │ │ │ ├── smps_demo.c │ │ │ │ └── smps_demo.h │ │ │ ├── spi │ │ │ │ ├── spi_demo.c │ │ │ │ └── spi_demo.h │ │ │ ├── timer │ │ │ │ ├── timer_demo.c │ │ │ │ └── timer_demo.h │ │ │ ├── uart │ │ │ │ ├── uart_demo.c │ │ │ │ └── uart_demo.h │ │ │ └── wdog │ │ │ │ ├── wdog_demo.c │ │ │ │ └── wdog_demo.h │ │ └── qcli │ │ │ ├── qcli.c │ │ │ ├── qcli.h │ │ │ ├── qcli_api.h │ │ │ ├── qcli_pal.c │ │ │ ├── qcli_pal.h │ │ │ ├── qcli_util.c │ │ │ └── qcli_util.h │ ├── hwio │ │ └── inc │ │ │ ├── HALhwio.h │ │ │ ├── hwio_aon.h │ │ │ ├── hwio_base.h │ │ │ ├── hwio_fuse.h │ │ │ ├── hwio_gcc.h │ │ │ ├── hwio_nvm.h │ │ │ ├── hwio_periph.h │ │ │ ├── hwio_pmu.h │ │ │ ├── hwio_ram.h │ │ │ ├── hwio_sysfabric.h │ │ │ ├── hwio_tlmm.h │ │ │ └── hwio_tme_ipc.h │ ├── peripherals │ │ ├── inc │ │ │ ├── qspi.h │ │ │ ├── qspi_map.h │ │ │ ├── qup_api.h │ │ │ ├── qup_hwio.h │ │ │ └── timer.h │ │ └── src │ │ │ ├── qapi_appi2c.c │ │ │ ├── qapi_duc.c │ │ │ ├── qapi_flash.c │ │ │ ├── qapi_ftc.c │ │ │ ├── qapi_gpio.c │ │ │ ├── qapi_i2c.c │ │ │ ├── qapi_led.c │ │ │ ├── qapi_m2mdma.c │ │ │ ├── qapi_sense.c │ │ │ ├── qapi_spi.c │ │ │ ├── qapi_timer.c │ │ │ ├── qapi_uart.c │ │ │ ├── qspi.c │ │ │ ├── qspi_map.c │ │ │ ├── qup_api.c │ │ │ ├── qup_se_fw.c │ │ │ └── timer.c │ ├── platform │ │ ├── inc │ │ │ ├── ram.h │ │ │ └── stringl.h │ │ └── src │ │ │ ├── qapi_debug.c │ │ │ ├── qapi_heap.c │ │ │ ├── qapi_mfg.c │ │ │ ├── qapi_nvm.c │ │ │ ├── qapi_nvm_rot.c │ │ │ ├── qapi_power.c │ │ │ ├── qapi_radio.c │ │ │ ├── qapi_task.c │ │ │ ├── qapi_wdog.c │ │ │ ├── ram.c │ │ │ └── stringl.c │ └── tmeipc │ │ ├── TmecomClientCfg.c │ │ ├── TmecomClientOsApis.c │ │ ├── glink_os_dal.c │ │ └── xport_qmp_config.c └── tools │ ├── bin │ ├── ble_dtm.hex │ ├── nvm_programmer.elf │ ├── otp_tool.elf │ ├── qcc710_programmer.elf │ └── secure_loader.bin │ ├── cfgtag │ ├── qcc710.offsets │ └── qcc710.tcfx │ ├── scripts │ ├── cfgtag.py │ ├── cfgtag_framework │ │ ├── __init__.py │ │ ├── codegen.py │ │ ├── codegen_templates.py │ │ ├── config.py │ │ ├── hydra_db.py │ │ ├── hydra_schema.py │ │ ├── offsets_fileformats.py │ │ ├── tag_descriptor.py │ │ ├── tag_features.py │ │ ├── tag_filter.py │ │ ├── tag_groups.py │ │ ├── tag_platforms.py │ │ ├── tagblob.py │ │ ├── tagblob_patch.py │ │ ├── tagblob_verify.py │ │ ├── tags.py │ │ ├── tagtype.py │ │ ├── tagtype_bits.py │ │ ├── tagtype_enum.py │ │ ├── tagtype_integer.py │ │ ├── tagtype_struct.py │ │ ├── vtagsgen.py │ │ └── xml_wrapper.py │ ├── encrypt_file.py │ ├── examples │ │ ├── bd_addr_and_power.nvmx │ │ ├── cfgtag_example.bat │ │ ├── conf.json │ │ ├── key_config_example.txt │ │ └── otp_list.json │ ├── gdb_framework │ │ ├── __init__.py │ │ ├── gdb_client.py │ │ ├── gdb_framework.py │ │ ├── gdb_server_segger.py │ │ └── hexfile.py │ ├── nvm_programmer.py │ ├── otp_field_list.json │ ├── otp_programmer.py │ ├── qcc710_apps.JLinkScript │ ├── qcc710_programmer.py │ ├── qcc710_tlv_generator.py │ └── secure_programmer.py │ └── src │ ├── ble_dtm.c │ ├── flash_loader_asm.s │ ├── flash_loader_ram.c │ ├── nvm_programmer.c │ ├── otp_tool.c │ ├── qcc710_flash_loader.icf │ ├── qcc710_programmer.c │ └── secure_loader.c └── rot ├── images └── patch.bin ├── notice.txt └── tools ├── QCC710-DPRSignKey ├── README.md └── dprsignkey │ ├── config.json │ └── dpr_sign_key.py ├── QCC710-DebugUnlock ├── README.txt ├── debug.cfg ├── debug_unlock.py ├── debugger_framework.py ├── dmi_utils.py ├── generate_dpr.py ├── input_files │ ├── QCC710_DebugEntitlementCert_OEM_signed.json │ └── security_profile.xml └── pydbg-qcc710 │ ├── requirements.txt │ └── wheels │ ├── customer_pydbg_base-2.24.5-py2.py3-none-any.whl │ └── customer_pydbg_qcc710-2.22.8-py2.py3-none-any.whl ├── QCC710-KDF ├── README.md ├── kdf │ ├── __init__.py │ ├── derive_key.py │ └── tests │ │ ├── run_tests.py │ │ └── test_derive_key.py └── setup.py ├── QCC710-PackageParser ├── README.md └── parser │ └── parse_and_verify_update_package.py ├── QCC710-SecureWrap ├── README.md └── securewrap │ ├── config.json │ └── secure_wrap.py └── QCC710-Signing ├── cert_qcc710.py ├── config ├── OEM-IAR-BMHT.json └── OEM-REC-QCC710.json ├── sign_qcc710.py └── signing-tool-backend-all-1.0.1.jar /.github/workflows/quic-organization-repolinter.yml: -------------------------------------------------------------------------------- 1 | name: QuIC Organization Repolinter 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "main" ] 8 | workflow_dispatch: 9 | 10 | jobs: 11 | repolinter: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout Repo 15 | uses: actions/checkout@v4 16 | - name: Verify repolinter config file is present 17 | id: check_files 18 | uses: andstor/file-existence-action@v3 19 | with: 20 | files: "repolint.json" 21 | - name: Run Repolinter with local repolint.json 22 | if: steps.check_files.outputs.files_exists == 'true' 23 | uses: todogroup/repolinter-action@v1 24 | with: 25 | config_file: "repolint.json" 26 | - name: Run Repolinter with default ruleset 27 | if: steps.check_files.outputs.files_exists == 'false' 28 | uses: todogroup/repolinter-action@v1 29 | with: 30 | config_url: "https://raw.githubusercontent.com/quic/.github/main/repolint.json" 31 | 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | 3. Neither the name of the copyright holder nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | POSSIBILITY OF SUCH DAMAGE. 28 | 29 | SPDX-License-Identifier: BSD-3-Clause -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | QCC711 is a qualcomm brand wireless MCU chip which combines BLE5.4/rich peripheral interfaces and security function. 4 | 5 | The SDK provides CLI based demos, APSS System/driver APIs, BLE&Security APIs, BTSS patch and Security patch Binaries. 6 | it also provides the tools to program the chip. 7 | 8 | 9 | # How to start 10 | go to www.qualcomm.com, search QCC711, follow the guidance to get document 11 | 80-70850-1_AA_QCC711_v2_1_Bluetooth_Low_Energy_Software_Programming_Guide 12 | 13 | follow the guidance to start the work 14 | 15 | # License 16 | QCCSDK for QCC711 is licensed under the BSD 3-clause "New" or "Revised" License, Check LICENSE in the repo. 17 | -------------------------------------------------------------------------------- /common/manifest/qti_manifest-app_mode-unlicensed.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/common/manifest/qti_manifest-app_mode-unlicensed.bin -------------------------------------------------------------------------------- /qcc711_sdk/bin/btcfg_app_mode.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/qcc711_sdk/bin/btcfg_app_mode.bin -------------------------------------------------------------------------------- /qcc711_sdk/bin/btss_patch_app_mode.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/qcc711_sdk/bin/btss_patch_app_mode.bin -------------------------------------------------------------------------------- /qcc711_sdk/iar/Qualcomm/qcc710.i79: -------------------------------------------------------------------------------- 1 | [FILEFORMAT] 2 | rev=1.6 3 | 4 | [CHIP] 5 | name=qcc710 6 | endiansupport=le 7 | thumbsupport=true 8 | armsupport=false 9 | fpu=None 10 | SIMD=false 11 | 12 | JTAG=flase 13 | RTCK=false 14 | SWD=true 15 | SWO_TraceD0=false 16 | SWO_clock=32.0 17 | 18 | [CORE] 19 | name=Cortex-M3 20 | 21 | [FLASH LOADER] 22 | little=$PROJ_DIR$\qcc710_Loader\qcc710_Loader.board 23 | 24 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/Qualcomm/qcc710.menu: -------------------------------------------------------------------------------- 1 | 2 | 3 | QCC710 4 | QCC710 5 | $CUR_DIR$\QCC710.i79 6 | 7 | 8 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/apps/settings/appsGeneral_Debug.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/apps/settings/appsGeneral_Debug.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 1 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/apps/settings/appsGeneral_Release.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/apps/settings/appsGeneral_Release.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 1 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/apps/settings/appsPeripheral_Debug.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/apps/settings/appsPeripheral_Debug.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 1 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/apps/settings/appsPeripheral_Release.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/apps/settings/appsPeripheral_Release.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 1 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/apps/settings/pre_reset_cspy.mac: -------------------------------------------------------------------------------- 1 | //Execute SoC reset before the Debugger begins (after download) 2 | execUserSetup() 3 | { 4 | __writeMemory32(0x5A5A0100, 0x50006828, "Memory"); // HWIO_AON_PME_APPS_RESET_ADDR 5 | 6 | __hwReset(0); // Halt CPU on reset 7 | } 8 | 9 | // Execute SoC reset before the APSS is reset via Debugger 10 | execUserPreReset() 11 | { 12 | __writeMemory32(0x5A5A0100, 0x50006828, "Memory"); // HWIO_AON_PME_APPS_RESET_ADDR 13 | 14 | __hwReset(0); // Halt CPU on reset 15 | } 16 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/qcc710_Loader/qcc710_Loader.board: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | qcc710_Loader.flash 5 | CODE 0x10210000 0x10277fff 6 | 7 | 8 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/qcc710_Loader/qcc710_Loader.flash: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | qcc710_Loader.out 5 | 0x10210000 6 | 8 7 | 832 0x200 8 | qcc710_Loader.mac 9 | 10 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/qcc710_Loader/qcc710_Loader.mac: -------------------------------------------------------------------------------- 1 | // Execute SoC reset before the Flash Loader is downloaded 2 | execUserFlashInit() 3 | { 4 | __writeMemory32(0x5A5A0100, 0x50006828, "Memory"); // HWIO_AON_PME_APPS_RESET_ADDR 5 | 6 | __hwReset(0); // Halt CPU on reset 7 | } 8 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/qcc710_Loader/qcc710_Loader.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/qcc711_sdk/iar/qcc710_Loader/qcc710_Loader.out -------------------------------------------------------------------------------- /qcc711_sdk/iar/readme.txt: -------------------------------------------------------------------------------- 1 | The 'qcc710_Loader' folder contains the flash loader for qcc710. 2 | To use qcc710 flash loader: 3 | - Select a project in workspace, right click on it to open project config options. 4 | - Select 'Debugger' in category column. 5 | - Click on 'Setup' tag, select 'J-Link/J-Trace' under 'Driver' section, check 'Run to' option and put in main. 6 | - Click on 'Download' tag, select 'Verify download', 'Use flashloader(s)', 'Overwrite default board file' options and 7 | put in $PROJ_DIR$\..\qcc710_Loader\qcc710_Loader.board 8 | - Click on 'J-Link/J-Trace' in in category column. 9 | - Select 'Setup' tag, set 'Reset' to 'Normal', set 'JTAG/SWD speed' to 'Auto'. 10 | - Select 'Connection' tag, set 'Communication' to 'USB', set 'Interface' to 'SWD'. 11 | - Click OK 12 | 13 | The 'Qualcomm' folder contains files for adding qcc710 to IAR device list. 14 | For adding qcc710 to IAR device list: 15 | - Copy the 'Qualcomm' folder into 'IAR_TOOL_DIR\config\devices' folder 16 | - IAR_TOOL_DIR is path to the folder where the IAR is installed, for example C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm 17 | To use the qcc710 from IAR device list: 18 | - Select a project in workspace, right click on it to open project config options. 19 | - Select 'General Options' in category column. 20 | - Select 'Target', click 'Device' in 'Processor Variant' section. 21 | - Click on 'device list' icon, go to 'Qualcomm' section and click on it to use 'qcc710' as the target device. 22 | 23 | To use batch build 24 | - Click on 'Project' on the menu bar. 25 | - Select 'Batch build ...' 26 | - Select the desired bacth build action in the pop out window. 27 | - Click 'Make', 'Clean', or 'Rebuild All' 28 | 29 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/pre_reset_cspy.mac: -------------------------------------------------------------------------------- 1 | //Execute SoC reset before the Debugger begins (after download) 2 | execUserSetup() 3 | { 4 | __writeMemory32(0x5A5A0100, 0x50006828, "Memory"); // HWIO_AON_PME_APPS_RESET_ADDR 5 | 6 | __hwReset(0); // Halt CPU on reset 7 | } 8 | 9 | // Execute SoC reset before the APSS is reset via Debugger 10 | execUserPreReset() 11 | { 12 | __writeMemory32(0x5A5A0100, 0x50006828, "Memory"); // HWIO_AON_PME_APPS_RESET_ADDR 13 | 14 | __hwReset(0); // Halt CPU on reset 15 | } 16 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsFlashLoader_Debug.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsFlashLoader_Debug.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsFlashLoader_Release.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsFlashLoader_Release.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsNVMProgrammer_Debug.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsNVMProgrammer_Debug.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsNVMProgrammer_Release.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsNVMProgrammer_Release.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsOTP_Debug.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsOTP_Debug.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsOTP_Release.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsOTP_Release.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsQCC710Programmer_Debug.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsQCC710Programmer_Debug.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsQCC710Programmer_Release.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsQCC710Programmer_Release.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsSecureLoader_Debug.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsSecureLoader_Debug.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsSecureLoader_Release.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /qcc711_sdk/iar/tools/settings/toolsSecureLoader_Release.jlink: -------------------------------------------------------------------------------- 1 | [BREAKPOINTS] 2 | ForceImpTypeAny = 0 3 | ShowInfoWin = 1 4 | EnableFlashBP = 2 5 | BPDuringExecution = 0 6 | [CFI] 7 | CFISize = 0x00 8 | CFIAddr = 0x00 9 | [CPU] 10 | MonModeVTableAddr = 0xFFFFFFFF 11 | MonModeDebug = 0 12 | MaxNumAPs = 0 13 | LowPowerHandlingMode = 0 14 | OverrideMemMap = 0 15 | AllowSimulation = 1 16 | ScriptFile="" 17 | [FLASH] 18 | CacheExcludeSize = 0x00 19 | CacheExcludeAddr = 0x00 20 | MinNumBytesFlashDL = 0 21 | SkipProgOnCRCMatch = 1 22 | VerifyDownload = 1 23 | AllowCaching = 1 24 | EnableFlashDL = 2 25 | Override = 1 26 | Device="Cortex-M3" 27 | [GENERAL] 28 | WorkRAMSize = 0x00 29 | WorkRAMAddr = 0x00 30 | RAMUsageLimit = 0x00 31 | [SWO] 32 | SWOLogFile="" 33 | [MEM] 34 | RdOverrideOrMask = 0x00 35 | RdOverrideAndMask = 0xFFFFFFFF 36 | RdOverrideAddr = 0xFFFFFFFF 37 | WrOverrideOrMask = 0x00 38 | WrOverrideAndMask = 0xFFFFFFFF 39 | WrOverrideAddr = 0xFFFFFFFF 40 | -------------------------------------------------------------------------------- /qcc711_sdk/notice.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/qcc711_sdk/notice.txt -------------------------------------------------------------------------------- /qcc711_sdk/qapi/ble/qapi_ble_btapityp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __QAPI_BLE_BTAPITYP_H__ 8 | #define __QAPI_BLE_BTAPITYP_H__ 9 | 10 | /* The following definition defines the API Calling Convention for */ 11 | /* ALL the exported Bluetoth API Functions. */ 12 | #ifndef QAPI_BLE_BTPSAPI 13 | 14 | #define QAPI_BLE_BTPSAPI 15 | 16 | #endif 17 | 18 | /* The following conditional declaration controls the specific */ 19 | /* linkage that may/may not be required to specify Bluetooth API */ 20 | /* functions. */ 21 | #ifndef QAPI_BLE_DECLARATION 22 | 23 | #define QAPI_BLE_DECLARATION 24 | 25 | #endif 26 | 27 | /* This define (BTPSCONST) is used to conditionally support the use */ 28 | /* of the const modifier. */ 29 | /* * NOTE * This is only provided for older platforms that do not */ 30 | /* support the const modifier. */ 31 | #ifndef QAPI_BLE_CONST 32 | 33 | #define QAPI_BLE_CONST const 34 | 35 | #endif 36 | 37 | /* In case the compiler does not support exception handling, define */ 38 | /* the exception handling to do nothing. */ 39 | #ifndef __QAPI_BLE_TRY 40 | 41 | #define __QAPI_BLE_TRY 42 | 43 | #endif 44 | 45 | #ifndef __QAPI_BLE_EXCEPT 46 | 47 | #define __QAPI_BLE_EXCEPT(_x) if(0) 48 | 49 | #endif 50 | 51 | /* The following MACRO is a utility MACRO that exists to calculate */ 52 | /* the offset position of a particular structure member from the */ 53 | /* start of the structure. This MACRO accepts as the first parameter,*/ 54 | /* the physical name of the structure (the type name, NOT the */ 55 | /* variable name). The second parameter to this MACRO represents the */ 56 | /* actual structure member that the offset is to be determined. This */ 57 | /* MACRO returns an unsigned integer that represents the offset (in */ 58 | /* bytes) of the structure member. */ 59 | #define QAPI_BLE_BTPS_STRUCTURE_OFFSET(_x, _y) ((uintptr_t)&(((_x *)0)->_y)) 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /qcc711_sdk/qapi/ble/qapi_ble_bttypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __QAPI_BLE_BTTYPES_H__ 8 | #define __QAPI_BLE_BTTYPES_H__ 9 | 10 | /* Miscellaneous defined type declarations. */ 11 | 12 | /* Definitions for compilers that required structure to be explicitly*/ 13 | /* declared as packed. */ 14 | 15 | /* Check for ARM Real View. */ 16 | #if defined(__ARMCC_VERSION) 17 | 18 | #define __QAPI_BLE_PACKED_STRUCT_BEGIN__ __packed 19 | 20 | #define __QAPI_BLE_PACKED_STRUCT_END__ 21 | 22 | /* Check for GCC. */ 23 | #elif defined(__GNUC__) 24 | 25 | #define __QAPI_BLE_PACKED_STRUCT_BEGIN__ 26 | 27 | #define __QAPI_BLE_PACKED_STRUCT_END__ __attribute__ ((packed)) 28 | 29 | /* Check for IAR. */ 30 | #elif defined(__ICCARM__) 31 | 32 | #define __QAPI_BLE_PACKED_STRUCT_BEGIN__ __packed 33 | 34 | #define __QAPI_BLE_PACKED_STRUCT_END__ 35 | 36 | /* Must be handled some other way. */ 37 | #else 38 | 39 | #define __QAPI_BLE_PACKED_STRUCT_BEGIN__ 40 | 41 | #define __QAPI_BLE_PACKED_STRUCT_END__ 42 | 43 | #endif 44 | 45 | #define __QAPI_BLE_BTTYPESH_INC__ 46 | 47 | /* Force ALL Structure Declarations to be Byte Packed (noting the */ 48 | /* current Structure Packing). */ 49 | 50 | #include "qapi_ble_basetypes.h" 51 | #include "qapi_ble_btbtypes.h" 52 | 53 | /* Restore Structure Packing. */ 54 | 55 | #undef __QAPI_BLE_BTTYPESH_INC__ 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /qcc711_sdk/qapi/ble/qapi_ble_dtm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /** 8 | * @file qapi_ble_dtm.h 9 | * 10 | * @brief 11 | * QCA QAPI for Bluetopia Bluetooth Stack Direct Test Mode (DTM) 12 | * Profile API Type Definitions, Constants, and Prototypes. 13 | */ 14 | 15 | #ifndef __QAPI_BLE_DTM_H__ 16 | #define __QAPI_BLE_DTM_H__ 17 | 18 | #include "qapi_types.h" 19 | #include "qapi_ble_btapityp.h" 20 | 21 | 22 | /** @addtogroup qapi_ble_dtm 23 | @{ */ 24 | 25 | /** 26 | * @brief 27 | * This declared type represents the prototype Function for a DTM callback. 28 | * 29 | * @details 30 | * This function will be called whenever event data needs to be sent. 31 | * 32 | * @param[in] Length Length of the data buffer. 33 | * 34 | * @param[in] Data Event data to send. 35 | * 36 | * @param[in] CallbackParameter User-defined parameter that was defined in the 37 | * callback registration. 38 | * 39 | * @return 40 | * None. 41 | */ 42 | typedef void (QAPI_BLE_BTPSAPI *qapi_BLE_DTM_Callback_t)(uint32_t Length, uint8_t *Data, unsigned long CallbackParameter); 43 | 44 | /** 45 | * @brief 46 | * Initializes the Bluetooth Protocol Stack in BLE Direct Test Mode. 47 | * 48 | * As this module initializes the Bluetooth stack, it must not already be 49 | * initialized when this API is called. 50 | * 51 | * @param[in] Callback Function called when event data needs to be 52 | * sent. 53 | * 54 | * @param[in] CallbackParameter User-defined parameter passed to the callback 55 | * function. 56 | * 57 | * @return 58 | * Zero -- if initialization was successful. 59 | * Negative value -- That is an ErrorCode. Possible values are: 60 | * @par 61 | * QAPI_BLE_BTPS_ERROR_INVALID_PARAMETER \n 62 | * QAPI_BLE_BTPS_ERROR_HCI_DRIVER_ERROR \n 63 | * QAPI_BLE_BTPS_ERROR_INSUFFICIENT_RESOURCES \n 64 | * QAPI_BLE_BTPS_ERROR_HCI_INITIALIZATION_ERROR \n 65 | * QAPI_BLE_BTPS_ERROR_GAP_INITIALIZATION_ERROR \n 66 | * QAPI_BLE_BTPS_ERROR_L2CAP_INITIALIZATION_ERROR 67 | */ 68 | QAPI_BLE_DECLARATION int QAPI_BLE_BTPSAPI qapi_BLE_DTM_Initialize(qapi_BLE_DTM_Callback_t Callback, unsigned long CallbackParameter); 69 | 70 | /** 71 | * @brief 72 | * Exits Direct Test Mode and Shuts down the Bluetooth Protocol Stack. 73 | * 74 | * @return 75 | * None. 76 | */ 77 | QAPI_BLE_DECLARATION void QAPI_BLE_BTPSAPI qapi_BLE_DTM_Shutdown(void); 78 | 79 | /** 80 | * @brief 81 | * Pass recieved data into the DTM module. 82 | * 83 | * @param[in] Length Length of the data received. 84 | * 85 | * @param[in] Data Pointer to the recieved data. 86 | * 87 | * @return 88 | * Zero -- If successful.\n 89 | * Negative -- If an Error occurred. Possible values are: 90 | */ 91 | QAPI_BLE_DECLARATION int QAPI_BLE_BTPSAPI qapi_BLE_DTM_Receive(uint32_t Length, uint8_t *Data); 92 | 93 | /** @} */ /* end_addtogroup qapi_ble_dtm */ 94 | 95 | #endif 96 | 97 | -------------------------------------------------------------------------------- /qcc711_sdk/qapi/common/qapi_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /** 8 | * @file qapi_types.h 9 | * 10 | * @brief QAPI base type definitions 11 | * 12 | * @details This file provides the base type definitions used by the QAPI. 13 | * This includes the basic integer types (based on stdint.h and 14 | * stddef.h) and a basic boolean type. 15 | */ 16 | 17 | #ifndef __QAPI_TYPES_H__ // [ 18 | #define __QAPI_TYPES_H__ 19 | 20 | #include 21 | #include 22 | /** boolean data type. */ 23 | typedef uint32_t qbool_t; 24 | 25 | #ifndef false 26 | #define false (0) 27 | #endif 28 | 29 | #ifndef true 30 | #define true (1) 31 | #endif 32 | 33 | #endif // ] #ifndef __QAPI_TYPES_H__ 34 | 35 | -------------------------------------------------------------------------------- /qcc711_sdk/qapi/common/qapi_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /** 8 | * @file qapi_version.h 9 | * 10 | * @brief QAPI version information 11 | * 12 | * @details This file provides defintions for the QAPI/SDK version. 13 | */ 14 | 15 | #ifndef __QAPI_VERSION_H__ // [ 16 | #define __QAPI_VERSION_H__ 17 | 18 | #define QAPI_CHIP_VERSION 0x0102 19 | #define QAPI_BUILD_VERSION 0x68AE 20 | 21 | #define QAPI_CHIP_VERSION_STR "0102" 22 | #define QAPI_BUILD_VERSION_STR "68AE" 23 | 24 | #endif // ] #ifndef __QAPI_VERSION_H__ -------------------------------------------------------------------------------- /qcc711_sdk/qapi/crypto/qapi_crypto_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /** 8 | * @file qapi_crypto_common.h 9 | * @brief Crypto common types and definitions. 10 | 11 | This file defines the common data types used across crypto module and various sub modules. 12 | */ 13 | 14 | #ifndef __QAPI_CRYPTO_COMMON_H__ 15 | #define __QAPI_CRYPTO_COMMON_H__ 16 | 17 | 18 | /*------------------------------------------------------------------------- 19 | * Preprocessor Definitions and Constants 20 | *-----------------------------------------------------------------------*/ 21 | 22 | /*------------------------------------------------------------------------- 23 | * Type Declarations 24 | *-----------------------------------------------------------------------*/ 25 | 26 | /** @ingroup qapi_platform_crypto 27 | Type representing a key handle for the particular key. Key handle acquired via 28 | qapi_CRPT_Import_Key() can be used with any applicable crypto QAPI. */ 29 | typedef uint32_t qapi_CRPT_Key_Handle_t; 30 | 31 | 32 | #endif -------------------------------------------------------------------------------- /qcc711_sdk/qapi/platform/qapi_debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /** @file qapi_debug.h 8 | @brief Debug related APIs, types, and definitions. 9 | 10 | */ 11 | 12 | #ifndef __QAPI_DBG_H__ 13 | #define __QAPI_DBG_H__ 14 | 15 | /*------------------------------------------------------------------------- 16 | * Include Files 17 | *-----------------------------------------------------------------------*/ 18 | 19 | #include "qapi_types.h" 20 | #include "qapi_status.h" 21 | 22 | /** @addtogroup qapi_platform_dbg 23 | @{ */ 24 | 25 | /*------------------------------------------------------------------------- 26 | * Preprocessor Definitions and Constants 27 | *-----------------------------------------------------------------------*/ 28 | 29 | /*------------------------------------------------------------------------- 30 | * Type Declarations 31 | *-----------------------------------------------------------------------*/ 32 | 33 | /*------------------------------------------------------------------------- 34 | * Function Declarations 35 | *-----------------------------------------------------------------------*/ 36 | 37 | /** 38 | @brief Determines if a debugger is currently attached. 39 | 40 | @return 41 | TRUE -- If a debugger is attached. \n 42 | FALSE -- If a debugger is not attached. 43 | */ 44 | qbool_t qapi_DBG_Debugger_Attached(void); 45 | 46 | /** @} */ /* end_addtogroup qapi_platform_dbg */ 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /qcc711_sdk/qapi/platform/qapi_nvm_rot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /** @file qapi_nvm_rot.h 8 | @brief NVM related APIs and definitions. 9 | 10 | This module provides mechanisms to perform operations on the NVM shared by the RoT 11 | subsystem. 12 | Make sure that the #qapi_ROT_Session_Start() API is called before using these APIs. 13 | 14 | If the APSS has acquired NVM access, then access must be released to 15 | perform read/write operations in shared NVM. 16 | */ 17 | 18 | #ifndef __QAPI_NVM_ROT_H__ 19 | #define __QAPI_NVM_ROT_H__ 20 | 21 | /*------------------------------------------------------------------------- 22 | * Include Files 23 | *-----------------------------------------------------------------------*/ 24 | #include "qapi_types.h" 25 | #include "qapi_status.h" 26 | 27 | /** @addtogroup qapi_platform_nvm_rot 28 | @{ */ 29 | 30 | /*------------------------------------------------------------------------- 31 | * Preprocessor Definitions and Constants 32 | *-----------------------------------------------------------------------*/ 33 | 34 | /* Definition for NVM size available for the APSS to perform write/read operation. */ 35 | #define QAPI_NVM_ROT_SIZE (0x3000) /**< Size of shared NVM available to the APSS. */ 36 | 37 | /*------------------------------------------------------------------------- 38 | * Function Declarations 39 | *-----------------------------------------------------------------------*/ 40 | 41 | /** 42 | @brief Writes the provided buffer to the specified offset in NVM (RRAM) 43 | allocated to the RoT. 44 | 45 | Valid offset range is from 0 to (#QAPI_NVM_ROT_SIZE-1). 46 | 47 | Writes to NVM will block NVM reads, therefore this function blocks until the NVM 48 | write has completed. 49 | 50 | The caller should be aware that writing to RRAM can block other cores 51 | (namely the BTSS) and very long writes may affect performance. 52 | 53 | @param[in] Offset Offset at which data to write. 54 | @param[in] Buffer Data to write to NVM. 55 | @param[in] Length Length of the data to write to NVM. 56 | 57 | @return 58 | QAPI_OK -- If the data was successfully written to NVM.\n 59 | Negative value -- If there was an error. 60 | */ 61 | qapi_Status_t qapi_NVM_Write_ROT(uint32_t Offset, const void *Buffer, uint32_t Length); 62 | 63 | /** 64 | @brief Reads NVM (RRAM) data from the specified offset to the provided buffer. 65 | Valid offset range is from 0 to (#QAPI_NVM_ROT_SIZE-1). 66 | 67 | @param[in] Offset Offset from data to read. 68 | @param[in] Buffer Buffer to save read NVM data. 69 | @param[in] Length Length of the data to read from NVM. 70 | 71 | @return 72 | QAPI_OK -- If the data was successfully written to NVM.\n 73 | Negative value -- If there was an error. 74 | */ 75 | qapi_Status_t qapi_NVM_Read_ROT(uint32_t Offset, void *Buffer, uint32_t Length); 76 | 77 | /** @} */ /* end_addtogroup qapi_platform_nvm_rot */ 78 | 79 | #endif //__QAPI_NVM_ROT_H__ -------------------------------------------------------------------------------- /qcc711_sdk/src/CMSIS/Core/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.4 5 | * @date 23. July 2019 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2019 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 4U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /qcc711_sdk/src/CMSIS/Device/QC/QCC710/Include/system_qcc710.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | * NOT A CONTRIBUTION 6 | */ 7 | 8 | /**************************************************************************//** 9 | * @file system_qcc710.h 10 | * @brief CMSIS Cortex-M# Device Peripheral Access Layer Header File for 11 | * Device QCC710 12 | * @version V5.00 13 | * @date 10. January 2018 14 | ******************************************************************************/ 15 | /* 16 | * Copyright (c) 2009-2018 Arm Limited. All rights reserved. 17 | * 18 | * SPDX-License-Identifier: Apache-2.0 19 | * 20 | * Licensed under the Apache License, Version 2.0 (the License); you may 21 | * not use this file except in compliance with the License. 22 | * You may obtain a copy of the License at 23 | * 24 | * www.apache.org/licenses/LICENSE-2.0 25 | * 26 | * Unless required by applicable law or agreed to in writing, software 27 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 28 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 29 | * See the License for the specific language governing permissions and 30 | * limitations under the License. 31 | */ 32 | 33 | #ifndef SYSTEM_QCC710_H 34 | #define SYSTEM_QCC710_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | #include 41 | 42 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 43 | 44 | 45 | /** 46 | \brief Setup the microcontroller system. 47 | 48 | Initialize the System and update the SystemCoreClock variable. 49 | */ 50 | extern void SystemInit (void); 51 | 52 | 53 | /** 54 | \brief Update SystemCoreClock variable. 55 | 56 | Updates the SystemCoreClock with current core Clock retrieved from cpu registers. 57 | */ 58 | extern void SystemCoreClockUpdate (void); 59 | 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | 65 | #endif /* SYSTEM_QCC710_H */ 66 | -------------------------------------------------------------------------------- /qcc711_sdk/src/CMSIS/Device/QC/QCC710/Source/IAR/icfeditor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
Start:
7 |
End:
8 |
9 | 10 | __ICFEDIT_region_ROM_start__ 11 | __ICFEDIT_region_ROM_end__ 12 | The start address of the ROM region 13 | The end address of the ROM region 14 | 15 | 16 | __ICFEDIT_region_retn_RAM_start__ 17 | __ICFEDIT_region_retn_RAM_end__ 18 | The start address of the retained RAM region 19 | The end address of the retained RAM region 20 | 21 | 22 | __ICFEDIT_region_main_RAM_start__ 23 | __ICFEDIT_region_main_RAM_end__ 24 | The start address of the main RAM region 25 | The end address of the main RAM region 26 | 27 |
28 | 29 | 30 | 31 | __ICFEDIT_size_cstack__ 32 | The size of the main stack 33 | 34 | 35 | __ICFEDIT_size_proc_stack__ 36 | The size of the process stack 37 | 38 | 39 | __ICFEDIT_size_retn_heap__ 40 | The size of the main heap 41 | 42 | 43 | __ICFEDIT_size_main_heap__ 44 | The size of the main heap 45 | 46 | 47 |
48 | 49 | -------------------------------------------------------------------------------- /qcc711_sdk/src/CMSIS/Device/QC/QCC710/Source/system_qcc710.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | * NOT A CONTRIBUTION 6 | */ 7 | 8 | /**************************************************************************//** 9 | * @file system_qcc710.c 10 | * @brief CMSIS Cortex-M# Device Peripheral Access Layer Source File for 11 | * Device QCC710 12 | * @version V5.00 13 | * @date 10. January 2018 14 | ******************************************************************************/ 15 | /* 16 | * Copyright (c) 2009-2018 Arm Limited. All rights reserved. 17 | * 18 | * SPDX-License-Identifier: Apache-2.0 19 | * 20 | * Licensed under the Apache License, Version 2.0 (the License); you may 21 | * not use this file except in compliance with the License. 22 | * You may obtain a copy of the License at 23 | * 24 | * www.apache.org/licenses/LICENSE-2.0 25 | * 26 | * Unless required by applicable law or agreed to in writing, software 27 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 28 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 29 | * See the License for the specific language governing permissions and 30 | * limitations under the License. 31 | */ 32 | 33 | #include 34 | #include "qcc710.h" 35 | #include "HALhwio.h" 36 | #include "hwio_aon.h" 37 | 38 | 39 | /*---------------------------------------------------------------------------- 40 | Define clocks 41 | *----------------------------------------------------------------------------*/ 42 | #define XTAL (32000000U) /* Oscillator frequency */ 43 | 44 | #define SYSTEM_CLOCK (1 * XTAL) 45 | 46 | 47 | /*---------------------------------------------------------------------------- 48 | System Core Clock Variable 49 | *----------------------------------------------------------------------------*/ 50 | uint32_t SystemCoreClock = SYSTEM_CLOCK; /* System Clock Frequency (Core Clock)*/ 51 | 52 | 53 | 54 | /*---------------------------------------------------------------------------- 55 | Clock functions 56 | *----------------------------------------------------------------------------*/ 57 | 58 | void SystemCoreClockUpdate (void) /* Get Core Clock Frequency */ 59 | { 60 | SystemCoreClock = SYSTEM_CLOCK; 61 | } 62 | 63 | void SystemInit (void) 64 | { 65 | SystemCoreClock = SYSTEM_CLOCK; 66 | 67 | /* Make the vote for NVM to be active. */ 68 | HWIO_AON_PME_APPS_DEPEND_ACTIVE_OUTM(HWIO_AON_PME_APPS_DEPEND_ACTIVE_NVM_BMSK, HWIO_AON_PME_APPS_DEPEND_ACTIVE_NVM_BMSK); 69 | 70 | /* Signal that APSS is running. */ 71 | HWIO_AON_PME_APPS_STATUS_OUTM(HWIO_AON_PME_APPS_STATUS_OPERATIVE_BMSK, HWIO_AON_PME_APPS_STATUS_OPERATIVE_BMSK); 72 | } 73 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/BASAPI_cb_m3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __BASAPI_CB_M3_H__ 7 | #define __BASAPI_CB_M3_H__ 8 | 9 | #include "callback.h" 10 | 11 | void BAS_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 12 | 13 | 14 | #endif /* __BASAPI_CB_M3_H__ */ 15 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/BASAPI_cb_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __BASAPI_CB_PARAMS_H__ 7 | #define __BASAPI_CB_PARAMS_H__ 8 | 9 | #include "qapi_ble_bas.h" 10 | 11 | typedef struct _tagBAS_Event_Callback_Params_t 12 | { 13 | uint32_t BluetoothStackID; 14 | qapi_BLE_BAS_Event_Data_t *BAS_Event_Data; 15 | unsigned long CallbackParameter; 16 | } BAS_Event_Callback_Params_t; 17 | 18 | #define BAS_EVENT_CALLBACK_PARAMS_SIZE sizeof(BAS_Event_Callback_Params_t) 19 | 20 | 21 | #endif /* __BASAPI_CB_PARAMS_H__ */ 22 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/BSCAPI_cb_m3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __BSCAPI_CB_M3_H__ 7 | #define __BSCAPI_CB_M3_H__ 8 | 9 | #include "callback.h" 10 | 11 | void BSC_Timer_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 12 | 13 | void BSC_Debug_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 14 | 15 | void BSC_AsynchronousCallbackFunction_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 16 | 17 | 18 | #endif /* __BSCAPI_CB_M3_H__ */ 19 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/BSCAPI_cb_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __BSCAPI_CB_PARAMS_H__ 7 | #define __BSCAPI_CB_PARAMS_H__ 8 | 9 | #include "qapi_ble_bsc.h" 10 | 11 | typedef struct _tagBSC_Timer_Callback_Params_t 12 | { 13 | uint32_t BluetoothStackID; 14 | uint32_t TimerID; 15 | unsigned long CallbackParameter; 16 | } BSC_Timer_Callback_Params_t; 17 | 18 | #define BSC_TIMER_CALLBACK_PARAMS_SIZE sizeof(BSC_Timer_Callback_Params_t) 19 | 20 | typedef struct _tagBSC_Debug_Callback_Params_t 21 | { 22 | uint32_t BluetoothStackID; 23 | boolean_t PacketSent; 24 | qapi_BLE_HCI_Packet_t *HCIPacket; 25 | unsigned long CallbackParameter; 26 | } BSC_Debug_Callback_Params_t; 27 | 28 | #define BSC_DEBUG_CALLBACK_PARAMS_SIZE sizeof(BSC_Debug_Callback_Params_t) 29 | 30 | typedef struct _tagBSC_AsynchronousCallbackFunction_Params_t 31 | { 32 | uint32_t BluetoothStackID; 33 | unsigned long CallbackParameter; 34 | } BSC_AsynchronousCallbackFunction_Params_t; 35 | 36 | #define BSC_ASYNCHRONOUSCALLBACKFUNCTION_PARAMS_SIZE sizeof(BSC_AsynchronousCallbackFunction_Params_t) 37 | 38 | 39 | #endif /* __BSCAPI_CB_PARAMS_H__ */ 40 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/BSCAPI_mnl_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __BSCAPIMNLUTILH__ 7 | #define __BSCAPIMNLUTILH__ 8 | 9 | #include 10 | 11 | typedef struct ApssVersionInfo_s 12 | { 13 | uint16_t ChipVersion; 14 | uint16_t BuildVersion; 15 | } ApssVersionInfo_t; 16 | 17 | #endif /* __BSCAPIMNLUTILH__ */ 18 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/BSCAPI_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2022 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __BSCAPI_PARAMS_H__ 7 | #define __BSCAPI_PARAMS_H__ 8 | 9 | #include "qapi_ble_bsc.h" 10 | typedef struct _tagBSC_Initialize_Params_t 11 | { 12 | qapi_BLE_HCI_DriverInformation_t *HCI_DriverInformation; 13 | unsigned long Flags; 14 | } BSC_Initialize_Params_t; 15 | 16 | #define BSC_INITIALIZE_PARAMS_SIZE sizeof(BSC_Initialize_Params_t) 17 | 18 | typedef struct _tagBSC_Shutdown_Params_t 19 | { 20 | uint32_t BluetoothStackID; 21 | } BSC_Shutdown_Params_t; 22 | 23 | #define BSC_SHUTDOWN_PARAMS_SIZE sizeof(BSC_Shutdown_Params_t) 24 | 25 | typedef struct _tagBSC_RegisterDebugCallback_Params_t 26 | { 27 | uint32_t BluetoothStackID; 28 | unsigned long CallbackParameter; 29 | } BSC_RegisterDebugCallback_Params_t; 30 | 31 | #define BSC_REGISTERDEBUGCALLBACK_PARAMS_SIZE sizeof(BSC_RegisterDebugCallback_Params_t) 32 | 33 | typedef struct _tagBSC_UnRegisterDebugCallback_Params_t 34 | { 35 | uint32_t BluetoothStackID; 36 | } BSC_UnRegisterDebugCallback_Params_t; 37 | 38 | #define BSC_UNREGISTERDEBUGCALLBACK_PARAMS_SIZE sizeof(BSC_UnRegisterDebugCallback_Params_t) 39 | 40 | typedef struct _tagBSC_QueryStatistics_Params_t 41 | { 42 | uint32_t BluetoothStackID; 43 | qapi_BLE_BSC_Statistics_t *Statistics; 44 | } BSC_QueryStatistics_Params_t; 45 | 46 | #define BSC_QUERYSTATISTICS_PARAMS_SIZE sizeof(BSC_QueryStatistics_Params_t) 47 | 48 | typedef struct _tagBSC_ClearStatistics_Params_t 49 | { 50 | uint32_t BluetoothStackID; 51 | uint32_t Flags; 52 | } BSC_ClearStatistics_Params_t; 53 | 54 | #define BSC_CLEARSTATISTICS_PARAMS_SIZE sizeof(BSC_ClearStatistics_Params_t) 55 | 56 | #endif /* __BSCAPI_PARAMS_H__ */ 57 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/CTESAPI_cb_m3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __CTESAPI_CB_M3_H__ 7 | #define __CTESAPI_CB_M3_H__ 8 | 9 | #include "callback.h" 10 | 11 | void CTES_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 12 | 13 | 14 | #endif /* __CTESAPI_CB_M3_H__ */ 15 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/CTESAPI_cb_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __CTESAPI_CB_PARAMS_H__ 7 | #define __CTESAPI_CB_PARAMS_H__ 8 | 9 | #include "qapi_ble_ctes.h" 10 | 11 | typedef struct _tagCTES_Event_Callback_Params_t 12 | { 13 | uint32_t BluetoothStackID; 14 | qapi_BLE_CTES_Event_Data_t *CTES_Event_Data; 15 | unsigned long CallbackParameter; 16 | } CTES_Event_Callback_Params_t; 17 | 18 | #define CTES_EVENT_CALLBACK_PARAMS_SIZE sizeof(CTES_Event_Callback_Params_t) 19 | 20 | 21 | #endif /* __CTESAPI_CB_PARAMS_H__ */ 22 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/DISAPI_cb_m3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __DISAPI_CB_M3_H__ 7 | #define __DISAPI_CB_M3_H__ 8 | 9 | #include "callback.h" 10 | 11 | 12 | #endif /* __DISAPI_CB_M3_H__ */ 13 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/DISAPI_cb_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __DISAPI_CB_PARAMS_H__ 7 | #define __DISAPI_CB_PARAMS_H__ 8 | 9 | #include "qapi_ble_dis.h" 10 | 11 | 12 | #endif /* __DISAPI_CB_PARAMS_H__ */ 13 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/GAPAPI_cb_m3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __GAPAPI_CB_M3_H__ 7 | #define __GAPAPI_CB_M3_H__ 8 | 9 | #include "callback.h" 10 | 11 | void GAP_LE_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 12 | 13 | 14 | #endif /* __GAPAPI_CB_M3_H__ */ 15 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/GAPAPI_cb_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __GAPAPI_CB_PARAMS_H__ 7 | #define __GAPAPI_CB_PARAMS_H__ 8 | 9 | #include "qapi_ble_gap.h" 10 | 11 | typedef struct _tagGAP_LE_Event_Callback_Params_t 12 | { 13 | uint32_t BluetoothStackID; 14 | qapi_BLE_GAP_LE_Event_Data_t *GAP_LE_Event_Data; 15 | unsigned long CallbackParameter; 16 | } GAP_LE_Event_Callback_Params_t; 17 | 18 | #define GAP_LE_EVENT_CALLBACK_PARAMS_SIZE sizeof(GAP_LE_Event_Callback_Params_t) 19 | 20 | 21 | #endif /* __GAPAPI_CB_PARAMS_H__ */ 22 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/GAPAPI_mnl_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __GAPAPIMNLUTILH__ 7 | #define __GAPAPIMNLUTILH__ 8 | 9 | #include "qapi_ble_gap.h" 10 | 11 | /* The following define valid return status' from the */ 12 | /* APSS_Buffer_Allow_Access_For_BTSS function. */ 13 | #define GAP_ERROR_BUFFER_STATUS_OK 0 14 | #define GAP_ERROR_BUFFER_STATUS_INVALID_PARAMETER (QAPI_BLE_BTPS_ERROR_INVALID_PARAMETER) 15 | #define GAP_ERROR_BUFFER_STATUS_IGNORE_RETURN_SUCCESS -2 16 | #define GAP_ERROR_BUFFER_STATUS_INVALID_OPERATION (QAPI_BLE_BTPS_ERROR_ACTION_NOT_ALLOWED) 17 | #define GAP_ERROR_BUFFER_STATUS_UNKNOWN_ERROR (QAPI_BLE_BTPS_ERROR_INTERNAL_ERROR) 18 | 19 | unsigned int CountAdvertisingDataRecords(unsigned int Advertising_Data_Length, uint8_t *Advertising_Data); 20 | unsigned int ParseAdvertisingData(unsigned int Advertising_Data_Length, uint8_t *Advertising_Data, qapi_BLE_GAP_LE_Advertising_Data_t *ParsedData); 21 | 22 | /* These functions a integrated with the APSS buffer management for */ 23 | /* ESL use case and thus are here. */ 24 | void ESLD_Write_Request_Event_Received(void); 25 | void ESLD_Write_Stopped_Event_Received(void); 26 | 27 | /* This function enables access for BTSS to read/write the specified */ 28 | /* buffer of the specified length. If NonObjectWriteCall is TRUE */ 29 | /* then this buffer is not involved in an ESL object write operation */ 30 | /* and the APSS_Buffer_Revoke_Access_From_BTSS() API must be called */ 31 | /* to revoke access to the memory when BTSS no longer needs access to*/ 32 | /* the memory. */ 33 | int APSS_Buffer_Allow_Access_For_BTSS(uint32_t Buffer_Length, uint8_t *Buffer, boolean_t NonObjectWriteCall); 34 | 35 | /* This function is called to revoke BTSS access to the specified */ 36 | /* buffer. This should never be called for a buffer used in an ESL */ 37 | /* Buffer Write (those are cleaned up when the object write operation*/ 38 | /* is complete). */ 39 | void APSS_Buffer_Revoke_Access_From_BTSS(uint32_t Buffer_Length, uint8_t *Buffer); 40 | 41 | #endif /* __GAPAPIMNLUTILH__ */ 42 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/GAPSAPI_cb_m3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __GAPSAPI_CB_M3_H__ 7 | #define __GAPSAPI_CB_M3_H__ 8 | 9 | #include "callback.h" 10 | 11 | 12 | #endif /* __GAPSAPI_CB_M3_H__ */ 13 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/GAPSAPI_cb_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __GAPSAPI_CB_PARAMS_H__ 7 | #define __GAPSAPI_CB_PARAMS_H__ 8 | 9 | #include "qapi_ble_gaps.h" 10 | 11 | 12 | #endif /* __GAPSAPI_CB_PARAMS_H__ */ 13 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/GATTAPI_cb_m3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __GATTAPI_CB_M3_H__ 7 | #define __GATTAPI_CB_M3_H__ 8 | 9 | #include "callback.h" 10 | 11 | void GATT_Connection_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 12 | 13 | void GATT_Server_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 14 | 15 | void GATT_Client_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 16 | 17 | void GATT_Service_Discovery_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 18 | 19 | 20 | #endif /* __GATTAPI_CB_M3_H__ */ 21 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/GATTAPI_cb_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __GATTAPI_CB_PARAMS_H__ 7 | #define __GATTAPI_CB_PARAMS_H__ 8 | 9 | #include "qapi_ble_gatt.h" 10 | 11 | typedef struct _tagGATT_Connection_Event_Callback_Params_t 12 | { 13 | uint32_t BluetoothStackID; 14 | qapi_BLE_GATT_Connection_Event_Data_t *GATT_Connection_Event_Data; 15 | unsigned long CallbackParameter; 16 | } GATT_Connection_Event_Callback_Params_t; 17 | 18 | #define GATT_CONNECTION_EVENT_CALLBACK_PARAMS_SIZE sizeof(GATT_Connection_Event_Callback_Params_t) 19 | 20 | typedef struct _tagGATT_Server_Event_Callback_Params_t 21 | { 22 | uint32_t BluetoothStackID; 23 | qapi_BLE_GATT_Server_Event_Data_t *GATT_Server_Event_Data; 24 | unsigned long CallbackParameter; 25 | } GATT_Server_Event_Callback_Params_t; 26 | 27 | #define GATT_SERVER_EVENT_CALLBACK_PARAMS_SIZE sizeof(GATT_Server_Event_Callback_Params_t) 28 | 29 | typedef struct _tagGATT_Client_Event_Callback_Params_t 30 | { 31 | uint32_t BluetoothStackID; 32 | qapi_BLE_GATT_Client_Event_Data_t *GATT_Client_Event_Data; 33 | unsigned long CallbackParameter; 34 | } GATT_Client_Event_Callback_Params_t; 35 | 36 | #define GATT_CLIENT_EVENT_CALLBACK_PARAMS_SIZE sizeof(GATT_Client_Event_Callback_Params_t) 37 | 38 | typedef struct _tagGATT_Service_Discovery_Event_Callback_Params_t 39 | { 40 | uint32_t BluetoothStackID; 41 | qapi_BLE_GATT_Service_Discovery_Event_Data_t *GATT_Service_Discovery_Event_Data; 42 | unsigned long CallbackParameter; 43 | } GATT_Service_Discovery_Event_Callback_Params_t; 44 | 45 | #define GATT_SERVICE_DISCOVERY_EVENT_CALLBACK_PARAMS_SIZE sizeof(GATT_Service_Discovery_Event_Callback_Params_t) 46 | 47 | 48 | #endif /* __GATTAPI_CB_PARAMS_H__ */ 49 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/GATTAPI_mnl_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include 7 | 8 | int qapi_BLE_GATT_RestoreConnectionEventCallback(void); 9 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/HCIAPI_cb_m3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __HCIAPI_CB_M3_H__ 7 | #define __HCIAPI_CB_M3_H__ 8 | 9 | #include "callback.h" 10 | 11 | void HCI_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 12 | 13 | void HCI_ACL_Data_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 14 | 15 | 16 | #endif /* __HCIAPI_CB_M3_H__ */ 17 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/HCIAPI_cb_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __HCIAPI_CB_PARAMS_H__ 7 | #define __HCIAPI_CB_PARAMS_H__ 8 | 9 | #include "qapi_ble_hci.h" 10 | 11 | typedef struct _tagHCI_Event_Callback_Params_t 12 | { 13 | uint32_t BluetoothStackID; 14 | qapi_BLE_HCI_Event_Data_t *HCI_Event_Data; 15 | unsigned long CallbackParameter; 16 | } HCI_Event_Callback_Params_t; 17 | 18 | #define HCI_EVENT_CALLBACK_PARAMS_SIZE sizeof(HCI_Event_Callback_Params_t) 19 | 20 | typedef struct _tagHCI_ACL_Data_Callback_Params_t 21 | { 22 | uint32_t BluetoothStackID; 23 | uint16_t Connection_Handle; 24 | uint16_t Flags; 25 | uint16_t ACLDataLength; 26 | uint8_t *ACLData; 27 | unsigned long CallbackParameter; 28 | } HCI_ACL_Data_Callback_Params_t; 29 | 30 | #define HCI_ACL_DATA_CALLBACK_PARAMS_SIZE sizeof(HCI_ACL_Data_Callback_Params_t) 31 | 32 | 33 | #endif /* __HCIAPI_CB_PARAMS_H__ */ 34 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/L2CAPAPI_cb_m3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __L2CAPAPI_CB_M3_H__ 7 | #define __L2CAPAPI_CB_M3_H__ 8 | 9 | #include "callback.h" 10 | 11 | void L2CA_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer); 12 | 13 | 14 | #endif /* __L2CAPAPI_CB_M3_H__ */ 15 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/L2CAPAPI_cb_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __L2CAPAPI_CB_PARAMS_H__ 7 | #define __L2CAPAPI_CB_PARAMS_H__ 8 | 9 | #include "qapi_ble_l2cap.h" 10 | 11 | typedef struct _tagL2CA_Event_Callback_Params_t 12 | { 13 | uint32_t BluetoothStackID; 14 | qapi_BLE_L2CA_Event_Data_t *L2CA_Event_Data; 15 | unsigned long CallbackParameter; 16 | } L2CA_Event_Callback_Params_t; 17 | 18 | #define L2CA_EVENT_CALLBACK_PARAMS_SIZE sizeof(L2CA_Event_Callback_Params_t) 19 | 20 | 21 | #endif /* __L2CAPAPI_CB_PARAMS_H__ */ 22 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/L2CAPAPI_mnl_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __L2CAPAPIMNLUTILH__ 7 | #define __L2CAPAPIMNLUTILH__ 8 | 9 | /* Even unsigned int IDs in the stack never use the top bit, since they are returned as signed from 10 | * the APIs. We can use the bit to identify the type of ID. */ 11 | #define L2CAP_CALLBACK_KEY_TYPE_MASK (0x80000000) 12 | #define L2CAP_CALLBACK_KEY_KEY_MASK (~L2CAP_CALLBACK_KEY_TYPE_MASK) 13 | #define L2CAP_CALLBACK_KEY_TYPE_PSMID (0x80000000) 14 | #define L2CAP_CALLBACK_KEY_TYPE_CID (0x00000000) 15 | 16 | #endif /* __L2CAPAPIMNLUTILH__ */ 17 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/Radio_params.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __RADIO_PARAMS_H__ 7 | #define __RADIO_PARAMS_H__ 8 | 9 | #include 10 | 11 | typedef struct Radio_Register_Brownout_Callback_Params_s 12 | { 13 | uint32_t BluetoothStackID; 14 | } Radio_Register_Brownout_Callback_Params_t; 15 | 16 | #define RADIO_REGISTER_BROWNOUT_CALLBACK_PARAMS_SIZE (sizeof(Radio_Register_Brownout_Callback_Params_t)) 17 | 18 | typedef struct Radio_Un_Register_Brownout_Callback_Params_s 19 | { 20 | uint32_t BluetoothStackID; 21 | } Radio_Un_Register_Brownout_Callback_Params_t; 22 | 23 | #define RADIO_UN_REGISTER_BROWNOUT_CALLBACK_PARAMS_SIZE (sizeof(Radio_Un_Register_Brownout_Callback_Params_t)) 24 | 25 | typedef struct Radio_Suspend_Params_s 26 | { 27 | uint32_t BluetoothStackID; 28 | } Radio_Suspend_Params_t; 29 | 30 | #define RADIO_SUSPEND_PARAMS_SIZE (sizeof(Radio_Suspend_Params_t)) 31 | 32 | typedef struct Radio_Resume_Params_s 33 | { 34 | uint32_t BluetoothStackID; 35 | } Radio_Resume_Params_t; 36 | 37 | #define RADIO_RESUME_PARAMS_SIZE (sizeof(Radio_Resume_Params_t)) 38 | 39 | typedef struct Radio_Set_Max_Tx_Power_Params_s 40 | { 41 | uint32_t BluetoothStackID; 42 | int8_t dBm; 43 | } Radio_Set_Max_Tx_Power_Params_t; 44 | 45 | #define RADIO_SET_MAX_TX_POWER_PARAMS_SIZE (sizeof(Radio_Set_Max_Tx_Power_Params_t)) 46 | 47 | typedef struct Radio_Brownout_Callback_Params_s 48 | { 49 | int8_t dBm; 50 | } Radio_Brownout_Callback_Params_t; 51 | 52 | #define RADIO_BROWNOUT_CALLBACK_PARAMS_SIZE (sizeof(Radio_Brownout_Callback_Params_t)) 53 | 54 | #endif /* __RADIO_PARAMS_H__ */ 55 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/ipc_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __IPCTYPESH__ 7 | #define __IPCTYPESH__ 8 | 9 | #include 10 | 11 | #define IPC_MESSAGE_TYPE_TYPE_MASK 0x7FFF 12 | #define IPC_MESSAGE_TYPE_RESPONSE_MASK 0x8000 13 | #define IPC_MESSAGE_TYPE_FUNCTION 0x0001 14 | #define IPC_MESSAGE_TYPE_CALLBACK 0x0002 15 | #define IPC_MESSAGE_TYPE_ERROR 0x0003 16 | 17 | #define IPC_MESSAGE_ERROR_CODE_MEMORY_ALLOCATION 0x00000001 18 | 19 | /** 20 | * Structure of the header data common to all IPC packets. 21 | */ 22 | typedef struct IPC_Packet_Header_s 23 | { 24 | uint16_t Type; /**< The type of message. Indicates whether it is a function/callback w/ a bit to denote a response message. */ 25 | uint16_t FileID; /**< File ID associated with the IPC call. */ 26 | uint16_t FunctionID; /**< The FunctionID/CallbackID associated with the File */ 27 | uint16_t PacketLength; 28 | } IPC_Packet_Header_t; 29 | 30 | #define IPC_PACKET_HEADER_SIZE (sizeof(IPC_Packet_Header_t)) 31 | 32 | /** 33 | * Structure of the message data specific to a Function/Callback packet (non-response) 34 | */ 35 | typedef struct IPC_Command_Packet_s 36 | { 37 | IPC_Packet_Header_t Header; 38 | uint32_t ParamDataLength; /**< Indicates the amount of extra parameter data located in shared memory. */ 39 | uint8_t *ParamData; /**< Indicates the location of extra parameter data in shared memory, or NULL if there is none. */ 40 | } IPC_Command_Packet_t; 41 | 42 | #define IPC_COMMAND_PACKET_SIZE (sizeof(IPC_Command_Packet_t)) 43 | 44 | /** 45 | * Structure of the message data specific to a response message to a function command. 46 | */ 47 | typedef struct IPC_Function_Response_Packet_s 48 | { 49 | IPC_Packet_Header_t Header; 50 | uint32_t Return; /**< The return value of the function. Ignored if the function is void. */ 51 | } IPC_Function_Response_Packet_t; 52 | 53 | #define IPC_FUNCTION_RESPONSE_PACKET_SIZE (sizeof(IPC_Function_Response_Packet_t)) 54 | 55 | /** 56 | * Structure of the message data specific to a response message to an asynchronous callback message. 57 | */ 58 | typedef struct IPC_Callback_Response_Packet_s 59 | { 60 | IPC_Packet_Header_t Header; 61 | uint8_t *CallbackParamData; /**< A pointer ot the parameter data returned in the event. (Credits the buffer back). */ 62 | } IPC_Callback_Response_Packet_t; 63 | 64 | #define IPC_CALLBACK_RESPONSE_PACKET_SIZE (sizeof(IPC_Callback_Response_Packet_t)) 65 | 66 | typedef struct IPC_Error_Packet_s 67 | { 68 | IPC_Packet_Header_t Header; 69 | uint32_t ErrorCode; 70 | uint32_t ErrorDataLength; 71 | uint8_t ErrorData[1]; 72 | } IPC_Error_Packet_t; 73 | 74 | #define IPC_ERROR_PACKET_SIZE(_ExtraLen) ((sizeof(IPC_Error_Packet_t) - 1) + (_ExtraLen)) 75 | 76 | #endif /* __IPCTYPESH__ */ 77 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/inc/manual_ids.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef __MANUAL_IDS_H__ 7 | #define __MANUAL_IDS_H__ 8 | 9 | /* Manually create File IDs for non-autogen IPC communication. */ 10 | #define FILE_ID_RADIO 0x8000 11 | 12 | #define FUNCTION_ID_RADIO_REGISTER_BROWNOUT_CALLBACK 0 13 | #define FUNCTION_ID_RADIO_UN_REGISTER_BROWNOUT_CALLBACK 1 14 | #define FUNCTION_ID_RADIO_SUSPEND 2 15 | #define FUNCTION_ID_RADIO_RESUME 3 16 | #define FUNCTION_ID_RADIO_SET_MAX_TX_POWER 4 17 | 18 | #define CALLBACK_ID_RADIO_BROWNOUT 0 19 | 20 | #endif /* __MANUAL_IDS_H__ */ 21 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/BASAPI_cb_m3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "BASAPI_cb_params.h" 7 | #include "BASAPI_cb_m3.h" 8 | #include "callback.h" 9 | 10 | void BAS_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 11 | { 12 | BAS_Event_Callback_Params_t *Params = (BAS_Event_Callback_Params_t *)Buffer; 13 | CallbackInfo_t KeyedCBInfo; 14 | 15 | if(BufferLength >= sizeof(BAS_Event_Callback_Params_t)) 16 | { 17 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 18 | { 19 | ((qapi_BLE_BAS_Event_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->BAS_Event_Data, KeyedCBInfo.AppParam); 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/BSCAPI_cb_m3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "BSCAPI_cb_params.h" 7 | #include "BSCAPI_cb_m3.h" 8 | #include "callback.h" 9 | 10 | void BSC_Timer_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 11 | { 12 | BSC_Timer_Callback_Params_t *Params = (BSC_Timer_Callback_Params_t *)Buffer; 13 | CallbackInfo_t KeyedCBInfo; 14 | 15 | if(BufferLength >= sizeof(BSC_Timer_Callback_Params_t)) 16 | { 17 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 18 | { 19 | ((qapi_BLE_BSC_Timer_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->TimerID, KeyedCBInfo.AppParam); 20 | } 21 | } 22 | } 23 | 24 | void BSC_Debug_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 25 | { 26 | BSC_Debug_Callback_Params_t *Params = (BSC_Debug_Callback_Params_t *)Buffer; 27 | CallbackInfo_t KeyedCBInfo; 28 | 29 | if(BufferLength >= sizeof(BSC_Debug_Callback_Params_t)) 30 | { 31 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 32 | { 33 | ((qapi_BLE_BSC_Debug_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->PacketSent, Params->HCIPacket, KeyedCBInfo.AppParam); 34 | } 35 | } 36 | } 37 | 38 | void BSC_AsynchronousCallbackFunction_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 39 | { 40 | BSC_AsynchronousCallbackFunction_Params_t *Params = (BSC_AsynchronousCallbackFunction_Params_t *)Buffer; 41 | CallbackInfo_t KeyedCBInfo; 42 | 43 | if(BufferLength >= sizeof(BSC_AsynchronousCallbackFunction_Params_t)) 44 | { 45 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 46 | { 47 | ((qapi_BLE_BSC_AsynchronousCallbackFunction_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, KeyedCBInfo.AppParam); 48 | } 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/BSCAPI_funcs_m3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "qapi_ble_bsc.h" 7 | #include "BSCAPI_params.h" 8 | #include "BSCAPI_cb_m3.h" 9 | #include "ipc.h" 10 | #include "callback.h" 11 | #include "id_list.h" 12 | #include 13 | #include "stringl.h" 14 | 15 | #define ALIGN32(_offset) ((((_offset) & 0x03) == 0) ? (_offset) : (((_offset) & ~(0x3)) + 4)) 16 | 17 | int QAPI_BLE_BTPSAPI qapi_BLE_BSC_RegisterDebugCallback(uint32_t BluetoothStackID, qapi_BLE_BSC_Debug_Callback_t BSC_DebugCallback, unsigned long CallbackParameter) 18 | { 19 | BSC_RegisterDebugCallback_Params_t *Params; 20 | int ret_val = -1; 21 | CallbackInfo_t CBInfo; 22 | uint32_t CBHandle = 0; 23 | uint32_t MessageSize; 24 | 25 | MessageSize = ALIGN32(BSC_REGISTERDEBUGCALLBACK_PARAMS_SIZE); 26 | 27 | if(NULL != (Params = IPC_GetSharedMemory(MessageSize))) 28 | { 29 | Params->BluetoothStackID = BluetoothStackID; 30 | Params->CallbackParameter = CallbackParameter; 31 | 32 | if(BSC_DebugCallback != NULL) 33 | { 34 | CBInfo.FileID = FILE_ID_BSCAPI; 35 | CBInfo.CallbackID = CALLBACK_ID_BSC_DEBUG_CALLBACK_T; 36 | CBInfo.CallbackKey = 0; 37 | CBInfo.AppFunction = (void *)BSC_DebugCallback; 38 | CBInfo.AppParam = CallbackParameter; 39 | } 40 | 41 | if((BSC_DebugCallback == NULL) || (Callback_Register(&CBHandle, BSC_Debug_Callback_Handler, (const CallbackInfo_t *)&CBInfo, false) == 0)) 42 | { 43 | Params->CallbackParameter = (unsigned long)CBHandle; 44 | ret_val = (int)IPC_SendFunctionCall(FILE_ID_BSCAPI, FUNCTION_ID_BSC_REGISTERDEBUGCALLBACK, MessageSize, (uint8_t *)Params); 45 | 46 | if(BSC_DebugCallback != NULL) 47 | { 48 | if(!(ret_val > 0)) 49 | { 50 | Callback_UnregisterByHandle(CBHandle); 51 | } 52 | } 53 | } 54 | IPC_FreeSharedMemory(Params); 55 | } 56 | 57 | return(ret_val); 58 | } 59 | 60 | void QAPI_BLE_BTPSAPI qapi_BLE_BSC_UnRegisterDebugCallback(uint32_t BluetoothStackID) 61 | { 62 | BSC_UnRegisterDebugCallback_Params_t *Params; 63 | uint32_t MessageSize; 64 | 65 | MessageSize = ALIGN32(BSC_UNREGISTERDEBUGCALLBACK_PARAMS_SIZE); 66 | 67 | if(NULL != (Params = IPC_GetSharedMemory(MessageSize))) 68 | { 69 | Params->BluetoothStackID = BluetoothStackID; 70 | 71 | IPC_SendFunctionCall(FILE_ID_BSCAPI, FUNCTION_ID_BSC_UNREGISTERDEBUGCALLBACK, MessageSize, (uint8_t *)Params); 72 | 73 | Callback_UnregisterByKey(FILE_ID_BSCAPI, CALLBACK_ID_BSC_DEBUG_CALLBACK_T, 0); 74 | 75 | IPC_FreeSharedMemory(Params); 76 | } 77 | } 78 | 79 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/CTESAPI_cb_m3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "CTESAPI_cb_params.h" 7 | #include "CTESAPI_cb_m3.h" 8 | #include "callback.h" 9 | 10 | void CTES_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 11 | { 12 | CTES_Event_Callback_Params_t *Params = (CTES_Event_Callback_Params_t *)Buffer; 13 | CallbackInfo_t KeyedCBInfo; 14 | 15 | if(BufferLength >= sizeof(CTES_Event_Callback_Params_t)) 16 | { 17 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 18 | { 19 | ((qapi_BLE_CTES_Event_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->CTES_Event_Data, KeyedCBInfo.AppParam); 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/DISAPI_cb_m3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "DISAPI_cb_params.h" 7 | #include "DISAPI_cb_m3.h" 8 | #include "callback.h" 9 | 10 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/GAPAPI_cb_m3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "GAPAPI_cb_params.h" 7 | #include "GAPAPI_cb_m3.h" 8 | #include "callback.h" 9 | 10 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/GAPSAPI_cb_m3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "GAPSAPI_cb_params.h" 7 | #include "GAPSAPI_cb_m3.h" 8 | #include "callback.h" 9 | 10 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/GATTAPI_cb_m3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "GATTAPI_cb_params.h" 7 | #include "GATTAPI_cb_m3.h" 8 | #include "callback.h" 9 | 10 | void GATT_Connection_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 11 | { 12 | GATT_Connection_Event_Callback_Params_t *Params = (GATT_Connection_Event_Callback_Params_t *)Buffer; 13 | CallbackInfo_t KeyedCBInfo; 14 | 15 | if(BufferLength >= sizeof(GATT_Connection_Event_Callback_Params_t)) 16 | { 17 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 18 | { 19 | ((qapi_BLE_GATT_Connection_Event_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->GATT_Connection_Event_Data, KeyedCBInfo.AppParam); 20 | } 21 | } 22 | } 23 | 24 | void GATT_Server_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 25 | { 26 | GATT_Server_Event_Callback_Params_t *Params = (GATT_Server_Event_Callback_Params_t *)Buffer; 27 | CallbackInfo_t KeyedCBInfo; 28 | 29 | if(BufferLength >= sizeof(GATT_Server_Event_Callback_Params_t)) 30 | { 31 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 32 | { 33 | ((qapi_BLE_GATT_Server_Event_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->GATT_Server_Event_Data, KeyedCBInfo.AppParam); 34 | } 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/GATTAPI_cb_m3_mnl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "GATTAPI_cb_params.h" 7 | #include "GATTAPI_cb_m3.h" 8 | #include "callback.h" 9 | 10 | void GATT_Client_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 11 | { 12 | GATT_Client_Event_Callback_Params_t *Params = (GATT_Client_Event_Callback_Params_t *)Buffer; 13 | CallbackInfo_t KeyedCBInfo; 14 | 15 | if(BufferLength >= sizeof(GATT_Client_Event_Callback_Params_t)) 16 | { 17 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 18 | { 19 | ((qapi_BLE_GATT_Client_Event_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->GATT_Client_Event_Data, KeyedCBInfo.AppParam); 20 | 21 | /* TODO Verify the reception of an event is always the end of a transaction. */ 22 | Callback_UnregisterByHandle((uint32_t)Params->CallbackParameter); 23 | } 24 | } 25 | } 26 | 27 | void GATT_Service_Discovery_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 28 | { 29 | GATT_Service_Discovery_Event_Callback_Params_t *Params = (GATT_Service_Discovery_Event_Callback_Params_t *)Buffer; 30 | CallbackInfo_t KeyedCBInfo; 31 | 32 | if(BufferLength >= sizeof(GATT_Service_Discovery_Event_Callback_Params_t)) 33 | { 34 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 35 | { 36 | ((qapi_BLE_GATT_Service_Discovery_Event_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->GATT_Service_Discovery_Event_Data, KeyedCBInfo.AppParam); 37 | 38 | /* Un-register the callback upon completion. */ 39 | if(Params->GATT_Service_Discovery_Event_Data->Event_Data_Type == QAPI_BLE_ET_GATT_SERVICE_DISCOVERY_COMPLETE_E) 40 | { 41 | Callback_UnregisterByHandle((uint32_t)Params->CallbackParameter); 42 | } 43 | } 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/HCIAPI_cb_m3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "HCIAPI_cb_params.h" 7 | #include "HCIAPI_cb_m3.h" 8 | #include "callback.h" 9 | 10 | void HCI_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 11 | { 12 | HCI_Event_Callback_Params_t *Params = (HCI_Event_Callback_Params_t *)Buffer; 13 | CallbackInfo_t KeyedCBInfo; 14 | 15 | if(BufferLength >= sizeof(HCI_Event_Callback_Params_t)) 16 | { 17 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 18 | { 19 | ((qapi_BLE_HCI_Event_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->HCI_Event_Data, KeyedCBInfo.AppParam); 20 | } 21 | } 22 | } 23 | 24 | void HCI_ACL_Data_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 25 | { 26 | HCI_ACL_Data_Callback_Params_t *Params = (HCI_ACL_Data_Callback_Params_t *)Buffer; 27 | CallbackInfo_t KeyedCBInfo; 28 | 29 | if(BufferLength >= sizeof(HCI_ACL_Data_Callback_Params_t)) 30 | { 31 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 32 | { 33 | ((qapi_BLE_HCI_ACL_Data_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->Connection_Handle, Params->Flags, Params->ACLDataLength, Params->ACLData, KeyedCBInfo.AppParam); 34 | } 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/L2CAPAPI_cb_m3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "L2CAPAPI_cb_params.h" 7 | #include "L2CAPAPI_cb_m3.h" 8 | #include "callback.h" 9 | 10 | -------------------------------------------------------------------------------- /qcc711_sdk/src/ble/src/L2CAPAPI_cb_m3_mnl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #include "L2CAPAPI_cb_params.h" 7 | #include "L2CAPAPI_cb_m3.h" 8 | #include "L2CAPAPI_mnl_util.h" 9 | #include "callback.h" 10 | #include "qapi_ble_hcitypes.h" 11 | 12 | void L2CA_Event_Callback_Handler(uint32_t Handle, CallbackInfo_t *CallbackInfo, uint16_t BufferLength, uint8_t *Buffer) 13 | { 14 | L2CA_Event_Callback_Params_t *Params = (L2CA_Event_Callback_Params_t *)Buffer; 15 | CallbackInfo_t KeyedCBInfo; 16 | 17 | if(BufferLength >= sizeof(L2CA_Event_Callback_Params_t)) 18 | { 19 | if(Callback_Retrieve((uint32_t)Params->CallbackParameter, &KeyedCBInfo) == 0) 20 | { 21 | /* Process a few events manually for callback deletion first. */ 22 | switch(Params->L2CA_Event_Data->L2CA_Event_Type) 23 | { 24 | case QAPI_BLE_ET_LE_DISCONNECT_INDICATION_E: 25 | /* Non-zero Reason indicates this event is due to something link link loss rather than an actuall Disconnect Request 26 | * L2CAP message. In this case, the channel is immediately invalidated, so we should delete the callback. In the zero 27 | * Reason case, we are expected the application to send a Disconnect Response still. */ 28 | if(Params->L2CA_Event_Data->Event_Data.L2CA_LE_Disconnect_Indication->Reason != QAPI_BLE_HCI_ERROR_CODE_NO_ERROR) 29 | { 30 | /* If this callback was registered via PSM registration, then it won't be deleted. */ 31 | if((KeyedCBInfo.CallbackKey & L2CAP_CALLBACK_KEY_TYPE_MASK) == L2CAP_CALLBACK_KEY_TYPE_CID) 32 | Callback_UnregisterByHandle((uint32_t)Params->CallbackParameter); 33 | } 34 | break; 35 | case QAPI_BLE_ET_LE_DISCONNECT_CONFIRMATION_E: 36 | /* If this callback was registered via PSM registration, then it won't be deleted. */ 37 | if((KeyedCBInfo.CallbackKey & L2CAP_CALLBACK_KEY_TYPE_MASK) == L2CAP_CALLBACK_KEY_TYPE_CID) 38 | Callback_UnregisterByHandle((uint32_t)Params->CallbackParameter); 39 | break; 40 | default: 41 | break; 42 | } 43 | 44 | ((qapi_BLE_L2CA_Event_Callback_t)KeyedCBInfo.AppFunction)(Params->BluetoothStackID, Params->L2CA_Event_Data, KeyedCBInfo.AppParam); 45 | } 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/packed.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | // clang-format off 9 | /*! \file packed.h 10 | * @brief The definitions packed attribute to be used across TME-FW. 11 | * 12 | */ 13 | #ifndef PACKED_H 14 | #define PACKED_H 15 | 16 | #define PACKED_PREFIX __attribute__((__packed__)) 17 | 18 | 19 | /*==========================================================================* 20 | * END OF FILE * 21 | *==========================================================================*/ 22 | #endif /* PACKED_H */ 23 | -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_access_control_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | // clang-format off 9 | /*! \file tme_access_control_interface.h 10 | * @brief IPC related interfaces for access control 11 | *
NVM register access 12 | */ 13 | #ifndef TME_ACCESS_CONTROL_INTERFACE_H 14 | #define TME_ACCESS_CONTROL_INTERFACE_H 15 | 16 | #include "packed.h" 17 | #include "tme_types.h" 18 | 19 | /************************************************************* 20 | * NVM register access Request/Response Structure Definitions 21 | *************************************************************/ 22 | 23 | /*! 24 | * @struct TMENVMRegisterAccessMessageRequest 25 | * @brief Input structure of NVM register access message. 26 | */ 27 | 28 | typedef struct PACKED_PREFIX tme_nvm_register_access_message_request_s 29 | { 30 | UINT32 provideAccess; /*!< Set to non-zero to provide access for requesting 31 | subsystem. Set to zero to release access for 32 | requesting subsystem. */ 33 | } TMENVMRegisterAccessMessageRequest; 34 | 35 | /*! 36 | * @struct TMENVMRegisterAccessMessageResponse 37 | * @brief Output structure of NVM register access message. 38 | */ 39 | 40 | typedef struct PACKED_PREFIX tme_nvm_register_access_message_response_s 41 | { 42 | TMEStatus status; /*!< Status of NVM register access operation. */ 43 | } TMENVMRegisterAccessMessageResponse; 44 | 45 | /*! 46 | * @struct TMENVMRegisterAccessMessage 47 | * @brief Structure of NVM register access message. 48 | */ 49 | 50 | typedef struct PACKED_PREFIX tme_nvm_register_access_message_s 51 | { 52 | TMENVMRegisterAccessMessageRequest input; /*!< NVM register access 53 | message's request */ 54 | TMENVMRegisterAccessMessageResponse output; /*!< NVM register access 55 | message's response */ 56 | } TMENVMRegisterAccessMessage; 57 | 58 | // clang-format on 59 | #endif /* TME_ACCESS_CONTROL_INTERFACE_H */ -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_crypto_digest_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | // clang-format off 9 | /*! \file tme_crypto_digest_interface.h 10 | * @brief IPC's digest related interfaces for TME-FW Crypto Service. Defines 11 | * structures for the following crypto requests 12 | *
Get Digest 13 | */ 14 | #ifndef TME_CRYPTO_DIGEST_INTERFACE_H 15 | #define TME_CRYPTO_DIGEST_INTERFACE_H 16 | 17 | #include "packed.h" 18 | #include "tme_types.h" 19 | #include "tme_crypto_params.h" 20 | 21 | /************************************************ 22 | * Digest Request/Response Structure Definitions 23 | ************************************************/ 24 | 25 | /*! 26 | * @struct TMEDigestMessageRequest 27 | * @brief Digest message's input structure. 28 | */ 29 | 30 | typedef struct PACKED_PREFIX tme_digest_message_request_s 31 | { 32 | TMEDigestAlgo algo; /*!< Algorithm to be used for generating digest*/ 33 | TMECBuffer input; /*!< Input Buffer containing message whose digest need 34 | to be calculated. The calling subsystem will 35 | allocate memory and fill the buffer with the 36 | message along with setting the length */ 37 | } TMEDigestMessageRequest; 38 | 39 | /*! 40 | * @struct TMEDigestMessageResponse 41 | * @brief Digest message's output structure. 42 | */ 43 | 44 | typedef struct PACKED_PREFIX tme_digest_message_response_s 45 | { 46 | TMEStatus status; /*!< Status of the response */ 47 | TMEResponseCBuffer response; /*!< Respone buffer to be filled by TME with the 48 | generated digest. Memory for the containing buffer 49 | is to be allocated by the calling subsystem 50 | And the calling sub system will set the length 51 | accordingly. */ 52 | } TMEDigestMessageResponse; 53 | 54 | /*! 55 | * @struct TMEDigestMessage 56 | * @brief Digest message's structure. 57 | */ 58 | 59 | typedef struct PACKED_PREFIX tme_digest_message_s 60 | { 61 | TMEDigestMessageRequest input; /*!< Digest message's request */ 62 | TMEDigestMessageResponse output; /*!< Digest message's response */ 63 | } TMEDigestMessage; 64 | // clang-format on 65 | #endif /* TME_CRYPTO_DIGEST_INTERFACE_H */ 66 | -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_crypto_hmac_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | // clang-format off 9 | /*! \file tme_crypto_hmac_interface.h 10 | * @brief IPC's HMAC related interfaces for TME-FW Crypto Service. Defines 11 | structures for the following crypto requests 12 | *
Get HMAC 13 | */ 14 | #ifndef TME_CRYPTO_HMAC_INTERFACE_H 15 | #define TME_CRYPTO_HMAC_INTERFACE_H 16 | 17 | #include "packed.h" 18 | #include "tme_types.h" 19 | #include "tme_crypto_params.h" 20 | 21 | /********************************************** 22 | * HMAC Request/Response Structure Definitions 23 | **********************************************/ 24 | 25 | /*! 26 | * @struct TMEHMACMessageRequest 27 | * @brief Input structure of HMAC message. 28 | */ 29 | 30 | typedef struct PACKED_PREFIX tme_hmac_message_request_s 31 | { 32 | TMEDigestAlgo algo; /*!< Algorithm to be used for calculating MAC */ 33 | TMECBuffer input; /*!< Input Buffer containing message whose MAC 34 | is required.The calling subsystem will 35 | allocate memory and fill the buffer with 36 | the message along with setting the length */ 37 | TMECBuffer initialMac; /*!< The MAC returned by the previous invocation 38 | in a sequence,otherwise empty.*/ 39 | TMEKeyHandle keyHandle; /*!< Key Handle of the key present in TME to be 40 | used for calculating HMAC */ 41 | } TMEHMACMessageRequest; 42 | 43 | /*! 44 | * @struct TMEHMACMessageResponse 45 | * @brief Output structure of HMAC message. 46 | */ 47 | 48 | typedef struct PACKED_PREFIX tme_hmac_message_response_s 49 | { 50 | TMEStatus status; /*!< Status of the response */ 51 | TMEResponseCBuffer response; /*!< Respone buffer to be filled by TME with the 52 | calculated MAC. Memory for the containing buffer 53 | is to be allocated by the calling subsystem. And 54 | the calling sub system will set the length 55 | accordingly. */ 56 | } TMEHMACMessageResponse; 57 | 58 | /*! 59 | * @struct TMEHMACMessage 60 | * @brief Structure of HMAC message. 61 | */ 62 | 63 | typedef struct PACKED_PREFIX tme_hmac_message_s 64 | { 65 | TMEHMACMessageRequest input; /*!< HMAC message's request */ 66 | TMEHMACMessageResponse output; /*!< HMAC message's response */ 67 | } TMEHMACMessage; 68 | // clang-format on 69 | #endif /* TME_CRYPTO_HMAC_INTERFACE_H */ 70 | -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_crypto_rng_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | // clang-format off 9 | /*! \file tme_crypto_rng_interface.h 10 | * @brief IPC's RNG related interfaces for TME-FW Crypto Service. Defines 11 | structures for the following crypto requests 12 | *
Get Random value 13 | */ 14 | #ifndef TME_CRYPTO_RNG_INTERFACE_H 15 | #define TME_CRYPTO_RNG_INTERFACE_H 16 | 17 | #include "packed.h" 18 | #include "tme_types.h" 19 | 20 | /************************************************ 21 | * PRNG Request/Response Structure Definitions 22 | ***********************************************/ 23 | 24 | /*! 25 | * @struct TMEGetRandomMessageRequest 26 | * @brief Input structure of generate random number message. 27 | */ 28 | 29 | typedef struct PACKED_PREFIX tme_get_random_message_request_s 30 | { 31 | UINT32 length; /*!< Requisite length of generated random number. The maximum 32 | allowed length is 64.*/ 33 | } TMEGetRandomMessageRequest; 34 | 35 | /*! 36 | * @struct TMEGetRandomMessageResponse 37 | * @brief Output structure of generate random number message. 38 | */ 39 | 40 | typedef struct PACKED_PREFIX tme_get_random_message_response_s 41 | { 42 | TMEStatus status; /*!< Status of the response */ 43 | TMEResponseCBuffer response; /*!< Respone buffer to be filled by TME with the 44 | generated random number.Memory for the 45 | containing buffer is to be allocated by the calling 46 | subsystem. And the calling sub system will set the 47 | length accordingly.*/ 48 | } TMEGetRandomMessageResponse; 49 | 50 | /*! 51 | * @struct TMEGetRandomMessage 52 | * @brief Structure of generate random number message. 53 | */ 54 | 55 | typedef struct PACKED_PREFIX tme_get_random_message_s 56 | { 57 | TMEGetRandomMessageRequest input; /*!< Generate random number message's 58 | request */ 59 | TMEGetRandomMessageResponse output; /*!< Generate random number message's 60 | response */ 61 | } TMEGetRandomMessage; 62 | // clang-format on 63 | #endif /* TME_CRYPTO_RNG_INTERFACE_H */ 64 | -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_ipc_access_control_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | 9 | #ifndef TME_IPC_ACCESS_CONTROL_COMMON_H 10 | #define TME_IPC_ACCESS_CONTROL_COMMON_H 11 | 12 | #ifdef __linux__ 13 | #include 14 | #endif /* __linux__ */ 15 | 16 | #include "qapi_status.h" 17 | #include "qapi_types.h" 18 | 19 | /** 20 | @brief Validate QAPI parameters and create corresponding NVM register access IPC message. 21 | 22 | @param[in] QapiParams QAPI NVM access parameters. 23 | @param[in, out] TMEIPCMsg TME NVM access IPC message. 24 | @param[in, out] TMEIPCMsgLength TME IPC message length. 25 | 26 | @return QAPI_OK if completed successfully, or a negative 27 | value if there was an error. 28 | */ 29 | qapi_Status_t Validate_And_Create_NVM_Register_Access_IPC_Msg(void *QapiParams, 30 | void **TmeIPCMsg, 31 | uint32_t *TmeIPCMsgLength); 32 | 33 | /** 34 | @brief Validate NVM register access IPC message response. 35 | 36 | @param[in] QapiParams QAPI NVM access parameters. 37 | @param[in] TMEIPCMsg TME NVM access IPC message. 38 | @param[in] Status Tmecom return status. 39 | @param[in] CallBack QAPI callback function. 40 | @param[in] UserData Placeholder for user data. 41 | 42 | @return QAPI_OK if completed successfully, or a negative 43 | value if there was an error. 44 | */ 45 | qapi_Status_t Process_NVM_Register_Access_IPC_Msg_Response(void *QapiParams, 46 | void *TMEIPCMsg, 47 | qapi_Status_t Status, 48 | void *Callback, 49 | void *UserData); 50 | 51 | #endif //TME_IPC_ACCESS_CONTROL_COMMON_H -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_ipc_callback_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | // clang-format off 9 | /*! \file tme_ipc_callback_utils.h 10 | * @brief The utility structures, functions and enums related to TME IPC Callback 11 | */ 12 | #ifndef TME_IPC_CALLBACK_UTILS_H 13 | #define TME_IPC_CALLBACK_UTILS_H 14 | 15 | #ifdef __linux__ 16 | #include 17 | #endif /* __linux__ */ 18 | 19 | #include "qapi_status.h" 20 | 21 | /** Variable for specifying whether TME Callback has been initialised or not */ 22 | static qbool_t is_tme_callback_initialized; 23 | 24 | /** Enumeration of Event data type. */ 25 | typedef enum 26 | { 27 | CRYPTO_EVENT_DATA = 1, /**< qapi_CRPT_Operation_Event_Data_t. */ 28 | CRYPTO_EX_EVENT_DATA, /**< qapi_CRPT_EX_Operation_Event_Data_t. */ 29 | TOKEN_EVENT_DATA, /**< qapi_CRPT_TOKN_Operation_Event_Data_t. */ 30 | FIRMWARE_EVENT_DATA, /**< qapi_FWUP_Operation_Event_Data_t. */ 31 | ROT_EVENT_DATA, /**< qapi_ROT_Operation_Event_Data_t */ 32 | LIC_EVENT_DATA, /**< qapi_LIC_Operation_Event_Data_t */ 33 | FUSE_EVENT_DATA, /**< qapi_FUSE_Operation_Event_Data_t */ 34 | } TMW_Event_Data_Type_t; 35 | 36 | /** 37 | @brief: Initializes the callback module. 38 | 39 | The function creates the task which will parse the context and execute 40 | the stored callback 41 | 42 | @return the status result of the callback initialization. 43 | */ 44 | qapi_Status_t Initialize_TME_Callback(void); 45 | 46 | /** 47 | @brief: Process a callback function with the provided information. 48 | 49 | Primarily it will add the callback to the context so that it can be executed by the task. 50 | 51 | @param Status Status returned by QAPI 52 | @param EventDataType Type of Event data 53 | @param EventData Event Data of QAPI. 54 | @param UserParam Parameter provided by user 55 | @param CallBack The call back function 56 | 57 | @return QAPI_OK if the callback was processed successfully or error if there was an error. 58 | */ 59 | qapi_Status_t Process_TME_Callback(qapi_Status_t Status, TMW_Event_Data_Type_t EventDataType, 60 | void *EventData, void *UserParam, void *CallBack); 61 | 62 | /** 63 | @brief: De-Initializes the callback module. 64 | 65 | The function marks the task TO BE DELETED so that scheduler can remove it. 66 | */ 67 | void Deinitialize_TME_Callback(void); 68 | 69 | /** 70 | @brief: Function to determine whether a callback is pending or not. 71 | 72 | @return true if pending or false otherwise 73 | */ 74 | qbool_t Is_Callback_Pending(void); 75 | 76 | // clang-format on 77 | #endif /* TME_IPC_CALLBACK_UTILS_H */ 78 | -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_ipc_nvm_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | 9 | #ifndef TME_IPC_NVM_COMMON_H__ 10 | #define TME_IPC_NVM_COMMON_H__ 11 | 12 | /** Structure representing the NVM write ROT request. */ 13 | typedef struct qapi_NVM_Write_Rot_Params_s 14 | { 15 | uint32_t Offset; /**< Offset location to perform write operation. */ 16 | const void *Buffer; /**< Data to write to ROT NVM. */ 17 | uint32_t BufferLen; /**< Length of the data to write to NVM. */ 18 | } qapi_NVM_Write_Rot_Params_t; 19 | 20 | /** Structure representing the NVM read ROT request. */ 21 | typedef struct qapi_NVM_Read_Rot_Params_s 22 | { 23 | uint32_t Offset; /**< Offset location to perform read operation. */ 24 | void *Buffer; /**< Buffer to store data. */ 25 | uint32_t BufferLen; /**< Length of the data to read from ROT NVM. */ 26 | } qapi_NVM_Read_Rot_Params_t; 27 | 28 | #endif //TME_IPC_NVM_COMMON_H__ -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_ipc_nvm_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | 9 | /*! \file tme_ipc_nvm_utils.h 10 | * @brief The utility related to NVM of various sub system. 11 | */ 12 | #ifndef TME_IPC_NVM_UTILS_H 13 | #define TME_IPC_NVM_UTILS_H 14 | 15 | #ifdef __linux__ 16 | #include 17 | #endif /* __linux__ */ 18 | 19 | #include "qapi_status.h" 20 | #include "qapi_types.h" 21 | 22 | /** 23 | @brief Validates whether the given address range falls in the subsystem NVM Blocks which 24 | can be used FW Updated related operations. 25 | 26 | @param[in] StartAddress Start address. 27 | @param[in] Size Number of bytes from start address. 28 | 29 | 30 | @return QAPI_OK if address range is valid, or a negative value if not. 31 | 32 | */ 33 | qapi_Status_t Validate_FW_Update_Address_Range(uint32_t StartAddress, uint32_t Size); 34 | 35 | /** 36 | @brief Manage TME Read only Access (Share/Revoke) of subsystem' NVM block. Based on provided 37 | start address and size it will calculate the number of NVM's block impacted and 38 | provide or revoke access according to NvmShare flag provided. 39 | 40 | @param[in] StartAddress Start address from which access is to be managed. 41 | @param[in] Size Number of bytes from start address whose access is to be managed. 42 | @param[in] ShareNvm True if access is to given and False to revoke the access. 43 | 44 | 45 | @return QAPI_OK if completed successfully, or a negative value if there was an error. 46 | 47 | */ 48 | qapi_Status_t Manage_TME_Access_Of_NVM(uint32_t StartAddress, uint32_t Size, qbool_t ShareNvm); 49 | 50 | /** 51 | @brief Give TME Access to all NMV Block of subsystem. 52 | 53 | @return QAPI_OK if completed successfully, or a negative value if there was an error. 54 | 55 | */ 56 | qapi_Status_t Give_TME_Access_Of_NVM(void); 57 | 58 | /** 59 | @brief Revole TME Access from all NMV Block of subsystem. 60 | 61 | @return QAPI_OK if completed successfully, or a negative value if there was an error. 62 | 63 | */ 64 | qapi_Status_t Revoke_TME_Access_Of_NVM(void); 65 | 66 | #endif //TME_IPC_ACCESS_CONTROL_COMMON_H 67 | -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_ipc_rot_feature_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | 9 | #ifndef TME_IPC_ROT_FEATURE_COMMON_H 10 | #define TME_IPC_ROT_FEATURE_COMMON_H 11 | 12 | #ifdef __linux__ 13 | #include 14 | #endif /* __linux__ */ 15 | 16 | #include "qapi_status.h" 17 | #include "qapi_types.h" 18 | 19 | /** 20 | @brief Validate QAPI parameters and create corresponding patch version IPC message. 21 | 22 | @param[in] QapiGetPatchVersionParams qapi get RoT patch version parameters. 23 | @param[in, out] TMEIPCMsg TME patch version IPC message. 24 | @param[in, out] TMEIPCMsgLength TME patch version IPC message length. 25 | 26 | @return QAPI_OK if completed successfully, or a negative 27 | value if there was an error. 28 | */ 29 | qapi_Status_t Validate_And_Create_Patch_Version_IPC_Msg(void *QapiGetPatchVersionParams, 30 | void **TmeIPCMsg, 31 | uint32_t *TmeIPCMsgLength); 32 | 33 | /** 34 | @brief Process Patch_Version IPC message response. 35 | Create event data for non-blocking call. 36 | 37 | @param[in] QapiGetPatchVersionParams qapi get patch version parameters. 38 | @param[in] TMEIPCMsg TME patch version IPC message. 39 | @param[in] Status Tmecom return status. 40 | @param[in] CallBack qapi callback function. 41 | @param[in] UserData Placeholder for user data. 42 | 43 | @return QAPI_OK if completed successfully, or a negative 44 | value if there was an error. 45 | */ 46 | qapi_Status_t Process_Patch_Version_IPC_Msg_Response(void *QapiGetPatchVersionParams, 47 | void *TMEIPCMsg, 48 | qapi_Status_t Status, 49 | void *CallBack, 50 | void *UserData); 51 | 52 | #endif //TME_IPC_ROT_FEATURE_COMMON_H -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_ipc_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | // clang-format off 9 | /*! \file tme_ipc_utils.h 10 | * @brief The utility structures, functions and enums related to TME IPC. 11 | */ 12 | #ifndef TME_IPC_UTILS_H 13 | #define TME_IPC_UTILS_H 14 | 15 | #ifdef __linux__ 16 | #include 17 | #endif /* __linux__ */ 18 | 19 | #include "qapi_status.h" 20 | #include "qapi_types.h" 21 | #include "TmecomClient.h" 22 | #include "tme_ipc_msg_uid_mapping.h" 23 | #include "tme_types.h" 24 | 25 | /* Buffer size in bytes. */ 26 | #define BUFFER_SIZE_32 32 27 | #define BUFFER_SIZE_64 64 28 | 29 | /*! Calculate the number of elements in array. */ 30 | #define ARRAY_ELEMENTS(arr) (sizeof(arr)/sizeof(arr[0])) 31 | 32 | /* Get TME digest algo from QAPI digest algo. */ 33 | #define QAPI_CRPT_GET_TME_DIGEST_ALGO(algo) (TMEDigestAlgo) \ 34 | ((algo == QAPI_CRPT_DIGEST_ALGO_SHA256_E) ? TME_DALG_SHA256 : \ 35 | ((algo == QAPI_CRPT_DIGEST_ALGO_SHA512_E) ? TME_DALG_SHA512 : 0)) 36 | 37 | /* Get TME ecc curve from QAPI ecc curve. */ 38 | #define QAPI_CRPT_GET_TME_ECC_CURVE(curve) (TMEECCCurve) \ 39 | ((curve == QAPI_CRPT_ECC_CURVE_NIST_P256_E) ? TME_ECC_CURVE_NIST_P256 : \ 40 | ((curve == QAPI_CRPT_ECC_CURVE_NIST_P521_E) ? TME_ECC_CURVE_NIST_P521 : 0)) 41 | /** 42 | @brief Convert tmecom status to qapi status 43 | 44 | @param[in] Status TMECOM status. 45 | 46 | @return Corresponding qapi status will be returned. 47 | */ 48 | qapi_Status_t qapi_Convert_Tmecom_Status(TmecomResponse_t Status); 49 | 50 | /** 51 | @brief Convert tme status to qapi status 52 | 53 | @param[in] Status TMEStatus status. 54 | 55 | @return Corresponding qapi status will be returned. 56 | */ 57 | qapi_Status_t qapi_Convert_Tme_Status(TMEStatus Status); 58 | 59 | /** 60 | @brief Perform operation based on message ID. 61 | 62 | @param[in] TmeMsgUid TME request identifier. 63 | @param[in] TmeMsgParamID TME message param ID. 64 | @param[in] QapiCryptoParams qapi crypto parameters. 65 | @param[in] Callback qapi callback function. 66 | @param[in] UserData Placeholder for user data. 67 | 68 | @return QAPI_OK if completed successfully, or a negative 69 | value if there was an error. 70 | 71 | */ 72 | qapi_Status_t qapi_Perform_Operation(uint32_t TmeMsgUid, 73 | uint32_t TmeMsgParamID, 74 | void *QapiCryptoParams, 75 | void *Callback, 76 | void *UserParam); 77 | 78 | // clang-format on 79 | #endif /* TME_IPC_UTILS_H */ 80 | -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_patch_version_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | // clang-format off 9 | /*! \file tme_patch_version_interface.h 10 | * @brief IPC related interface for patch version. Defines 11 | * structures for the following update requests 12 | *
Get patch version 13 | */ 14 | 15 | #ifndef TME_PATCH_VERSION_INTERFACE_H 16 | #define TME_PATCH_VERSION_INTERFACE_H 17 | 18 | #include "packed.h" 19 | #include "tme_types.h" 20 | 21 | /*********************************************************** 22 | * Get patch version Request/Response Structure Definitions 23 | ***********************************************************/ 24 | 25 | /*! 26 | * @struct TMEGetPatchVersionMessageResponse 27 | * @brief Output structure of get patch version message. 28 | */ 29 | 30 | typedef struct PACKED_PREFIX tme_get_patch_version_message_response_s 31 | { 32 | TMEStatus status; /*!< Status of the response. */ 33 | TMEResponseCBuffer response; /*!< Response buffer to be filled by TME with the 34 | patch version. Memory for the containing buffer 35 | is to be allocated by the calling subsystem 36 | And the calling sub system will set the length 37 | accordingly. */ 38 | 39 | } TMEGetPatchVersionMessageResponse; 40 | 41 | /*! 42 | * @struct TMEGetPatchVersionMessage 43 | * @brief Structure of get patch version message. 44 | */ 45 | 46 | typedef struct PACKED_PREFIX tme_get_patch_version_message_s 47 | { 48 | TMEGetPatchVersionMessageResponse output; /*!< Get patch version message's response */ 49 | } TMEGetPatchVersionMessage; 50 | // clang-format on 51 | #endif /* TME_PATCH_VERSION_INTERFACE_H */ 52 | -------------------------------------------------------------------------------- /qcc711_sdk/src/common/crypto/inc/tme_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * 4 | * All Rights Reserved 5 | * Qualcomm Technologies Inc Confidential and Proprietary. 6 | * Notifications and licenses are retained for attribution purposes only 7 | */ 8 | // clang-format off 9 | /*! \file tme_types.h 10 | * @brief The definitions of constants, enums and structures to be used 11 | * across TME-FW. 12 | */ 13 | #ifndef TME_TYPES_H 14 | #define TME_TYPES_H 15 | 16 | #include "packed.h" 17 | 18 | #ifdef __linux__ 19 | #include 20 | #endif /* __linux__ */ 21 | 22 | /** Primitive Type - Byte */ 23 | typedef int8_t INT8; 24 | /** Primitive Type - Short */ 25 | typedef int16_t INT16; 26 | /** Primitive Type - Integer */ 27 | typedef int32_t INT32; 28 | /** Primitive Type - Unsigned Byte */ 29 | typedef uint8_t UINT8; 30 | /** Primitive Type - Unsigned Short */ 31 | typedef uint16_t UINT16; 32 | /** Primitive Type - Unsigned Integer */ 33 | typedef uint32_t UINT32; 34 | 35 | /*! 36 | * @enum TMEStatus 37 | * @brief Indicates the status returned by the TME-FW subsystems. 38 | */ 39 | 40 | typedef enum tme_status_e 41 | { 42 | TME_STATUS_SUCCESS, /*!< Success */ 43 | TME_STATUS_FAILURE, /*!< Generic Failure */ 44 | TME_STATUS_INVALID_INPUT, /*!< Invalid Input */ 45 | TME_STATUS_MALFORMED_TOKEN, /*!< Token is malformed */ 46 | TME_STATUS_NOT_IMPLEMENTED, /*!< Not Supported/Implemented */ 47 | TME_STATUS_INVALID_MEMORY, /*!< Invalid Memory Location */ 48 | TME_STATUS_SMALL_OUTPUT_BUFFER, /*!< Length of output buffer is smaller 49 | than expected */ 50 | TME_STATUS_NOT_READY, /*!< FW is not ready or set. */ 51 | TME_STATUS_ME_DATA_UNAVAILABLE, /*!< Expected ME Data is not available */ 52 | TME_STATUS_UNKNOWN = 0xFFFFFFFF /*!< Unknown */ 53 | } TMEStatus; 54 | 55 | /*! 56 | * @struct TMECBuffer 57 | * @brief Represents a generic byte array based buffer of given length. 58 | */ 59 | 60 | typedef struct PACKED_PREFIX tme_cbuffer_s 61 | { 62 | UINT8 *pData; /*!< Pointer to the buffer */ 63 | UINT32 length; /*!< Length of the buffer */ 64 | } TMECBuffer; 65 | 66 | /*! 67 | * @struct TMEResponseCBuffer 68 | * @brief Represents a generic byte array based buffer of given length. 69 | */ 70 | 71 | typedef struct PACKED_PREFIX tme_response_cbuffer_s 72 | { 73 | UINT8 *pData; /*!< Pointer to the buffer */ 74 | UINT32 length; /*!< Length of the buffer */ 75 | UINT32 lengthUsed; /*!< Actual length of the buffer used */ 76 | } TMEResponseCBuffer; 77 | // clang-format on 78 | #endif /* TME_TYPES_H */ 79 | -------------------------------------------------------------------------------- /qcc711_sdk/src/common/temcom/inc/TmeErrorCodes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | #ifndef TME_ERROR_CODES_H 7 | #define TME_ERROR_CODES_H 8 | 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | /*============================================================================= 17 | MACRO DECLARATIONS 18 | =============================================================================*/ 19 | /** 20 | * Type definition for TME error status 21 | */ 22 | typedef uint32_t TME_ERROR; 23 | 24 | #define TME_SUCCESS (0x0U) ///input.provideAccess = *(qbool_t *)QapiParams; 54 | return QAPI_OK; 55 | } 56 | 57 | /** 58 | @brief Validate NVM register access IPC message response. 59 | 60 | @param[in] QapiParams QAPI NVM access parameters. 61 | @param[in] TMEIPCMsg TME NVM access IPC message. 62 | @param[in] Status Tmecom return status. 63 | @param[in] CallBack QAPI callback function. 64 | @param[in] UserData Placeholder for user data. 65 | 66 | @return QAPI_OK if completed successfully, or a negative 67 | value if there was an error. 68 | */ 69 | qapi_Status_t Process_NVM_Register_Access_IPC_Msg_Response(void *QapiParams, 70 | void *TMEIPCMsg, 71 | qapi_Status_t Status, 72 | void *Callback, 73 | void *UserData) 74 | { 75 | TMENVMRegisterAccessMessage *AccessIPCMsg = (TMENVMRegisterAccessMessage*)(TMEIPCMsg); 76 | if(Status == QAPI_OK) 77 | { 78 | Status = qapi_Convert_Tme_Status(AccessIPCMsg->output.status); 79 | } 80 | return Status; 81 | } 82 | -------------------------------------------------------------------------------- /qcc711_sdk/src/crypto/src/tme_ipc_msg_uid_mapping.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2023 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /*------------------------------------------------------------------------- 8 | * Include Files 9 | *-----------------------------------------------------------------------*/ 10 | 11 | // TME utility headers 12 | #include "tme_ipc_utils.h" 13 | #include "tme_ipc_crypto.h" 14 | 15 | // TMECOM headers 16 | #include "TmeMessagesUids.h" 17 | 18 | /*------------------------------------------------------------------------- 19 | * Preprocessor Definitions and Constants 20 | *-----------------------------------------------------------------------*/ 21 | 22 | /* Structure with conversion function of QAPI to IPC message and vice-versa, based on message ID. */ 23 | TMEIPCQapiMapping TmeMessageMapping[] = 24 | { 25 | {TME_MSG_UID_CRYPTO_KEY_IMPORT, Validate_And_Create_Import_Key_IPC_Msg, Process_Import_Key_IPC_Msg_Response}, 26 | {TME_MSG_UID_CRYPTO_KEY_CLEAR, Validate_And_Create_Clear_Key_IPC_Msg, Process_Clear_Key_IPC_Msg_Response}, 27 | {TME_MSG_UID_CRYPTO_DERIVE_KEY, Validate_And_Create_Derive_Key_IPC_Msg, Process_Derive_Key_IPC_Msg_Response}, 28 | {TME_MSG_UID_CRYPTO_HMAC, Validate_And_Create_HMAC_256_IPC_Msg, Process_HMAC_256_IPC_Msg_Response}, 29 | {TME_MSG_UID_CRYPTO_GENERATE_KEYPAIR, Validate_And_Create_Generate_Key_Pair_IPC_Msg, Process_Generate_Key_Pair_IPC_Msg_Response}, 30 | {TME_MSG_UID_CRYPTO_ECC_GET_PUBLIC_KEY, Validate_And_Create_ECC_Get_Public_Key_IPC_Msg, Process_ECC_Get_Public_Key_IPC_Msg_Response}, 31 | {TME_MSG_UID_CRYPTO_DERIVE_SHARED_SECRET, Validate_And_Create_ECDH_Shared_Secret_IPC_Msg, Process_ECDH_Shared_Secret_IPC_Msg_Response}, 32 | {TME_MSG_UID_CRYPTO_ECDSA_SIGN_DIGEST, Validate_And_Create_ECDSA_Sign_Digest_IPC_Msg, Process_ECDSA_Sign_Digest_IPC_Msg_Response}, 33 | {TME_MSG_UID_CRYPTO_ECDSA_VERIFY_DIGEST, Validate_And_Create_ECDSA_Verify_Digest_IPC_Msg, Process_ECDSA_Verify_Digest_IPC_Msg_Response}, 34 | {TME_MSG_UID_CRYPTO_ECDSA_SIGN_BUFFER, Validate_And_Create_ECDSA_Sign_Message_IPC_Msg, Process_ECDSA_Sign_Message_IPC_Msg_Response}, 35 | {TME_MSG_UID_CRYPTO_ECDSA_VERIFY_BUFFER, Validate_And_Create_ECDSA_Verify_Message_IPC_Msg, Process_ECDSA_Verify_Message_IPC_Msg_Response}, 36 | {TME_MSG_UID_CRYPTO_AES_DECRYPT_EX, Validate_And_Create_AES_Decryption_IPC_Msg, Process_AES_Decryption_IPC_Msg_Response}, 37 | {TME_MSG_UID_CRYPTO_AES_ENCRYPT_EX, Validate_And_Create_AES_Encryption_IPC_Msg, Process_AES_Encryption_IPC_Msg_Response} 38 | }; 39 | 40 | /*------------------------------------------------------------------------- 41 | * Function Definitions 42 | *-----------------------------------------------------------------------*/ 43 | 44 | /** 45 | @brief Get TME IPC mapping for APSS exclusive qapi. 46 | 47 | @param[in] TmeMsgUid TME message ID. 48 | 49 | @return TMEIPCQapiMapping Tme message mapping corresponding to 50 | TmeMsgUid will be returned if found, else NULL. 51 | */ 52 | TMEIPCQapiMapping* Get_IPC_QAPI_Mapping(uint32_t TmeMsgUid) 53 | { 54 | uint32_t MapLength = ARRAY_ELEMENTS(TmeMessageMapping); 55 | 56 | for(uint32_t index = 0; index < MapLength; index++) 57 | { 58 | if(TmeMessageMapping[index].messageId == TmeMsgUid) 59 | { 60 | return (&TmeMessageMapping[index]); 61 | } 62 | } 63 | 64 | return NULL; 65 | } -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/general/ble/bas_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __BAS_DEMO_H__ 8 | #define __BAS_DEMO_H__ 9 | 10 | #include "qcli_api.h" 11 | #include "qapi_ble_gatt.h" 12 | 13 | /** 14 | @brief Initializes the BAS demo application. 15 | 16 | @param[in] BLE_QCLI_Handle is the parent QCLI handle for the BAS demo. 17 | */ 18 | qbool_t Initialize_BAS_Demo(QCLI_Group_Handle_t BLE_QCLI_Handle); 19 | 20 | /** 21 | @brief Cleans up the BAS demo application. 22 | */ 23 | void Cleanup_BAS_Demo(void); 24 | 25 | /** 26 | @brief Frees any resources allocated that aren't valid when stack is shutdown 27 | without shutting down the QCLI interface for the BAS demo. 28 | */ 29 | void Shutdown_BAS_Demo(void); 30 | 31 | /** 32 | @brief Handle the bas notification event. 33 | 34 | @param[in] GATT_Server_Notification_Data is the notitication data. 35 | */ 36 | void Handle_BAS_Notification(qapi_BLE_GATT_Server_Notification_Data_t *GATT_Server_Notification_Data); 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/general/crypto/crypto_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __CRYPTO_DEMO_H__ 8 | #define __CRYPTO_DEMO_H__ 9 | 10 | #include "qcli_api.h" 11 | 12 | /** 13 | @brief Initialize crypto demo. 14 | 15 | @param[in] Parent_Group Parent group handle. 16 | */ 17 | void Initialize_Crypto_Demo(QCLI_Group_Handle_t Parent_Group); 18 | 19 | /** 20 | @brief Cleans up resources used by the crypto demo. 21 | */ 22 | void Cleanup_Crypto_Demo(void); 23 | 24 | #endif -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/general/crypto/fwup_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __FWUP_DEMO_H__ 8 | #define __FWUP_DEMO_H__ 9 | 10 | #include "qcli_api.h" 11 | 12 | /** 13 | @brief Initialize FWUP demo. 14 | 15 | @param[in] Parent_Group Parent group handle. 16 | */ 17 | void Initialize_FWUP_Demo(QCLI_Group_Handle_t Parent_Group); 18 | 19 | /** 20 | @brief Cleans up resources used by the FWUP demo. 21 | */ 22 | void Cleanup_FWUP_Demo(void); 23 | 24 | #endif // __FWUP_DEMO_H__ -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/general/crypto/rot_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __ROT_DEMO_H__ 8 | #define __ROT_DEMO_H__ 9 | 10 | #include "qapi_types.h" 11 | 12 | /** 13 | @brief Initializes the RoT demo application. 14 | 15 | @return true if RoT demo initialized successfully or false on failure. 16 | */ 17 | qbool_t Initialize_RoT_Demo(void); 18 | 19 | /** 20 | @brief Cleans up the RoT demo application. 21 | */ 22 | void Cleanup_RoT_Demo(void); 23 | 24 | #endif -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/general/crypto/rot_demo_utils.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /*------------------------------------------------------------------------- 8 | * Include Files 9 | *-----------------------------------------------------------------------*/ 10 | #include 11 | #include 12 | #include "qapi_heap.h" 13 | #include "qcli_api.h" 14 | #include "qapi_status.h" 15 | #include "rot_demo_utils.h" 16 | #include "qcli_util.h" 17 | 18 | /** 19 | @brief Convert Hex string to byte array. 20 | Caller is responsible to free the allocated memory returned by this function. 21 | 22 | @param[in] InputString Input string. 23 | @param[in] Len Input Length. 24 | @param[in] QcliGroupHandle Qcli group handle. 25 | 26 | @return Byte array converted from hex string on success, or NULL on failure. 27 | */ 28 | uint8_t *GetArrayFromHexString(char *InputString, uint32_t Len, QCLI_Group_Handle_t QcliGroupHandle) 29 | { 30 | uint8_t *Buffer = NULL; 31 | uint32_t RequiredLen; 32 | qbool_t ConvertResult; 33 | 34 | if (Len > ROT_MAX_INPUT_LENGTH) 35 | { 36 | QCLI_Printf(QcliGroupHandle, "ERROR: Provided string length is too big, maximum supported length is %d bytes\n", 37 | ROT_MAX_INPUT_LENGTH); 38 | return NULL; 39 | } 40 | 41 | if (strlen(InputString) != Len * 2) 42 | { 43 | QCLI_Printf(QcliGroupHandle, "ERROR: String length does not match with provided length\n"); 44 | return NULL; 45 | } 46 | 47 | Buffer = qapi_Malloc(Len); 48 | if (Buffer == NULL) 49 | { 50 | QCLI_Printf(QcliGroupHandle, "ERROR: No enough memory.\n"); 51 | return NULL; 52 | } 53 | memset(Buffer, 0, Len); 54 | 55 | RequiredLen = Len; 56 | ConvertResult = QCLI_Hex_String_To_Array(InputString, &RequiredLen, Buffer); 57 | 58 | if (!ConvertResult || RequiredLen != Len) 59 | { 60 | qapi_Free(Buffer); 61 | QCLI_Printf(QcliGroupHandle, "ERROR: Hex String to array conversion failed.\n"); 62 | return NULL; 63 | } 64 | 65 | return Buffer; 66 | } 67 | 68 | /** 69 | @brief Convert Qapi status to Qcli status. 70 | 71 | @param[in] Status Qapi status. 72 | 73 | @return Qcli command status. 74 | */ 75 | QCLI_Command_Status_t GetQcliStatusFromQapiStatus(qapi_Status_t Status) 76 | { 77 | QCLI_Command_Status_t CmdStatus; 78 | switch(Status) 79 | { 80 | case QAPI_OK: 81 | CmdStatus = QCLI_STATUS_SUCCESS_E; 82 | break; 83 | case QAPI_ERR_INVALID_PARAM: 84 | CmdStatus = QCLI_STATUS_USAGE_E; 85 | break; 86 | default: 87 | CmdStatus = QCLI_STATUS_ERROR_E; 88 | } 89 | return CmdStatus; 90 | } -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/general/crypto/rot_demo_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __ROT_DEMO_UTILS_H__ 8 | #define __ROT_DEMO_UTILS_H__ 9 | 10 | #include 11 | 12 | /** Maximum length for input string in bytes. */ 13 | #define ROT_MAX_INPUT_LENGTH (1024) 14 | 15 | /** Helper macro to free allocated memory. */ 16 | #define FREE_IF(ptr) \ 17 | if (ptr != NULL) \ 18 | { \ 19 | qapi_Free(ptr); \ 20 | } 21 | 22 | /** 23 | @brief Convert Hex string to byte array. 24 | Caller is responsible to free the allocated memory returned by this function. 25 | 26 | @param[in] InputString Input string. 27 | @param[in] Len Input Length. 28 | @param[in] QcliGroupHandle Qcli group handle. 29 | 30 | @return Byte array converted from hex string on success, or NULL on failure. 31 | */ 32 | uint8_t *GetArrayFromHexString(char *InputString, uint32_t Len, QCLI_Group_Handle_t QcliGroupHandle); 33 | 34 | /** 35 | @brief Convert Qapi status to Qcli status. 36 | 37 | @param[in] Status Qapi status. 38 | 39 | @return Qcli command status. 40 | */ 41 | QCLI_Command_Status_t GetQcliStatusFromQapiStatus(qapi_Status_t Status); 42 | 43 | #endif // __ROT_DEMO_UTILS_H__ -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/general/platform/mfg_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __MFG_DEMO_H__ 8 | #define __MFG_DEMO_H__ 9 | 10 | #include "qcli_api.h" 11 | 12 | /** 13 | @brief Initializes the Manufacturing demo application. 14 | 15 | @param[in] Parent_Group QCLI handle for the parent group. 16 | */ 17 | qbool_t Initialize_Mfg_Demo(QCLI_Group_Handle_t Parent_Group); 18 | 19 | /** 20 | @brief Cleans up the Manufacturing demo application. 21 | */ 22 | void Cleanup_Mfg_Demo(void); 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/general/platform/nvm_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __NVM_DEMO_H__ 8 | #define __NVM_DEMO_H__ 9 | 10 | #include "qcli_api.h" 11 | 12 | /** 13 | @brief Initializes the NVM demo application. 14 | 15 | @param[in] Parent_Group QCLI handle for the parent group. 16 | */ 17 | qbool_t Initialize_Nvm_Demo(QCLI_Group_Handle_t Parent_Group); 18 | 19 | /** 20 | @brief Cleans up the NVM demo application. 21 | */ 22 | void Cleanup_Nvm_Demo(void); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/general/platform/plat_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __PLAT_DEMO_H__ 8 | #define __PLAT_DEMO_H__ 9 | 10 | #include "qcli_api.h" 11 | 12 | /** 13 | @brief Initializes the Platform demo application. 14 | */ 15 | qbool_t Initialize_Plat_Demo(void); 16 | 17 | /** 18 | @brief Cleans up the Platform demo application. 19 | */ 20 | void Cleanup_Plat_Demo(void); 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/general/sample_gen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /*------------------------------------------------------------------------- 8 | * Include Files 9 | *-----------------------------------------------------------------------*/ 10 | 11 | #include "qcli_pal.h" 12 | 13 | #include "qapi_ble_hcitypes.h" 14 | #include "ble_demo.h" 15 | #include "mfg_demo.h" 16 | #include "plat_demo.h" 17 | #include "rot_demo.h" 18 | 19 | /*------------------------------------------------------------------------- 20 | * Preprocessor Definitions and Constants 21 | *-----------------------------------------------------------------------*/ 22 | 23 | /*------------------------------------------------------------------------- 24 | * Type Declarations 25 | *-----------------------------------------------------------------------*/ 26 | 27 | /*------------------------------------------------------------------------- 28 | * Static & global Variable Declarations 29 | *-----------------------------------------------------------------------*/ 30 | 31 | static qapi_BLE_HCI_DriverInformation_t HCI_DriverInformation; 32 | 33 | /*------------------------------------------------------------------------- 34 | * Function Declarations 35 | *-----------------------------------------------------------------------*/ 36 | 37 | /*------------------------------------------------------------------------- 38 | * Function Definitions 39 | *-----------------------------------------------------------------------*/ 40 | 41 | /** 42 | @brief Initializing the individual sample applications. 43 | */ 44 | void Initialize_Samples(void) 45 | { 46 | QAPI_BLE_HCI_DRIVER_SET_COMM_INFORMATION(&HCI_DriverInformation, 0, 0, QAPI_BLE_COMM_PROTOCOL_UART_E); 47 | Initialize_BLE_Demo(&HCI_DriverInformation); 48 | Initialize_Plat_Demo(); 49 | Initialize_RoT_Demo(); 50 | } 51 | 52 | /** 53 | @brief Cleanup the individual sample applications before exitting. 54 | */ 55 | void Cleanup_Samples(void) 56 | { 57 | Cleanup_BLE_Demo(); 58 | Cleanup_Plat_Demo(); 59 | Cleanup_RoT_Demo(); 60 | } -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/appi2c/appi2c_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __APPI2C_DEMO_H__ 8 | #define __APPI2C_DEMO_H__ 9 | 10 | 11 | void Initialize_APPI2C_Demo(void); 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/epd/epd_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __EPD_DEMO_H__ 8 | #define __EPD_DEMO_H__ 9 | 10 | 11 | /*------------------------------------------------------------------------- 12 | * Include Files 13 | *-----------------------------------------------------------------------*/ 14 | 15 | /*------------------------------------------------------------------------- 16 | * Preprocessor DefinitIons and Constants 17 | *-----------------------------------------------------------------------*/ 18 | 19 | /*------------------------------------------------------------------------- 20 | * FunctIon DeclaratIons and DocumentatIon 21 | *-----------------------------------------------------------------------*/ 22 | void Initialize_Eink_Demo(void); 23 | #endif 24 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/flash/flash_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __FLASH_DEMO_H__ 8 | #define __FLASH_DEMO_H__ 9 | 10 | /*------------------------------------------------------------------------- 11 | * Include Files 12 | *-----------------------------------------------------------------------*/ 13 | 14 | /*------------------------------------------------------------------------- 15 | * Preprocessor Definitions and Constants 16 | *-----------------------------------------------------------------------*/ 17 | 18 | /*------------------------------------------------------------------------- 19 | * Type Declarations 20 | *-----------------------------------------------------------------------*/ 21 | 22 | /*------------------------------------------------------------------------- 23 | * Function Declarations 24 | *-----------------------------------------------------------------------*/ 25 | 26 | void Initialize_Flash_Demo(void); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/ftc/ftc_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __FTC_DEMO_H__ 8 | #define __FTC_DEMO_H__ 9 | 10 | 11 | void Initialize_FTC_Demo(void); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/gpio/gpio_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __GPIO_DEMO_H__ 8 | #define __GPIO_DEMO_H__ 9 | 10 | 11 | void Initialize_GPIO_Demo(void); 12 | 13 | #endif -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/i2c/i2c_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __I2C_DEMO_H__ 8 | #define __I2C_DEMO_H__ 9 | 10 | 11 | void Initialize_I2CM_Demo(void); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/m2mdma/m2mdma_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __M2MDMA_DEMO_H__ 8 | #define __M2MDMA_DEMO_H__ 9 | 10 | void Initialize_M2MDMA_Demo(void); 11 | 12 | #endif 13 | 14 | 15 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/mfp/mfp_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __MFP_DEMO_H__ 8 | #define __MFP_DEMO_H__ 9 | 10 | 11 | void Initialize_MFP_Demo(void); 12 | 13 | #endif -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/sample_periph.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /*------------------------------------------------------------------------- 8 | * Include Files 9 | *-----------------------------------------------------------------------*/ 10 | 11 | #include "qcli_pal.h" 12 | 13 | #include "flash_demo.h" 14 | #include "timer_demo.h" 15 | #include "epd_demo.h" 16 | #include "ftc_demo.h" 17 | #include "gpio_demo.h" 18 | #include "i2c_demo.h" 19 | #include "m2mdma_demo.h" 20 | #include "smps_demo.h" 21 | #include "spi_demo.h" 22 | #include "uart_demo.h" 23 | #include "wdog_demo.h" 24 | #include "mfp_demo.h" 25 | #include "appi2c_demo.h" 26 | #include "sensor_duc_demo.h" 27 | #include "qapi_power.h" 28 | 29 | /*------------------------------------------------------------------------- 30 | * Preprocessor Definitions and Constants 31 | *-----------------------------------------------------------------------*/ 32 | 33 | /*------------------------------------------------------------------------- 34 | * Type Declarations 35 | *-----------------------------------------------------------------------*/ 36 | 37 | /*------------------------------------------------------------------------- 38 | * Static & global Variable Declarations 39 | *-----------------------------------------------------------------------*/ 40 | 41 | /*------------------------------------------------------------------------- 42 | * Function Declarations 43 | *-----------------------------------------------------------------------*/ 44 | 45 | /*------------------------------------------------------------------------- 46 | * Function Definitions 47 | *-----------------------------------------------------------------------*/ 48 | 49 | /** 50 | @brief Initializing the individual sample applications. 51 | */ 52 | void Initialize_Samples(void) 53 | { 54 | Initialize_Flash_Demo(); 55 | Initialize_Timer_Demo(); 56 | Initialize_FTC_Demo(); 57 | Initialize_GPIO_Demo(); 58 | Initialize_WDOG_Demo(); 59 | Initialize_MFP_Demo(); 60 | Initialize_APPI2C_Demo(); 61 | 62 | #ifdef ENABLE_PERIPHERAL_I2C 63 | Initialize_I2CM_Demo(); 64 | #endif 65 | #ifdef ENABLE_PERIPHERAL_M2MDMA 66 | Initialize_M2MDMA_Demo(); 67 | #endif 68 | #ifdef ENABLE_PERIPHERAL_SPI 69 | Initialize_Eink_Demo(); 70 | Initialize_Spi_Demo(); 71 | #endif 72 | #ifdef ENABLE_PERIPHERAL_UART 73 | Initialize_Uart_Demo(); 74 | #endif 75 | 76 | Initialize_Sensor_Duc_Demo(); 77 | Initialize_SMPS_Demo(); 78 | } 79 | 80 | /** 81 | @brief Cleanup the individual sample applications before exitting. 82 | */ 83 | void Cleanup_Samples(void) 84 | { 85 | } 86 | 87 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/sensor_duc/sensor_duc_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __SENSOR_DUC_DEMO_H__ 8 | #define __SENSOR_DUC_DEMO_H__ 9 | 10 | /*------------------------------------------------------------------------- 11 | * Include Files 12 | *-----------------------------------------------------------------------*/ 13 | 14 | /*------------------------------------------------------------------------- 15 | * Preprocessor Definitions and Constants 16 | *-----------------------------------------------------------------------*/ 17 | 18 | /*------------------------------------------------------------------------- 19 | * Type Declarations 20 | *-----------------------------------------------------------------------*/ 21 | 22 | /*------------------------------------------------------------------------- 23 | * Function Declarations 24 | *-----------------------------------------------------------------------*/ 25 | 26 | void Initialize_Sensor_Duc_Demo(void); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/smps/smps_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __SMPS_DEMO_H__ 8 | #define __SMPS_DEMO_H__ 9 | 10 | #include "qcli_api.h" 11 | 12 | /** 13 | @brief Initializes the SMPS demo application. 14 | */ 15 | qbool_t Initialize_SMPS_Demo(void); 16 | 17 | /** 18 | @brief Cleans up the Manufacturing demo application. 19 | */ 20 | void Cleanup_SMPS_Demo(void); 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/spi/spi_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __SPI_DEMO_H__ 8 | #define __SPI_DEMO_H__ 9 | 10 | 11 | void Initialize_Spi_Demo(void); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/timer/timer_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __TIMER_DEMO_H__ 8 | #define __TIMER_DEMO_H__ 9 | 10 | /*------------------------------------------------------------------------- 11 | * Include Files 12 | *-----------------------------------------------------------------------*/ 13 | 14 | /*------------------------------------------------------------------------- 15 | * Preprocessor Definitions and Constants 16 | *-----------------------------------------------------------------------*/ 17 | 18 | /*------------------------------------------------------------------------- 19 | * Type Declarations 20 | *-----------------------------------------------------------------------*/ 21 | 22 | /*------------------------------------------------------------------------- 23 | * Function Declarations 24 | *-----------------------------------------------------------------------*/ 25 | 26 | void Initialize_Timer_Demo(void); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/uart/uart_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __UART_DEMO_H__ 8 | #define __UART_DEMO_H__ 9 | 10 | 11 | void Initialize_Uart_Demo(void); 12 | 13 | #endif 14 | 15 | 16 | -------------------------------------------------------------------------------- /qcc711_sdk/src/demo/peripherals/wdog/wdog_demo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __WDOG_DEMO_H__ 8 | #define __WDOG_DEMO_H__ 9 | 10 | /** 11 | @brief Initializes the watchdog demo application. 12 | */ 13 | void Initialize_WDOG_Demo(void); 14 | 15 | #endif -------------------------------------------------------------------------------- /qcc711_sdk/src/peripherals/inc/qup_hwio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /*------------------------------------------------------------------------- 8 | * Include Files 9 | *-----------------------------------------------------------------------*/ 10 | #include "HALhwio.h" 11 | #include "hwio_periph.h" 12 | 13 | /*------------------------------------------------------------------------- 14 | * Preprocessor Definitions and Constants 15 | *-----------------------------------------------------------------------*/ 16 | #define FLD_BMSK(reg, field) HWIO_PERIPH_##reg##_##field##_BMSK 17 | 18 | #define FLD_SHFT(reg, field) HWIO_PERIPH_##reg##_##field##_SHFT 19 | 20 | #define FLD_SET(reg, field, data) \ 21 | (((uint32_t) data << (uint32_t) FLD_SHFT(reg, field)) & (uint32_t) FLD_BMSK(reg, field)) 22 | 23 | #define FLD_GET(data, reg, field) \ 24 | ((data & FLD_BMSK(reg, field)) >> FLD_SHFT(reg, field)) 25 | 26 | 27 | #define REG_IN(base, hwiosym) HWIO_PERIPH_##hwiosym##_IN(base) 28 | 29 | #define REG_OUT(base, hwiosym, value) HWIO_PERIPH_##hwiosym##_OUT(base, value) 30 | 31 | #define REG_INI(base, hwiosym, n) HWIO_PERIPH_##hwiosym##_INI(base, n) 32 | 33 | #define REG_OUTI(base, hwiosym, n, value) HWIO_PERIPH_##hwiosym##_OUTI(base, n, value) 34 | 35 | #define REG_INF(base, hwiosym, field) \ 36 | ((REG_IN(base, hwiosym) & FLD_BMSK(hwiosym, field)) >> FLD_SHFT(hwiosym, field)) 37 | 38 | #define REG_OUTF(base, hwiosym, field, data) \ 39 | REG_OUT(base, hwiosym, ((REG_IN(base, hwiosym) & ~(FLD_BMSK(hwiosym, field))) | \ 40 | ((data << FLD_SHFT(hwiosym, field)) & FLD_BMSK(hwiosym, field)))) 41 | 42 | 43 | #define GENI4_CFG_REG_BASE 0x0 44 | #define GENI4_IMAGE_REGS_REG_BASE 0x100 45 | #define GENI4_DATA_REG_BASE 0x600 46 | #define QUPV3_SE_DMA_REG_BASE 0xC00 47 | #define GENI4_IMAGE_REG_BASE 0x1000 48 | #define QUPV3_SEC_REG_BASE 0x2000 49 | 50 | 51 | 52 | /*------------------------------------------------------------------------- 53 | * Type Declarations 54 | *-----------------------------------------------------------------------*/ 55 | 56 | -------------------------------------------------------------------------------- /qcc711_sdk/src/peripherals/inc/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /** @file timer.h 8 | @brief Timer internal Services Interface definition. 9 | 10 | This module provide timer internal APIs, types, and definitions. 11 | */ 12 | 13 | #ifndef __TIMER_H__ 14 | #define __TIMER_H__ 15 | 16 | /*------------------------------------------------------------------------- 17 | * Include Files 18 | *-----------------------------------------------------------------------*/ 19 | 20 | #include "qapi_status.h" 21 | 22 | /** @addtogroup peripherals_timer 23 | @{ 24 | */ 25 | 26 | /*------------------------------------------------------------------------- 27 | * Preprocessor Definitions and Constants 28 | *-----------------------------------------------------------------------*/ 29 | 30 | /*------------------------------------------------------------------------- 31 | * Type Declarations 32 | *-----------------------------------------------------------------------*/ 33 | 34 | /*------------------------------------------------------------------------- 35 | * Function Declarations 36 | *-----------------------------------------------------------------------*/ 37 | 38 | /** 39 | @brief Enable CETimer and Sync CETimer with GLTimer. 40 | 41 | This function must be called after cold boot or warm boot. 42 | 43 | @return Current Global timer time value in microsecond. 44 | */ 45 | uint64_t TMR_Enable(); 46 | 47 | /** 48 | @brief Disable CETimer. 49 | */ 50 | void TMR_Disable(); 51 | 52 | /** 53 | @brief Get current timer value in millisecond. 54 | 55 | @return Current timer value in millisecond. 56 | */ 57 | uint32_t TMR_GetCurTimeMs(); 58 | 59 | /** @} */ 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /qcc711_sdk/src/platform/inc/stringl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #ifndef __STRINGL_H__ 8 | #define __STRINGL_H__ 9 | 10 | #include 11 | 12 | /** 13 | @brief Safe version of memcpy. 14 | 15 | This function will copy data from the source buffer to the dest buffer. The 16 | amount of data copied with be the minimum of dest_size and source_size. 17 | 18 | @param[out] Dest Destination buffer for the copy. 19 | @param[in] DestSize Size of the destination buffer. 20 | @param[in] Src Source buffer for the copy. 21 | @param[in] SrcSize Size of the source buffer. 22 | 23 | @return The number of bytes actually copied. 24 | */ 25 | size_t memscpy(void* Dest, size_t DestSize, const void *Src, size_t SrcSize); 26 | 27 | /** 28 | @brief Safe version of memmove. 29 | 30 | This function will move data from the source buffer to the dest buffer, 31 | accounting for possible overlap. The amount of data moved with be the 32 | minimum of dest_size and source_size. 33 | 34 | @param[out] Dest Destination buffer for the move. 35 | @param[in] DestSize Size of the destination buffer. 36 | @param[in] Src Source buffer for the move. 37 | @param[in] SrcSize Size of the source buffer. 38 | 39 | @return The number of bytes actually moved. 40 | */ 41 | size_t memsmove(void* Dest, size_t DestSize, const void *Src, size_t SrcSize); 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /qcc711_sdk/src/platform/src/qapi_debug.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /*------------------------------------------------------------------------- 8 | * Include Files 9 | *-----------------------------------------------------------------------*/ 10 | 11 | #include "qapi_debug.h" 12 | #include "HALhwio.h" 13 | #include "hwio_aon.h" 14 | 15 | /*------------------------------------------------------------------------- 16 | * Preprocessor Definitions and Constants 17 | *-----------------------------------------------------------------------*/ 18 | 19 | /*------------------------------------------------------------------------- 20 | * Type Declarations 21 | *-----------------------------------------------------------------------*/ 22 | 23 | /*------------------------------------------------------------------------- 24 | * Variables 25 | *-----------------------------------------------------------------------*/ 26 | 27 | /*------------------------------------------------------------------------- 28 | * Function Declarations 29 | *-----------------------------------------------------------------------*/ 30 | 31 | /*------------------------------------------------------------------------- 32 | * Function Definitions 33 | *-----------------------------------------------------------------------*/ 34 | 35 | /** 36 | @brief Determines if a debugger is currently attached. 37 | 38 | @return True if a debugger is attached or false if it is not. 39 | */ 40 | qbool_t qapi_DBG_Debugger_Attached(void) 41 | { 42 | return ((qbool_t)(HWIO_AON_PME_SOC_STATUS_INM(HWIO_AON_PME_SOC_STATUS_DEBUG_MODE_BMSK) != 0)); 43 | } 44 | 45 | -------------------------------------------------------------------------------- /qcc711_sdk/src/platform/src/qapi_nvm_rot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | /*------------------------------------------------------------------------- 8 | * Include Files 9 | *-----------------------------------------------------------------------*/ 10 | 11 | #include 12 | #include "qapi_types.h" 13 | #include "qapi_nvm_rot.h" 14 | 15 | /* IPC headers*/ 16 | #include "tme_ipc_utils.h" 17 | #include "TmeMessagesUids.h" 18 | #include "tme_ipc_nvm_common.h" 19 | 20 | /** 21 | @brief Writes the provided buffer to the specified offset in NVM (RRAM) 22 | allocated to ROT. 23 | 24 | Valid offset range is from 0 to (QAPI_NVM_ROT_SIZE-1). 25 | 26 | Writes to NVM will block NVM reads so this function blocks until the NVM 27 | write has completed. 28 | 29 | Also, the caller should be aware that writing to RRAM can block other cores 30 | (namely BTSS) and very long writes may affect performance. 31 | 32 | @param[in] Offset Offset at which data to write. 33 | @param[in] Buffer Data to write to NVM. 34 | @param[in] Length Length of the data to write to NVM. 35 | 36 | @return 37 | QAPI_OK -- If the data was successfully written to NVM.\n 38 | Negative value -- If there was an error. 39 | */ 40 | qapi_Status_t qapi_NVM_Write_ROT(uint32_t Offset, const void *Buffer, uint32_t Length) 41 | { 42 | qapi_NVM_Write_Rot_Params_t NVMWriteParams; 43 | 44 | NVMWriteParams.Offset = Offset; 45 | NVMWriteParams.Buffer = Buffer; 46 | NVMWriteParams.BufferLen = Length; 47 | 48 | return qapi_Perform_Operation(TME_MSG_UID_GENERIC_NVM_WRITE_EX, TME_MSG_UID_GENERIC_NVM_WRITE_EX_PARAM_ID, &NVMWriteParams, NULL, NULL); 49 | } 50 | 51 | /** 52 | @brief Reads NVM (RRAM) data from the specified offset to provided buffer. 53 | Valid offset range is from 0 to (QAPI_NVM_ROT_SIZE-1). 54 | 55 | @param[in] Offset Offset from data to read. 56 | @param[in] Buffer Buffer to save read NVM data. 57 | @param[in] Length Length of the data to read from NVM. 58 | 59 | @return 60 | QAPI_OK -- If the data was successfully written to NVM.\n 61 | Negative value -- If there was an error. 62 | */ 63 | qapi_Status_t qapi_NVM_Read_ROT(uint32_t Offset, void *Buffer, uint32_t Length) 64 | { 65 | qapi_NVM_Read_Rot_Params_t NVMReadParams; 66 | 67 | NVMReadParams.Offset = Offset; 68 | NVMReadParams.Buffer = Buffer; 69 | NVMReadParams.BufferLen = Length; 70 | 71 | return qapi_Perform_Operation(TME_MSG_UID_GENERIC_NVM_READ_EX, TME_MSG_UID_GENERIC_NVM_READ_EX_PARAM_ID, &NVMReadParams, NULL, NULL); 72 | } 73 | -------------------------------------------------------------------------------- /qcc711_sdk/src/platform/src/stringl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | * All Rights Reserved. 4 | * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | /** 11 | @brief Safe version of memcpy. 12 | 13 | This function will copy data from the source buffer to the dest buffer. The 14 | amount of data copied with be the minimum of dest_size and source_size. 15 | 16 | @param[out] Dest Destination buffer for the copy. 17 | @param[in] DestSize Size of the destination buffer. 18 | @param[in] Src Source buffer for the copy. 19 | @param[in] SrcSize Size of the source buffer. 20 | 21 | @return The number of bytes actually copied. 22 | */ 23 | size_t memscpy(void* Dest, size_t DestSize, const void *Src, size_t SrcSize) 24 | { 25 | if(SrcSize > DestSize) 26 | { 27 | SrcSize = DestSize; 28 | } 29 | 30 | memcpy(Dest, Src, SrcSize); 31 | 32 | return(SrcSize); 33 | } 34 | 35 | /** 36 | @brief Safe version of memmove. 37 | 38 | This function will move data from the source buffer to the dest buffer, 39 | accounting for possible overlap. The amount of data moved with be the 40 | minimum of dest_size and source_size. 41 | 42 | @param[out] Dest Destination buffer for the move. 43 | @param[in] DestSize Size of the destination buffer. 44 | @param[in] Src Source buffer for the move. 45 | @param[in] SrcSize Size of the source buffer. 46 | 47 | @return The number of bytes actually moved. 48 | */ 49 | size_t memsmove(void* Dest, size_t DestSize, const void *Src, size_t SrcSize) 50 | { 51 | if(SrcSize > DestSize) 52 | { 53 | SrcSize = DestSize; 54 | } 55 | 56 | memmove(Dest, Src, SrcSize); 57 | 58 | return(SrcSize); 59 | } 60 | -------------------------------------------------------------------------------- /qcc711_sdk/src/tmeipc/TmecomClientCfg.c: -------------------------------------------------------------------------------- 1 | /*============================================================================= 2 | 3 | TME COM Client Utilities Source File 4 | 5 | 6 | Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 7 | All Rights Reserved. 8 | Qualcomm Technologies, Inc. Confidential and Proprietary. 9 | =============================================================================*/ 10 | 11 | /*============================================================================= 12 | INCLUDE FILES 13 | =============================================================================*/ 14 | #include 15 | 16 | #include "Tmecom.h" 17 | 18 | /*============================================================================= 19 | LOCAL DATA DECLARATIONS 20 | =============================================================================*/ 21 | 22 | /*---------------------------------------------------------------------------- 23 | * Glink config struct for APSS 24 | *--------------------------------------------------------------------------*/ 25 | static TmecomGlinkCfg_t gApssGlinkCfg = { 26 | "tme", "tmeRequest" 27 | }; 28 | 29 | /*============================================================================= 30 | 31 | PUBLIC FUNCTION DEFINITIONS 32 | 33 | =============================================================================*/ 34 | 35 | /** 36 | @brief Get APSS client config data. 37 | 38 | @return A pointer to local subsytem specific config structure. 39 | */ 40 | const TmecomGlinkCfg_t* TmecomGetClientCfg() 41 | { 42 | return &gApssGlinkCfg; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /qcc711_sdk/tools/bin/nvm_programmer.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/qcc711_sdk/tools/bin/nvm_programmer.elf -------------------------------------------------------------------------------- /qcc711_sdk/tools/bin/otp_tool.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/qcc711_sdk/tools/bin/otp_tool.elf -------------------------------------------------------------------------------- /qcc711_sdk/tools/bin/qcc710_programmer.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/qcc711_sdk/tools/bin/qcc710_programmer.elf -------------------------------------------------------------------------------- /qcc711_sdk/tools/bin/secure_loader.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/qcc711_sdk/tools/bin/secure_loader.bin -------------------------------------------------------------------------------- /qcc711_sdk/tools/cfgtag/qcc710.offsets: -------------------------------------------------------------------------------- 1 | # 2 | # Generated on 2023-02-23 14:32:58 3 | Base 0x10200000 4 | Tag 1 = 448 5 | Tag 2 = 0 6 | Tag 6 = 6 7 | Tag 7 = 14 8 | Tag 8 = 16 9 | Tag 10 = 480 10 | Tag 17 = 486 11 | Tag 21 = 492 12 | Tag 22 = 24 13 | Tag 27 = 502 14 | Tag 28 = 516 15 | Tag 31 = 536 16 | Tag 32 = 538 17 | Tag 33 = 138 18 | Tag 35 = 540 19 | Tag 36 = 660 20 | Tag 37 = 692 21 | Tag 38 = 736 22 | Tag 39 = 820 23 | Tag 42 = 1748 24 | Tag 53 = 880 25 | Tag 54 = 890 26 | Tag 55 = 896 27 | Tag 56 = 960 28 | Tag 57 = 158 29 | Tag 60 = 1800 30 | Tag 64 = 961 31 | Tag 73 = 1028 32 | Tag 78 = 214 33 | Tag 79 = 1036 34 | Tag 80 = 1964 35 | Tag 83 = 1152 36 | Tag 86 = 1998 37 | Tag 90 = 216 38 | Tag 95 = 224 39 | Tag 97 = 1167 40 | Tag 98 = 380 41 | Tag 99 = 1169 42 | Tag 147 = 384 43 | Tag 151 = 388 44 | Tag 152 = 1172 45 | Tag 154 = 1296 46 | Tag 158 = 416 47 | Tag 160 = 2006 48 | Tag 168 = 1548 49 | Tag 175 = 421 50 | Tag 179 = 1560 51 | Tag 181 = 1584 52 | Tag 182 = 1660 53 | Tag 184 = 2016 54 | Tag 185 = 2104 55 | Tag 186 = 2352 56 | Tag 187 = 2396 57 | Tag 188 = 2484 58 | Tag 190 = 1664 59 | Tag 191 = 2520 60 | Tag 192 = 2600 61 | Tag 193 = 2688 62 | Tag 194 = 1668 63 | Tag 196 = 1744 64 | Tag 197 = 1745 65 | Tag 201 = 422 66 | Tag 219 = 424 67 | Tag 242 = 432 68 | Tag 254 = 434 69 | Tag 255 = 442 70 | -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/cfgtag.py: -------------------------------------------------------------------------------- 1 | from cfgtag_framework import tagblob_patch 2 | tagblob_patch.main() 3 | -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/cfgtag_framework/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/qcc711_sdk/tools/scripts/cfgtag_framework/__init__.py -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/cfgtag_framework/tag_features.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Tag Platforms processing. 3 | ################################################################################ 4 | # Copyright (c) 2020 Qualcomm Technologies International, Ltd. 5 | # All Rights Reserved 6 | # Confidential and Proprietary - Qualcomm Technologies International, Ltd. 7 | ################################################################################ 8 | 9 | 10 | ################################################################################ 11 | # Library Imports 12 | ################################################################################ 13 | from config import TagError 14 | from xml_wrapper import ET 15 | 16 | 17 | ################################################################################ 18 | # Global Variables 19 | ################################################################################ 20 | 21 | 22 | ################################################################################ 23 | # Local Functions 24 | ################################################################################ 25 | 26 | 27 | ################################################################################ 28 | # TagFeatures Class 29 | # 30 | # Holds all information on the defined Tag Features. 31 | ################################################################################ 32 | class TagFeatures: 33 | def __init__(self): 34 | self.numFeatures = 0 35 | self.maxNameLen = 0 36 | self.Features = [] 37 | 38 | ############################################################################ 39 | # Load Tag Feature definitions from an TCFX tree 40 | ############################################################################ 41 | def loadTCFX(self, rootElem): 42 | tcfxFeatureList = rootElem.findall("FEATURE") 43 | self.numFeatures = len(tcfxFeatureList) 44 | 45 | for index, tcfxFeature in enumerate(tcfxFeatureList): 46 | tagFeature = {} 47 | tagFeature['idx'] = index 48 | tagFeature['name'] = tcfxFeature.get("Name") 49 | tagFeature['desc'] = tcfxFeature.get("Description").strip() 50 | self.Features.append(tagFeature) 51 | 52 | if tagFeature['name'] is None: 53 | raise TagError("TagFeature '%d' is missing 'name'" % index) 54 | if tagFeature['desc'] is None or tagFeature['desc'].strip() == "": 55 | raise TagError("TagFeature '%d' is missing description" % index) 56 | 57 | if len(tagFeature['name']) > self.maxNameLen: 58 | self.maxNameLen = len(tagFeature['name']) 59 | 60 | ############################################################################ 61 | # Save Tag Feature definitions to an TCFX tree 62 | ############################################################################ 63 | def saveTCFX(self, rootElem): 64 | TagFeaturesElem = ET.SubElement(rootElem, "FEATURES") 65 | enableMacro = None 66 | 67 | for tagFeature in self.Features: 68 | FeatureElem = ET.SubElement(TagFeaturesElem, "FEATURE") 69 | FeatureElem.set("Name", tagFeature['name']) 70 | FeatureElem.set("Description", tagFeature['desc']) -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/cfgtag_framework/xml_wrapper.py: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # XML library wrapper, with fallback to Python standard library. 3 | # 4 | # We prefer lxml as it's implementation has additional XML formatting options 5 | # (pretty_print) which is useful when emitting XML. However the Python standard 6 | # library also includes an XML parser (albeit missing pretty_print). This 7 | # wrapper hides the implementation detail from the rest of parse_tags. 8 | # 9 | ################################################################################ 10 | # Copyright (c) 2020 Qualcomm Technologies, Inc. 11 | # All Rights Reserved 12 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 13 | ################################################################################ 14 | 15 | 16 | ################################################################################ 17 | # Library Imports 18 | ################################################################################ 19 | from __future__ import print_function 20 | 21 | # Load the XML parser, try LXML first to get its extra formatting options, then 22 | # try the native C implementation, finally fallback to Python implementation. 23 | try: 24 | from lxml import etree as ET 25 | xmlIsLXML = True 26 | except ImportError: 27 | xmlIsLXML = False 28 | try: 29 | import xml.etree.cElementTree as ET 30 | except ImportError: 31 | import xml.etree.ElementTree as ET 32 | 33 | 34 | 35 | ############################################################################ 36 | # Save all tag information to an XML file 37 | ############################################################################ 38 | def xmlToString(xmlElem, debug=False): 39 | global xmlIsLXML 40 | 41 | if xmlIsLXML: 42 | if debug: print("Using LXML") 43 | xmlText = ET.tostring(xmlElem, pretty_print=True, xml_declaration=True, encoding="utf-8") 44 | else: 45 | if debug: print("Using ElementTree") 46 | xmlText = ET.tostring(xmlElem, encoding="utf-8") 47 | 48 | return xmlText 49 | 50 | -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/examples/bd_addr_and_power.nvmx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | Advertising and Scan Request Power Level Index 2 to 1, BD_ADDR = 0xBAADBAADF00D 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/examples/cfgtag_example.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM 4 | REM This is an example of how to use the cfgtag.py script to update a config tag binary. 5 | REM Paths are relative to this batch script i.e. "SDK_ROOT/tools/scripts/examples". 6 | REM 7 | REM The script requires some parameters to run: 8 | REM - The TCFX file describing the config tags to be edited. 9 | REM - The offsets file describing tag locations. 10 | REM - The input config tag to be patched. 11 | REM - The generated output config tag. 12 | REM - The list of NVMX files that are applied to the binary. 13 | REM 14 | REM These inputs are hardcoded in this example, however, in most cases, the list of NVMX 15 | REM files should be determined at build time, and applied to the Qualcomm-provided binary 16 | REM containing the baseline configuration. The patched output binary should then be used 17 | REM when creating the final application image. 18 | REM 19 | REM The utility also allows the following options in special use cases: 20 | REM --allow-missing : Allows applying NVMX files containing unknown tags, which will be skipped. 21 | REM --allow-duplicates : Allows applying NVMX files containing already-patched tags. Useful when overriding a previous NVMX. 22 | REM 23 | REM IMPORTANT NOTE! 24 | REM 25 | REM The TCFX file and offsets file must not be modified, as it describes critical layout 26 | REM information in order to properly interpret the tags and patch the correct location. 27 | REM 28 | 29 | SET SDK_ROOT=..\..\..\ 30 | 31 | SET TCFX_PATH="%SDK_ROOT%\tools\cfgtag\qcc710.tcfx" 32 | SET OFFSETS_PATH="%SDK_ROOT%\tools\cfgtag\qcc710.offsets" 33 | 34 | SET INPUT_APP="%SDK_ROOT%\bin\qcc710_btcfg_app.bin" 35 | SET OUTPUT_APP="%SDK_ROOT%\bin\qcc710_btcfg_app_user.bin" 36 | 37 | SET INPUT_HCI="%SDK_ROOT%\bin\qcc710_btcfg_hci.bin" 38 | SET OUTPUT_HCI="%SDK_ROOT%\bin\qcc710_btcfg_hci_user.bin" 39 | 40 | REM Run the utility twice, once for each QCC710 image. 41 | REM Note the utility allows multiple NVMX files to be specified at once. 42 | python ..\cfgtag.py --bin --taginfo %OFFSETS_PATH% --tcfx %TCFX_PATH% --input %INPUT_APP% --output %OUTPUT_APP% bd_addr_and_power.nvmx 43 | python ..\cfgtag.py --bin --taginfo %OFFSETS_PATH% --tcfx %TCFX_PATH% --input %INPUT_HCI% --output %OUTPUT_HCI% bd_addr_and_power.nvmx 44 | -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/examples/conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "otp_config": 3 | { 4 | "otp_mtp_values": 5 | { 6 | "OEM_MRC_HASH" : "0x123456789ABCDEF0", 7 | "OEM_ID" : "0x1", 8 | "OEM_PRODUCT_SEED" : "0x123456789ABCDEF0" 9 | }, 10 | 11 | "secure_file" : "secure_otp.bin" 12 | }, 13 | 14 | "image_config": 15 | { 16 | "non_secure_config": 17 | { 18 | "image" : "update_apss_unlicense.bin", 19 | "address" : "0x10240000", 20 | "update" : "True" 21 | }, 22 | 23 | "secure_config": 24 | { 25 | "secure_image" : "encrypted_update_apss.bin", 26 | "address" : "0x10240000", 27 | "baudrate" : 115200, 28 | "secure_loader_update" : "update_secure_loader.bin" 29 | } 30 | }, 31 | 32 | "user_config": 33 | { 34 | "image" : "user_config.bin", 35 | "address" : "0x1023F000" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/examples/key_config_example.txt: -------------------------------------------------------------------------------- 1 | # =============================================================================== 2 | # Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | # All Rights Reserved. 4 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | # =============================================================================== 6 | # 7 | # This document contains examples for the key.json file used with encrypt_file.py. 8 | # 9 | # KeyType (Mandatory) 10 | # Two key types you can select. 11 | # Derived 12 | # Static 13 | # 14 | # OemBatchSecret (Mandatory for Derived KeyType) 15 | # Value designated by customer(MAX size: 128-bit hex number). 16 | # 17 | # Nonce (Optional) 18 | # Only used in Derived KeyType.Value designated by customer(MAX size: 128-bit hex number).if not designated, "Nonce" value would be a 16 Bytes random number. 19 | # 20 | # Label (Optional) 21 | # Only used in Derived KeyType.Value designated by customer(MAX size: 32 characters).if not designated, "Label" value would be a null string(""). 22 | # 23 | # KeyId (Mandatory for Static KeyType) 24 | # ID of Key field. 25 | # 26 | # Key (Mandatory for Static KeyType) 27 | # Fixed Key specified by APSS(MAX size: 128-bit hex number). 28 | 29 | Example1: 30 | { 31 | "KeyType":"Derived", 32 | "OemBatchSecret":"0x123456789ABCDEF0", 33 | "Nonce":"0x123456789ABCDEF0", 34 | "Label":"ABCDEFGHIJKLMNOPabcdefghijklmnop" 35 | } 36 | 37 | Example2: 38 | { 39 | "KeyType":"Static", 40 | "KeyId":"1", 41 | "Key":"0x123456789ABCDEF0" 42 | } -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/examples/otp_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "OEM_MRC_HASH":"0", 3 | "DEBUG_DISABLE_VECTOR":"0", 4 | "OEM_PRODUCT_ID":"0", 5 | "OEM_SECURITY_POLICY":"0", 6 | "OEM_LIFE_CYCLE_STATE":"0" 7 | } -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/gdb_framework/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /qcc711_sdk/tools/scripts/qcc710_apps.JLinkScript: -------------------------------------------------------------------------------- 1 | int ConfigTargetSettings(void) { 2 | JLINK_ExecCommand("SetSWDTargetId=0x001830E1"); // 28-bit target ID 3 | JLINK_ExecCommand("SetSWDInstanceId=0x0"); // 4-bit instance ID 4 | 5 | JLINK_CORESIGHT_AddAP(0, CORESIGHT_AHB_AP); // APSS Core 6 | JLINK_CORESIGHT_AddAP(1, CORESIGHT_AHB_AP); // BTSS Core 7 | JLINK_CORESIGHT_AddAP(4, CORESIGHT_APB_AP); // RoT Core 8 | 9 | CORESIGHT_IndexAHBAPToUse = 0; // Connect to APSS 10 | 11 | return(0); 12 | } 13 | 14 | int InitTarget(void) { 15 | JLINK_MEM_WriteU32(0x50006828, 0x5A5A0100); // HWIO_AON_PME_APPS_RESET_ADDR 16 | 17 | return(0); 18 | } 19 | -------------------------------------------------------------------------------- /rot/images/patch.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/rot/images/patch.bin -------------------------------------------------------------------------------- /rot/tools/QCC710-DPRSignKey/README.md: -------------------------------------------------------------------------------- 1 | 6 | # Lists of APIs this packages supports 7 | - ### DPR Signing Key 8 | 9 | ### Dependencies 10 | 1. python >= 3.7 11 | 2. pip >= 19.0.0 12 | 3. wheel 0.36.2 13 | 4. pycryptodome 3.10.1 14 | 5. cryptography 3.4.7 15 | 6. QCC710-KDF 0.7.9 16 | 17 | The package has been tested with dependency version listed above. 18 | The package requires Ubuntu Version 18.04 LTS. 19 | The package also use dataclasses but with the python version 3.7 and above, dataclasses are in-built. 20 | In case your execution environment complains about dataclasses, you may install version 0.8 explicitly. 21 | 22 | ### Check Dependencies 23 | 1. python3 24 | ``` 25 | python3 --version 26 | pip3 --version 27 | ``` 28 | 29 | If not installed, please follow the steps below to install python3 and pip. 30 | 31 | ### Install Dependencies 32 | * python3 33 | ``` 34 | sudo apt install python3 python3-pip 35 | ``` 36 | 37 | Note: Please check whether you have latest pip3 version. If not, please upgrade pip3 using below command: 38 | ``` 39 | python -m pip install --upgrade pip 40 | ``` 41 | 42 | * wheel 43 | Run the below command from project root directory. 44 | ``` 45 | pip3 install wheel==0.36.2 46 | ``` 47 | 48 | * pycryptodome 49 | ``` 50 | pip3 install pycryptodome==3.10.1 51 | ``` 52 | Note: 'pycryptodome' will not work along with 'pycrypto'. If any of your other project have 'pycrypto' dependency, please setup virtual environment and install 'wheel', 'pycose' and 'pycryptodome' in virtual environment or if 'pycrypto' is not required, please run below command. 53 | ``` 54 | pip3 uninstall pycrypto 55 | ``` 56 | 57 | * cryptography 58 | ``` 59 | pip3 install cryptography==3.4.7 60 | ``` 61 | 62 | * QCC710-KDF 63 | Go to QCC710-KDF project root directory. 64 | ``` 65 | cd QCC710-KDF 66 | ``` 67 | Run the below command from project root directory. 68 | ``` 69 | pip3 install -e . 70 | ``` 71 | 72 | ### Execute dpr_sign_key.py 73 | Go to dprsignkey folder in QCC710-DPRSignKey. 74 | ``` 75 | cd QCC710-DPRSignKey/dprsignkey 76 | ``` 77 | Run the below command. 78 | ``` 79 | python3 dpr_sign_key.py -j config.json -o output-folder 80 | -------------------------------------------------------------------------------- /rot/tools/QCC710-DPRSignKey/dprsignkey/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "entity_dev_fact_prov_key" : "568e2f90ae618ab6b4d9c11678c8923c617a01f46e62720d32b63789c70b4907", 3 | "oem_batch_secret" : "f0f0a5a5f0f0a5a5f0f0a5a5f0f0a5a5", 4 | "KDFContext" : { 5 | "chip_unique_id" : "78563412ffff0000", 6 | "oem_id" : 18, 7 | "oem_product_id" : "0000", 8 | "oem_product_seed" : "f0f0a5a5f0f0a5a5f0f0a5a5f0f0a5a5", 9 | "oem_lcs" : 0, 10 | "is_oem_lcs_activated" : false 11 | } 12 | } -------------------------------------------------------------------------------- /rot/tools/QCC710-DebugUnlock/README.txt: -------------------------------------------------------------------------------- 1 | // ============================================================================= 2 | // * Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | // * All Rights Reserved. 4 | // * Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | // ============================================================================= 6 | 7 | ================================================================================ 8 | Prerequisites 9 | ================================================================================ 10 | 1. Python version >= 3.7 11 | 2. Sectools 12 | 3. JLink software 13 | 4. Install following python packages 14 | - Install "argparse" using "pip install argparse==1.4.0" 15 | - Install QCOM internal package "pydbg-core" (Applicable for JLink based 16 | testing only) using 17 | "pip install -i https://devpi.qualcomm.com/qtil/rel pydbg-core" 18 | 19 | ================================================================================ 20 | Contents 21 | ================================================================================ 22 | Following are the key files required for Debug unlock tool execution 23 | - debug_unlock.py 24 | - debugger_framework.py 25 | - dmi_utils.py 26 | 27 | ================================================================================ 28 | Usage 29 | ================================================================================ 30 | Step 1) Generate the DPR request using sectools (Optional step) 31 | 32 | Syntax: python generate_dpr.py -c [--ahb_sysfabric_dbgen] [--debug_module_dbgen] [--apps_dbgen] [--apps_aon_dbgen] [--apps_watchdog_dbgen] 33 | 34 | i) "python generate_dpr.py -h" -- for detailed generate dpr tool usage help 35 | ii) Config parameter (-c) indicates configuration file that contains available configuration options and its explanation. 36 | iii) Specify the oem debug re-enable request. Possible options: --ahb_sysfabric_dbgen, --debug_module_dbgen, --apps_dbgen, --apps_aon_dbgen and --apps_watchdog_dbgen. These five arguments are optional. 37 | 38 | Eg: python generate_dpr.py -c debug.cfg --ahb_sysfabric_dbgen --debug_module_dbgen --apps_dbgen --apps_aon_dbgen --apps_watchdog_dbgen 39 | 40 | 41 | 42 | Step 2) Executing the DPR request using Debug unlock tool. 43 | 44 | Syntax: python debug_unlock.py -d -l 45 | 46 | i) "python debug_unlock.py -h" -- for detailed tool usage help 47 | ii) Signed dpr file parameter (-d) specifies the path of signed dpr request bin file. 48 | iii) Log level parameter (-l) indicates log level. Supported: "low"/"high". 49 | 50 | Eg: python debug_unlock.py -d "output_files/signedDprRequest.bin" -l "high" 51 | -------------------------------------------------------------------------------- /rot/tools/QCC710-DebugUnlock/debug.cfg: -------------------------------------------------------------------------------- 1 | #=============================================================================== 2 | # Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | # All Rights Reserved. 4 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | #=============================================================================== 6 | 7 | ################################################################################ 8 | # Sample configuration parameters for Debug unlock tool execution 9 | ################################################################################ 10 | # "security_profile" : Specify the path of the secuirty profile. 11 | # "sectools" : Specify the sectools path. 12 | # "private_key" : Specify the path of private key file in .pem format. 13 | # "certificate" : Specify the DEC file path. 14 | # "chip_unique_id" : Specify the chip_unique_ids. If there are more than one chip unique id to be specified, split the different chip_unique_ids by space. 15 | # "sectools_additional_input" : Specify the additional sectools input to be used for generating DPR request. 16 | # "signed_dpr" : Specify the path where generated DPR request will get stored. 17 | 18 | #Note - Do not share the private key file. 19 | ################################################################################ 20 | 21 | { 22 | "security_profile" : "input_files/security_profile.xml", 23 | "sectools" : "./../../../common/sectoolsv2/ext/Windows/sectools.exe", 24 | "private_key" : "input_files/GeneratedKey_ChipPreSilicon.pem", 25 | "certificate" : "input_files/QCC710_DebugEntitlementCert_signed.json", 26 | "chip_unique_id" : "0x0000FFFF12345678 0x0000FFFF9ABCDEF0", 27 | "sectools_additional_input" : " --persist-on-reset", 28 | "signed_dpr" : "output_files/signedDprRequest.bin" 29 | } 30 | -------------------------------------------------------------------------------- /rot/tools/QCC710-DebugUnlock/dmi_utils.py: -------------------------------------------------------------------------------- 1 | #=============================================================================== 2 | # Copyright (c) 2021 Qualcomm Technologies, Inc. 3 | # All Rights Reserved. 4 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | #=============================================================================== 6 | 7 | ############################################################################### 8 | # DMI States 9 | ############################################################################### 10 | DMI_UNINITIALIZED = 0x0000 11 | DMI_HEALTHY = 0x4844 # ASCII("DH") 12 | DMI_ERROR = 0x4544 # ASCII("DE") 13 | DMI_FATAL = 0x4644 # ASCII("DF") 14 | DMI_STATE_MASK = 0xFFFF 15 | 16 | DMI_CLIENT_HEALTHY = 0x0000 17 | DMI_CLIENT_ERROR_ACK = 0x4143 # ASCII("CA") 18 | 19 | ############################################################################### 20 | # DMI Error codes 21 | ############################################################################### 22 | SUCCESS = 0 23 | GEN_ERROR = -1 24 | ATTACH_ERROR = -2 25 | 26 | ############################################################################### 27 | # DMI Log levels 28 | ############################################################################### 29 | DMI_LOG_ERROR = 0 30 | DMI_LOG_WARN = 1 31 | DMI_LOG_INFO = 2 32 | DMI_LOG_DEBUG = 3 33 | 34 | ############################################################################### 35 | # Trace Log 36 | ############################################################################### 37 | TRACE_LOG_ENABLE = 1 38 | TRACE_LOG_DISABLE = 0 39 | 40 | ############################################################################### 41 | # Storing the address of scratch pad registers 42 | ############################################################################### 43 | dmi_reg_set = { 44 | "DMI_FIFO_STATUS0" : 0x00, 45 | "DMI_FIFO_STATUS1" : 0x04, 46 | "DMI_INFIFO" : 0x20, 47 | "DMI_OUTFIFO" : 0x24, 48 | "DMI_INBOUND_SCRATCH0" : 0x40, 49 | "DMI_INBOUND_SCRATCH1" : 0x44, 50 | "DMI_OUTBOUND_SCRATCH0" : 0x60, 51 | "DMI_OUTBOUND_SCRATCH1" : 0x64 52 | } 53 | 54 | global dmi_log_level 55 | global trace_log_option 56 | 57 | #Initializing the variables 58 | dmi_log_level = DMI_LOG_INFO 59 | trace_log_option = TRACE_LOG_ENABLE 60 | 61 | def dmi_log(*args): 62 | global dmi_log_level 63 | logs = ["DMI_LOG_ERROR", "DMI_LOG_WARN", "DMI_LOG_INFO", "DMI_LOG_DEBUG"] 64 | if int(args[0]) <= dmi_log_level: 65 | print("["+logs[int(args[0])]+"] "+"".join(map(str,args[1]))) 66 | 67 | def dmi_trace_log(*args): 68 | global trace_log_option 69 | if trace_log_option == 1: 70 | print("[DMI_LOG_TRACE]::"+"".join(map(str,args[0]))) 71 | else: 72 | dmi_log(DMI_LOG_DEBUG, *args) 73 | -------------------------------------------------------------------------------- /rot/tools/QCC710-DebugUnlock/input_files/QCC710_DebugEntitlementCert_OEM_signed.json: -------------------------------------------------------------------------------- 1 | { 2 | "EntitlementCertificate" : { 3 | "AlgorithmIdentifier" : "ECDSA_P521_SHA512", 4 | "CertificateVersion" : "0x00000001", 5 | "Entitlements" : { 6 | "DebugEntitlement" : { 7 | "AuthorizedDebugOptions" : [ "PERSIST_ON_RESET" ], 8 | "AuthorizedDebugVector" : "0x58120000000000000000000000000000", 9 | "ChipConstraints" : { 10 | "SocHardwareVersion" : "0x401802ff", 11 | "SocLifeCycleState" : [ "OPERATIONAL_EXT" ] 12 | }, 13 | "InstanceVersion" : "0x00000001", 14 | "InstantiationConstraints" : [ "IS_CHIP_UNIQUE_ID_BOUND", "IS_FINGERPRINT_BOUND" ], 15 | "PublicKey" : { 16 | "CurveIdentifier" : "P-521", 17 | "PublicKeyValue" : "0x000000a415fe175941c7c8ec8bf4feae98af748eda42fbd5cd2ea2e46e18fec447dbb719571edf3cc0bbdcc18ad2eda9b39b63d17ad861c4fc0703f6cdac600f16385366000000327a57bcf6e1a342cff68ee79607360bb17f9955c7f26a33ef8a6bcf07b283a938cffda99a5ab99bb52bbd86223df0a5ffc28491059e4ec125d765bca296bb93f6" 18 | } 19 | } 20 | }, 21 | "KeyIdentifier" : "QTI_ENTITLEMENT_ROOT_KID", 22 | "Signature" : "0x000000a332079a803233ed49e5221f7d03038a80efceef9098c8facb3a81d2137356aeed5285f4d4db9ebcf8a3c1c90f8dad1e0909cefeb13020596d0c6d3cd287a4b556000001d3a49feddc88cc17aee1e0837018e489f3c3055db40f8c59f343bc78df0bdb7b4489c50b909eef0e303ba6128b09020b523fce0d9602794912949c357b90deedb4" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /rot/tools/QCC710-DebugUnlock/pydbg-qcc710/requirements.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /rot/tools/QCC710-DebugUnlock/pydbg-qcc710/wheels/customer_pydbg_base-2.24.5-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/rot/tools/QCC710-DebugUnlock/pydbg-qcc710/wheels/customer_pydbg_base-2.24.5-py2.py3-none-any.whl -------------------------------------------------------------------------------- /rot/tools/QCC710-DebugUnlock/pydbg-qcc710/wheels/customer_pydbg_qcc710-2.22.8-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/rot/tools/QCC710-DebugUnlock/pydbg-qcc710/wheels/customer_pydbg_qcc710-2.22.8-py2.py3-none-any.whl -------------------------------------------------------------------------------- /rot/tools/QCC710-KDF/README.md: -------------------------------------------------------------------------------- 1 | 6 | # Lists of APIs this packages supports 7 | - ### Key Derivation using HKDF 8 | - ### Key Derivation using NIST KDF 9 | 10 | ### Dependencies 11 | 1. python >= 3.7 12 | 2. pip >= 19.0.0 13 | 3. wheel 0.36.2 14 | 4. cryptography 3.4.7 15 | 5. ecdsa 0.17.0 16 | 17 | The package has been tested with dependency version listed above. 18 | The package requires Ubuntu Version 18.04 LTS. 19 | The package also use dataclasses but with the python version 3.7 and above, dataclasses are in-built. 20 | In case your execution environment complains about dataclasses, you may install version 0.8 explicitly. 21 | 22 | ### Check Dependencies 23 | 1. python3 24 | ``` 25 | python3 --version 26 | pip3 --version 27 | ``` 28 | 29 | If not installed, please follow the steps below to install python3 and pip. 30 | 31 | ### Install Dependecies 32 | * python3 33 | ``` 34 | sudo apt install python3 python3-pip 35 | ``` 36 | 37 | Note: Please check whether you have latest pip3 version. If not, please upgrade pip3 using below command: 38 | ``` 39 | python -m pip install --upgrade pip 40 | ``` 41 | 42 | * wheel 43 | Run the below command from project root directory. 44 | ``` 45 | pip3 install wheel==0.36.2 46 | ``` 47 | 48 | * cryptography 49 | ``` 50 | pip3 install cryptography==3.4.7 51 | ``` 52 | 53 | * ecdsa 54 | ``` 55 | pip3 install ecdsa==0.17.0 56 | ``` 57 | 58 | ### Install package 59 | Go to QCC710-KDF project root directory 60 | ``` 61 | cd QCC710-KDF 62 | ``` 63 | Run the below command from project root directory. 64 | ``` 65 | pip3 install -e . 66 | ``` 67 | 68 | ### Run Tests 69 | - Install pytest framework to get list of test passed and failed. 70 | ``` 71 | pip3 install pytest 72 | ``` 73 | 74 | - Run the below commands from tests directory in QCC710-KDF/kdf. 75 | ``` 76 | cd ./kdf/tests/ 77 | pytest -rP 78 | ``` 79 | -------------------------------------------------------------------------------- /rot/tools/QCC710-KDF/kdf/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | @package QCC710-KDF 3 | 4 | @mainpage 5 | 6 | QCC710-KDF Package contains the following tools 7 | 8 | - Key Derivation using HKDF 9 | """ 10 | -------------------------------------------------------------------------------- /rot/tools/QCC710-KDF/kdf/tests/run_tests.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """! 3 | @brief It invokes various test cases for APIs 4 | defined in package. 5 | 6 | 7 | @section 8 | Copyright (c) 2020 Qualcomm Technologies, Inc. 9 | All rights reserved. 10 | Confidential and Proprietary - Qualcomm Technologies, Inc. 11 | """ 12 | 13 | 14 | from test_derive_key import tests_derive_key_hkdf, tests_derive_key_nist 15 | 16 | 17 | def main(): 18 | # Key Derivation using HKDF 19 | # Test cases for key derivation. Key is derived from base key 20 | # using HKDF 21 | tests_derive_key_hkdf() 22 | 23 | # Key Derivation using NIST KDF 24 | # Test cases for key derivation. Key is derived from base key 25 | # using NIST KDF 26 | tests_derive_key_nist() 27 | 28 | 29 | if __name__ == "__main__": 30 | main() 31 | -------------------------------------------------------------------------------- /rot/tools/QCC710-KDF/setup.py: -------------------------------------------------------------------------------- 1 | """! 2 | Copyright (c) 2022 Qualcomm Technologies, Inc. 3 | All rights reserved. 4 | Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | """ 6 | from setuptools import setup 7 | 8 | setup( 9 | name="QCC710-KDF", 10 | version="0.7.9") 11 | 12 | -------------------------------------------------------------------------------- /rot/tools/QCC710-SecureWrap/README.md: -------------------------------------------------------------------------------- 1 | 6 | # Lists of APIs this packages supports 7 | - ### X.509 Secure Wrap 8 | 9 | ### Dependencies 10 | 1. python >= 3.7 11 | 2. pip >= 19.0.0 12 | 3. wheel 0.36.2 13 | 4. pycryptodome 3.10.1 14 | 5. cryptography 3.4.7 15 | 6. QCC710-KDF 0.7.9 16 | 17 | The package has been tested with dependency version listed above. 18 | The package requires Ubuntu Version 18.04 LTS. 19 | The package also use dataclasses but with the python version 3.7 and above, dataclasses are in-built. 20 | In case your execution environment complains about dataclasses, you may install version 0.8 explicitly. 21 | 22 | ### Check Dependencies 23 | 1. python3 24 | ``` 25 | python3 --version 26 | pip3 --version 27 | ``` 28 | 29 | If not installed, please follow the steps below to install python3 and pip. 30 | 31 | ### Install Dependecies 32 | * python3 33 | ``` 34 | sudo apt install python3 python3-pip 35 | ``` 36 | 37 | Note: Please check whether you have latest pip3 version. If not, please upgrade pip3 using below command: 38 | ``` 39 | python -m pip install --upgrade pip 40 | ``` 41 | 42 | * wheel 43 | Run the below command from project root directory. 44 | ``` 45 | pip3 install wheel==0.36.2 46 | ``` 47 | 48 | * pycryptodome 49 | ``` 50 | pip3 install pycryptodome==3.10.1 51 | ``` 52 | Note: 'pycryptodome' will not work along with 'pycrypto'. If any of your other project have 'pycrypto' dependency, please setup virtual environment and install 'wheel', 'pycose' and 'pycryptodome' in virtual environment or if 'pycrypto' is not required, please run below command. 53 | ``` 54 | pip3 uninstall pycrypto 55 | ``` 56 | 57 | * cryptography 58 | ``` 59 | pip3 install cryptography==3.4.7 60 | ``` 61 | 62 | * QCC710-KDF 63 | Go to QCC710-KDF project root directory. 64 | ``` 65 | cd QCC710-KDF 66 | ``` 67 | Run the below command from project root directory. 68 | ``` 69 | pip3 install -e . 70 | ``` 71 | 72 | ### Execute secure_wrap.py 73 | Go to securewrap folder in QCC710-SecureWrap. 74 | ``` 75 | cd QCC710-SecureWrap/securewrap 76 | ``` 77 | Run the below command. 78 | ``` 79 | python3 secure_wrap.py -j config.json -o outputfile 80 | ``` -------------------------------------------------------------------------------- /rot/tools/QCC710-SecureWrap/securewrap/config.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "entity_dev_fact_prov_key" : "4d98ff3e037eb574256434560ffa0778099d7cfac47cf5e42a2ec58fb24a0c8e", 4 | "oem_batch_secret" : "44e4d455369676e61747572654b65795", 5 | "batch_secret_wrapping_key" : "021f23aff0dcbe4bd411d1f4f92ec5eb54c25d0b6484df339104688728c5fc44", 6 | "NISTKDFContext" : { 7 | "oem_product_seed" : "f0f0a5a5f0f0a5a5f0f0a5a5f0f0a5a5", 8 | "is_oem_lcs_activated" : true, 9 | "oem_lcs" : 2 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /rot/tools/QCC710-Signing/cert_qcc710.py: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (c) 2020-2021 Qualcomm Technologies, Inc. 3 | # All Rights Reserved. 4 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 5 | # ============================================================================== 6 | import argparse 7 | import os 8 | from pathlib import Path 9 | 10 | 11 | class CertQCC710(object): 12 | """ 13 | Class to create the QCC710 certificates. 14 | """ 15 | TEMP_PATH = 'target' 16 | 17 | def __init__(self, tool_path, privkey, pubkey): 18 | """ 19 | Initializer for the CertQCC710 class. 20 | 21 | :param tool_path: Path to the JAR backend. 22 | :param privkey: Private key file. 23 | :param pubkey: Public key file. 24 | """ 25 | self.tool_path = tool_path 26 | self.privkey = privkey 27 | self.pubkey = pubkey 28 | 29 | def generate(self, cert_config, output): 30 | """ 31 | Creates a certificate binary. 32 | 33 | :param cert_config: JSON configuration file for the certificate. 34 | :param output: Name of the generated certificates. 35 | """ 36 | out_path = Path(output) 37 | 38 | # Command parameters 39 | command = [ 40 | f'java', 41 | f'-cp "{self.tool_path}"', 42 | f'GenerateEntitlementCertificate', 43 | f'--cert "{cert_config}"', 44 | f'--privkey "{self.privkey}"', 45 | f'--pubkey "{self.pubkey}"', 46 | f'--out "{out_path.parent / out_path.stem}"', 47 | f'--logLevel ERROR', 48 | ] 49 | command = ' '.join(command) 50 | 51 | # Make sure the path exists. 52 | out_path.parent.mkdir(parents=True, exist_ok=True) 53 | 54 | # Execute the tool. 55 | if os.system(command): 56 | print(f'\nError executing tool: {command}\n') 57 | raise Exception('Error executing tool') 58 | 59 | # Clean up generated files 60 | try: 61 | os.remove(os.path.join(self.TEMP_PATH, 'rolling.log')) 62 | os.rmdir(self.TEMP_PATH) 63 | except: 64 | pass 65 | 66 | 67 | def main(): 68 | # Parse the command line arguments. 69 | parser = argparse.ArgumentParser(description='Generate OEM Root Entitlement certificate for QCC710.') 70 | parser.add_argument('-p', '--tool_path', default='./signing-tool-backend-all-1.0.1.jar', help='Path to JAR backend.') 71 | parser.add_argument('--privkey', required=True, help='Private key file.') 72 | parser.add_argument('--pubkey', required=True, help='Public key file.') 73 | parser.add_argument('-c', '--cert', required=True, help='Certificate input file.') 74 | parser.add_argument('-o', '--output', help='Output files prefix (defaults to CWD and the name of the JSON file).') 75 | args = parser.parse_args() 76 | 77 | # Build the cert object 78 | cert = CertQCC710(args.tool_path, args.privkey, args.pubkey) 79 | 80 | # Generate the cert with the given output path 81 | output = args.output if args.output is not None else Path(args.cert).stem 82 | cert.generate(args.cert, output) 83 | 84 | 85 | if __name__ == "__main__": 86 | main() 87 | -------------------------------------------------------------------------------- /rot/tools/QCC710-Signing/config/OEM-IAR-BMHT.json: -------------------------------------------------------------------------------- 1 | { 2 | "SvcImageAuthentication" : { 3 | "CmdMinorVersion" : "0x1", 4 | "CmdMajorVersion" : "0x1", 5 | "CmdSigningAlgorithmId" : "ECDSA_P521_SHA512", 6 | "ImageDescriptor" : { 7 | "SecurityVersion" : 1, 8 | "SoftwareComponentIdentifier" : "TME_SIGNED_CMD_SWID", 9 | "MeasurementRegisterTarget" : "NA", 10 | "HashValues" : { 11 | "AlgorithmIdentifier" : "SHA_512", 12 | "HashArray" : "" 13 | }, 14 | "ChipConstraints": { 15 | "OemRcHash" : { 16 | "AlgorithmIdentifier" : "SHA_512", 17 | "HashArray" : "24c92948f23b38f6d609cb07a1429e431f56a749cf2b2acd083e5a2bf787fc9132ef3c4166d09d248c2ee5441d16216fdb3d517413d822f009e1995e04475471" 18 | } 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /rot/tools/QCC710-Signing/config/OEM-REC-QCC710.json: -------------------------------------------------------------------------------- 1 | { 2 | "CertificateVersion": 1, 3 | "KeyIdentifier": "OEM_ENTITLEMENT_ROOT_KID", 4 | "AlgorithmIdentifier": "ECDSA_P521_SHA512", 5 | "Entitlements": { 6 | "OemRootEntitlement": { 7 | "InstanceVersion": 1, 8 | "Attributes": [ 9 | "IS_DELEGATE_K_TEST" 10 | ], 11 | "ChipConstraints": { 12 | "RootKeysetVersion": 1 13 | }, 14 | "InstantiationConstraints": [ 15 | "IS_OEM_RC_HASH_BOUND", 16 | "IS_FINGERPRINT_BOUND" 17 | ] 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /rot/tools/QCC710-Signing/signing-tool-backend-all-1.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quic/qccsdk-qcc711/5b3c8add6f3c67a36042c2d59370ea9432e5dea1/rot/tools/QCC710-Signing/signing-tool-backend-all-1.0.1.jar --------------------------------------------------------------------------------