#include <stdlib.h>
u32 armv4mmu_translate_va(target_t *target, armv4_5_mmu_common_t *armv4_5_mmu, u32 va, int *type, u32 *cb, int *domain, u32 *ap);
-int armv4_5_mmu_read_physical(target_t *target, armv4_5_mmu_common_t *armv4_5_mmu, u32 address, u32 size, u32 count, u8 *buffer);
-int armv4_5_mmu_write_physical(target_t *target, armv4_5_mmu_common_t *armv4_5_mmu, u32 address, u32 size, u32 count, u8 *buffer);
char* armv4_5_mmu_page_type_names[] =
{
4, 1, (u8*)&first_lvl_descriptor);
first_lvl_descriptor = target_buffer_get_u32(target, (u8*)&first_lvl_descriptor);
- DEBUG("1st lvl desc: %8.8x", first_lvl_descriptor);
+ LOG_DEBUG("1st lvl desc: %8.8x", first_lvl_descriptor);
if ((first_lvl_descriptor & 0x3) == 0)
{
*type = -1;
- ERROR("Address translation failure");
+ LOG_ERROR("Address translation failure");
return ERROR_TARGET_TRANSLATION_FAULT;
}
if (!armv4_5_mmu->has_tiny_pages && ((first_lvl_descriptor & 0x3) == 3))
{
*type = -1;
- ERROR("Address translation failure");
+ LOG_ERROR("Address translation failure");
return ERROR_TARGET_TRANSLATION_FAULT;
}
second_lvl_descriptor = target_buffer_get_u32(target, (u8*)&second_lvl_descriptor);
- DEBUG("2nd lvl desc: %8.8x", second_lvl_descriptor);
+ LOG_DEBUG("2nd lvl desc: %8.8x", second_lvl_descriptor);
if ((second_lvl_descriptor & 0x3) == 0)
{
*type = -1;
- ERROR("Address translation failure");
+ LOG_ERROR("Address translation failure");
return ERROR_TARGET_TRANSLATION_FAULT;
}
/* should not happen */
*type = -1;
- ERROR("Address translation failure");
+ LOG_ERROR("Address translation failure");
return ERROR_TARGET_TRANSLATION_FAULT;
}