sandbox: Update cpu to use logging
Use log_debug() instead of including the function name in the string. Add one more debug for PCI. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -109,8 +109,8 @@ void *phys_to_virt(phys_addr_t paddr)
|
|||||||
state = state_get_current();
|
state = state_get_current();
|
||||||
list_for_each_entry(mentry, &state->mapmem_head, sibling_node) {
|
list_for_each_entry(mentry, &state->mapmem_head, sibling_node) {
|
||||||
if (mentry->tag == paddr) {
|
if (mentry->tag == paddr) {
|
||||||
debug("%s: Used map from %lx to %p\n", __func__,
|
log_debug("Used map from %lx to %p\n", (ulong)paddr,
|
||||||
(ulong)paddr, mentry->ptr);
|
mentry->ptr);
|
||||||
return mentry->ptr;
|
return mentry->ptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -130,11 +130,12 @@ struct sandbox_mapmem_entry *find_tag(const void *ptr)
|
|||||||
|
|
||||||
list_for_each_entry(mentry, &state->mapmem_head, sibling_node) {
|
list_for_each_entry(mentry, &state->mapmem_head, sibling_node) {
|
||||||
if (mentry->ptr == ptr) {
|
if (mentry->ptr == ptr) {
|
||||||
debug("%s: Used map from %p to %lx\n", __func__, ptr,
|
log_debug("Used map from %p to %lx\n", ptr,
|
||||||
mentry->tag);
|
mentry->tag);
|
||||||
return mentry;
|
return mentry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +157,7 @@ phys_addr_t virt_to_phys(void *ptr)
|
|||||||
__func__, ptr, (ulong)gd->ram_size);
|
__func__, ptr, (ulong)gd->ram_size);
|
||||||
os_abort();
|
os_abort();
|
||||||
}
|
}
|
||||||
debug("%s: Used map from %p to %lx\n", __func__, ptr, mentry->tag);
|
log_debug("Used map from %p to %lx\n", ptr, mentry->tag);
|
||||||
|
|
||||||
return mentry->tag;
|
return mentry->tag;
|
||||||
}
|
}
|
||||||
@@ -174,6 +175,7 @@ void *map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
|
|||||||
__func__, (uint)paddr, len, plen);
|
__func__, (uint)paddr, len, plen);
|
||||||
}
|
}
|
||||||
map_len = len;
|
map_len = len;
|
||||||
|
log_debug("pci map %lx -> %p\n", (ulong)paddr, ptr);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -218,7 +220,7 @@ phys_addr_t map_to_sysmem(const void *ptr)
|
|||||||
mentry->tag = state->next_tag++;
|
mentry->tag = state->next_tag++;
|
||||||
mentry->ptr = (void *)ptr;
|
mentry->ptr = (void *)ptr;
|
||||||
list_add_tail(&mentry->sibling_node, &state->mapmem_head);
|
list_add_tail(&mentry->sibling_node, &state->mapmem_head);
|
||||||
debug("%s: Added map from %p to %lx\n", __func__, ptr,
|
log_debug("Added map from %p to %lx\n", ptr,
|
||||||
(ulong)mentry->tag);
|
(ulong)mentry->tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user