[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

possible bug in virtex bsp



Hi all,

The virtex bsp appears to have a heap setup bug.

In virtex/startup/bspstart.c, bsp_pretasking_hook() appears to
incorrectly calculate heap_end (and therefore heap_size).

void bsp_pretasking_hook(void)
{
    uint32_t        heap_start;
    uint32_t            heap_size;
    uint32_t            heap_end;

    heap_start = (((uint32_t)BSP_Configuration.work_space_start +
		   BSP_Configuration.work_space_size) + 0x18000) & 0xffff0000;

    heap_end = _heap_start + (uint32_t)&_HeapSize;

    heap_size = (heap_end - heap_start);

    _heap_start = heap_start;
    _heap_end = heap_end;

    _top_of_ram = heap_end;

    bsp_libc_init((void *) heap_start, heap_size, 0); /* 64 * 1024 */