summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
cb90d32)
simplifies the API and there is only one remaining user at this point.
Is the implementation busted where the check does not actually happen
now?
Change-Id: I776a43766f5576a08df320f6fe41a2750d101bde
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/264
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
for (int i = 0; i < in_num_fields; i++)
{
struct scan_field *field = &in_fields[i];
for (int i = 0; i < in_num_fields; i++)
{
struct scan_field *field = &in_fields[i];
- field->allocated = 0;
- field->modified = 0;
- if (field->check_value || field->in_value)
- continue;
- interface_jtag_add_scan_check_alloc(field);
- field->modified = 1;
+ /* caller must provide in_buffer if needed for callback */
+ assert((field->check_value == NULL) || (field->in_value != NULL));
}
jtag_add_scan(active, in_num_fields, in_fields, state);
}
jtag_add_scan(active, in_num_fields, in_fields, state);
(jtag_callback_data_t)in_fields[i].check_mask,
(jtag_callback_data_t)in_fields[i].num_bits);
}
(jtag_callback_data_t)in_fields[i].check_mask,
(jtag_callback_data_t)in_fields[i].num_bits);
}
- if (in_fields[i].allocated)
- {
- free(in_fields[i].in_value);
- }
- if (in_fields[i].modified)
- {
- in_fields[i].in_value = NULL;
- }
*
* In addition, this structure includes a value and mask that is used by
* jtag_add_dr_scan_check() to validate the value that was scanned out.
*
* In addition, this structure includes a value and mask that is used by
* jtag_add_dr_scan_check() to validate the value that was scanned out.
- *
- * The allocated, modified, and intmp fields are internal work space.
*/
struct scan_field {
/// The number of bits this field specifies (up to 32)
*/
struct scan_field {
/// The number of bits this field specifies (up to 32)
uint8_t* check_value;
/// The mask to go with check_value
uint8_t* check_mask;
uint8_t* check_value;
/// The mask to go with check_value
uint8_t* check_mask;
-
- /// in_value has been allocated for the queue
- int allocated;
- /// Indicates we modified the in_value.
- int modified;
- /// temporary storage for performing value checks synchronously
- uint8_t intmp[4];
#include <jtag/jtag_minidriver.h>
#include <jtag/jtag_minidriver.h>
-static inline void interface_jtag_alloc_in_value32(struct scan_field *field)
-{
- field->in_value = field->intmp;
-}
-
-static inline void interface_jtag_add_scan_check_alloc(struct scan_field *field)
-{
- /* We're executing this synchronously, so try to use local storage. */
- if (field->num_bits > 32)
- {
- unsigned num_bytes = DIV_ROUND_UP(field->num_bits, 8);
- field->in_value = (uint8_t *)malloc(num_bytes);
- field->allocated = 1;
- }
- else
- field->in_value = field->intmp;
-}
-
static inline void jtag_add_dr_out(struct jtag_tap* tap,
int num_fields, const int* num_bits, const uint32_t* value,
tap_state_t end_state)
static inline void jtag_add_dr_out(struct jtag_tap* tap,
int num_fields, const int* num_bits, const uint32_t* value,
tap_state_t end_state)
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)