Re: [PATCH] c-user: Add "Cache Manager" chapter

2021-09-14 Thread Chris Johns
On 14/9/21 3:57 pm, Sebastian Huber wrote:
> On 10/09/2021 10:49, Sebastian Huber wrote:
>> The Cache Manager directives are available via .  Document most
>> of them in the Classic API Guide.
>>
>> Not documented are the following directive since the API is not yet
>> stable:
>>
>> * rtems_cache_coherent_allocate()
>> * rtems_cache_coherent_free()
>> * rtems_cache_coherent_add_area()
>>
>> Not documented are the following directive since the directives are not
>> implemented on maintained platforms:
>>
>> * rtems_cache_freeze_data()
>> * rtems_cache_freeze_instruction()
>> * rtems_cache_unfreeze_data()
>> * rtems_cache_unfreeze_instruction()
>>
>> Close #4513.
>> ---
>> Here is the updated document for review:
>>
>> https://ftp.rtems.org/pub/rtems/people/sebh/c-user.pdf
> 
> Any objections to add this new chapter?
> 

Not from me. Looks good and a welcome addition.

Thanks
Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] c-user: Add "Cache Manager" chapter

2021-09-13 Thread Sebastian Huber

On 10/09/2021 10:49, Sebastian Huber wrote:

The Cache Manager directives are available via .  Document most
of them in the Classic API Guide.

Not documented are the following directive since the API is not yet
stable:

* rtems_cache_coherent_allocate()
* rtems_cache_coherent_free()
* rtems_cache_coherent_add_area()

Not documented are the following directive since the directives are not
implemented on maintained platforms:

* rtems_cache_freeze_data()
* rtems_cache_freeze_instruction()
* rtems_cache_unfreeze_data()
* rtems_cache_unfreeze_instruction()

Close #4513.
---
Here is the updated document for review:

https://ftp.rtems.org/pub/rtems/people/sebh/c-user.pdf


Any objections to add this new chapter?

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] c-user: Add "Cache Manager" chapter

2021-09-10 Thread Sebastian Huber
The Cache Manager directives are available via .  Document most
of them in the Classic API Guide.

Not documented are the following directive since the API is not yet
stable:

* rtems_cache_coherent_allocate()
* rtems_cache_coherent_free()
* rtems_cache_coherent_add_area()

Not documented are the following directive since the directives are not
implemented on maintained platforms:

* rtems_cache_freeze_data()
* rtems_cache_freeze_instruction()
* rtems_cache_unfreeze_data()
* rtems_cache_unfreeze_instruction()

Close #4513.
---
Here is the updated document for review:

https://ftp.rtems.org/pub/rtems/people/sebh/c-user.pdf

 c-user/cache/directives.rst   | 665 ++
 c-user/cache/index.rst|  15 +
 c-user/cache/introduction.rst | 101 ++
 c-user/index.rst  |   1 +
 4 files changed, 782 insertions(+)
 create mode 100644 c-user/cache/directives.rst
 create mode 100644 c-user/cache/index.rst
 create mode 100644 c-user/cache/introduction.rst

diff --git a/c-user/cache/directives.rst b/c-user/cache/directives.rst
new file mode 100644
index 000..98349db
--- /dev/null
+++ b/c-user/cache/directives.rst
@@ -0,0 +1,665 @@
+.. SPDX-License-Identifier: CC-BY-SA-4.0
+
+.. Copyright (C) 2016 Pavel Pisa
+.. Copyright (C) 2014, 2021 embedded brains GmbH 
(http://www.embedded-brains.de)
+.. Copyright (C) 2000, 2008 On-Line Applications Research Corporation (OAR)
+
+.. This file is part of the RTEMS quality process and was automatically
+.. generated.  If you find something that needs to be fixed or
+.. worded better please post a report or patch to an RTEMS mailing list
+.. or raise a bug report:
+..
+.. https://www.rtems.org/bugs.html
+..
+.. For information on updating and regenerating please refer to the How-To
+.. section in the Software Requirements Engineering chapter of the
+.. RTEMS Software Engineering manual.  The manual is provided as a part of
+.. a release.  For development sources please refer to the online
+.. documentation at:
+..
+.. https://docs.rtems.org
+
+.. _CacheManagerDirectives:
+
+Directives
+==
+
+This section details the directives of the Cache Manager. A subsection is
+dedicated to each of this manager's directives and lists the calling sequence,
+parameters, description, return values, and notes of the directive.
+
+.. Generated from spec:/rtems/cache/if/flush-multiple-data-lines
+
+.. raw:: latex
+
+\clearpage
+
+.. index:: rtems_cache_flush_multiple_data_lines()
+
+.. _InterfaceRtemsCacheFlushMultipleDataLines:
+
+rtems_cache_flush_multiple_data_lines()
+---
+
+Flushes the data cache lines covering the memory area.
+
+.. rubric:: CALLING SEQUENCE:
+
+.. code-block:: c
+
+void rtems_cache_flush_multiple_data_lines( const void *begin, size_t size 
);
+
+.. rubric:: PARAMETERS:
+
+``begin``
+This parameter is the begin address of the memory area to flush.
+
+``size``
+This parameter is the size in bytes of the memory area to flush.
+
+.. rubric:: DESCRIPTION:
+
+Dirty data cache lines covering the area are transfered to memory.  Depending
+on the cache implementation this may mark the lines as invalid.
+
+.. rubric:: CONSTRAINTS:
+
+The following constraints apply to this directive:
+
+* The directive may be called from within any runtime context.
+
+* The directive will not cause the calling task to be preempted.
+
+.. Generated from spec:/rtems/cache/if/invalidate-multiple-data-lines
+
+.. raw:: latex
+
+\clearpage
+
+.. index:: rtems_cache_invalidate_multiple_data_lines()
+
+.. _InterfaceRtemsCacheInvalidateMultipleDataLines:
+
+rtems_cache_invalidate_multiple_data_lines()
+
+
+Invalidates the data cache lines covering the memory area.
+
+.. rubric:: CALLING SEQUENCE:
+
+.. code-block:: c
+
+void rtems_cache_invalidate_multiple_data_lines(
+  const void *begin,
+  size_t  size
+);
+
+.. rubric:: PARAMETERS:
+
+``begin``
+This parameter is the begin address of the memory area to invalidate.
+
+``size``
+This parameter is the size in bytes of the memory area to invalidate.
+
+.. rubric:: DESCRIPTION:
+
+The cache lines covering the area are marked as invalid.  A later read access
+in the area will load the data from memory.
+
+.. rubric:: NOTES:
+
+In case the area is not aligned on cache line boundaries, then this operation
+may destroy unrelated data.
+
+On some systems, the cache lines may be flushed before they are invalidated.
+
+.. rubric:: CONSTRAINTS:
+
+The following constraints apply to this directive:
+
+* The directive may be called from within any runtime context.
+
+* The directive will not cause the calling task to be preempted.
+
+.. Generated from spec:/rtems/cache/if/invalidate-multiple-instruction-lines
+
+.. raw:: latex
+
+\clearpage
+
+.. index:: rtems_cache_invalidate_multiple_instruction_lines()
+
+.. _InterfaceRtemsCacheInvalidateMultipleInstructionLines:
+