workaround to disable temporary the mmnif device

This commit is contained in:
Stefan Lankes 2011-11-16 03:11:16 -08:00
parent 5221c3bf46
commit d9e0d932f0

View file

@ -883,8 +883,13 @@ err_t mmnif_init(struct netif *netif)
// align mpb size to the granularity of a page size
header_size = (header_size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
#if 1
#warning shmalloc
header_start_address = NULL;
#else
header_start_address = (void*) RCCE_shmalloc(header_size * MMNIF_CORES);
DEBUGPRINTF("RCCE_shmalloc : %p (size %u)\n", header_start_address, MMNIF_CORES * header_size);
#endif
// map physical address in the virtual address space
header_start_address = (void*) map_region(0, (size_t) header_start_address, (MMNIF_CORES * header_size) >> PAGE_SHIFT, MAP_KERNEL_SPACE | MAP_WT | MAP_NO_CACHE);
@ -909,8 +914,13 @@ err_t mmnif_init(struct netif *netif)
#else
// align size to the granularity of a page size
heap_size = (heap_size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
#if 1
#warning SHMALLOC
heap_start_address = NULL;
#else
heap_start_address = (void*) RCCE_shmalloc(heap_size * MMNIF_CORES);
DEBUGPRINTF("RCCE_shmalloc : %p (size %u)\n", heap_start_address, MMNIF_CORES * header_size);
#endif
// map physical address in the virtual address space
#if USE_CACHE