summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGjorgji <gjorgji.petkovski@seavus.com>2011-10-19 15:22:31 +0100
committerViktor Mladenovski <viktor.mladenovski@seavus.com>2011-10-28 18:56:05 +0200
commit6a702a0d231d02360066f718c5ef4e38431ddc8a (patch)
tree0c6bd094ba2c6cecc1bd18269d975657a5d1f85e
parent0ee6a4fffd68ec125fc7e7e0854aa10d8c09efc0 (diff)
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 <zoran.ancevski@seavus.com>
-rw-r--r--lcmodule/source/LCM.rc206
-rw-r--r--lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml22
-rw-r--r--source/CEH/commands_impl.cpp7
-rw-r--r--source/LCDriver.cpp7
-rw-r--r--source/LCDriver.h24
-rw-r--r--source/LCDriver.rc6
-rw-r--r--source/LCDriverMethods.cpp21
-rw-r--r--source/LCDriverMethods.h1
-rw-r--r--source/config/commands.xml22
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 @@
</permissions>
</command>
+ <command number="6" name="Init ARBTable" ADbg="false" source="PC" supportedcmdtype="longrunning">
+ <documentation>
+ Initialize a SW version table, intended for checking the ARB functionality.
+ </documentation>
+ <interface type="loader" name="InitARBTable"/>
+ <input>
+ <value type="uint32" name="Type">ARB Type to update</value>
+ <value type="uint32" name="DataLength">Length of the Data buffer</value>
+ <value type="buffer" name="DataBuff_p" length="DataLength">The data to write</value>
+ </input>
+ <output>
+ </output>
+ <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE">
+ <value ref="A1"/>
+ <value ref="CA"/>
+ </authentication>
+ <permissions>
+ <value ref="AdvanceServiceModeLevel"/>
+ <value ref="ProductionModeLevel"/>
+ </permissions>
+ </command>
+
</group>
<group number="08" name="ADbg application" supportedcmdtype="shortrunning">
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"
/// </summary>
/// <param name="pContext">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.</param>
- /// <param name="InterfaceId">A zero terminated string conaining the interface unique ID.</param>
+ /// <param name="InterfaceId">A zero terminated string containing the interface unique ID.</param>
/// <param name="Read_fn">A pointer to a communication device read function.</param>
/// <param name="Write_fn">A pointer to a communication device write function.</param>
/// <param name="Cancel_fn">A pointer to a communication device cancel function.</param>
/// <param name="Instance">A pointer to a pointer where to store the adress of the loader communication module instance.</param>
- /// <param name="Message_fn">A pointer to a message loging function.</param>
+ /// <param name="Message_fn">A pointer to a message logging function.</param>
/// <param name="LCMLibPath">A zero terminated string containing the path to the LCM library.</param>
/// <param name="ProgressBar_fn">A pointer to function which receives the progress updates.</param>
/// <returns>0 if OK, otherwise non-zero.</returns>
@@ -221,10 +221,10 @@ extern "C"
LCDRIVER_API int __cdecl ConfigureCommunicationDevice(LCDContext Context, void *Read_fn, void *Write_fn, void *Cancel_fn);
/// <summary>
- /// Sets the callback for message loging.
+ /// Sets the callback for message logging.
/// </summary>
/// <param name="Context">LCD context on which to execute the operation.</param>
- /// <param name="Callback_fn">A pointer to a message loging function.</param>
+ /// <param name="Callback_fn">A pointer to a message logging function.</param>
/// <returns>0 if OK, otherwise non-zero.</returns>
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.
/// </summary>
/// <param name="Context">LCD context on which to execute the operation.</param>
- /// <param name="Instance">A pointer to a pointer where to store the adress of the started communication instance.</param>
+ /// <param name="Instance">A pointer to a pointer where to store the address of the started communication instance.</param>
/// <returns>0 if OK, otherwise non-zero.</returns>
LCDRIVER_API int __cdecl StartContext(LCDContext Context, void **Instance);
@@ -370,7 +370,7 @@ extern "C"
/// <param name="Context">LCD context on which to execute the operation.</param>
/// <param name="iType">Authentication type:0 = control key authentication,1 = certificate authentication.</param>
/// <param name="piSize">Size of puchData.</param>
- /// <param name="puchdata">Data challange. </param>
+ /// <param name="puchdata">Data challenge. </param>
/// <returns>Status of the command.</returns>
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.
/// </summary>
/// <param name="HostDeviceId">Communication device number of the relay input (host device).</param>
- /// <param name="TargetDeviceId">Communication device number of the relay ouptut (target device).</param>
+ /// <param name="TargetDeviceId">Communication device number of the relay output (target device).</param>
/// <param name="ControlDeviceId">Communication device number for the loader commands (control device).</param>
/// <returns>Status of the command.</returns>
LCDRIVER_API int __cdecl System_StartCommRelay(LCDContext Context, uint32 HostDeviceId, uint32 TargetDeviceId, uint32 ControlDeviceId);
@@ -738,6 +738,16 @@ extern "C"
LCDRIVER_API int __cdecl Security_StoreSecureObject(LCDContext Context, const char *pchSourcePath, int iDestination, int iUseBulk);
/// <summary>
+ /// This command is used to initialize a SW version table, intended for checking the ARB functionality.
+ /// </summary>
+ /// <param name="Context">LCD context on which to execute the operation.</param>
+ /// <param name="iType">ARB data type:0 = COPS_ARB_DATA_TYPE_MODELID.</param>
+ /// <param name="iLength">Length of puarbData.</param>
+ /// <param name="puarbdata">For arb_data_type = COPS_ARB_DATA_TYPE_MODELID the data is a 16 bit modelid.</param>
+ /// <returns>Status of the command.</returns>
+ LCDRIVER_API int __cdecl Security_InitARBTable(LCDContext Context, int iType, int iLength, unsigned char *puarbdata);
+
+ /// <summary>
/// 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
/// command has been returned.
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:
/// </summary>
/// <param name="iType">Authentication type:0 = control key authentication,1 = certificate authentication.</param>
/// <param name="piSize">Size of puchData.</param>
-/// <param name="puchdata">Data challange. </param>
+/// <param name="puchdata">Data challenge. </param>
/// <returns> Status of the command.</returns>
int CLCDriverMethods::Do_System_Authenticate(int iType, int *piSize, unsigned char *puchdata)
{
@@ -1746,6 +1746,23 @@ ErrorExit:
}
/// <summary>
+/// This command is used to initialize a SW version table, intended for checking the ARB functionality.
+/// </summary>
+/// <returns> Status of the command.</returns>
+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;
+}
+
+/// <summary>
/// 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
/// command has been returned.
@@ -2179,7 +2196,7 @@ ErrorExit:
}
/// <summary>
-/// Exit Z-protocol and start uing PROTROM-protocol.
+/// Exit Z-protocol and start using PROTROM-protocol.
/// </summary>
/// <returns> Status of the command.</returns>
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 @@
</permissions>
</command>
+ <command number="6" name="Init ARBTable" ADbg="false" source="PC">
+ <documentation>
+ Initialize a SW version table, intended for checking the ARB functionality.
+ </documentation>
+ <interface type="loader" name="InitARBTable"/>
+ <input>
+ <value type="uint32" name="Type">ARB Type to update</value>
+ <value type="uint32" name="DataLength">Length of the Data buffer</value>
+ <value type="buffer" name="DataBuff_p" length="DataLength">The data to write</value>
+ </input>
+ <output>
+ </output>
+ <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE">
+ <value ref="A1"/>
+ <value ref="CA"/>
+ </authentication>
+ <permissions>
+ <value ref="AdvanceServiceModeLevel"/>
+ <value ref="ProductionModeLevel"/>
+ </permissions>
+ </command>
+
</group>
<group number="8" name="ADbg application">