dart.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef _POWERPC_SYSDEV_DART_H
  19. #define _POWERPC_SYSDEV_DART_H
  20. /* physical base of DART registers */
  21. #define DART_BASE 0xf8033000UL
  22. /* Offset from base to control register */
  23. #define DARTCNTL 0
  24. /* Offset from base to exception register */
  25. #define DARTEXCP 0x10
  26. /* Offset from base to TLB tag registers */
  27. #define DARTTAG 0x1000
  28. /* Control Register fields */
  29. /* base address of table (pfn) */
  30. #define DARTCNTL_BASE_MASK 0xfffff
  31. #define DARTCNTL_BASE_SHIFT 12
  32. #define DARTCNTL_FLUSHTLB 0x400
  33. #define DARTCNTL_ENABLE 0x200
  34. /* size of table in pages */
  35. #define DARTCNTL_SIZE_MASK 0x1ff
  36. #define DARTCNTL_SIZE_SHIFT 0
  37. /* DART table fields */
  38. #define DARTMAP_VALID 0x80000000
  39. #define DARTMAP_RPNMASK 0x00ffffff
  40. #define DART_PAGE_SHIFT 12
  41. #define DART_PAGE_SIZE (1 << DART_PAGE_SHIFT)
  42. #define DART_PAGE_FACTOR (PAGE_SHIFT - DART_PAGE_SHIFT)
  43. #endif /* _POWERPC_SYSDEV_DART_H */