Commit 4566b028 authored by Jens Korinth's avatar Jens Korinth
Browse files

Implement plugin interface to modify address map

* all methods starting with "modify_address_map_" in namespace platform
  are automatically called before finalizing the address map, with the
  current address map as a parameter and returning an address map
* this allows for arbitrary modifications of the map
parent d799fa4f
......@@ -125,8 +125,17 @@ namespace eval addressmap {
return $address_map
}
proc apply_address_map_mods {map} {
foreach p [lsort [info commands ::platform::modify_address_map_*]] {
puts " found address map extension proc: $p"
set map [eval {$p} {$map}]
}
return $map
}
proc construct_address_map {{map ""}} {
if {$map == ""} { set map [::platform::get_address_map [::platform::get_pe_base_address]] }
set map [apply_address_map_mods $map]
set seg_i 0
foreach space [get_bd_addr_spaces] {
puts "space: $space"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment