Opened on 03/10/11 at 08:54:13
Last modified on 01/22/15 at 21:19:17
#1761 closed enhancement
2kB of memory are lost in the SpaceWire Driver — at Version 5
Reported by: | Cláudio Silva | Owned by: | Daniel Hellstrom |
---|---|---|---|
Priority: | highest | Milestone: | 4.11 |
Component: | bsps | Version: | 4.10 |
Severity: | minor | Keywords: | |
Cc: | Joel Sherrill | Blocked By: | |
Blocking: |
Description (last modified by Joel Sherrill)
The structure GRSPW_DEV has two members that are the Descriptor Tables
used for the DMA engines. These members are allocated statically (char
_txtable[SPACEWIRE_BDTABLE_SIZE*2]; ) with twice the size they need
to be. They should have 1024 bytes of size and have 2048. This extra
size is needed because the descriptor table needs to be 1024 aligned
(0x400).
In the function grspw_hw_init these memory areas are passed to the
function SPW_ALIGN which returns the first aligned address in the
memory area. This way the driver is allocating twice the memory
needed in order to find an aligned base address for the table inside
the memory area.
For example if the _txtable start address is 0x40000001, the address
returned by SPW_ALIGN will be 0x40000400 and the used memory area
will be 0x40000400-0x40000800. Addresses in the range 0x80000001-
0x40000399 will not be used, but will remain allocated.
This way we are losing 2kB in the descriptor tables.
Change History (7)
comment:1 Changed on 03/10/11 at 08:57:27 by Cláudio Silva
Owner: | changed from Joel Sherrill to Chris Johns |
---|
comment:2 Changed on 03/10/11 at 14:46:13 by Joel Sherrill
Cc: | Joel Sherrill added |
---|
Changed on 12/16/13 at 00:40:34 by Daniel Ramirez
Attachment: | grspw.patch added |
---|
Changed on 12/16/13 at 18:39:05 by Daniel Ramirez
Attachment: | grspw-2.patch added |
---|
Desciptor tables no longer statically allocated
comment:3 Changed on 12/16/13 at 18:39:05 by Daniel Ramirez
attachments.isobsolete: | 0 → 1 |
---|
comment:4 Changed on 01/08/14 at 04:49:13 by cynt6007
Status: | new → assigned, cynt6007@vandals.uidaho.edu |
---|
comment:5 Changed on 11/23/14 at 17:37:45 by Joel Sherrill
Description: | modified (diff) |
---|---|
Owner: | changed from Chris Johns to Daniel Hellstrom |
Descriptor tables are no longer statically allocated, saving memory