init.S 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * (C) Copyright 2009-2010
  3. * Stefan Roese, DENX Software Engineering, sr@denx.de.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #include <ppc_asm.tmpl>
  8. #include <config.h>
  9. #include <asm/mmu.h>
  10. #include <asm/ppc4xx.h>
  11. /*
  12. * TLB TABLE
  13. *
  14. * This table is used by the cpu boot code to setup the initial tlb
  15. * entries. Rather than make broad assumptions in the cpu source tree,
  16. * this table lets each board set things up however they like.
  17. *
  18. * Pointer to the table is returned in r1
  19. *
  20. */
  21. .section .bootpg,"ax"
  22. .globl tlbtab
  23. tlbtab:
  24. tlbtab_start
  25. /*
  26. * BOOT_CS (FLASH) must be first. Before relocation SA_I can be off to
  27. * use the speed up boot process. It is patched after relocation to
  28. * enable SA_I.
  29. */
  30. tlbentry(CONFIG_SYS_BOOT_BASE_ADDR, SZ_16M, CONFIG_SYS_BOOT_BASE_ADDR,
  31. 4, AC_RWX | SA_G) /* TLB 0 */
  32. /*
  33. * TLB entries for SDRAM are not needed on this platform.
  34. * They are dynamically generated in the SPD DDR(2) detection
  35. * routine.
  36. */
  37. tlbentry(CONFIG_SYS_ISRAM_BASE, SZ_256K, 0x00000000, 4,
  38. AC_RWX | SA_I)
  39. tlbentry(CONFIG_SYS_PERIPHERAL_BASE, SZ_4K, 0xF0000000, 4,
  40. AC_RW | SA_IG)
  41. tlbentry(CONFIG_SYS_ACE_BASE, SZ_1K,
  42. CONFIG_SYS_ACE_BASE_PHYS_L, CONFIG_SYS_ACE_BASE_PHYS_H,
  43. AC_RW | SA_IG)
  44. tlbentry(CONFIG_SYS_PCI_BASE, SZ_256M, 0x00000000, 0xC,
  45. AC_RW | SA_IG)
  46. tlbentry(CONFIG_SYS_PCI_MEMBASE, SZ_256M, 0x10000000, 0xC,
  47. AC_RW | SA_IG)
  48. tlbentry(CONFIG_SYS_PCIE_MEMBASE, SZ_256M, 0xB0000000, 0xD,
  49. AC_RW | SA_IG)
  50. tlbentry(CONFIG_SYS_PCIE0_CFGBASE, SZ_16M, 0x00000000, 0xD,
  51. AC_RW | SA_IG)
  52. tlbentry(CONFIG_SYS_PCIE1_CFGBASE, SZ_16M, 0x20000000, 0xD,
  53. AC_RW | SA_IG)
  54. tlbentry(CONFIG_SYS_PCIE2_CFGBASE, SZ_16M, 0x40000000, 0xD,
  55. AC_RW | SA_IG)
  56. tlbentry(CONFIG_SYS_PCIE0_XCFGBASE, SZ_1K, 0x10000000, 0xD,
  57. AC_RW | SA_IG)
  58. tlbentry(CONFIG_SYS_PCIE1_XCFGBASE, SZ_1K, 0x30000000, 0xD,
  59. AC_RW | SA_IG)
  60. tlbentry(CONFIG_SYS_PCIE2_XCFGBASE, SZ_1K, 0x50000000, 0xD,
  61. AC_RW | SA_IG)
  62. tlbtab_end