From 6a702a0d231d02360066f718c5ef4e38431ddc8a Mon Sep 17 00:00:00 2001 From: Gjorgji Date: Wed, 19 Oct 2011 15:22:31 +0100 Subject: Flash based ARB support. ST-Ericsson ID: 344196 ST-Ericsson FOSS-OUT ID: NA Change-Id: Id4e7569ebe5f41806ceb9d57915acd434c27ef93 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30353 Tested-by: Vlatko STENKOSKI Reviewed-by: Zoran ANCEVSKI --- lcmodule/source/LCM.rc | 206 ++++++++++----------- .../config/commands.xml | 22 +++ source/CEH/commands_impl.cpp | 7 + source/LCDriver.cpp | 7 + source/LCDriver.h | 24 ++- source/LCDriver.rc | 6 +- source/LCDriverMethods.cpp | 21 ++- source/LCDriverMethods.h | 1 + source/config/commands.xml | 22 +++ 9 files changed, 201 insertions(+), 115 deletions(-) diff --git a/lcmodule/source/LCM.rc b/lcmodule/source/LCM.rc index 93ea986..91d79f2 100644 --- a/lcmodule/source/LCM.rc +++ b/lcmodule/source/LCM.rc @@ -1,103 +1,103 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "windows.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x1fL -#ifdef _DEBUG - FILEFLAGS 0x9L -#else - FILEFLAGS 0x8L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "Build date: 2011-10-13" - VALUE "CompanyName", "STEricsson AB" - VALUE "FileDescription", "LCDriver Dynamic Link Library" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "Loader Communication Driver" - VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011" - VALUE "PrivateBuild", "Change-Id: I372f164a742d031976ae9aed50a509f130a101cd" - VALUE "ProductName", "CXA1104507 Loader Communication Module" - VALUE "ProductVersion", "PV5" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "windows.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""windows.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x1fL +#ifdef _DEBUG + FILEFLAGS 0x9L +#else + FILEFLAGS 0x8L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Build date: 2011-10-19" + VALUE "CompanyName", "STEricsson AB" + VALUE "FileDescription", "LCDriver Dynamic Link Library" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "Loader Communication Driver" + VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011" + VALUE "PrivateBuild", "Change-Id: Id4e7569ebe5f41806ceb9d57915acd434c27ef93" + VALUE "ProductName", "CXA1104507 Loader Communication Module" + VALUE "ProductVersion", "PV6" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml index d5cd45e..4c60f44 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml @@ -1084,6 +1084,28 @@ + + + Initialize a SW version table, intended for checking the ARB functionality. + + + + ARB Type to update + Length of the Data buffer + The data to write + + + + + + + + + + + + + diff --git a/source/CEH/commands_impl.cpp b/source/CEH/commands_impl.cpp index 8cceed9..768f075 100644 --- a/source/CEH/commands_impl.cpp +++ b/source/CEH/commands_impl.cpp @@ -421,3 +421,10 @@ ErrorCode_e LoaderRpcInterfaceImpl::DoneRPC_Security_BindPropertiesImpl(uint16 S return E_SUCCESS; } + +ErrorCode_e LoaderRpcInterfaceImpl::DoneRPC_Security_InitARBTableImpl(uint16 Session, ErrorCode_e Status) +{ + cmdResult_->GeneralResponse_Session = Session; + + return E_SUCCESS; +} diff --git a/source/LCDriver.cpp b/source/LCDriver.cpp index 6afb1c1..914483e 100644 --- a/source/LCDriver.cpp +++ b/source/LCDriver.cpp @@ -506,6 +506,13 @@ LCDRIVER_API int __cdecl Security_StoreSecureObject(LCDContext Context, const ch return Context->m_pObject->Do_OTP_StoreSecureObject(pchSourcePath, iDestination, iUseBulk); } +LCDRIVER_API int __cdecl Security_InitARBTable(LCDContext Context, int iType, int iLength, unsigned char *puarbdata) +{ + VERIFY_CONTEXT_STARTED(Context); + + return Context->m_pObject->Do_Security_InitARBTable(iType, iLength, puarbdata); +} + LCDRIVER_API int __cdecl A2_System_Shutdown(LCDContext Context) { VERIFY_CONTEXT_STARTED(Context); diff --git a/source/LCDriver.h b/source/LCDriver.h index d50007e..9f6db6e 100644 --- a/source/LCDriver.h +++ b/source/LCDriver.h @@ -165,12 +165,12 @@ extern "C" /// /// A pointer to a LCDContext where to store the newly created context or to put /// the previously created context if the context with the specified interface id already exists. - /// A zero terminated string conaining the interface unique ID. + /// A zero terminated string containing the interface unique ID. /// A pointer to a communication device read function. /// A pointer to a communication device write function. /// A pointer to a communication device cancel function. /// A pointer to a pointer where to store the adress of the loader communication module instance. - /// A pointer to a message loging function. + /// A pointer to a message logging function. /// A zero terminated string containing the path to the LCM library. /// A pointer to function which receives the progress updates. /// 0 if OK, otherwise non-zero. @@ -221,10 +221,10 @@ extern "C" LCDRIVER_API int __cdecl ConfigureCommunicationDevice(LCDContext Context, void *Read_fn, void *Write_fn, void *Cancel_fn); /// - /// Sets the callback for message loging. + /// Sets the callback for message logging. /// /// LCD context on which to execute the operation. - /// A pointer to a message loging function. + /// A pointer to a message logging function. /// 0 if OK, otherwise non-zero. LCDRIVER_API int __cdecl SetMessageCallback(LCDContext Context, void *Callback_fn); @@ -240,7 +240,7 @@ extern "C" /// Starts the context. Should be called after the required parameters are previously configured. /// /// LCD context on which to execute the operation. - /// A pointer to a pointer where to store the adress of the started communication instance. + /// A pointer to a pointer where to store the address of the started communication instance. /// 0 if OK, otherwise non-zero. LCDRIVER_API int __cdecl StartContext(LCDContext Context, void **Instance); @@ -370,7 +370,7 @@ extern "C" /// LCD context on which to execute the operation. /// Authentication type:0 = control key authentication,1 = certificate authentication. /// Size of puchData. - /// Data challange. + /// Data challenge. /// Status of the command. LCDRIVER_API int __cdecl System_Authenticate(LCDContext Context, int iType, int *piSize, unsigned char *puchdata); @@ -425,7 +425,7 @@ extern "C" /// The Loader shuts down the global communication and enters in a Relay working mode. /// /// Communication device number of the relay input (host device). - /// Communication device number of the relay ouptut (target device). + /// Communication device number of the relay output (target device). /// Communication device number for the loader commands (control device). /// Status of the command. LCDRIVER_API int __cdecl System_StartCommRelay(LCDContext Context, uint32 HostDeviceId, uint32 TargetDeviceId, uint32 ControlDeviceId); @@ -737,6 +737,16 @@ extern "C" /// Status of the command. LCDRIVER_API int __cdecl Security_StoreSecureObject(LCDContext Context, const char *pchSourcePath, int iDestination, int iUseBulk); + /// + /// This command is used to initialize a SW version table, intended for checking the ARB functionality. + /// + /// LCD context on which to execute the operation. + /// ARB data type:0 = COPS_ARB_DATA_TYPE_MODELID. + /// Length of puarbData. + /// For arb_data_type = COPS_ARB_DATA_TYPE_MODELID the data is a 16 bit modelid. + /// Status of the command. + LCDRIVER_API int __cdecl Security_InitARBTable(LCDContext Context, int iType, int iLength, unsigned char *puarbdata); + /// /// The A2 loader shuts down in a controlled fashion and proceeds to shut down the ME itself. /// The ME does not accept any further communication after a successful response from this diff --git a/source/LCDriver.rc b/source/LCDriver.rc index 05c89ca..ead99a3 100644 --- a/source/LCDriver.rc +++ b/source/LCDriver.rc @@ -81,15 +81,15 @@ BEGIN BEGIN BLOCK "000904b0" BEGIN - VALUE "Comments", "Build date: 2011-10-13" + VALUE "Comments", "Build date: 2011-10-19" VALUE "CompanyName", "STEricsson AB" VALUE "FileDescription", "LCDriver Dynamic Link Library" VALUE "FileVersion", "1, 0, 0, 1" VALUE "InternalName", "Loader Communication Driver" VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011" - VALUE "PrivateBuild", "Change-Id: I372f164a742d031976ae9aed50a509f130a101cd" + VALUE "PrivateBuild", "Change-Id: Id4e7569ebe5f41806ceb9d57915acd434c27ef93" VALUE "ProductName", "CXC 173 0865, LCDriver DLL" - VALUE "ProductVersion", "PT5" + VALUE "ProductVersion", "PT6" END END BLOCK "VarFileInfo" diff --git a/source/LCDriverMethods.cpp b/source/LCDriverMethods.cpp index 147bb2a..ca44754 100644 --- a/source/LCDriverMethods.cpp +++ b/source/LCDriverMethods.cpp @@ -703,7 +703,7 @@ ErrorExit: /// /// Authentication type:0 = control key authentication,1 = certificate authentication. /// Size of puchData. -/// Data challange. +/// Data challenge. /// Status of the command. int CLCDriverMethods::Do_System_Authenticate(int iType, int *piSize, unsigned char *puchdata) { @@ -1745,6 +1745,23 @@ ErrorExit: return ReturnValue; } +/// +/// This command is used to initialize a SW version table, intended for checking the ARB functionality. +/// +/// Status of the command. +int CLCDriverMethods::Do_Security_InitARBTable(int iType, int iLength, const unsigned char *puarbdata) +{ + uint16 uiSessionOut = 0; + int ReturnValue = E_SUCCESS; + + VERIFY_SUCCESS(IsMainThreadAlive()); + VERIFY_SUCCESS(m_pLoaderRpcFunctions->DoRPC_Security_InitARBTable(uiSessionOut, iType, iLength, puarbdata)); + VERIFY_SUCCESS(WaitForEvent(EVENT_GR_RECEIVED, GROUP_SECURITY, COMMAND_SECURITY_INITARBTABLE)); + +ErrorExit: + return ReturnValue; +} + /// /// The A2 loader shuts down in a controlled fashion and proceeds to shut down the ME itself. /// The ME does not accept any further communication after a successful response from this @@ -2179,7 +2196,7 @@ ErrorExit: } /// -/// Exit Z-protocol and start uing PROTROM-protocol. +/// Exit Z-protocol and start using PROTROM-protocol. /// /// Status of the command. int CLCDriverMethods::Do_Z_Exit_Z_Protocol() diff --git a/source/LCDriverMethods.h b/source/LCDriverMethods.h index c63cd84..fdc66f3 100644 --- a/source/LCDriverMethods.h +++ b/source/LCDriverMethods.h @@ -105,6 +105,7 @@ public: int Do_Security_GetProperties(int iUnitId, int *piSize, unsigned char *puchDataBuffer); int Do_Security_SetProperties(int iUnitId, int iSize, const unsigned char *puchDataBuffer); int Do_Security_BindProperties(); + int Do_Security_InitARBTable(int iType, int iLength, const unsigned char *puarbdata); // A2 Protocol Methods int Do_A2_System_Shutdown(); diff --git a/source/config/commands.xml b/source/config/commands.xml index 6060fe8..650cbfe 100644 --- a/source/config/commands.xml +++ b/source/config/commands.xml @@ -1085,6 +1085,28 @@ + + + Initialize a SW version table, intended for checking the ARB functionality. + + + + ARB Type to update + Length of the Data buffer + The data to write + + + + + + + + + + + + + -- cgit v1.2.3