libxhcidbg.git
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 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>