blob: c9c56d991d936e5d0385149b848e9261c82f096d [file] [log] [blame]
Kaushal Kumarf3b1a192012-07-03 19:48:41 +05301/*
Jeff Hugo5ba15fe2013-05-06 14:24:24 -06002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Kaushal Kumarf3b1a192012-07-03 19:48:41 +05303 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 */
14
15#ifndef __ARCH_ARM_MACH_MSM_SMEM_IFACE_H
16#define __ARCH_ARM_MACH_MSM_SMEM_IFACE_H
17
18#include <mach/msm_smsm.h>
Jeff Hugo5ba15fe2013-05-06 14:24:24 -060019#include <mach/msm_smem.h>
Kaushal Kumarf3b1a192012-07-03 19:48:41 +053020
21#define MAX_KEY_EVENTS 10
22#define MAX_SEC_KEY_PAYLOAD 32
23
24struct boot_shared_ssd_status_info {
25 uint32_t update_status; /* To check if process is successful or not */
26 uint32_t bl_error_code; /* To indicate error code in bootloader */
27};
28
29struct boot_symmetric_key_info {
30 uint32_t key_len; /* Encrypted Symmetric Key Length */
31 uint32_t iv_len; /* Initialization Vector Length */
32 uint8_t key[MAX_SEC_KEY_PAYLOAD]; /* Encrypted Symmetric Key */
33 uint8_t iv[MAX_SEC_KEY_PAYLOAD]; /* Initialization Vector */
34};
35
Kaushal Kumar1f549fc2012-10-04 11:45:32 +053036/* floor_fuse to re-use the fuse bit earlier used by ring_osc */
Kaushal Kumarf3b1a192012-07-03 19:48:41 +053037struct cpr_info_type {
Kaushal Kumar1f549fc2012-10-04 11:45:32 +053038 uint8_t ring_osc; /* CPR FUSE [0]: TURBO RO SEL BIT */
39 uint8_t turbo_quot; /* CPRFUSE[1:7] : TURBO QUOT*/
40 uint8_t pvs_fuse; /* TURBO PVS FUSE */
41 uint8_t floor_fuse; /* Vmin Selection. b1: FAB_ID(2), b0: CPR_fuse[0] */
Kaushal Kumarecfc9182012-10-25 16:17:51 +053042 bool disable_cpr;
Kaushal Kumarf3b1a192012-07-03 19:48:41 +053043};
44
45struct boot_info_for_apps {
46 uint32_t apps_image_start_addr; /* apps image start address */
47 uint32_t boot_flags; /* bit mask of upto 32 flags */
48 struct boot_shared_ssd_status_info ssd_status_info; /* SSD status */
49 struct boot_symmetric_key_info key_info;
50 uint16_t boot_keys_pressed[MAX_KEY_EVENTS]; /* Log of key presses */
51 uint32_t timetick; /* Modem tick timer value before apps out of reset */
52 struct cpr_info_type cpr_info;
Kaushal Kumarecfc9182012-10-25 16:17:51 +053053 uint8_t PAD[23];
Kaushal Kumarf3b1a192012-07-03 19:48:41 +053054};
55
56void msm_smem_get_cpr_info(struct cpr_info_type *cpr_info);
57
58#endif /* __ARCH_ARM_MACH_MSM_SMEM_IFACE_H */