setup.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * linux/include/asm/setup.h
  3. *
  4. * Copyright (C) 1997-1999 Russell King
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * Structure passed to kernel to tell it about the
  11. * hardware it's running on. See Documentation/arm/Setup
  12. * for more info.
  13. */
  14. #ifndef __ASMARM_SETUP_H
  15. #define __ASMARM_SETUP_H
  16. #include <uapi/asm/setup.h>
  17. #define __tag __used __attribute__((__section__(".taglist.init")))
  18. #define __tagtable(tag, fn) \
  19. static const struct tagtable __tagtable_##fn __tag = { tag, fn }
  20. /*
  21. * Memory map description
  22. */
  23. #define NR_BANKS CONFIG_ARM_NR_BANKS
  24. struct membank {
  25. phys_addr_t start;
  26. phys_addr_t size;
  27. unsigned int highmem;
  28. };
  29. struct meminfo {
  30. int nr_banks;
  31. struct membank bank[NR_BANKS];
  32. };
  33. extern struct meminfo meminfo;
  34. #define for_each_bank(iter,mi) \
  35. for (iter = 0; iter < (mi)->nr_banks; iter++)
  36. #define bank_pfn_start(bank) __phys_to_pfn((bank)->start)
  37. #define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size)
  38. #define bank_pfn_size(bank) ((bank)->size >> PAGE_SHIFT)
  39. #define bank_phys_start(bank) (bank)->start
  40. #define bank_phys_end(bank) ((bank)->start + (bank)->size)
  41. #define bank_phys_size(bank) (bank)->size
  42. extern int arm_add_memory(phys_addr_t start, phys_addr_t size);
  43. extern void early_print(const char *str, ...);
  44. extern void dump_machine_table(void);
  45. #endif