sysmem.h 850 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * sysmem-related prototypes.
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 2014 Cadence Design Systems Inc.
  9. */
  10. #ifndef _XTENSA_SYSMEM_H
  11. #define _XTENSA_SYSMEM_H
  12. #define SYSMEM_BANKS_MAX 31
  13. struct meminfo {
  14. unsigned long start;
  15. unsigned long end;
  16. };
  17. /*
  18. * Bank array is sorted by .start.
  19. * Banks don't overlap and there's at least one page gap
  20. * between adjacent bank entries.
  21. */
  22. struct sysmem_info {
  23. int nr_banks;
  24. struct meminfo bank[SYSMEM_BANKS_MAX];
  25. };
  26. extern struct sysmem_info sysmem;
  27. int add_sysmem_bank(unsigned long start, unsigned long end);
  28. int mem_reserve(unsigned long, unsigned long, int);
  29. void bootmem_init(void);
  30. void zones_init(void);
  31. #endif /* _XTENSA_SYSMEM_H */