xen/arm64: head: Introduce macros to create table and mapping entry
authorJulien Grall <julien.grall@arm.com>
Mon, 17 Jun 2019 13:25:11 +0000 (14:25 +0100)
committerJulien Grall <julien.grall@arm.com>
Thu, 26 Sep 2019 15:03:39 +0000 (16:03 +0100)
commit93dc90db0426debc7a88231e961aef2f8daf4bfc
treea114b32c0145291c49f16932380567a54f6af125
parentb03f75e22a0952fdae0dbac8a0febad0e0766a32
xen/arm64: head: Introduce macros to create table and mapping entry

At the moment, any update to the boot-pages are open-coded. This is
making more difficult to understand the logic of a function as each
update roughly requires 6 instructions.

To ease the readability, two new macros are introduced:
    - create_table_entry: Create a page-table entry in a given table.
    This can work at any level.
    - create_mapping_entry: Create a mapping entry in a given table.
    None of the users will require to map at any other level than 3rd
    (i.e page granularity). So the macro is only supporting 3rd level
    mapping.

Furthermore, the two macros are capable to work independently of the
state of the MMU.

Lastly, take the opportunity to replace open-coded version in
setup_fixmap() by the two new macros. The ones in create_page_tables()
will be replaced in a follow-up patch.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm64/head.S