lmb.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef _PPC64_LMB_H
  2. #define _PPC64_LMB_H
  3. /*
  4. * Definitions for talking to the Open Firmware PROM on
  5. * Power Macintosh computers.
  6. *
  7. * Copyright (C) 2001 Peter Bergner, IBM Corp.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version
  12. * 2 of the License, or (at your option) any later version.
  13. */
  14. #include <linux/init.h>
  15. #include <asm/prom.h>
  16. #define MAX_LMB_REGIONS 128
  17. #define LMB_ALLOC_ANYWHERE 0
  18. struct lmb_property {
  19. unsigned long base;
  20. unsigned long physbase;
  21. unsigned long size;
  22. };
  23. struct lmb_region {
  24. unsigned long cnt;
  25. unsigned long size;
  26. struct lmb_property region[MAX_LMB_REGIONS+1];
  27. };
  28. struct lmb {
  29. unsigned long debug;
  30. unsigned long rmo_size;
  31. struct lmb_region memory;
  32. struct lmb_region reserved;
  33. };
  34. extern struct lmb lmb;
  35. extern void __init lmb_init(void);
  36. extern void __init lmb_analyze(void);
  37. extern long __init lmb_add(unsigned long, unsigned long);
  38. extern long __init lmb_reserve(unsigned long, unsigned long);
  39. extern unsigned long __init lmb_alloc(unsigned long, unsigned long);
  40. extern unsigned long __init lmb_alloc_base(unsigned long, unsigned long,
  41. unsigned long);
  42. extern unsigned long __init lmb_phys_mem_size(void);
  43. extern unsigned long __init lmb_end_of_DRAM(void);
  44. extern unsigned long __init lmb_abs_to_phys(unsigned long);
  45. extern void __init lmb_enforce_memory_limit(void);
  46. extern void lmb_dump_all(void);
  47. extern unsigned long io_hole_start;
  48. #endif /* _PPC64_LMB_H */