I would have guessed that line 137 comment is wrong.
137: ldmia r4!, {r1,r2,r3} /* # of sections, PA|attr, VA */
(2b loop)
131: str r3, [r0, r2]
Where r0 is the startup page table, r2 is the VA offset into table and
r3 is the PA|attr to be put in the table.
--Mark Tinguely