summaryrefslogtreecommitdiff
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
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
-rw-r--r--[-rwxr-xr-x]lcmodule/source/LCM.rc6
-rw-r--r--lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml20
-rw-r--r--lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml3
-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
10 files changed, 95 insertions, 6 deletions
diff --git a/lcmodule/source/LCM.rc b/lcmodule/source/LCM.rc
index 572d78e..1bc8f62 100755..100644
--- a/lcmodule/source/LCM.rc
+++ b/lcmodule/source/LCM.rc
@@ -69,16 +69,16 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
- VALUE "Comments", "Build date: 2011-06-21"
+ VALUE "Comments", "Build date: 2011-06-29"
VALUE "CompanyName", "ST Ericsson AB"
VALUE "FileDescription", "LCM Dynamic Link Library"
VALUE "FileVersion", "1,0,0,1"
VALUE "InternalName", "LCM"
VALUE "LegalCopyright", "Copyright (C) ST Ericsson 2011"
VALUE "OriginalFilename", "LCM.dll"
- VALUE "PrivateBuild", "Change-Id: I5d459585cb065bad1cc16ffefd25ec28b731778d"
+ VALUE "PrivateBuild", "http://gerrit.lud.stericsson.com/gerrit/22864"
VALUE "ProductName", "CXA1104507 Loader Communication Module"
- VALUE "ProductVersion", "P1S"
+ VALUE "ProductVersion", "P1T"
END
END
BLOCK "VarFileInfo"
diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml
index d37a13e..000e960 100644
--- a/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml
+++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml
@@ -482,6 +482,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="03" name="File system operations" supportedcmdtype="longrunning,shortrunning">
diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml
index 7435367..60d2fbe 100644
--- a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml
+++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml
@@ -144,6 +144,9 @@
<value number="775" name="E_FILE_TOO_LARGE" fatal="false" short="File too large.">The file is too large to fit in the partition. Increase the partition size and try to flash the file again. If problem still exist, report it</value>
<value number="776" name="E_FILE_OUT_OF_BOOT_AREA" fatal="false" short="File outside of boot area">The file is too large to fit in the boot area.</value>
<value number="777" name="E_DUMP_OUT_OF_FLASH_RANGE" fatal="false" short="Dump outside of flash range">The requested dump size is outside of the flash range, available flash range is dumped.</value>
+ <value number="778" name="E_ENHANCED_AREA_NOT_SET" fatal="false" short="Enhanced area is not set">Archive contains image marked for enhanced area, but enhanced area is not set on eMMC</value>
+ <value number="779" name="E_ENHANCED_IMAGE_OUT_OF_ENHANCED_AREA" fatal="false" short="Image out of enhanced area">Image marked for enhanced area has start and/or end address out of enhanced area</value>
+ <value number="780" name="E_SET_ENHANCED_AREA_FAILED" fatal="false" short="Setting of enhanced area failed">eMMC driver returned error while setting enhanced area</value>
<!--
* File management Fatal 900-950
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">