]>
git.ipfire.org Git - people/ms/u-boot.git/blob - include/lmb.h
7 * Logical memory blocks.
9 * Copyright (C) 2001 Peter Bergner, IBM Corp.
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version
14 * 2 of the License, or (at your option) any later version.
17 #define MAX_LMB_REGIONS 8
27 struct lmb_property region
[MAX_LMB_REGIONS
+1];
31 struct lmb_region memory
;
32 struct lmb_region reserved
;
35 extern struct lmb lmb
;
37 extern void lmb_init(struct lmb
*lmb
);
38 extern long lmb_add(struct lmb
*lmb
, ulong base
, ulong size
);
39 extern long lmb_reserve(struct lmb
*lmb
, ulong base
, ulong size
);
40 extern ulong
lmb_alloc(struct lmb
*lmb
, ulong size
, ulong align
);
41 extern ulong
lmb_alloc_base(struct lmb
*lmb
, ulong size
, ulong align
, ulong max_addr
);
42 extern ulong
__lmb_alloc_base(struct lmb
*lmb
, ulong size
, ulong align
, ulong max_addr
);
43 extern int lmb_is_reserved(struct lmb
*lmb
, ulong addr
);
45 extern void lmb_dump_all(struct lmb
*lmb
);
48 lmb_size_bytes(struct lmb_region
*type
, unsigned long region_nr
)
50 return type
->region
[region_nr
].size
;
52 #endif /* __KERNEL__ */
54 #endif /* _LINUX_LMB_H */