Igor Kovalenko wrote:
Right. For sparc64 we copy mappings from hardware tables set up by asm bootstrap code using a walk over hardware translations. Most of bootstrap mappings are locked into tlb so we do not really need to handle translations for them. Instead we use bootstrap mappings to keep client from allocating memory in those spaces. For other architectures I think we can do the same in arch-specific way (probably walk code can be reused?)
Yeah. One of the frustrations I have found (resulting in the recent cleanup) was that each arch was taken from a set of core routines and then customised in order to make it boot. Sadly this has resulted in fixes being fragmented across the code base and a lot of very-similar-but-not-quite code duplication :(
I would say that looking to the future, we should focus on enhancing and defining the arch-specific APIs and make the changes benefit everyone rather than just one specific arch.
ATB,
Mark.