OLD | NEW |
1 //------------------------------------------------------------------------------ | 1 //------------------------------------------------------------------------------ |
2 // <copyright file="bmi_msg.h" company="Atheros"> | 2 // Copyright (c) 2004-2010 Atheros Corporation. All rights reserved. |
3 // Copyright (c) 2004-2009 Atheros Corporation. All rights reserved. | |
4 // | |
5 // This program is free software; you can redistribute it and/or modify | |
6 // it under the terms of the GNU General Public License version 2 as | |
7 // published by the Free Software Foundation; | |
8 // | |
9 // Software distributed under the License is distributed on an "AS | |
10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | |
11 // implied. See the License for the specific language governing | |
12 // rights and limitations under the License. | |
13 // | 3 // |
14 // | 4 // |
| 5 // Permission to use, copy, modify, and/or distribute this software for any |
| 6 // purpose with or without fee is hereby granted, provided that the above |
| 7 // copyright notice and this permission notice appear in all copies. |
| 8 // |
| 9 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 10 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 11 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 12 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 13 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 14 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 // |
| 17 // |
| 18 // |
| 19 // Author(s): ="Atheros" |
15 //------------------------------------------------------------------------------ | 20 //------------------------------------------------------------------------------ |
16 //============================================================================== | |
17 // Author(s): ="Atheros" | |
18 //============================================================================== | |
19 | 21 |
20 #ifndef __BMI_MSG_H__ | 22 #ifndef __BMI_MSG_H__ |
21 #define __BMI_MSG_H__ | 23 #define __BMI_MSG_H__ |
22 | 24 |
| 25 #ifndef ATH_TARGET |
| 26 #include "athstartpack.h" |
| 27 #endif |
| 28 |
23 /* | 29 /* |
24 * Bootloader Messaging Interface (BMI) | 30 * Bootloader Messaging Interface (BMI) |
25 * | 31 * |
26 * BMI is a very simple messaging interface used during initialization | 32 * BMI is a very simple messaging interface used during initialization |
27 * to read memory, write memory, execute code, and to define an | 33 * to read memory, write memory, execute code, and to define an |
28 * application entry PC. | 34 * application entry PC. |
29 * | 35 * |
30 * It is used to download an application to AR6K, to provide | 36 * It is used to download an application to AR6K, to provide |
31 * patches to code that is already resident on AR6K, and generally | 37 * patches to code that is already resident on AR6K, and generally |
32 * to examine and modify state. The Host has an opportunity to use | 38 * to examine and modify state. The Host has an opportunity to use |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 * Semantics: Fetch the 4-byte Target information | 138 * Semantics: Fetch the 4-byte Target information |
133 * Request format: | 139 * Request format: |
134 * A_UINT32 command (BMI_GET_TARGET_ID/INFO) | 140 * A_UINT32 command (BMI_GET_TARGET_ID/INFO) |
135 * Response format1 (old firmware): | 141 * Response format1 (old firmware): |
136 * A_UINT32 TargetVersionID | 142 * A_UINT32 TargetVersionID |
137 * Response format2 (newer firmware): | 143 * Response format2 (newer firmware): |
138 * A_UINT32 TARGET_VERSION_SENTINAL | 144 * A_UINT32 TARGET_VERSION_SENTINAL |
139 * struct bmi_target_info; | 145 * struct bmi_target_info; |
140 */ | 146 */ |
141 | 147 |
142 struct bmi_target_info { | 148 PREPACK struct bmi_target_info { |
143 A_UINT32 target_info_byte_count; /* size of this structure */ | 149 A_UINT32 target_info_byte_count; /* size of this structure */ |
144 A_UINT32 target_ver; /* Target Version ID */ | 150 A_UINT32 target_ver; /* Target Version ID */ |
145 A_UINT32 target_type; /* Target type */ | 151 A_UINT32 target_type; /* Target type */ |
146 }; | 152 } POSTPACK; |
147 #define TARGET_VERSION_SENTINAL 0xffffffff | 153 #define TARGET_VERSION_SENTINAL 0xffffffff |
148 #define TARGET_TYPE_AR6001 1 | 154 #define TARGET_TYPE_AR6001 1 |
149 #define TARGET_TYPE_AR6002 2 | 155 #define TARGET_TYPE_AR6002 2 |
150 #define TARGET_TYPE_AR6003 3 | 156 #define TARGET_TYPE_AR6003 3 |
151 | 157 |
152 | 158 |
153 #define BMI_ROMPATCH_INSTALL 9 | 159 #define BMI_ROMPATCH_INSTALL 9 |
154 /* | 160 /* |
155 * Semantics: Install a ROM Patch. | 161 * Semantics: Install a ROM Patch. |
156 * Request format: | 162 * Request format: |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 * input stream until another BMI_LZ_STREAM_START is issued. | 227 * input stream until another BMI_LZ_STREAM_START is issued. |
222 * Request format: | 228 * Request format: |
223 * A_UINT32 command (BMI_LZ_DATA) | 229 * A_UINT32 command (BMI_LZ_DATA) |
224 * A_UINT32 length (of compressed data), | 230 * A_UINT32 length (of compressed data), |
225 * at most BMI_DATASZ_MAX | 231 * at most BMI_DATASZ_MAX |
226 * A_UINT8 CompressedData[length] | 232 * A_UINT8 CompressedData[length] |
227 * Response format: none | 233 * Response format: none |
228 * Note: Not supported on all versions of ROM firmware. | 234 * Note: Not supported on all versions of ROM firmware. |
229 */ | 235 */ |
230 | 236 |
| 237 #ifndef ATH_TARGET |
| 238 #include "athendpack.h" |
| 239 #endif |
| 240 |
231 #endif /* __BMI_MSG_H__ */ | 241 #endif /* __BMI_MSG_H__ */ |
OLD | NEW |