.. | .. |
---|
1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
---|
2 | 1 | /* |
---|
3 | 2 | * HND Run Time Environment debug info area |
---|
4 | 3 | * |
---|
5 | | - * Copyright (C) 1999-2019, Broadcom Corporation |
---|
6 | | - * |
---|
| 4 | + * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation |
---|
| 5 | + * |
---|
| 6 | + * Copyright (C) 1999-2017, Broadcom Corporation |
---|
| 7 | + * |
---|
7 | 8 | * Unless you and Broadcom execute a separate written software license |
---|
8 | 9 | * agreement governing use of this software, this software is licensed to you |
---|
9 | 10 | * under the terms of the GNU General Public License version 2 (the "GPL"), |
---|
10 | 11 | * available at http://www.broadcom.com/licenses/GPLv2.php, with the |
---|
11 | 12 | * following added to such license: |
---|
12 | | - * |
---|
| 13 | + * |
---|
13 | 14 | * As a special exception, the copyright holders of this software give you |
---|
14 | 15 | * permission to link this software with independent modules, and to copy and |
---|
15 | 16 | * distribute the resulting executable under terms of your choice, provided that |
---|
.. | .. |
---|
17 | 18 | * the license of that module. An independent module is a module which is not |
---|
18 | 19 | * derived from this software. The special exception does not apply to any |
---|
19 | 20 | * modifications of the software. |
---|
20 | | - * |
---|
| 21 | + * |
---|
21 | 22 | * Notwithstanding the above, under no circumstances may you combine this |
---|
22 | 23 | * software in any way with any other Broadcom software provided under a license |
---|
23 | 24 | * other than the GPL, without Broadcom's express prior written consent. |
---|
.. | .. |
---|
25 | 26 | * |
---|
26 | 27 | * <<Broadcom-WL-IPTag/Open:>> |
---|
27 | 28 | * |
---|
28 | | - * $Id: hnd_debug.h 561108 2015-06-03 09:20:16Z $ |
---|
| 29 | + * $Id: hnd_debug.h 688714 2017-03-07 12:15:33Z $ |
---|
29 | 30 | */ |
---|
30 | 31 | |
---|
31 | 32 | #ifndef _HND_DEBUG_H |
---|
.. | .. |
---|
48 | 49 | |
---|
49 | 50 | #ifdef FWID |
---|
50 | 51 | extern uint32 gFWID; |
---|
51 | | -#endif |
---|
| 52 | +#endif // endif |
---|
52 | 53 | |
---|
53 | 54 | /* Define pointers for use on other systems */ |
---|
54 | 55 | #define _HD_EVLOG_P uint32 |
---|
.. | .. |
---|
77 | 78 | uint32 ram_size; |
---|
78 | 79 | } hnd_ramsize_ptr_t; |
---|
79 | 80 | |
---|
| 81 | +#define HND_DEBUG_EPIVERS_MAX_STR_LEN 32 |
---|
| 82 | +#define HND_DEBUG_BUILD_SIGNATURE_FWID_LEN 17 |
---|
| 83 | +#define HND_DEBUG_BUILD_SIGNATURE_VER_LEN 22 |
---|
80 | 84 | typedef struct hnd_debug { |
---|
81 | 85 | uint32 magic; |
---|
82 | 86 | #define HND_DEBUG_MAGIC 0x47424544 /* 'DEBG' */ |
---|
.. | .. |
---|
85 | 89 | #define HND_DEBUG_VERSION 1 |
---|
86 | 90 | |
---|
87 | 91 | uint32 fwid; /* 4 bytes of fw info */ |
---|
88 | | - char epivers[32]; |
---|
| 92 | + char epivers[HND_DEBUG_EPIVERS_MAX_STR_LEN]; |
---|
89 | 93 | |
---|
90 | 94 | _HD_TRAP_P trap_ptr; /* trap_t data struct */ |
---|
91 | 95 | _HD_CONS_P console; /* Console */ |
---|
.. | .. |
---|
97 | 101 | uint32 rom_size; |
---|
98 | 102 | |
---|
99 | 103 | _HD_EVLOG_P event_log_top; |
---|
| 104 | + |
---|
| 105 | + /* To populated fields below, |
---|
| 106 | + * INCLUDE_BUILD_SIGNATURE_IN_SOCRAM needs to be enabled |
---|
| 107 | + */ |
---|
| 108 | + char fwid_signature[HND_DEBUG_BUILD_SIGNATURE_FWID_LEN]; /* fwid=<FWID> */ |
---|
| 109 | + char ver_signature[HND_DEBUG_BUILD_SIGNATURE_VER_LEN]; /* ver=abc.abc.abc.abc */ |
---|
100 | 110 | |
---|
101 | 111 | } hnd_debug_t; |
---|
102 | 112 | |
---|
.. | .. |
---|
111 | 121 | uint32 tv_sec; /* Seconds */ |
---|
112 | 122 | uint32 tv_usec; /* Microseconds */ |
---|
113 | 123 | } timeval_t; |
---|
114 | | - |
---|
115 | 124 | |
---|
116 | 125 | /* Linux/ARM 32 prstatus for notes section */ |
---|
117 | 126 | typedef struct prstatus { |
---|
.. | .. |
---|
133 | 142 | uint32 uregs[18]; |
---|
134 | 143 | int32 pr_fpvalid; /* True if math copro being used. */ |
---|
135 | 144 | } prstatus_t; |
---|
136 | | - |
---|
137 | | -#ifdef __GNUC__ |
---|
138 | | -extern hnd_debug_t *get_hnd_debug_info(void); |
---|
139 | | -#endif /* __GNUC__ */ |
---|
140 | 145 | |
---|
141 | 146 | /* for mkcore and other utilities use */ |
---|
142 | 147 | #define DUMP_INFO_PTR_PTR_0 0x74 |
---|