init.S 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 <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 the
  29. * 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, 0, AC_RWX | SA_G)
  32. /* TLB-entry for init-ram in dcache (SA_I must be turned off!) */
  33. tlbentry(CONFIG_SYS_INIT_RAM_ADDR, SZ_4K, CONFIG_SYS_INIT_RAM_ADDR, 0, AC_RWX | SA_G)
  34. /* PCI base & peripherals */
  35. tlbentry(CONFIG_SYS_PCI_BASE, SZ_256M, CONFIG_SYS_PCI_BASE, 0, AC_RW | SA_IG)
  36. tlbentry(CONFIG_SYS_NVRAM_BASE_ADDR, SZ_256M, CONFIG_SYS_NVRAM_BASE_ADDR, 0, AC_RWX | SA_W|SA_I)
  37. tlbentry(CONFIG_SYS_NAND_ADDR, SZ_4K, CONFIG_SYS_NAND_ADDR, 0, AC_RWX | SA_W|SA_I)
  38. /* PCI */
  39. tlbentry(CONFIG_SYS_PCI_MEMBASE, SZ_256M, CONFIG_SYS_PCI_MEMBASE, 0, AC_RW | SA_IG)
  40. tlbentry(CONFIG_SYS_PCI_MEMBASE1, SZ_256M, CONFIG_SYS_PCI_MEMBASE1, 0, AC_RW | SA_IG)
  41. tlbentry(CONFIG_SYS_PCI_MEMBASE2, SZ_256M, CONFIG_SYS_PCI_MEMBASE2, 0, AC_RW | SA_IG)
  42. tlbentry(CONFIG_SYS_PCI_MEMBASE3, SZ_256M, CONFIG_SYS_PCI_MEMBASE3, 0, AC_RW | SA_IG)
  43. /* USB 2.0 Device */
  44. tlbentry(CONFIG_SYS_USB_DEVICE, SZ_1K, CONFIG_SYS_USB_DEVICE, 0, AC_RW | SA_IG)
  45. tlbtab_end