示例#1
0
/**
 * Called after Linux allocates all of its memory. This sets
 * up the 32bit shared region. Note that this region was
 * allocated as a named block during HAL init. This made sure
 * that nobody used the memory for something else during
 * init. Now we'll free it so userspace apps can use this
 * memory region with bootmem_alloc.
 */
void octeon_hal_setup_reserved32(void)
{
#if CONFIG_CAVIUM_RESERVE32
    if (octeon_reserve32_memory)
    {
        cvmx_bootmem_desc_t *bootmem_desc = octeon_phys_to_ptr(octeon_bootinfo->phy_mem_desc_addr);
        octeon_phy_mem_named_block_free(bootmem_desc, "CAVIUM_RESERVE32");
    }
#endif
}
int cvmx_bootmem_free_named(char *name)
{
    return(octeon_phy_mem_named_block_free(cvmx_bootmem_desc, name));
}