diff options
author | Mark Salter <msalter@redhat.com> | 2014-04-07 18:39:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:36:15 -0400 |
commit | bf4b558eba920a38f91beb5ee62a8ce2628c92f7 (patch) | |
tree | 322210246d72cf0ce2a700709da443022e9dac6b /arch/arm64/kernel/head.S | |
parent | 0bf757c73d6612d3d279de3f61b35062aa9c8b1d (diff) |
arm64: add early_ioremap support
Add support for early IO or memory mappings which are needed before the
normal ioremap() is usable. This also adds fixmap support for permanent
fixed mappings such as that used by the earlyprintk device register
region.
Signed-off-by: Mark Salter <msalter@redhat.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Borislav Petkov <borislav.petkov@amd.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm64/kernel/head.S')
-rw-r--r-- | arch/arm64/kernel/head.S | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 61035d6814cb..1fe5d8d2bdfd 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S | |||
@@ -404,7 +404,7 @@ ENDPROC(__calc_phys_offset) | |||
404 | * - identity mapping to enable the MMU (low address, TTBR0) | 404 | * - identity mapping to enable the MMU (low address, TTBR0) |
405 | * - first few MB of the kernel linear mapping to jump to once the MMU has | 405 | * - first few MB of the kernel linear mapping to jump to once the MMU has |
406 | * been enabled, including the FDT blob (TTBR1) | 406 | * been enabled, including the FDT blob (TTBR1) |
407 | * - UART mapping if CONFIG_EARLY_PRINTK is enabled (TTBR1) | 407 | * - pgd entry for fixed mappings (TTBR1) |
408 | */ | 408 | */ |
409 | __create_page_tables: | 409 | __create_page_tables: |
410 | pgtbl x25, x26, x24 // idmap_pg_dir and swapper_pg_dir addresses | 410 | pgtbl x25, x26, x24 // idmap_pg_dir and swapper_pg_dir addresses |
@@ -461,15 +461,12 @@ __create_page_tables: | |||
461 | sub x6, x6, #1 // inclusive range | 461 | sub x6, x6, #1 // inclusive range |
462 | create_block_map x0, x7, x3, x5, x6 | 462 | create_block_map x0, x7, x3, x5, x6 |
463 | 1: | 463 | 1: |
464 | #ifdef CONFIG_EARLY_PRINTK | ||
465 | /* | 464 | /* |
466 | * Create the pgd entry for the UART mapping. The full mapping is done | 465 | * Create the pgd entry for the fixed mappings. |
467 | * later based earlyprintk kernel parameter. | ||
468 | */ | 466 | */ |
469 | ldr x5, =EARLYCON_IOBASE // UART virtual address | 467 | ldr x5, =FIXADDR_TOP // Fixed mapping virtual address |
470 | add x0, x26, #2 * PAGE_SIZE // section table address | 468 | add x0, x26, #2 * PAGE_SIZE // section table address |
471 | create_pgd_entry x26, x0, x5, x6, x7 | 469 | create_pgd_entry x26, x0, x5, x6, x7 |
472 | #endif | ||
473 | ret | 470 | ret |
474 | ENDPROC(__create_page_tables) | 471 | ENDPROC(__create_page_tables) |
475 | .ltorg | 472 | .ltorg |