summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorZoran Ancevski <zoran.ancevski@seavus.com>2011-06-29 17:42:43 +0100
committerViktor Mladenovski <viktor.mladenovski@seavus.com>2011-09-29 09:45:14 +0200
commit38e46271a9c25d289b12ff4723c51aa169698389 (patch)
tree7953235439302b39aa9438d44e6c3f0b7e466930 /source
parent632b3be5e00fd38294b0106705ac0ecdab9d62b6 (diff)
Add eMMC-MLC as bootable memory
Set Enhanced Area command added New error codes added ST-Ericsson ID: 325127 ST-Ericsson FOSS-OUT ID: NA Change-Id: I4a06ca15cccd4cba033aeb181db9bbd71b9ddac2 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/22864 Reviewed-by: QATEST Reviewed-by: Johan YDSTROM <johan.xj.ydstrom@stericsson.com> Tested-by: Vlatko STENKOSKI Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com> Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com> Conflicts: lcmodule/win_binaries/LCM.dll win_binaries/LCDriver_CNH1606432.dll
Diffstat (limited to 'source')
-rw-r--r--source/CEH/commands_impl.cpp7
-rw-r--r--source/LCDriver.cpp7
-rw-r--r--source/LCDriver.h10
-rw-r--r--[-rwxr-xr-x]source/LCDriver.rc6
-rw-r--r--source/LCDriverMethods.cpp21
-rw-r--r--source/LCDriverMethods.h1
-rw-r--r--source/config/commands.xml20
7 files changed, 69 insertions, 3 deletions
diff --git a/source/CEH/commands_impl.cpp b/source/CEH/commands_impl.cpp
index 066e1a1..a5839dc 100644
--- a/source/CEH/commands_impl.cpp
+++ b/source/CEH/commands_impl.cpp
@@ -166,6 +166,13 @@ ErrorCode_e LoaderRpcInterfaceImpl::DoneRPC_Flash_FlashRawImpl(uint16 Session, E
return E_SUCCESS;
}
+ErrorCode_e LoaderRpcInterfaceImpl::DoneRPC_Flash_SetEnhancedAreaImpl(uint16 Session, ErrorCode_e Status)
+{
+ cmdResult_->GeneralResponse_Session = Session;
+
+ return E_SUCCESS;
+}
+
ErrorCode_e LoaderRpcInterfaceImpl::DoneRPC_File_System_Operations_VolumePropertiesImpl(uint16 Session, ErrorCode_e Status, const char *FS_Type_p, const uint64 Size, const uint64 Free)
{
diff --git a/source/LCDriver.cpp b/source/LCDriver.cpp
index c68042c..9be6fb3 100644
--- a/source/LCDriver.cpp
+++ b/source/LCDriver.cpp
@@ -324,6 +324,13 @@ LCDRIVER_API int __cdecl Flash_FlashRaw(LCDContext Context, const char *pchPath,
return Context->m_pObject->Do_Flash_FlashRaw(pchPath, uiStart, uiLength, uiDevice, iUseBulk, iDeleteBuffers);
}
+LCDRIVER_API int __cdecl Flash_SetEnhancedArea(LCDContext Context, const char *pchPathToDump, uint64 uiStart, uint64 uiLength)
+{
+ VERIFY_CONTEXT_STARTED(Context);
+
+ return Context->m_pObject->Do_Flash_SetEnhancedArea(pchPathToDump, uiStart, uiLength);
+}
+
LCDRIVER_API int __cdecl FileSystem_VolumeProperties(LCDContext Context, const char *pchDevicePath, char *pchFSType, int *piFSTypeSize, uint64 *puiSize, uint64 *puiFree)
{
VERIFY_CONTEXT_STARTED(Context);
diff --git a/source/LCDriver.h b/source/LCDriver.h
index 73a6452..8e8f82a 100644
--- a/source/LCDriver.h
+++ b/source/LCDriver.h
@@ -480,6 +480,16 @@ extern "C"
LCDRIVER_API int __cdecl Flash_FlashRaw(LCDContext Context, const char *pchPath, uint64 uiStart, uint64 uiLength, uint32 uiDevice, int iUseBulk, int iDeleteBuffers);
/// <summary>
+ /// This command is used to set enhanced area in eMMC.
+ /// </summary>
+ /// <param name="Context">LCD context on which to execute the operation.</param>
+ /// <param name="pchPathToDump">Path to the device where area should be set.</param>
+ /// <param name="uiStart">Start of enhanced area [Byte].</param>
+ /// <param name="uiLength">Length of enhanced area [Byte].</param>
+ /// <returns>Status of the command.</returns>
+ LCDRIVER_API int __cdecl Flash_SetEnhancedArea(LCDContext Context, const char *pchPathToDump, uint64 uiStart, uint64 uiLength);
+
+ /// <summary>
/// This command retrieves the properties of the specified file system volume. It is issued by the PC application.
/// </summary>
/// <param name="Context">LCD context on which to execute the operation.</param>
diff --git a/source/LCDriver.rc b/source/LCDriver.rc
index 037465d..f681e3b 100755..100644
--- a/source/LCDriver.rc
+++ b/source/LCDriver.rc
@@ -81,16 +81,16 @@ BEGIN
BEGIN
BLOCK "000904b0"
BEGIN
- VALUE "Comments", "Build date: 2011-06-21"
+ VALUE "Comments", "Build date: 2011-06-29"
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 "OriginalFilename", "LCDriver_CNH1606432.dll"
- VALUE "PrivateBuild", "Change-Id: I5d459585cb065bad1cc16ffefd25ec28b731778d"
+ VALUE "PrivateBuild", "http://gerrit.lud.stericsson.com/gerrit/22864"
VALUE "ProductName", "CXC 173 0865, LCDriver DLL"
- VALUE "ProductVersion", "P1N"
+ VALUE "ProductVersion", "P1S"
END
END
BLOCK "VarFileInfo"
diff --git a/source/LCDriverMethods.cpp b/source/LCDriverMethods.cpp
index 7a54ecc..b329efd 100644
--- a/source/LCDriverMethods.cpp
+++ b/source/LCDriverMethods.cpp
@@ -1070,6 +1070,27 @@ ErrorExit:
}
/// <summary>
+/// This command is used to set enhanced area in eMMC.
+/// </summary>
+/// <param name="Context">LCD context on which to execute the operation.</param>
+/// <param name="pchPathToDump">Path to the device where area should be set.</param>
+/// <param name="uiStart">Start of enhanced area [Byte].</param>
+/// <param name="uiLength">Length of enhanced area [Byte].</param>
+/// <returns>Status of the command.</returns>
+int CLCDriverMethods::Do_Flash_SetEnhancedArea(const char *pchPathToDump, uint64 uiStart, uint64 uiLength)
+{
+ uint16 uiSessionOut = 0;
+ int ReturnValue = E_SUCCESS;
+
+ VERIFY_SUCCESS(IsMainThreadAlive());
+ VERIFY_SUCCESS(m_pLoaderRpcFunctions->DoRPC_Flash_SetEnhancedArea(uiSessionOut, pchPathToDump, uiStart, uiLength));
+ VERIFY_SUCCESS(WaitForEvent(EVENT_GR_RECEIVED, GROUP_FLASH, COMMAND_FLASH_SETENHANCEDAREA));
+
+ErrorExit:
+ return ReturnValue;
+}
+
+/// <summary>
/// This command retrieves the properties of the specified file system volume. It is issued by the PC application.
/// </summary>
/// <param name="pchDevicePath">Path of file system volume.</param>
diff --git a/source/LCDriverMethods.h b/source/LCDriverMethods.h
index 31be2f3..9e15cce 100644
--- a/source/LCDriverMethods.h
+++ b/source/LCDriverMethods.h
@@ -75,6 +75,7 @@ public:
int Do_Flash_DumpArea(const char *pchPathToDump, uint64 uiStart, uint64 uiLength, const char *pchFilePath, uint32 RedundantArea, int iUseBulk);
int Do_Flash_EraseArea(const char *pchPath, uint64 uiStart, uint64 uiLength);
int Do_Flash_FlashRaw(const char *pchPath, uint64 uiStart, uint64 uiLength, uint32 uiDevice, int iUseBulk, int iDeleteBuffers);
+ int Do_Flash_SetEnhancedArea(const char *pchPathToDump, uint64 uiStart, uint64 uiLength);
int Do_FileSystem_VolumeProperties(const char *pchDevicePath, char *pchFSType, int *piFSTypeSize, uint64 *puiSize, uint64 *puiFree);
int Do_FileSystem_FormatVolume(const char *pchDevicePath);
diff --git a/source/config/commands.xml b/source/config/commands.xml
index f075a44..03a8835 100644
--- a/source/config/commands.xml
+++ b/source/config/commands.xml
@@ -483,6 +483,26 @@
</permissions>
</command>
+ <command number="6" name="Set Enhanced Area" ADbg="false" source="PC" supportedcmdtype="longrunning">
+ <documentation>
+ This command is used to set enhanced area on eMC card.
+ </documentation>
+ <interface type="loader" name="SetEnhancedArea"/>
+ <input>
+ <value type="string" name="Path_p">Path to the device where area will be set.</value>
+ <value type="uint64" name="Start">Start address of enhanced area in bytes.</value>
+ <value type="uint64" name="Length">Length of the enhanced area in bytes.</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="ProductionModeLevel"/>
+ </permissions>
+ </command>
</group>
<group number="3" name="File system operations">