fix bug in the initialize routine
This commit is contained in:
parent
cd6f8b56fc
commit
bdb0a895f2
1 changed files with 4 additions and 4 deletions
|
@ -984,8 +984,8 @@ err_t mmnif_init(struct netif *netif)
|
||||||
|
|
||||||
// map physical address in the virtual address space
|
// map physical address in the virtual address space
|
||||||
#if USE_CACHE
|
#if USE_CACHE
|
||||||
heap_start_address = map_region(0, heap_start_address, (MMNIF_CORES * heap_size) >> PAGE_SHIFT, MAP_KERNEL_SPACE | MAP_NO_CACHE | MAP_MPE | MAP_WT);
|
|
||||||
uint32_t n = (uint32_t) heap_start_address;
|
uint32_t n = (uint32_t) heap_start_address;
|
||||||
|
heap_start_address = map_region(0, heap_start_address, (MMNIF_CORES * heap_size) >> PAGE_SHIFT, MAP_KERNEL_SPACE | MAP_NO_CACHE | MAP_MPE | MAP_WT);
|
||||||
map_region(heap_start_address + (heap_size) * (own_ip_address - router_ip_address), n + (heap_size) * (own_ip_address - router_ip_address), header_size >> PAGE_SHIFT, MAP_KERNEL_SPACE | MAP_MPE | MAP_WT | MAP_REMAP);
|
map_region(heap_start_address + (heap_size) * (own_ip_address - router_ip_address), n + (heap_size) * (own_ip_address - router_ip_address), header_size >> PAGE_SHIFT, MAP_KERNEL_SPACE | MAP_MPE | MAP_WT | MAP_REMAP);
|
||||||
#else
|
#else
|
||||||
heap_start_address = (void*) map_region(0, (size_t) heap_start_address, (MMNIF_CORES * heap_size) >> PAGE_SHIFT, MAP_KERNEL_SPACE | MAP_NO_CACHE | MAP_MPE | MAP_WT);
|
heap_start_address = (void*) map_region(0, (size_t) heap_start_address, (MMNIF_CORES * heap_size) >> PAGE_SHIFT, MAP_KERNEL_SPACE | MAP_NO_CACHE | MAP_MPE | MAP_WT);
|
||||||
|
@ -1209,11 +1209,11 @@ anotherpacket:
|
||||||
for (q = p, i = 0; q != NULL; q = q->next)
|
for (q = p, i = 0; q != NULL; q = q->next)
|
||||||
{
|
{
|
||||||
#if !USE_CACHE && !MMNIF_USE_MBP
|
#if !USE_CACHE && !MMNIF_USE_MBP
|
||||||
memcpy_from_nc((uint8_t *) q->payload, &packet[i], q->len);
|
memcpy_from_nc((uint8_t *) q->payload, packet + i, q->len);
|
||||||
#elif MMNIF_USE_MPB
|
#elif MMNIF_USE_MPB
|
||||||
memcpy_get((uint8_t *) q->payload, &packet[i], q->len);
|
memcpy_get((uint8_t *) q->payload, packet + i, q->len);
|
||||||
#else
|
#else
|
||||||
memcpy((uint8_t *) q->payload, &packet[i], q->len);
|
memcpy((uint8_t *) q->payload, packet + i, q->len);
|
||||||
#endif
|
#endif
|
||||||
i += q->len;
|
i += q->len;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue