libxhcidbg.git
5 months agoAdjust to cspecs changes muen
Reto Buerki [Thu, 10 Jun 2021 13:19:23 +0000 (15:19 +0200)]
Adjust to cspecs changes

17 months agoFix compiler error emitted by GNAT Community 2020
Adrian-Ken Rueegsegger [Wed, 27 May 2020 15:56:10 +0000 (17:56 +0200)]
Fix compiler error emitted by GNAT Community 2020

This fixes the following compiler error:

  representation item must appear after type is fully defined

2 years agoUse picocom to read serial in misc/xhcidbg-log
Reto Buerki [Mon, 19 Aug 2019 09:47:05 +0000 (11:47 +0200)]
Use picocom to read serial in misc/xhcidbg-log

Separate configuration via stty and cat did not work very well, as
initial characters could get lost. Use a simple terminal emulation
program instead.

2 years agoAdjust to buildsystem changes
Adrian-Ken Rueegsegger [Wed, 8 May 2019 12:58:48 +0000 (14:58 +0200)]
Adjust to buildsystem changes

All components are technically 'SPARK' now.

Futhermore, disable proofs for now. Recent GNATprove versions issue many
warnings which should be sorted through and corrected. However, we
postpone this to a later date.

4 years agoDrop obsolete component resources from spec
Adrian-Ken Rueegsegger [Thu, 16 Nov 2017 15:52:57 +0000 (16:52 +0100)]
Drop obsolete component resources from spec

4 years agoAdd requires section to component spec
Adrian-Ken Rueegsegger [Thu, 16 Nov 2017 13:39:19 +0000 (14:39 +0100)]
Add requires section to component spec

4 years agoReplace Desc_Strings array assignment with for loop
Adrian-Ken Rueegsegger [Thu, 19 Oct 2017 08:59:51 +0000 (10:59 +0200)]
Replace Desc_Strings array assignment with for loop

This removes calls to memmove which is not supported by the Muen
zero-footprint runtime.

4 years agoMake Libxhcidbg a SPARK library
Adrian-Ken Rueegsegger [Tue, 3 Oct 2017 10:25:54 +0000 (12:25 +0200)]
Make Libxhcidbg a SPARK library

4 years agoMerge branch 'master' into muen-spark
Adrian-Ken Rueegsegger [Fri, 27 Oct 2017 15:21:02 +0000 (17:21 +0200)]
Merge branch 'master' into muen-spark

4 years agoRemove TODO item devel master
Adrian-Ken Rueegsegger [Fri, 27 Oct 2017 12:18:24 +0000 (14:18 +0200)]
Remove TODO item

The code is now SPARK-compliant and can be analyzed using GPL 2017.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoDisable GNATprove warning for Transfer_Info.Dump_Stats
Adrian-Ken Rueegsegger [Thu, 26 Oct 2017 15:10:22 +0000 (17:10 +0200)]
Disable GNATprove warning for Transfer_Info.Dump_Stats

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoTighten representation of DbC context type
Adrian-Ken Rueegsegger [Tue, 24 Oct 2017 15:22:27 +0000 (17:22 +0200)]
Tighten representation of DbC context type

Instead of packing the DbC_Context type use a representation clause to
make sure it conforms to the specification given in "eXtensible Host
Controller Interface for Universal Serial Bus" revision 1.1, section
7.6.9, figure 120.

It was discovered that the latest GNAT version 18.0 generated a
different representation for this type which lead to broken data
transfer: only the first 4096 bytes (Max_Bulk_Size) would be transfered.

Note: The pragma Warnings is required to be compatible with older GNAT
      versions such as GPL 2016.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoInitialize all HW.DbC.State
Adrian-Ken Rueegsegger [Wed, 18 Oct 2017 12:57:25 +0000 (14:57 +0200)]
Initialize all HW.DbC.State

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoAdd Null_String_Desc constant
Adrian-Ken Rueegsegger [Thu, 19 Oct 2017 08:39:20 +0000 (10:39 +0200)]
Add Null_String_Desc constant

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoMinor: Adjust indentation in DbC body
Adrian-Ken Rueegsegger [Wed, 18 Oct 2017 12:49:13 +0000 (14:49 +0200)]
Minor: Adjust indentation in DbC body

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoInitialize Transfer_Rings.State
Adrian-Ken Rueegsegger [Wed, 18 Oct 2017 12:25:10 +0000 (14:25 +0200)]
Initialize Transfer_Rings.State

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoAdd Null_TP constant
Adrian-Ken Rueegsegger [Wed, 18 Oct 2017 12:24:45 +0000 (14:24 +0200)]
Add Null_TP constant

Use it to initialize transfer pointers.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoDisable "no effect" warning for busy loop
Adrian-Ken Rueegsegger [Wed, 4 Oct 2017 13:26:49 +0000 (15:26 +0200)]
Disable "no effect" warning for busy loop

The intended effect is passing of time.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoDisable SPARK for Copy_DMA_[In|Out] body
Adrian-Ken Rueegsegger [Tue, 3 Oct 2017 10:25:13 +0000 (12:25 +0200)]
Disable SPARK for Copy_DMA_[In|Out] body

The procedures use a memory overlay which is problematic in SPARK.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoUse Word32 modular type for stats counters
Adrian-Ken Rueegsegger [Tue, 3 Oct 2017 08:59:32 +0000 (10:59 +0200)]
Use Word32 modular type for stats counters

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoSimplify Walk_Finished procedure
Adrian-Ken Rueegsegger [Mon, 2 Oct 2017 16:36:45 +0000 (18:36 +0200)]
Simplify Walk_Finished procedure

Make Check_Finished a regular nested function instead of a nested generic
function that needs to be instantiated.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoFix SPARK warning regarding global and non-volatile function
Adrian-Ken Rueegsegger [Mon, 2 Oct 2017 16:14:24 +0000 (18:14 +0200)]
Fix SPARK warning regarding global and non-volatile function

The warning fixed by the change is:

 "Ring" constituent of "DMA" cannot act as global item of nonvolatile
 function "Ready"

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoFix SPARK warning regarding interfering context
Adrian-Ken Rueegsegger [Mon, 2 Oct 2017 15:58:15 +0000 (17:58 +0200)]
Fix SPARK warning regarding interfering context

The warning fixed by the change is:

 Call to a volatile function in interfering context is not allowed in
 SPARK

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoFix SPARK warning regarding nonvolatile functions
Adrian-Ken Rueegsegger [Mon, 2 Oct 2017 15:56:26 +0000 (17:56 +0200)]
Fix SPARK warning regarding nonvolatile functions

Convert functions to procedures with out parameter. Making them volatile
functions is not an option since this is not legal in SPARK see also
GNAT ticket [QA04-034].

The warning corrected by these changes is:

 Nonvolatile function with effectively volatile parameter is not
 allowed in SPARK

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoDrop unneeded use type clauses
Adrian-Ken Rueegsegger [Wed, 27 Sep 2017 09:29:09 +0000 (11:29 +0200)]
Drop unneeded use type clauses

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoAdd component XML spec template
Adrian-Ken Rueegsegger [Fri, 5 May 2017 16:55:34 +0000 (18:55 +0200)]
Add component XML spec template

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoUse generated spec values
Adrian-Ken Rueegsegger [Fri, 5 May 2017 16:55:27 +0000 (18:55 +0200)]
Use generated spec values

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoAdd Muen component build infrastructure
Adrian-Ken Rueegsegger [Fri, 5 May 2017 16:55:21 +0000 (18:55 +0200)]
Add Muen component build infrastructure

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoReplace array assignment with for loop
Adrian-Ken Rueegsegger [Fri, 5 May 2017 16:55:11 +0000 (18:55 +0200)]
Replace array assignment with for loop

This removes calls to memmove which is not supported by the Muen
zero-footprint runtime.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoDo not perform hardware reset
Adrian-Ken Rueegsegger [Wed, 10 May 2017 11:59:47 +0000 (13:59 +0200)]
Do not perform hardware reset

The debug capability interface is independent from the "regular"
xHCI interface, so a hardware reset is not necessary. This simplifies
the initialization and triggering potential issues if the reset timeout
is too small for a given hardware platform.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoREADME: Add remark regarding USB charging mode
Adrian-Ken Rueegsegger [Wed, 10 May 2017 12:20:54 +0000 (14:20 +0200)]
README: Add remark regarding USB charging mode

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoMinor: Avoid null else branch
Adrian-Ken Rueegsegger [Wed, 10 May 2017 12:07:51 +0000 (14:07 +0200)]
Minor: Avoid null else branch

Use conditional pragma Debug to avoid an else branch which is only
necessary for debug output.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
4 years agoInitial import of libxhcidbg library
Nico Huber [Fri, 5 May 2017 16:43:12 +0000 (18:43 +0200)]
Initial import of libxhcidbg library

This libxhcidbg library implements support for the xHCI debug capability
as specified in "eXtensible Host Controller Interface for Universal
Serial Bus (xHCI)", revision 1.1, section 7.6.

Signed-off-by: Nico Huber <nico.huber@secunet.com>