=pod

=head1 NAME

hab_log_parser - read and parse HAB audit events from NXP i.MX processors

=head1 SYNOPSIS

B<hab_log_parser> [B<--sdp> I<device> | B<--input-bin> I<file> | B<--input-ascii> I<file>]
[B<--output> I<file>] [B<--verbose>]

=head1 NOTE

This manpage is a short description of NXP B<hab_log_parser>.
For a detailed discussion refer to the Code Signing Tool User Guide UG10106,
section 5.8 for usage, and to the High Assurance Boot Version 4 API Reference
Manual RM00298 section 4 for structures contained in I<image>.
The user guide and the reference manual can be obtained from www.nxp.com and is
excluded from Debian for copyright reasons.

=head1 DESCRIPTION

B<hab_log_parser> is a tool to read HAB persisntent memory dumps from OCRAM of
NXP i.MX SoCs through USB or files and print the parsed HAB events.

=head1 OPTIONS

=over 4

=item B<-s>, B<--sdp> I<device>

Select Serial Downloader Protocol (SDP) mode for download over USB.
Requires specifying the device type.
Can be one of B<imx6s>, B<imx6dl>, B<imx6q>, B<imx6d>, B<imx6qp>, B<imx6dp>,
B<imx6sl>, B<imx6sll>, B<imx6sx>, B<imx6ul>, B<imx6ull>, B<imx7s>, B<imx7d>,
B<imx7ulpa7>, B<imx7ulpm4>, B<imx8mq>, B<imx8mm>, B<imx8mn>, B<imx8mp>.

=item B<-b>, B<--input-bin> I<file>

Read HAB4 persistent memory content dump from binary file.

=item B<-a>, B<--input-ascii> I<file>

Read HAB4 persistent memory content dump from ASCII file.

=item B<-o>, B<--output> I<file>

Specify file where to save parsed output. If not provided, logs will be printed
to stdout.

=item B<-b>, B<--verbose>

Enable verbose output.

=back

=head1 EXAMPLES

=head2 Parsing memory dumps

Memory dumps may for example be retrieved from u-boot console with the md.b
command, or by using JTAG debubggers.

To read persistant memory from an i.MX 6s SoC over USB and save parsed logs to
text file.

  hab_log_parser -s imx6s -o hab_log_parsed.txt

To read binary file containing a memory dump and save parsed logs to text file:

  hab_log_parser -b hab4_pers.bin -o hab_log_parsed.txt

=cut
