On 09/24/2018 01:41 PM, Peter Maydell wrote: > On 19 September 2018 at 11:19, Cédric Le Goater <c...@kaod.org> wrote: >> These are the number of read operations done on the flash memory region : >> >> 922478 ~ 3.5 MBytes OpenBMC U-Boot >> 20569977 ~ 80 MBytes Mainline U-Boot >> >> >> So we are trashing the TBs I would say. Is there a way to increase the >> TB size ? or some other TB parameter ? Is that directly linked to the >> instruction cache size ? > > Well, execution direct from MMIO means we read each instruction > as we execute it -- there's no caching of TBs. (We generate a > temporary TB with a single insn and throw it away after executing > from it.) This is because we can't be sure that we would get the > same data value the next time we read from the address.
In our case, we should have the same data. So may be I can introduce a read-only region with a cache to speed up the accesses. A bit like this was done with the previous mmio inteface. > So we definitely expect things to go slower -- I'm just a little > surprised that we spend so much time executing from flash devices > that aren't in "romd" mode. Yes. it is very slow but some instructions are loaded more than 250.000 times. See below. Thanks, C. count address ... ... 149113 0x28a18 149113 0x28a1c 149113 0x28a20 149113 0x28a24 149113 0x28a28 149113 0x28a2c 149113 0x28a30 149113 0x28a34 149113 0x28a38 149113 0x28a3c 149113 0x28a40 253584 0x288b4 253584 0x288bc 253584 0x288c0 253584 0x288c8 253584 0x288cc 253584 0x288d4 253584 0x288e0 253584 0x288e4 253584 0x288f0 253584 0x288f4 253584 0x288fc 253584 0x28904 253584 0x28908 253584 0x28910 253584 0x28914 253584 0x28920 253584 0x28924 253584 0x28928 253584 0x2892c 253584 0x28934 253584 0x28938 253584 0x2893c 253584 0x28940 253584 0x28944 253584 0x2894c 253584 0x28954 253584 0x28958 253584 0x2895c 253584 0x28960 253584 0x28964 253584 0x28968 253584 0x2896c 253584 0x28970 253584 0x28974 253584 0x28978 253584 0x2897c 253584 0x28980 253584 0x53364 253585 0x288b8 253585 0x288c4 253585 0x288d0 253585 0x288d8 253585 0x288dc 253585 0x288f8 253585 0x28900 253585 0x2890c 253585 0x28918 253585 0x2891c 253585 0x28948 253585 0x53344 253586 0x28930 253586 0x28950 253587 0x288b0 257497 0x53348 277523 0x53354