*/
#include <common.h>
+#include <addr_map.h>
#include <cpu_func.h>
#include <cros_ec.h>
#include <dm.h>
return 0;
}
#endif
+
+int init_addr_map(void)
+{
+ if (IS_ENABLED(CONFIG_ADDR_MAP))
+ addrmap_set_entry(0, 0, CONFIG_SYS_SDRAM_SIZE, 0);
+
+ return 0;
+}
CONFIG_WDT_SANDBOX=y
CONFIG_FS_CBFS=y
CONFIG_FS_CRAMFS=y
+CONFIG_ADDR_MAP=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ECDSA=y
CONFIG_ECDSA_VERIFY=y
unsigned long vaddr;
};
+#ifdef CONFIG_ADDR_MAP
extern struct addrmap address_map[CONFIG_SYS_NUM_ADDR_MAP];
+#endif
phys_addr_t addrmap_virt_to_phys(void *vaddr);
void *addrmap_phys_to_virt(phys_addr_t paddr);
#include <common.h>
#include <addr_map.h>
+#include <mapmem.h>
struct addrmap address_map[CONFIG_SYS_NUM_ADDR_MAP];
if (address_map[i].size == 0)
continue;
- addr = (u64)((u32)vaddr);
+ addr = map_to_sysmem(vaddr);
base = (u64)(address_map[i].vaddr);
upper = (u64)(address_map[i].size) + base - 1;
offset = address_map[i].paddr - address_map[i].vaddr;
- return (void *)(unsigned long)(paddr - offset);
+ return map_sysmem(paddr - offset, 0);
}
}
int do_ut_addrmap(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- struct unit_test *tests = ll_entry_start(struct unit_test,
- addrmap_test);
- const int n_ents = ll_entry_count(struct unit_test, addrmap_test);
+ struct unit_test *tests = UNIT_TEST_SUITE_START(addrmap_test);
+ const int n_ents = UNIT_TEST_SUITE_COUNT(addrmap_test);
return cmd_ut_category("cmd_addrmap", "cmd_addrmap_", tests, n_ents,
argc, argv);