- improve some names -- a "default" prefix is not descriptive
- add doxygen @todo entries for some issues
- avr8 isn't ever going to need those MMU hooks
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
.register_commands = avr_register_commands,
.target_create = avr_target_create,
.init_target = avr_init_target,
.register_commands = avr_register_commands,
.target_create = avr_target_create,
.init_target = avr_init_target,
-/*
- .virt2phys = avr_virt2phys,
- .mmu = avr_mmu
-*/
};
int avr_register_commands(struct command_context_s *cmd_ctx)
};
int avr_register_commands(struct command_context_s *cmd_ctx)
-static int default_virt2phys(struct target_s *target, uint32_t virtual, uint32_t *physical)
+static int identity_virt2phys(struct target_s *target,
+ uint32_t virtual, uint32_t *physical)
{
*physical = virtual;
return ERROR_OK;
}
{
*physical = virtual;
return ERROR_OK;
}
-static int default_mmu(struct target_s *target, int *enabled)
+static int no_mmu(struct target_s *target, int *enabled)
{
*enabled = 0;
return ERROR_OK;
{
*enabled = 0;
return ERROR_OK;
-default_read_phys_memory(struct target_s *target, uint32_t address,
+err_read_phys_memory(struct target_s *target, uint32_t address,
uint32_t size, uint32_t count, uint8_t *buffer)
{
LOG_ERROR("Not implemented: %s", __func__);
uint32_t size, uint32_t count, uint8_t *buffer)
{
LOG_ERROR("Not implemented: %s", __func__);
-default_write_phys_memory(struct target_s *target, uint32_t address,
+err_write_phys_memory(struct target_s *target, uint32_t address,
uint32_t size, uint32_t count, uint8_t *buffer)
{
LOG_ERROR("Not implemented: %s", __func__);
uint32_t size, uint32_t count, uint8_t *buffer)
{
LOG_ERROR("Not implemented: %s", __func__);
/* Set up default functions if none are provided by target */
if (target->type->virt2phys == NULL)
{
/* Set up default functions if none are provided by target */
if (target->type->virt2phys == NULL)
{
- target->type->virt2phys = default_virt2phys;
+ target->type->virt2phys = identity_virt2phys;
}
if (target->type->read_phys_memory == NULL)
{
}
if (target->type->read_phys_memory == NULL)
{
- target->type->read_phys_memory = default_read_phys_memory;
+ target->type->read_phys_memory = err_read_phys_memory;
}
if (target->type->write_phys_memory == NULL)
{
}
if (target->type->write_phys_memory == NULL)
{
- target->type->write_phys_memory = default_write_phys_memory;
+ target->type->write_phys_memory = err_write_phys_memory;
+ /**
+ * @todo MCR/MRC are ARM-specific; don't require them in
+ * all targets, or for ARMs without coprocessors.
+ */
if (target->type->mcr == NULL)
{
target->type->mcr = default_mcr;
if (target->type->mcr == NULL)
{
target->type->mcr = default_mcr;
+ /**
+ * @todo get rid of those *memory_imp() methods, now that all
+ * callers are using target_*_memory() accessors ... and make
+ * sure the "physical" paths handle the same issues.
+ */
+
/* a non-invasive way(in terms of patches) to add some code that
* runs before the type->write/read_memory implementation
*/
/* a non-invasive way(in terms of patches) to add some code that
* runs before the type->write/read_memory implementation
*/
if (target->type->mmu == NULL)
{
if (target->type->mmu == NULL)
{
- target->type->mmu = default_mmu;
+ target->type->mmu = no_mmu;
}
target = target->next;
}
}
target = target->next;
}
"loads active fast load image to current target "
"- mainly for profiling purposes");
"loads active fast load image to current target "
"- mainly for profiling purposes");
+ /** @todo don't register virt2phys() unless target supports it */
register_command(cmd_ctx, NULL, "virt2phys",
handle_virt2phys_command, COMMAND_ANY,
"translate a virtual address into a physical address");
register_command(cmd_ctx, NULL, "virt2phys",
handle_virt2phys_command, COMMAND_ANY,
"translate a virtual address into a physical address");
register_command(cmd_ctx, NULL, "reg",
handle_reg_command, COMMAND_EXEC,
"display or set a register");
register_command(cmd_ctx, NULL, "reg",
handle_reg_command, COMMAND_EXEC,
"display or set a register");
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)