init.S 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * (C) Copyright 2008
  3. * Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de
  4. *
  5. * based on board/amcc/yosemite/init.S
  6. * original Copyright not specified there
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include <asm-offsets.h>
  10. #include <ppc_asm.tmpl>
  11. #include <config.h>
  12. #include <asm/mmu.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
  29. * the speed up boot process. It is patched after relocation to enable SA_I
  30. */
  31. tlbentry( CONFIG_SYS_BOOT_BASE_ADDR, SZ_256M, CONFIG_SYS_BOOT_BASE_ADDR,
  32. 0, AC_RWX | SA_G/*|SA_I*/)
  33. /* TLB-entry for init-ram in dcache (SA_I must be turned off!) */
  34. tlbentry( CONFIG_SYS_INIT_RAM_ADDR, SZ_64K, CONFIG_SYS_INIT_RAM_ADDR,
  35. 0, AC_RWX | SA_G )
  36. tlbentry( CONFIG_SYS_SDRAM_BASE, SZ_256M, CONFIG_SYS_SDRAM_BASE,
  37. 0, AC_RWX | SA_IG )
  38. tlbentry( CONFIG_SYS_PCI_BASE, SZ_256M, CONFIG_SYS_PCI_BASE,
  39. 0, AC_RW | SA_IG )
  40. /* PCI */
  41. tlbentry( CONFIG_SYS_PCI_MEMBASE, SZ_256M, CONFIG_SYS_PCI_MEMBASE,
  42. 0, AC_RW | SA_IG )
  43. tlbentry( CONFIG_SYS_PCI_MEMBASE1, SZ_256M, CONFIG_SYS_PCI_MEMBASE1,
  44. 0, AC_RW | SA_IG )
  45. tlbentry( CONFIG_SYS_PCI_MEMBASE2, SZ_256M, CONFIG_SYS_PCI_MEMBASE2,
  46. 0, AC_RW | SA_IG )
  47. tlbentry( CONFIG_SYS_PCI_MEMBASE3, SZ_256M, CONFIG_SYS_PCI_MEMBASE3,
  48. 0, AC_RW | SA_IG )
  49. tlbtab_end