blob: 808cf0673fed76c622adf789b543dfe544b1e1a9 (
plain)
1
2
3
4
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
*/
#ifndef __MINIDUMP_PRIVATE_H
#define __MINIDUMP_PRIVATE_H
#define MD_REVISION 1
#define SBL_MINIDUMP_SMEM_ID 602
#define MAX_NUM_OF_SS 10
#define MD_SS_HLOS_ID 0
#define SMEM_ENTRY_SIZE 40
/* Bootloader has 16 byte support, 4 bytes reserved for itself */
#define MAX_REGION_NAME_LENGTH 16
#define MD_REGION_VALID ('V' << 24 | 'A' << 16 | 'L' << 8 | 'I' << 0)
#define MD_REGION_INVALID ('I' << 24 | 'N' << 16 | 'V' << 8 | 'A' << 0)
#define MD_REGION_INIT ('I' << 24 | 'N' << 16 | 'I' << 8 | 'T' << 0)
#define MD_REGION_NOINIT 0
#define MD_SS_ENCR_REQ (0 << 24 | 'Y' << 16 | 'E' << 8 | 'S' << 0)
#define MD_SS_ENCR_NOTREQ (0 << 24 | 0 << 16 | 'N' << 8 | 'R' << 0)
#define MD_SS_ENCR_NONE ('N' << 24 | 'O' << 16 | 'N' << 8 | 'E' << 0)
#define MD_SS_ENCR_DONE ('D' << 24 | 'O' << 16 | 'N' << 8 | 'E' << 0)
#define MD_SS_ENCR_START ('S' << 24 | 'T' << 16 | 'R' << 8 | 'T' << 0)
#define MD_SS_ENABLED ('E' << 24 | 'N' << 16 | 'B' << 8 | 'L' << 0)
#define MD_SS_DISABLED ('D' << 24 | 'S' << 16 | 'B' << 8 | 'L' << 0)
/**
* md_ss_region - Minidump region
* @name : Name of the region to be dumped
* @seq_num: : Use to differentiate regions with same name.
* @md_valid : This entry to be dumped (if set to 1)
* @region_base_address : Physical address of region to be dumped
* @region_size : Size of the region
*/
struct md_ss_region {
char name[MAX_REGION_NAME_LENGTH];
u32 seq_num;
u32 md_valid;
u64 region_base_address;
u64 region_size;
};
/**
* md_ss_toc: Sub system SMEM Table of content
* @md_ss_toc_init : SS toc init status
* @md_ss_enable_status : if set to 1, Bootloader would dump this SS regions
* @encryption_status: Encryption status for this subsystem
* @encryption_required : Decides to encrypt the SS regions or not
* @ss_region_count : Number of regions added in this SS toc
* @md_ss_smem_regions_baseptr : regions base pointer of the Subsystem
*/
struct md_ss_toc {
u32 md_ss_toc_init;
u32 md_ss_enable_status;
u32 encryption_status;
u32 encryption_required;
u32 ss_region_count;
u64 md_ss_smem_regions_baseptr;
};
/**
* md_global_toc: Global Table of Content
* @md_toc_init : Global Minidump init status
* @md_revision : Minidump revision
* @md_enable_status : Minidump enable status
* @md_ss_toc : Array of subsystems toc
*/
struct md_global_toc {
u32 md_toc_init;
u32 md_revision;
u32 md_enable_status;
struct md_ss_toc md_ss_toc[MAX_NUM_OF_SS];
};
#endif
|