target/xtensa: avoid IHI for writes to non-executable memory
[openocd.git] / src / jtag / drivers / versaloon / versaloon_internal.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4 * Copyright (C) 2009 - 2010 by Simon Qian <SimonQian@SimonQian.com> *
5 ***************************************************************************/
6
7 #ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H
8 #define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H
9
10 #define VERSALOON_PRODUCTSTRING_INDEX 2
11 #define VERSALOON_SERIALSTRING_INDEX 3
12
13 #define VERSALOON_PRODUCTSTRING "Versaloon"
14
15 #define VERSALOON_VID 0x0483
16 #define VERSALOON_PID 0xA038
17 #define VERSALOON_INP 0x82
18 #define VERSALOON_OUTP 0x03
19 #define VERSALOON_IFACE 0x00
20
21 #define VERSALOON_FULL 1
22 #define VERSALOON_MINI 2
23 #define VERSALOON_NANO 3
24
25 #define VERSALOON_TIMEOUT 5000
26 #define VERSALOON_TIMEOUT_LONG 60000
27
28 /* USB Commands */
29 /* Common Commands */
30 #define VERSALOON_COMMON_CMD_START 0x00
31 #define VERSALOON_COMMON_CMD_END 0x0F
32
33 #define VERSALOON_GET_INFO 0x00
34 #define VERSALOON_GET_TVCC 0x01
35 #define VERSALOON_GET_HARDWARE 0x02
36 #define VERSALOON_GET_OFFLINE_SIZE 0x08
37 #define VERSALOON_ERASE_OFFLINE_DATA 0x09
38 #define VERSALOON_WRITE_OFFLINE_DATA 0x0A
39 #define VERSALOON_GET_OFFLINE_CHECKSUM 0x0B
40 #define VERSALOON_FW_UPDATE 0x0F
41 #define VERSALOON_FW_UPDATE_KEY 0xAA
42
43 /* MCU Command */
44 #define VERSALOON_MCU_CMD_START 0x10
45 #define VERSALOON_MCU_CMD_END 0x1F
46
47 /* USB_TO_XXX Command */
48 #define VERSALOON_USB_TO_XXX_CMD_START 0x20
49 #define VERSALOON_USB_TO_XXX_CMD_END 0x7F
50
51 /* VSLLink Command */
52 #define VERSALOON_VSLLINK_CMD_START 0x80
53 #define VERSALOON_VSLLINK_CMD_END 0xFF
54
55 /* Mass-product */
56 #define MP_OK 0x00
57 #define MP_FAIL 0x01
58
59 #define MP_ISSP 0x11
60
61 /* pending struct */
62 #define VERSALOON_MAX_PENDING_NUMBER 4096
63 typedef RESULT(*versaloon_callback_t)(void *, uint8_t *, uint8_t *);
64 struct versaloon_want_pos_t {
65 uint16_t offset;
66 uint16_t size;
67 uint8_t *buff;
68 struct versaloon_want_pos_t *next;
69 };
70 struct versaloon_pending_t {
71 uint8_t type;
72 uint8_t cmd;
73 uint16_t want_data_pos;
74 uint16_t want_data_size;
75 uint16_t actual_data_size;
76 uint8_t *data_buffer;
77 uint8_t collect;
78 uint32_t id;
79 struct versaloon_want_pos_t *pos;
80 void *extra_data;
81 versaloon_callback_t callback;
82 };
83 extern struct versaloon_pending_t
84 versaloon_pending[VERSALOON_MAX_PENDING_NUMBER];
85 extern uint16_t versaloon_pending_idx;
86 void versaloon_set_pending_id(uint32_t id);
87 void versaloon_set_callback(versaloon_callback_t callback);
88 void versaloon_set_extra_data(void *p);
89 RESULT versaloon_add_want_pos(uint16_t offset, uint16_t size, uint8_t *buff);
90 RESULT versaloon_add_pending(uint8_t type, uint8_t cmd, uint16_t actual_szie,
91 uint16_t want_pos, uint16_t want_size, uint8_t *buffer, uint8_t collect);
92 void versaloon_free_want_pos(void);
93
94 RESULT versaloon_send_command(uint16_t out_len, uint16_t *inlen);
95 extern uint8_t *versaloon_buf;
96 extern uint8_t *versaloon_cmd_buf;
97 extern uint16_t versaloon_buf_size;
98
99 #endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H */

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)