blob: a68541c81b83e2099853b215bc63b9a9789ba851 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/*
2 * include/soc/asr/asr_mflag.h
3 *
4 */
5#ifndef __ASR_MFLAG_H__
6#define __ASR_MFLAG_H__
7
8#include <linux/kernel.h>
9
10#define ASR_MFLAG_OFFSET_FROM_CRASHKERNEL (0x300)
11
12#define AP_DIAG_BUF_SET_MAGIC (0x41504447) /* APDG */
13#define AP_DIAG_BUF_SET_MAGIC2 (0x41504467) /* APDg */
14
15/* resever a 128 bytes(0x300 to 0x380) structure to save asr memory flags */
16struct asr_mflag {
17 u32 reserved1[0x28 / sizeof(u32)];
18
19 u32 diag_buff_magic;
20 u32 diag_buff_addr;
21 u32 diag_buff_len;
22
23 u32 fastboot_flag; /* fast boot mode flag, offset 0x34 */
24 u32 ubifs_error_magic; /* ubifs error magic offset 0x38 */
25 u32 ubifs_error_type; /* ubifs error magic offset 0x3c */
26 u32 reserved2[0x40 / sizeof(u32)];
27} __attribute__ ((__packed__));
28
29extern struct asr_mflag * get_asr_mflag(void);
30#endif
31