Considering the feedback, I think we may do the following here: 1. Rename the device variable to S2_noncacheable to represent if the S2 is going to be marked non cacheable. Otherwise S2 will be mapped NORMAL. 2. Detect what PFN has to be marked S2_noncacheable. If a PFN is not in the kernel map, mark as S2 except for PFNMAP + VMA cacheable.Q: 'mark as S2 except'... should be 'mark as S2_noncacheable' ?
3. Prohibit cacheable PFNMAP if hardware doesn't support FWB and CACHE DIC. 4. Prohibit S2 non cached mapping for cacheable VMA for all cases, whether pre-FWB hardware or not.