sysbios: all sort of goodness

* VirtQueue: Adopt VRING addresses to new memory layout
* VirtQueue: Fix ID_*_TO_* macro confusion
* VirtQueue: remove buf_addr, since device addresses are fixed atm
* VirtQueue: update mapVAtoPA (it's still a hack that *must* go eventually!)
* VirtQueue: VirtQueue_getAvailBuf debugging to display ring.avail addr
* VirtQueue: clean up VirtQueue_create to assign VRING addresses directly
* VirtQueue: remove DSP VirtQueue_startup code, as it's unmaintained

* rsc_table: Adopt new memory layout of vrings and buffer addresses
* rsc_table: Add a new VRING resource type
* rsc_table: adopt new 'struct resource' layout (update rprcfmt.h too)
* rsc_table: remove entrypoint entries - we don't use them atm
* rsc_table: ditch the IPC carveout - that region will be dynamically allocated
* rsc_table: don't ask for a specific PA in the DATA carveout. The PA will be
             assigned dynamically, and Ducati should take it from this table.
* rsc_table: Fill the 'id' member for the trace and vring entries
* rsc_table: Use meaningful names for the trace and vring entries
* rsc_table: Add a temporary & evil devmem hack so the IPC region is mapped.
             Should be removed as soon as we get gemeric DMA API on Linux.
             For now, it means that remoteproc's CMA region must be @ IPC_PA.

* dlw_client: hex length display

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
IPC: check again the indexs after setting the NOTIFY flag

Once the VRING_USED_F_NO_NOTIFY is set in memory to start
receiving notifications from host check again the indexs since
by the time the flag is set the host side may had move them but
it did not catch the flag just set in shared memory leading to a
lock up since guest is waiting for notification to check new buffers
but host will not notify.

Signed-off-by: Miguel Vadillo <vadillo@ti.com>
remove resources that belong to core1

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
rsc_table: initialize trace buffer address during link

Note that you can safely apply this and use it with both the RPRC format
and ELF. It just initializes the field at link time, which genrprc will
overwrite (with the same thing).

Signed-off-by: Mark Grosen <mgrosen@ti.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Makefile: add tags target

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
.gitignore: ignore non-src files

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
rsc_table: update resource types to latest ABI

fix rprcfmt accordingly, too.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
sysbios: update vring/virtio model

1. update vring device addresses
2. add virtio header resource entry, which provides virtio
   features/status fields

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
init: temporarily delay tasks init to avoid race

Yeah, this is horrible.

Without it, we might try to send a message before buffers are
available in the ring, and then the code just bluntly fails.

The real fix is to pause initialization until buffers are available,
or allow users to get notified when a buffer is available after
they failed getting one.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
rsc_table: re-order resource table to fit the latest Linux expectations

Eventually it'd be best to get rid of order dependencies,
but currently we're opting for cleaner Linux code.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
rsc_table: express vring sizes in number of supported buffers

The sizes of the vrings should be expressed in number of supported
buffers (which should be a power of 2).

Currently we support 256 buffers, but that can be easily changed now
solely on the sysbios side: the Linux side will just grab the number
from the resource table and build an appropriate vring.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
ping_tasks: add rpmsg-proto service

rename the service listening on addr 51 to "rpmsg-proto" to enable
Linux AF_RPMSG Socket API demos.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
BUILD: Remove build of src/utils/elfload RPRC loader and utitilies.

New ELF loader does not require this.

Signed-off-by: G Anthony <a0783926@ti.com>
Build: Makefile and config.bld cleanup

Cleanup and refactor config.bld to better scale to multiple targets.

Signed-off-by: Chris Ring <cring@ti.com>
Merge pull request #5 from cringthis/build_cleanup

Build: Makefile and config.bld cleanup
Synchronize hard coded base addr to the new Linux 3.3 values:

    "On 3.3 the System RAM is truncated earlier than it was before,
    due to an increase in the vmalloc region to 240MB (from 120MB);
    see commit 0536bdf33faff4d940ac094c77998cfac368cfff "ARM: move
    iotable mappings within the vmalloc region".

    Adapt the rproc CMA region to accomodate that (otherwise some of the pages
    will elicit invalid pfn warnings when the cma regions are activated)."

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Revert "init: temporarily delay tasks init to avoid race"

This reverts commit 6d91e0256063d392ce566e617775da7a70766f58.

It's no longer needed in 3.3.

Either way, it's quite horrid, and it should be fixed otherwise.

Conflicts:

	src/ti/examples/srvmgr/ping_tasks.c
rsc_table: put the fixed-size array behind

The array approach was very limiting: all members had to have
the same size and members, and this didn't work quite well
since some members are very small, where others quite big.

Move to a type-value approach, where each resource entry has
its own dedicated structure.

In addition, create a simple header which contains the number
of entries and their offsets within the table: this helps parsing code
to do fast browsing through the table.

And - add a version field so hosts can verify we have the image
format they expect.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
quick example of CIO filesystem skeleton
rsc_table: add a vdev console resource entry

Add a new resource entry that describes a console vdev.

This creates two dedicated vrings that will be used by the Linux
virtio_console driver.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>