diff options
author | Missy Connell <missyc@us.ibm.com> | 2012-07-16 14:46:47 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-08-27 17:36:28 -0500 |
commit | 428319443515f3eca49f4537422103f9534b8dd3 (patch) | |
tree | bd3f8fa557088eab78af0eb8e3af4b458fd5730d /src/include/usr | |
parent | 0bbf9079c5659d43a79daf54ccf3b1aad7665193 (diff) | |
download | talos-hostboot-428319443515f3eca49f4537422103f9534b8dd3.tar.gz talos-hostboot-428319443515f3eca49f4537422103f9534b8dd3.zip |
Scan Functionality
Supports Scan read/write
Change-Id: I3ccecb772cff3de80062a35219fbfd9fdefd3d82
RTC:34014
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1470
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r-- | src/include/usr/devicefw/userif.H | 61 | ||||
-rw-r--r-- | src/include/usr/hbotcompid.H | 52 | ||||
-rw-r--r-- | src/include/usr/scan/scan_reasoncodes.H | 56 | ||||
-rw-r--r-- | src/include/usr/scan/scanif.H | 46 |
4 files changed, 170 insertions, 45 deletions
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H index 5fa17dae7..9f4463661 100644 --- a/src/include/usr/devicefw/userif.H +++ b/src/include/usr/devicefw/userif.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/devicefw/userif.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2011-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/devicefw/userif.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ /** @file userif.H * @brief Provides the user application interfaces for performing device * access. @@ -50,6 +49,7 @@ namespace DeviceFW FSI, SPD, MVPD, + SCAN, LAST_ACCESS_TYPE, }; @@ -109,6 +109,21 @@ namespace DeviceFW static_cast<uint64_t>(( i_keyword )) /** + * Construct the device addressing parameters for the SCAN device ops. + * @param[in] i_ring - The ring address to scan + * @param[in] i_ringlen - The length of the ring to scan in bits + * NOTE: This value is the scanring length must + * match the scandef file value. + * @param[in] i_flag - Specific requests on the scan such as + * check the header, or set pulse option. + * Flag options are located in: src/include/usr/scan/scanif.H + */ + #define DEVICE_SCAN_ADDRESS( i_ring, i_ringlen, i_flag )\ + DeviceFW::SCAN, static_cast<uint64_t>(( i_ring )),\ + static_cast<uint64_t>(( i_ringlen )),\ + static_cast<uint64_t>(( i_flag )) + + /** * @brief Perform a hardware read operation. * * @param[in] i_target Device target to operate on. diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H index 667a2a811..7fb1b3a47 100644 --- a/src/include/usr/hbotcompid.H +++ b/src/include/usr/hbotcompid.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/hbotcompid.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hbotcompid.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #ifndef HBOTCOMPID_H #define HBOTCOMPID_H /** @@ -241,6 +241,14 @@ const compId_t HBATTN_COMP_ID = 0x1800; const char HBATTN_COMP_NAME[] = "attn"; //@} +/** @name SCAN + * SCAN component + */ +//@{ +const compId_t SCAN_COMP_ID = 0x1900; +const char SCAN_COMP_NAME[] = "scan"; +//@} + /** @name RESERVED * Reserved component ID. x3100 is the component ID * of FipS ERRL component. Due to our use of diff --git a/src/include/usr/scan/scan_reasoncodes.H b/src/include/usr/scan/scan_reasoncodes.H new file mode 100644 index 000000000..15b83a4f8 --- /dev/null +++ b/src/include/usr/scan/scan_reasoncodes.H @@ -0,0 +1,56 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/scan/scan_reasoncodes.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +#ifndef __SCAN_REASONCODES_H +#define __SCAN_REASONCODES_H + +#include <hbotcompid.H> + +namespace SCAN +{ + enum SCANModuleId + { + MOD_SCANDD_INVALID = 0x00, /**< Zero is an invalid module id */ + MOD_SCANDD_DDOP = 0x01, /**< scandd.C : ddOp */ + MOD_SCANDD_DOSCAN = 0x02, /**< scandd.C : ScanDD::scanDoScan */ + + }; + + enum SCANReasonCode + { + RC_INVALID_LENGTH = SCAN_COMP_ID | 0x01, + RC_INVALID_RING_ADDRESS = SCAN_COMP_ID | 0x02, + RC_INVALID_OPERATION = SCAN_COMP_ID | 0x03, + RC_INVALID_BUF_SIZE = SCAN_COMP_ID | 0x04, + RC_SCAN_LAST_BITS_FAIL = SCAN_COMP_ID | 0x05, + RC_SCAN_TYPE_SELECT_ERROR = SCAN_COMP_ID | 0x06, + RC_HEADER_WRITE_ERROR = SCAN_COMP_ID | 0x07, + RC_HEADER_READ_ERROR = SCAN_COMP_ID | 0x08, + RC_SCAN_READ_FAIL = SCAN_COMP_ID | 0x09, + RC_SCAN_READ_EXTRA_FAIL = SCAN_COMP_ID | 0x0a, + RC_SCAN_WRITE_FAIL = SCAN_COMP_ID | 0x0b, + RC_HEADER_DATA_MISMATCH = SCAN_COMP_ID | 0x0c, + RC_INVALID_DATA = SCAN_COMP_ID | 0x0d, + }; +}; + +#endif diff --git a/src/include/usr/scan/scanif.H b/src/include/usr/scan/scanif.H new file mode 100644 index 000000000..e164cf6cb --- /dev/null +++ b/src/include/usr/scan/scanif.H @@ -0,0 +1,46 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/scan/scanif.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +#ifndef __SCANIF_H +#define __SCANIF_H + + +namespace SCAN +{ + + /** + * SCAN Interface Flags + * This is a bitmap to allow the user to specify multiple modes + */ + enum ScanFlags + { + NO_HEADER_CHECK = 0x00000001, /**< SCAN Do Not do Header Check*/ + SET_PULSE = 0x00000002 /**< SCAN set pulse */ + //NEXT_FLAG = 0x00000004 + //NEXT_FLAG1 = 0x00000008 + }; + + + +} + +#endif |