| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Shifting by more than 32 is undefined for 32 bit integers according
to the C standard. Robust solution is conditional code.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
| |
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
|
|
|
|
|
|
| |
And move the rest of the vector_catch stuff into the C file;
it's not part of the module interface.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
| |
Also, switch integrity check over to the correct magic number,
and remove duplicate v4/v5 #define.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
| |
Eventually there should be a v7a init routine, but for now
all that is inlined here.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
| |
Get rid of undesirable and needless exit() calls
from the Cortex-M3 support.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
| |
We no longer need v7A-specific code for this.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
| |
Have ARM11 register the "standard" ARM commands. For now, only
disassembly really works.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
| |
Rename the "armv4_5" command prefix to straight "arm" so it makes
more sense for newer cores. Add a simple compatibility script.
Make sure all the commands give the same "not an ARM" diagnostic
message (and fail properly) when called against non-ARM targets.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
| |
Fix bug noted by Øyvind: terminate the IR length autoscan when
the IR is too long, or otherwise broken.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use size_t instead of uint32_t when specifying file sizes. Update all
consumers up through the layers to use size_t when required. These
changes should be safe, but the higher-levels will need to be updated
further to receive the intended benefits (i.e. large file support).
Add error checking for fileio_read and file_write. Previously, all
errors were being silently ignored, so this change might cause some
problems for some people in some cases. However, it gives us the chance
to handle any errors that do occur at higher-levels, rather than burying
our heads in the sand.
|
|
|
|
|
|
| |
Add const keyword to file url and cast to free().
Make size an ssize_t and chase all format strings that use it.
|
|
|
|
|
|
|
| |
Uses unsigned type to pass line numbers.
Use uint64_t to pass sleep routines their milliseconds. Updates sleep
routines to use this type and improve whitespace.
|
|
|
|
| |
The jim_register command just needed to use the type defined by jim.h.
|
| |
|
|
|
|
|
| |
The getopt_long call allows a const struct option, so mark ours
const too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tweak "standard" ARM disassembler diagnostics to fail if the target
is not "an ARM" (vs. not "an ARMV4/5"), so it makes more sense for
cores inheriting this as the "generic" disassembler.
Also, to use the Thumb2 entry instead of the original Thumb entry.
This makes it work better for both newer cores (which support those
added instructions) and for BL and BLX instructions on older cores.
(Those instructions are 32-bits, which requires curious state-aware
code to go through a 16-bit decode interface...)
Plus minor cleanups, notably to have fewer exit paths and to make
sure they all return failure codes.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
| |
No point in multiple includes, and that file doesn't
use its functions any more.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
| |
They're really too big to inline, at least for code that's
not in any performance-critical loops.
Also move the associated string table to the rodata section.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
| |
The "improve inline binarybuffer helpers" mis-handled bytes
with the high bit set; treat them as unsigned, not signed.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
| |
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
| |
Don't include it in more headers than necessary; just
use it in the few files that actually need it.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
|
|
|
|
|
|
|
|
| |
The ARRAY_SIZE macro was defined in several target files, so move it
to types.h.
This patch also removes two other identical macros: DIM (from jtag.h)
and asizeof (from arm11.h).
|
|
|
|
|
|
| |
Eliminate redundant check that gets covered by using unsigned type.
Created to eliminate noise from subsequent patches, but this kind of
conversion will be beneficial in similar ways throughout the tree.
|
|
|
|
| |
Use DIV_ROUND_UP(n, 8) instead of TAP_SCAN_BYTES macro.
|
|
|
|
|
| |
Improves the name of this macro, moves it to types.h, and adds a block
of Doxygen comments to describe what it does.
|
|
|
|
|
|
| |
The container_of macro is useful as a general solution. It belongs
in types.h, rather than target.h where it was introduced. Requires
the offsetof macro, which comes from <stddef.h> (moved as well).
|
|
|
|
|
| |
Use COMMAND_HELPER macro to define nand_command_get_device_by_num.
Use CALL_COMMAND_HANDLER to invoke it.
|
|
|
|
|
| |
Use COMMAND_HELPER macro to declare flash_command_get_bank_by_num.
This is required for COMMAND_PARSE_NUMBER macro.
|
|
|
|
|
| |
Remove two vestigial externs from our JTAG minidriver source files.
Also, removes many extra blank lines from the minidummy driver.
|
|
|
|
|
|
|
|
|
|
|
| |
Add the 'nand verify' command to perform a dump and fake-write
simultaneously, checking the read bits against those generated by the
write process. Appropriate user documentation for this command has
been added to the user guide as well.
The algorithm presently makes a relatively naive comparison. Some chips
that use ECC may not verify correctly using this implementation, but the
new documentation provides details about this limitation.
|
|
|
|
|
|
|
| |
In some cases, the FILEIO_NONE access mode may be useful as a parameter
to indicate that file access should be disabled. High-level routines can
use it to skip file access calls, as 'fileio_open' will fail presently
if called to open a file using this mode.
|
|
|
|
|
|
|
|
|
|
|
| |
This patch eliminates duplicated code in the the NAND 'dump' and 'write'
by using the new static helper functions.
These changes also fix a possible memory leak in nand dump command, in
the case that the dump file failed to open.
Overall, the changes should be functionally equivalent, but the
resulting code will be easier to improve and extend further.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch provides helpers APIs that will eliminate duplicated code in
the the NAND 'dump' and 'write' commands by factoring their common code
into static helper functions. These helpers may be useful for creating
new commands, as shown in the final patch to 'verify' flash from a file.
Several previously unreported error conditions now generate messages and
propogate the return codes, such as when the file fails to open and bad
arguments are given. These changes will fix a possible memory leak in
nand dump command, in the case that the dump file failed to open.
Overall, the changes should be functionally equivalent, but the
resulting code will be easier to improve and extend consistently.
|
|
|
|
|
| |
Adds Doxygen documentation for a number of the binarybuffer APIs,
including "unexpected" behavior exposed during review on the list.
|
|
|
|
| |
Use void*, unsigned, and bool types with inline helpers.
|
|
|
|
|
| |
Use void * and unsigned types for buffer and their sizes.
Allows it to be used with more than uint8_t * without casts.
|
|
|
|
| |
Use memset instead of loop. Improve types, using void * and unsigned.
|
|
|
|
|
| |
Use memcpy for bulk of copy, improve final byte handling.
Improve types by using void * for buffers and unsigned for size.
|
|
|
|
|
|
|
|
| |
Rewrite buf_cmp to use memcpy for bulk of comparison. Add static
helper to perform comparison of trailing byte, which uses another
static helper to perform a maksed comparison. The masked comparison
helper is used by the buf_cmp_mask to simplify its loop.
Improve types to use void *, unsigned, and return bool.
|
|
|
|
|
| |
Improve types: use void * and unsigned. Move all variables to point of
first use. Move radix guessing logic to new str_radix_guess helper.
|
|
|
|
| |
Reduce some noise from subsequent patches.
|