Lines Matching +full:block +full:- +full:size

7  * Copyright (c) 2003-2008 Cavium Networks
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
45 /* Allocate from end of block instead of beginning */
51 /* First bytes of each free physical block of memory contain this structure,
64 uint64_t size; member
76 /* Base address of named block */
79 * Size actually allocated for named block (may differ from
82 uint64_t size; member
83 /* name of named block */
122 /* address of named memory block descriptors */
149 * Allocate a block of memory from the free list that was
151 * address. This is an allocate-only algorithm, so
155 * @size: Size in bytes of block to allocate
158 * @alignment: Alignment required - must be power of 2
159 * Returns pointer to block of memory, NULL on error
161 extern void *cvmx_bootmem_alloc_address(uint64_t size, uint64_t address,
165 * Frees a previously allocated named bootmem block.
167 * @name: name of block to free
175 * Allocate a block of memory from the free list that was passed
177 * global named block table. (part of the cvmx_bootmem_descriptor_t structure)
180 * @size: Size in bytes of block to allocate
181 * @alignment: Alignment required - must be power of 2
182 * @name: name of block - must be less than CVMX_BOOTMEM_NAME_LEN bytes
184 * Returns a pointer to block of memory, NULL on error
186 extern void *cvmx_bootmem_alloc_named(uint64_t size, uint64_t alignment,
190 * Allocate a block of memory from a specific range of the free list
192 * a name in the global named block table. (part of the
197 * @size: Size in bytes of block to allocate
201 * @name: name of block - must be less than CVMX_BOOTMEM_NAME_LEN bytes
203 * Returns a pointer to block of memory, NULL on error
205 extern void *cvmx_bootmem_alloc_named_range(uint64_t size, uint64_t min_addr,
210 * Allocate if needed a block of memory from a specific range of the
212 * assign it a name in the global named block table. (part of the
214 * freed. If the requested name block is already allocated, return
215 * the pointer to block of memory. If request cannot be satisfied
218 * @param size Size in bytes of block to allocate
222 * @param name name of block - must be less than CVMX_BOOTMEM_NAME_LEN bytes
225 * The initialization function is optional, if omitted the named block
228 * @return pointer to block of memory, NULL on error
230 void *cvmx_bootmem_alloc_named_range_once(uint64_t size,
240 * Finds a named bootmem block by name.
242 * @name: name of block to free
244 * Returns pointer to named block descriptor on success
250 * Allocates a block of physical memory from the free list, at
253 * @req_size: size of region to allocate. All requests are rounded up
254 * to be a multiple CVMX_BOOTMEM_ALIGNMENT_SIZE bytes size
256 * @address_min: Minimum address that block can occupy.
261 * @alignment: Requested alignment of the block. If this alignment
271 * Returns physical address of block allocated, or -1 on failure
278 * Allocates a named block of physical memory from the free list, at
281 * @param size size of region to allocate. All requests are rounded
283 * bytes size
284 * @param min_addr Minimum address that block can occupy.
287 * @param alignment Requested alignment of the block. If this
294 * @param name name to assign to named block
297 * @return physical address of block allocated, or -1 on failure
299 int64_t cvmx_bootmem_phy_named_block_alloc(uint64_t size, uint64_t min_addr,
305 * Frees a block to the bootmem allocator list. This must
306 * be used with care, as the size provided must match the size
307 * of the block that was allocated, or the list will become
310 * IMPORTANT: This is only intended to be used as part of named block
314 * @phy_addr: physical address of block
315 * @size: size of block in bytes.
321 int __cvmx_bootmem_phy_free(uint64_t phy_addr, uint64_t size, uint32_t flags);