init.S 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * (C) Copyright 2007
  3. * Stefan Roese, DENX Software Engineering, sr@denx.de.
  4. *
  5. * Copyright (C) 2002 Scott McNutt <smcnutt@artesyncp.com>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include <ppc_asm.tmpl>
  10. #include <config.h>
  11. #include <asm/mmu.h>
  12. #include <asm/ppc4xx.h>
  13. /**************************************************************************
  14. * TLB TABLE
  15. *
  16. * This table is used by the cpu boot code to setup the initial tlb
  17. * entries. Rather than make broad assumptions in the cpu source tree,
  18. * this table lets each board set things up however they like.
  19. *
  20. * Pointer to the table is returned in r1
  21. *
  22. *************************************************************************/
  23. .section .bootpg,"ax"
  24. .globl tlbtab
  25. tlbtab:
  26. tlbtab_start
  27. /*
  28. * BOOT_CS (FLASH) must be first. Before relocation SA_I can be off to use the
  29. * speed up boot process. It is patched after relocation to enable SA_I
  30. */
  31. tlbentry(0xfff00000, SZ_1M, 0xfff00000, 1, AC_RWX | SA_G)
  32. tlbentry(0xffc00000, SZ_1M, 0xffc00000, 1, AC_RWX | SA_IG)
  33. tlbentry(0xffd00000, SZ_1M, 0xffd00000, 1, AC_RWX | SA_IG)
  34. tlbentry(0xffe00000, SZ_1M, 0xffe00000, 1, AC_RWX | SA_IG)
  35. tlbentry(0xff900000, SZ_1M, 0xff900000, 1, AC_RWX | SA_IG)
  36. tlbentry(CONFIG_SYS_EPLD_BASE, SZ_256K, 0xff000000, 1, AC_RW | SA_IG)
  37. /*
  38. * TLB entries for SDRAM are not needed on this platform.
  39. * They are dynamically generated in the SPD DDR(2) detection
  40. * routine.
  41. */
  42. /* internal ram (l2 cache) */
  43. tlbentry(CONFIG_SYS_ISRAM_BASE, SZ_256K, 0x80000000, 0, AC_RWX | SA_I)
  44. /* peripherals at f0000000 */
  45. tlbentry(CONFIG_SYS_PERIPHERAL_BASE, SZ_4K, CONFIG_SYS_PERIPHERAL_BASE, 1, AC_RW | SA_IG)
  46. /* PCI */
  47. tlbentry(CONFIG_SYS_PCI_BASE, SZ_256M, 0x00000000, 9, AC_RW | SA_IG)
  48. tlbentry(CONFIG_SYS_PCI_MEMBASE, SZ_256M, 0x10000000, 9, AC_RW | SA_IG)
  49. tlbtab_end