<?xml version="1.0" encoding="UTF-8"?>
<!--
===============================================================================

  Copyright (c) 2013-2017 Qualcomm Technologies, Inc.
  All Rights Reserved.
  Confidential and Proprietary - Qualcomm Technologies, Inc.

===============================================================================
-->

<tns:secimage xmlns:tns="http://www.qualcomm.com/secimage"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.qualcomm.com/secimage ../xsd/secimage.xsd">

    <metadata>
        <chipset>rennell</chipset>
        <version>2.0</version>
    </metadata>

    <!--
       See documentation on general_properties below.
    -->
    <general_properties>
        <selected_signer>local_v2</selected_signer>
        <selected_encryptor></selected_encryptor>
        <selected_cert_config>qti_presigned_certs</selected_cert_config>
        <cass_capability>secboot_sha2_pss_subca2</cass_capability>

        <key_size>2048</key_size>
        <exponent>65537</exponent>

        <mrc_index>0</mrc_index>
        <num_root_certs>1</num_root_certs>
        <max_num_root_certs>4</max_num_root_certs>
        <!--
        JTAG IDs:
        0x0012A0E1 - rennell
        0x0012B0E1 - rennell Premier
        0x001490E1 - rennell v1.1
        -->
        <msm_part>0x0012A0E1</msm_part>
        <soc_hw_version>0x600E0100</soc_hw_version>
        <soc_vers>0x600E</soc_vers>
        <in_use_soc_hw_version>enable</in_use_soc_hw_version>
        <oem_id_independent>disable</oem_id_independent>
        <oem_id>0x0000</oem_id>
        <model_id>0x0000</model_id>
        <debug>nop</debug>
        <multi_serial_numbers>
            <!--<serial>0x12345678</serial>-->
        </multi_serial_numbers>

        <secboot_version>3.0</secboot_version>
        <qti_sign>false</qti_sign>
        <oem_sign>true</oem_sign>

        <max_cert_size>2048</max_cert_size>
        <num_certs_in_certchain>3</num_certs_in_certchain>

        <hmac>false</hmac>
        <dsa_type>rsa</dsa_type>
        <rsa_padding>pss</rsa_padding>
        <hash_algorithm>sha256</hash_algorithm>
        <segment_hash_algorithm>sha384</segment_hash_algorithm>
    </general_properties>

    <!--
        ***general_properties***

        The default properties for all images. These properties may be overridden
        per image in the 'images' section below as needed.

        Supported signer are:
        local_v2: use local signer with test keys
        cass: use cass signer with production key

        Supported encryptor are:
        unified_encryption_2_0: supports ELF images. Image must be signed to encrypt

        Capability selected the signing key used. Currently, the following capabilities are supported.
        OEM may obtain additional capabilities from CASS support.

        secboot_sha2_pss_subca2: use SHA256, RSAPSS signed root cert

        If "secboot_sha2_pss_subca2" is selected,the PK_HASH_IN_FUSE needs to be blown,
        and the ROOT CERT HASH below needs to be blown in OEM PK HASH:
        d40eee56f3194665574109a39267724ae7944134cd53cb767e293d3c40497955bc8a4519ff992b031fadc6355015ac87

        key_size: Size (in bits) of the key used for signing.
        exponent: exponent value used in attestation key generation.

        mrc_index: the root index for multiple root certificates (MRC) use case (0-3)
        num_root_certs: Number of root certificates in the certificate chain (1-4)
        root_revoke_activate_enable: enable revocation and activation (in hex)

        msm_part: jtag_id for signing. (in hex)
        soc_hw_version: MSM identifier used for latest family of chips (in hex)
        in_use_soc_hw_version: flag to use JTAG_ID or SOC_HW_VERSION (0 or 1)
        oem_id_independent: flag to set oem_id=0x0001 and model_id=0x0000 (0 or 1)
        oem_id: oem_id for signing. (in hex)
        model_id: model_id for signing. (in hex)
        debug: debug_id for signing. (in hex)
        multi_serial_numbers: serial number list that enable serial binding (in hex)

        max_cert_size: Maximum size (in bytes) of one certificate.
        num_certs_in_certchain: Number of certificates in the certificate chain (2,3)

        UIE_key: Specifies which local key assets to use for encryption.
        uie_key_switch_enable: enable UIE key switch (in hex)
        hmac: use HMAC or SHA256 (in boolean)
        rsa_padding: PKCS1.5 or RSAPSS for signature and certificate chain (pkcs or pss)

        QTI internal: (shall not be modified by customer)
        max_num_root_certs: Maximum number of root certificates allowed (1-4)
        UIE_capability: Specifies which encrypted key assets to retrieve from QTI UIE server and use for encryption.
        UIE_root_key_type: Defaults to 1. Can be set to either 0, 1 or 2 depending on whether RTL QTI, OTP OEM, or OTP QTI root key will be used for encryption
        secboot_version: define ELF image header format (1.0, 2.0, or 3.0)
        oem_sign: enable OEM sig segment (in boolean)
        qti_sign: enable QTI sig segment (in boolean)
    -->

    <parsegen>
        <!--
        Parsegen information by default will be read from parsegen_config.xml.
        Additional image_id's can be included here or existing image_id's may be overwritten
        to be generated with the default image_ids.
        -->
    </parsegen>

    <!-- Signing configurations used by secimage. -->
    <signing>
        <signer_attributes>
            <!--
                Use of CASS signer will require additional license agreement
                and contract. Hardware token is required for access.
            -->
            <cass_signer_attributes>
                <!--
                    keystore_type: PKCS11 (hardware token)
                    token_password: User will be prompted if password
                                    is an empty string
                    token_driver_home: Safenet driver location
                -->
                <user_identity>
                    <keystore_type>PKCS11</keystore_type>
                    <token_password></token_password>
                    <token_driver_home>
                        <windows>C:/WINDOWS/SYSTEM32/eTpkcs11.dll</windows>
                        <linux>/usr/lib/libeTPkcs11.so</linux>
                    </token_driver_home>
                </user_identity>
            </cass_signer_attributes>
        </signer_attributes>
    </signing>

    <post_process>
        <pil_splitter>$(META_BUILD)/common/tools/misc/pil-splitter.py</pil_splitter>
    </post_process>

    <data_provisioning>
        <base_path>./../../resources/data_prov_assets/</base_path>
    </data_provisioning>

    <images_list>
         <image sign_id="secelf" image_type="elf_has_ht" output_file_name="sec.elf">
            <general_properties_overrides>
                <sw_id>0x0000002B</sw_id>
                <anti_rollback_version>0x00000000</anti_rollback_version>
            </general_properties_overrides>
        </image>
    </images_list>

</tns:secimage>
