On 26 February 2014 19:47, Rob Herring <rob.herring@xxxxxxxxxx> wrote: > Tagged addresses would probably be broken in other places as well as I > don't think we handle all of the BranchTo() pseudocode. I'm not sure > anything is using tagged addresses ATM. Yeah, I agree we would need to fix other places too at some point. > I've fixed the above issues and found another issue on v7 LPAE with > the ttbr masking. I believe it to be correct now, but my formula does > not match the pseudocode which is: > > baselowerbound = 3 + tablesize - stride*(3-level) - grainsize; > baseaddress = base<47:baselowerbound>:Zeros(baselowerbound); > > This formula appears to be wrong AFAICT. Take a couple of examples: > > level=1,tablesize=32: 3 + 32 - 12*2 - 9 = 2 (correct value is 5) > level=0,tablesize=48: 3 + 48 - 12*3 - 9 = 6 (correct value is 12) Your examples seem to have the stride and grainsize the wrong way round. grainsize is 16, 14, or 12, and stride is grainsize - 3. So for the first one: 3 + 32 - 9*2 - 12 == 5 and for the second: 3 + 48 - 9*3 - 12 == 12 thanks -- PMM _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm