context_hub: Define target version bytes
Define that the first two previously-reserved bytes in the nanoapp
header are used to indicate the target CHRE API version.
Bug: 64852297
Test: run CHQTS on Nanohub, rebuild test app targeting 1.2 and confirm
it's interpreted correctly
Change-Id: I0582f718bb641cc9c4e1f013578dc2dd50e6d3ec
This commit is contained in:
@@ -47,12 +47,13 @@ __BEGIN_DECLS
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define CONTEXT_HUB_HEADER_MAJOR_VERSION 1
|
#define CONTEXT_HUB_HEADER_MAJOR_VERSION 1
|
||||||
#define CONTEXT_HUB_HEADER_MINOR_VERSION 0
|
#define CONTEXT_HUB_HEADER_MINOR_VERSION 1
|
||||||
#define CONTEXT_HUB_DEVICE_API_VERSION \
|
#define CONTEXT_HUB_DEVICE_API_VERSION \
|
||||||
HARDWARE_DEVICE_API_VERSION(CONTEXT_HUB_HEADER_MAJOR_VERSION, \
|
HARDWARE_DEVICE_API_VERSION(CONTEXT_HUB_HEADER_MAJOR_VERSION, \
|
||||||
CONTEXT_HUB_HEADER_MINOR_VERSION)
|
CONTEXT_HUB_HEADER_MINOR_VERSION)
|
||||||
|
|
||||||
#define CONTEXT_HUB_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION(1, 0)
|
#define CONTEXT_HUB_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION(1, 0)
|
||||||
|
#define CONTEXT_HUB_DEVICE_API_VERSION_1_1 HARDWARE_DEVICE_API_VERSION(1, 1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The id of this module
|
* The id of this module
|
||||||
@@ -131,9 +132,17 @@ struct nano_app_binary_t {
|
|||||||
uint32_t app_version; // Version of the app
|
uint32_t app_version; // Version of the app
|
||||||
uint32_t flags; // Signed, encrypted
|
uint32_t flags; // Signed, encrypted
|
||||||
uint64_t hw_hub_type; // which hub type is this compiled for
|
uint64_t hw_hub_type; // which hub type is this compiled for
|
||||||
uint32_t reserved[2]; // Should be all zeroes
|
|
||||||
uint8_t custom_binary[0]; // start of custom binary data
|
// The version of the CHRE API that this nanoapp was compiled against.
|
||||||
};
|
// If these values are both set to 0, then they must be interpreted the same
|
||||||
|
// as if major version were set to 1, and minor 0 (the first valid CHRE API
|
||||||
|
// version).
|
||||||
|
uint8_t target_chre_api_major_version;
|
||||||
|
uint8_t target_chre_api_minor_version;
|
||||||
|
|
||||||
|
uint8_t reserved[6]; // Should be all zeroes
|
||||||
|
uint8_t custom_binary[0]; // start of custom binary data
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct hub_app_info {
|
struct hub_app_info {
|
||||||
struct hub_app_name_t app_name;
|
struct hub_app_name_t app_name;
|
||||||
|
|||||||
Reference in New Issue
Block a user