4 conditional compilation, 5 debug messaging, 6 distribution archive – Freescale Semiconductor SEC2SWUG User Manual

Page 43

Advertising
background image

SEC 2.0 Reference Device Driver User’s Guide, Rev. 0

Freescale Semiconductor

PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE

43

Porting

8.4 Conditional Compilation

See the makefile for specifics on the default build of the driver

8.5 Debug Messaging

The driver includes a

DBG

define that allows for debug message output to the developer's console. If defined in the

driver build, debug messages will be sent from various components in the driver to the console.

Messages come from various sections of the driver, and a bitmask is kept in a driver global variable so that the
developer can turn message sources on or off as required. This global is named

SEC2DebugLevel

, and contains an

ORed combination of any of the following bits:

In normal driver operation (not in a development setting), the DBG definition should be left undefined for best
performance.

8.6 Distribution Archive

For this release, the distribution archive consists of the source files listed in this section. Note that the user may wish
to reorganize header file locations consistent with the file location conventions appropriate for their system
configuration.

DBGTXT_SETRQ

Messages from request setup operations (new requests inbound from the application).

DBGTXT_SVCRQ

Messages from servicing device responses (ISR/deferred service routine handlers)
outbound to the application.

DBGTXT_INITDEV

Messages from the device/driver initialization process.

DBGTXT_DPDSHOW

Shows the content of a constructed DPD before it is handed to the security core.

DBGTXT_INFO

Shows a short banner at device initialization describing the driver and hardware version.

Header

Description

Sec2.h

Primary public header file for all users of the driver

Sec2Driver.h

Driver/Hardware interfaces, private to the driver itself

Sec2Descriptors.h

DPD type definitions

Sec2Notify.h

Structures for ISR/main thread communication

sec2_dpd_Table.h

DPD construction constants

sec2_cha.c

CHA mapping and management

sec2_dpd.c

DPD construction functionality

sec2_init.c

Device/driver initialization code

sec2_io.c

Basic register I/O primitives

sec2_ioctl.c

Operating system interfaces

sec2_request.c

Request/response

management

sec2_sctrMap.c

Scatter buffer identification and mapping

sec2isr.c

Interrupt service routine

Advertising