# HG changeset patch # User hgs # Date 1272056084 -3600 # Node ID 6e99f362aa465a84680c57432c298402c83af18c # Parent 947f0dc9f7a81f92efdf2f5d5b79c1eaeb96551f 201015_03 diff -r 947f0dc9f7a8 -r 6e99f362aa46 kernel/eka/drivers/hcr/hcr_hai.h --- a/kernel/eka/drivers/hcr/hcr_hai.h Fri Apr 16 16:24:37 2010 +0300 +++ b/kernel/eka/drivers/hcr/hcr_hai.h Fri Apr 23 21:54:44 2010 +0100 @@ -100,7 +100,7 @@ /** This method returns the address of the override repository that provides override values for the variant. Typically this repository - is held in NAND flash and shadowed in RAM by the OS loader. It is + is held in local media and shadowed in RAM by the OS loader. It is a read-only settings repository. This repository is optional and may be absent in which case 0 should be returned in aAddr. @@ -154,7 +154,7 @@ }; /** Union type used to hold either the literal value or an offset from the - start if the setting repository to the setting value. Used in file and RAM + start of the setting repository to the setting value. Used in file and RAM mapped settings. */ union USettingValueF @@ -204,7 +204,7 @@ USettingValueC iValue; }; - /** This structure holds a setting define in a file or memory within a file + /** This structure holds a setting defined in a file or memory within a file based repository. @see SRepositoryFile */ @@ -266,7 +266,7 @@ /** This class is the root object for a file or memory based settings repository. It assumes the repository has a flat contiguous layout and - employees offsets to data rather then C++ pointers as in compiled + employes offsets to data rather then C++ pointers as in compiled setting repositories. All offsets are relative to the address of &iHdr member. The last two members are expected to be present in the file/memory as shown @@ -369,7 +369,7 @@ /** Global macro used as last entry in a PSL compiled repository static data. The main use of this is to avoid the "last entry needs no following comma" issue -and to aid HCR initial thead testing. +and to aid HCR initial thread testing. The Setting (0xffffffff, 0xffffffff) was choosen as it should never appear in a real variant as this category UID can not be allocated offically. Testers should also be aware of the special use of this setting so as not to use it in diff -r 947f0dc9f7a8 -r 6e99f362aa46 kernel/eka/drivers/power/smppower/idlehelper.cia --- a/kernel/eka/drivers/power/smppower/idlehelper.cia Fri Apr 16 16:24:37 2010 +0300 +++ b/kernel/eka/drivers/power/smppower/idlehelper.cia Fri Apr 23 21:54:44 2010 +0100 @@ -1,23 +1,19 @@ -/* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* os\kernelhwsrv\kernel\eka\drivers\power\smpidlehelper.cpp -* Impelentation of helper classes required to implement CPU idle -* functionality in a SMP BSP. -* -*/ - +// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL " http://www.eclipse.org/legal/epl-v10.html ". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// os\kernelhwsrv\kernel\eka\drivers\power\smpidlehelper.cpp +// Impelentation of helper classes required to implement CPU idle +// functionality in a SMP BSP. /** @file diff -r 947f0dc9f7a8 -r 6e99f362aa46 kernel/eka/drivers/power/smppower/idlehelper.cpp --- a/kernel/eka/drivers/power/smppower/idlehelper.cpp Fri Apr 16 16:24:37 2010 +0300 +++ b/kernel/eka/drivers/power/smppower/idlehelper.cpp Fri Apr 23 21:54:44 2010 +0100 @@ -1,23 +1,19 @@ -/* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* os\kernelhwsrv\kernel\eka\drivers\power\smppower\idlehelper.cpp -* Impelentation of helper classes required to implement CPU idle -* functionality in a SMP BSP. -* -*/ - +// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL " http://www.eclipse.org/legal/epl-v10.html ". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// os\kernelhwsrv\kernel\eka\drivers\power\smppower\idlehelper.cpp +// Impelentation of helper classes required to implement CPU idle +// functionality in a SMP BSP. /** @file diff -r 947f0dc9f7a8 -r 6e99f362aa46 kernel/eka/drivers/power/smppower/idlehelper_lib.mmp --- a/kernel/eka/drivers/power/smppower/idlehelper_lib.mmp Fri Apr 16 16:24:37 2010 +0300 +++ b/kernel/eka/drivers/power/smppower/idlehelper_lib.mmp Fri Apr 23 21:54:44 2010 +0100 @@ -1,9 +1,9 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" +// under the terms of the License "Eclipse Public License v1.0" // which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// at the URL " http://www.eclipse.org/legal/epl-v10.html ". // // Initial Contributors: // Nokia Corporation - initial contribution. @@ -14,7 +14,6 @@ // e32\drivers\power\smppower\smpidlehelper_lib.mmp // Helper library required to implement CPU idle // functionality in a SMP BSP. -// #define NO_EKERN_LIB diff -r 947f0dc9f7a8 -r 6e99f362aa46 kernel/eka/drivers/power/smppower/sample_idlehandler/smpidlehandler.cpp --- a/kernel/eka/drivers/power/smppower/sample_idlehandler/smpidlehandler.cpp Fri Apr 16 16:24:37 2010 +0300 +++ b/kernel/eka/drivers/power/smppower/sample_idlehandler/smpidlehandler.cpp Fri Apr 23 21:54:44 2010 +0100 @@ -1,23 +1,19 @@ -/* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* os\kernelhwsrv\kernel\eka\drivers\power\smppower\sample_idlehandler\smpidlehandler.cpp -* implements a basic smp idle handler generic layer that can be derived from -* to create platform specific SMP idle handlers -* -*/ - +// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL " http://www.eclipse.org/legal/epl-v10.html ". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// os\kernelhwsrv\kernel\eka\drivers\power\smppower\sample_idlehandler\smpidlehandler.cpp +// implements a basic smp idle handler generic layer that can be derived from +// to create platform specific SMP idle handlers /** @file diff -r 947f0dc9f7a8 -r 6e99f362aa46 kernel/eka/drivers/power/smppower/sample_idlehandler/smpidlehandler_lib.mmp --- a/kernel/eka/drivers/power/smppower/sample_idlehandler/smpidlehandler_lib.mmp Fri Apr 16 16:24:37 2010 +0300 +++ b/kernel/eka/drivers/power/smppower/sample_idlehandler/smpidlehandler_lib.mmp Fri Apr 23 21:54:44 2010 +0100 @@ -1,9 +1,9 @@ // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" +// under the terms of the License "Eclipse Public License v1.0" // which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// at the URL " http://www.eclipse.org/legal/epl-v10.html ". // // Initial Contributors: // Nokia Corporation - initial contribution. @@ -14,7 +14,6 @@ // eka\drivers\power\smppower\sample_idlehandler\smpidlehandler_lib.mmp // Helper library required to implement CPU idle // functionality in a SMP BSP. -// #define NO_EKERN_LIB diff -r 947f0dc9f7a8 -r 6e99f362aa46 kernel/eka/include/e32ver.h --- a/kernel/eka/include/e32ver.h Fri Apr 16 16:24:37 2010 +0300 +++ b/kernel/eka/include/e32ver.h Fri Apr 23 21:54:44 2010 +0100 @@ -28,7 +28,7 @@ const TInt KE32MajorVersionNumber=2; const TInt KE32MinorVersionNumber=0; -const TInt KE32BuildVersionNumber=3040; +const TInt KE32BuildVersionNumber=3060; const TInt KMachineConfigurationMajorVersionNumber=1; const TInt KMachineConfigurationMinorVersionNumber=0; diff -r 947f0dc9f7a8 -r 6e99f362aa46 kernel/eka/kernel/ekern.mmp --- a/kernel/eka/kernel/ekern.mmp Fri Apr 16 16:24:37 2010 +0300 +++ b/kernel/eka/kernel/ekern.mmp Fri Apr 23 21:54:44 2010 +0100 @@ -85,7 +85,7 @@ sourcepath ../klib/arm source ckdes8.cia cumem.cia cbma.cia sourcepath ../common/arm -source carray.cia cdes8.cia cheap.cia cmem.cia +source carray.cia cdes8.cia cmem.cia #if defined(GCC32) source cgcchelp.cpp cgcchelp.cia #elif defined(ARMCC) @@ -164,7 +164,8 @@ source kheap.cpp bma.cpp sourcepath ../common -source alloc.cpp array.cpp des8.cpp heap.cpp mem.cpp +source alloc.cpp array.cpp des8.cpp mem.cpp +source heap_hybrid.cpp debugfunction.cpp source secure.cpp macro __EXPORT_MEMCPY__ #ifdef MARM diff -r 947f0dc9f7a8 -r 6e99f362aa46 kernel/eka/release.txt --- a/kernel/eka/release.txt Fri Apr 16 16:24:37 2010 +0300 +++ b/kernel/eka/release.txt Fri Apr 23 21:54:44 2010 +0100 @@ -1,3 +1,247 @@ +Version 2.00.3060 +================= +(Made by vfebvre 12/04/2010) + +1. vfebvre + 1. DEF145318 [System Build]:CBR stage errors in MSF00392 vtb101sf and vfuture builds + + +Version 2.00.3059 +================= +(Made by vfebvre 09/04/2010) + +1. seolney + 1. ou1cimx1#339838 t_dma times out on SMP datapaged system + Reduce number of test iterations and different fragment sizes tested + +2. cnotton + 1. ou1cimx1#341002 Wrong copyright header under sf\os\kernelhwsrv\kernel\eka\drivers\power\smppower + + +Version 2.00.3058 +================= +(Made by vfebvre 09/04/2010) + +1. stmansfi + 1. DEF145294 Update HCR API comments and documentation + +2. vfebvre + 1. DEF145224 Change distribution policy ID of hcr/documents to 1 + +3. marisood + 1. PDEF145242 E32TEST T_PRMACCTSTSIM fails on NE1_TB.ARMV5.UDEB.DATAPAGE + + +Version 2.00.3057 +================= +(Made by vfebvre 08/04/2010) + +1. lforynsk + 1. DEF144907: T_CPUTIME fails on several platforms + +2. stmansfi + 1. DEF145153 GPIO template implementation should use VARIANT.MMH to specify its .LIB file to + +3. shenzhou + 1. ou1cimx1#335116:change_otg_descriptor_returned_location + +4. jcoppear + 1. PDEF144022: T_SHADOW failing test that ROM is section mapped (t_shadow.cpp:360) + +5. shubmurt + 1. DEF145149 WDP: paging benchmarks minimum value incorrectly reported + + +Version 2.00.3056 +================= +(Made by vfebvre 08/04/2010) + +1. mmoate + 1. REQ 417-52840 Upgrade memory allocator to a higher performance allocator + PackageReleaseID=413335 FeaturePlanID=413327 + CR503 RHeap hybrid heap reimplementation + + +Version 2.00.3055 +================= +(Made by vfebvre 08/04/2010) + +1. garciato + 1. MINOR CHANGE Moving headers to EPL for kern core stats test code + + +Version 2.00.3054 +================= +(Made by vfebvre 29/03/2010) + +1. vfebvre + 1. DEF145148 E32TEST T_SHBUF_OWN test failure investigation (t_shbuf.cpp:2083) + +2. garciato + 1. DEF144785 t_timerduration sporadically fails on builds with load balancer and idle code + +3. dogunjum + 1. DEF145185 TEventModifier in e32keys.h does not support QT Key Event Handling + New key event modifiers added to TEventModifier in e32keys.h. EModifierLongKey = 0x20000000 + for Long key press and EModiferExternalKey = 0x40000000 for Accessory key event. EAllModifiers + a member of TEventModifier changed to support the addition of the new key event modifiers. + i.e. EAllModifiers=0x1fffffff changed to EAllModifiers=0xffffffff. + +4. gcochran + 1. PDEF145132 TRLM-83EGSL Paging HAL stats not visible + +5. mmoate + 1. PDEF145152 \e32utils\nistsecurerng\* has incorrect distribution.policy.s60 ID + + +Version 2.00.3053 +================= +(Made by vfebvre 26/03/2010) + +1. jimmzhou + 1. ou1cimx1#320634 [kernelmcl]Phone Crash when USB MobileTV device CU-14A is connected + + +Version 2.00.3052 +================= +(Made by vfebvre 25/03/2010) + +1. gavguo + 1. REQ:417-57581:RVCT 4 compatible software codebase + PackageReleaseID=462344 FeaturePlanID=444184 + + +Version 2.00.3051 +================= +(Made by vfebvre 25/03/2010) + +1. lanerobe + 1. PDEF145143 KHS Documentation is not contributed to the Symbian Foundation + + +Version 2.00.3050 +================= +(Made by vfebvre 23/03/2010) + +1. josezhou + 1. ou1cimx1#312908 : RUsbHubDriver interface can only be called by FDF, but multiple clients might have conflict requests to the interfaces + +2. lanerobe + 1. DEF145040 E32TEST T_THREAD test failure investigation + + +Version 2.00.3049 +================= +(Made by vfebvre 22/03/2010) + +1. lanerobe + 1. DEF145041 E32TEST T_TIMER test failure investigation + + +Version 2.00.3048 +================= +(Made by vfebvre 22/03/2010) + +1. lanerobe + 1. DEF145039 E32TEST T_SDRIVERS test failure investigation + 2. PDEF144928 Symbian Foundation build error due to missing usb components + + +Version 2.00.3047 +================= +(Made by vfebvre 19/03/2010) + +1. jimmzhou + 1. ou1cimx1#310882: BELS-7YXDRY RDevUsbcClient::ReadUntilShort complete unexpected + +2. lanerobe + 1. DEF144874 Intermittent E32TEST T_MSTIM test failures on the H4 (line 371) + +3. fagortz + 1. DEF144667 WDP: t_medch crashes the system if a page out happens + + +Version 2.00.3046 +================= +(Made by vfebvre 18/03/2010) + +1. lanerobe + 1. DEF145036 T_CONTEXT test failure investigation + +2. ferporta + 1. DEF145026 Remove SCM memory model dependency + 2. DEF144875 E32TEST T_RMDEBUG2_OEM failing on UREL SMP configurations + +3. genwei + 1. ou1cimx1#301181: The device under test exits the high-speed host electrical test mode without operator action + + +Version 2.00.3045 +================= +(Made by vfebvre 17/03/2010) + +1. lanerobe + 1. MINOR_CHANGE Fix copyright notices on power management code + +2. martai + 1. PDEF145027 FMM - BTrace messages EKernelMemory are missing from the flexible memory model + + +Version 2.00.3044 +================= +(Made by vfebvre 15/03/2010) + +1. jimmzhou + 1. CR ou1cimx1#300759: kernel_mcl: A malfunctioning peripheral still cannot be reported to the UI, breaking the "no silent failures" policy of USB OTG + TKEA-836MEU + +2. martai + 1. PDEF144923 FMM - The virtual address space manager allocates incorrect size heap cells + 2. DEF144936 It is not possible to free a RAM zone via its ID + + +Version 2.00.3043 +================= +(Made by vfebvre 12/03/2010) + +1. seolney + 1. DEF144850 E32TEST T_DMASIM fails on x86pc (level 012) + +2. necliffo + 1. PDEF144977 EMOL-83CGYT: SPB 10.1: Device freeze when corrupted memory card is used. + +3. mmaksymi + 1. DEF144804 OST Kernel Code Doesn't Comply with Header Relocation Rules + + +Version 2.00.3042 +================= +(Made by vfebvre 11/03/2010) + +1. jimmzhou + 1. DEF144836: for submission to MCL: TSW defect TSW YXIO-82ZBP + +2. gcochran + 1. PDEF144935 MMEG-83F9A8 - Misleading error message in ExecHandler::ThreadRequestSignal + +3. tommarti + 1. DEF144920 Wrong license in some FMM source files + + +Version 2.00.3041 +================= +(Made by vfebvre 10/03/2010) + +1. gayarama + 1. PDEF144756 t_tbus_datapaging test fails on Vasco/TB9.2 due to fileserver api issue + +2. martai + 1. DEF144781: MMEG-8369AQ RThread::Create documentation doesn't mention the minimum stack size + +3. davegord + 1. DEF144743 Kernel Message Pool corrupted by delayed DeadClientCleanup + + Version 2.00.3040 ================= (Made by vfebvre 09/03/2010) diff -r 947f0dc9f7a8 -r 6e99f362aa46 kerneltest/e32test/dma/t_dma.cpp --- a/kerneltest/e32test/dma/t_dma.cpp Fri Apr 16 16:24:37 2010 +0300 +++ b/kerneltest/e32test/dma/t_dma.cpp Fri Apr 23 21:54:44 2010 +0100 @@ -348,7 +348,7 @@ TBuf<16> name; name = _L("TESTER-"); name.AppendNum(aIdx); - test(iThread.Create(name, ThreadFunction, 0x1000, NULL, this) == KErrNone); + test(iThread.Create(name, ThreadFunction, 0x2000, NULL, this) == KErrNone); iThread.SetPriority(EPriorityLess); iThread.Logon(iStatus); SetActive(); @@ -466,28 +466,27 @@ do { fragSize -= step; - // make sure size is aligned + + // Make sure size is aligned fragSize = fragSize & ~Info.iMemAlignMask; + if(fragSize == 0) + break; r = OpenChannel(iMaxFragCount, fragSize); test_KErrNone(r); for(iFragCount=1; iFragCount <= iMaxFragCount; iFragCount++) { - test.Printf(_L("Fragment size %d bytes, %d fragments\nIter: "), fragSize, iFragCount); + test.Printf(_L("Chan %d Fragment size %d bytes, %d fragments, %d iters\n"), iChannelId, fragSize, iFragCount, iInnerIterations); for(TInt i=0; i 0); iTimer.Close(); @@ -527,7 +526,7 @@ User::WaitForRequest(rs, timerStatus); if(rs.Int() == KRequestPending) { - RDebug::Print(_L("Transfer timed out!")); + RDebug::Printf("Chan %d: Transfer timed out!", iChannelId); // timed out test(EFalse); } @@ -1188,9 +1187,9 @@ // intended to find errors in PSL implmentations const TInt iterPerFragSize = 1; #else - const TInt iterPerFragSize = 30; + const TInt iterPerFragSize = 10; #endif - const TInt rangeMaxFragCount = 8; + const TInt rangeMaxFragCount = 5; test.Next(_L("sb")); RunSbTest(maxchannel, new CFragSizeRange(1, rangeMaxFragCount, rangeFragSize, iterPerFragSize)); diff -r 947f0dc9f7a8 -r 6e99f362aa46 kerneltest/e32test/resourceman/acctst/d_prmacctst.cpp --- a/kerneltest/e32test/resourceman/acctst/d_prmacctst.cpp Fri Apr 16 16:24:37 2010 +0300 +++ b/kerneltest/e32test/resourceman/acctst/d_prmacctst.cpp Fri Apr 23 21:54:44 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of the License "Eclipse Public License v1.0" @@ -151,11 +151,12 @@ TDynamicDfcQue* dfcQ; TInt r = Kern::DynamicDfcQCreate(dfcQ, KTestDfcQuePrority, KTestDfcQueBaseName); TEST_KERRNONE(r); - iDfcQ = dfcQ; if (r != KErrNone) { return r; } + dfcQ->SetRealtimeState(ERealtimeStateOff); + iDfcQ = dfcQ; SetDfcQ(iDfcQ); iMsgQ.Receive(); return KErrNone; diff -r 947f0dc9f7a8 -r 6e99f362aa46 userlibandfileserver/fileserver/group/release.txt --- a/userlibandfileserver/fileserver/group/release.txt Fri Apr 16 16:24:37 2010 +0300 +++ b/userlibandfileserver/fileserver/group/release.txt Fri Apr 23 21:54:44 2010 +0100 @@ -1,3 +1,77 @@ +Version 2.00.3028 +================= +(Made by vfebvre 09/04/2010) + +1. fagortz + 1. PDEF145219 TTPA-83EAYU: Partition handling for USB drives with 4K block size is incorrect + + +Version 2.00.3027 +================= +(Made by vfebvre 08/04/2010) + +1. frhofman + 1. DEF145044: F32TEST T_HANDSHARE test failure investigation + + +Version 2.00.3026 +================= +(Made by vfebvre 30/03/2010) + +1. michcox + 1. DEF145235 DNAK-83X92C Symbian^3 SDK : Compilation error in Error in "f32notification.h" + + +Version 2.00.3025 +================= +(Made by vfebvre 26/03/2010) + +1. famustaf + 1. REQ 417-52995 Improved rugged FAT performance + PackageReleaseID=419439 FeatureReleaseID=419437 + + +Version 2.00.3024 +================= +(Made by vfebvre 22/03/2010) + +1. migubarr + 1. DEF144423 Frequent T_RCACHE failures on the H2/H6 (line 1556) + +2. michcox + 1. PDEF145110 File server does not check return result of some User::ReAlloc()'s + + +Version 2.00.3023 +================= +(Made by vfebvre 15/03/2010) + +1. niccox + 1. DEF145021 Improper Mass Storage Error Code for Empty Drive case + +2. shamaden + 1. PDEF144922 TRAI-82RJFS Crash when usb memory is dismounted during copy + + +Version 2.00.3022 +================= +(Made by vfebvre 12/03/2010) + +1. famustaf + 1. MINOR_CHANGE Updated RFs::ScanDrive and RFs::CheckDisk Documentation + +2. michcox + 1. DEF144912 T_EXT1 fails under platsim as it doesn't support fsys extensions + + +Version 2.00.3021 +================= +(Made by vfebvre 11/03/2010) + +1. frhofman + 1. PDEF144919: SALM-82WCVK: efile.exe crashes in dynamic dir cache code when out-of-memory + + Version 2.00.3020 ================= (Made by vfebvre 08/03/2010) diff -r 947f0dc9f7a8 -r 6e99f362aa46 userlibandfileserver/fileserver/inc/f32ver.h --- a/userlibandfileserver/fileserver/inc/f32ver.h Fri Apr 16 16:24:37 2010 +0300 +++ b/userlibandfileserver/fileserver/inc/f32ver.h Fri Apr 23 21:54:44 2010 +0100 @@ -58,6 +58,6 @@ @see TVersion */ -const TInt KF32BuildVersionNumber=3020; +const TInt KF32BuildVersionNumber=3028; // #endif diff -r 947f0dc9f7a8 -r 6e99f362aa46 userlibandfileserver/fileserver/shostmassstorage/msproxy/debug.h --- a/userlibandfileserver/fileserver/shostmassstorage/msproxy/debug.h Fri Apr 16 16:24:37 2010 +0300 +++ b/userlibandfileserver/fileserver/shostmassstorage/msproxy/debug.h Fri Apr 23 21:54:44 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of the License "Eclipse Public License v1.0" @@ -22,7 +22,7 @@ #ifndef PXY_DEBUG_H #define PXY_DEBUG_H -// #define _HOST_DEBUG_TRACE_ +// #define _HOST_DEBUG_PRINT_ // #define _PROXY_DEBUG_PRINT_ // #define _PROXY_FN_TRACE_ diff -r 947f0dc9f7a8 -r 6e99f362aa46 userlibandfileserver/fileserver/shostmassstorage/msproxy/hostusbmsproxy.cpp --- a/userlibandfileserver/fileserver/shostmassstorage/msproxy/hostusbmsproxy.cpp Fri Apr 16 16:24:37 2010 +0300 +++ b/userlibandfileserver/fileserver/shostmassstorage/msproxy/hostusbmsproxy.cpp Fri Apr 23 21:54:44 2010 +0100 @@ -1,24 +1,18 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ +// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". // -// hostusbmsproxy.cpp +// Initial Contributors: +// Nokia Corporation - initial contribution. // -// This file system extension provides a way to access a drive on the MS system in "raw format". -// It can be used to test large files / drives +// Contributors: +// +// Description: +// This file system extension provides a way to access a drive on the MS system +// in "raw format". It can be used to test large files / drives // /** @file @@ -46,14 +40,19 @@ TInt CUsbHostMsProxyDrive::InitialiseOffset(TCapsInfo& aCapsInfo) { __MSFNSLOG - const TInt KPartitionInfoSize = TMsDataMemMap::KSectorSize; - TBuf8 partitionInfo; - TInt r; + RBuf8 partitionInfo; + TInt r; + TRAP(r, partitionInfo.CreateL(aCapsInfo.iBlockLength)); + if (r != KErrNone) + { + return r; + } - r = iUsbHostMsLun.Read(0 , KPartitionInfoSize, (TDes8 &) partitionInfo); + r = iUsbHostMsLun.Read(0, aCapsInfo.iBlockLength, partitionInfo); if (r != KErrNone) { __PXYPRINT1(_L("!! Reading medium failed with %d !!"), r); + partitionInfo.Close(); return r; } TUint8 *iIntBuf = (TUint8 *) partitionInfo.Ptr(); @@ -110,21 +109,27 @@ TMBRPartitionEntry& partitionEntry = pe[partitionIndex]; iMsDataMemMap.InitDataArea(partitionEntry.iFirstSector, - partitionEntry.iNumSectors); + partitionEntry.iNumSectors, + aCapsInfo.iBlockLength); __PXYPRINT2(_L("paritioncount = %d defaultpartition = %d"), partitionCount, partitionIndex); - __PXYPRINT2(_L("iFirstSector = x%x iNumSectors = x%x"), + __PXYPRINT3(_L("iFirstSector = x%x iNumSectors = x%x iSectorSize = x%x"), partitionEntry.iFirstSector, - partitionEntry.iNumSectors); + partitionEntry.iNumSectors, + aCapsInfo.iBlockLength); } else { __PXYPRINT(_L("No partition found")); - iMsDataMemMap.InitDataArea(0, aCapsInfo.iNumberOfBlocks); - __PXYPRINT2(_L("iFirstSector = x%x iNumSectors = x%x"), - 0, aCapsInfo.iNumberOfBlocks); + iMsDataMemMap.InitDataArea(0, aCapsInfo.iNumberOfBlocks, aCapsInfo.iBlockLength); + __PXYPRINT3(_L("iFirstSector = x%x iNumSectors = x%x iSectorSize = x%x"), + 0, + aCapsInfo.iNumberOfBlocks, + aCapsInfo.iBlockLength); } } + + partitionInfo.Close(); return KErrNone; } @@ -486,6 +491,7 @@ return KErrNone; } + /** Write to the proxy drive and pass flags to driver @@ -521,6 +527,7 @@ return iUsbHostMsLun.Write(iMsDataMemMap.GetDataPos(aPos), aSrc.Length(), aSrc); } + /** Get the proxy drive's capabilities information. @@ -562,23 +569,33 @@ { c.iMediaAtt |= KMediaAttWriteProtected; } + + static const TInt K512ByteSectorSize = 0x200; // 512 + if(K512ByteSectorSize != capsInfo.iBlockLength) + { + c.iMediaAtt &= ~KMediaAttFormattable; + } __HOSTPRINT4(_L("<<< HOST Caps Block[num=0x%x size=0x%x] Media[size=0x%lx WP=0x%x]"), capsInfo.iNumberOfBlocks, capsInfo.iBlockLength, caps().iSize, caps().iMediaAtt); } - else + else if (KErrNotReady) { __HOSTPRINT(_L("<<< HOST Caps Media Not Present")); - c.iType = EMediaNotPresent; - if(r != KErrNotReady) - r = KErrUnknown; + c.iType = EMediaNotPresent; + r = KErrNone; + } + else + { + __HOSTPRINT(_L("<<< HOST Caps Unknown Error")); + c.iType = EMediaUnknown; + r = KErrUnknown; } anInfo = caps.Left(Min(caps.Length(),anInfo.MaxLength())); return r; } - /** Format the proxy drive. The drive is assumed to be a single partition. The partition size is equivalent to the size of the media. @@ -630,7 +647,7 @@ { __MSFNSLOG - const TInt KDefaultMaxBytesPerFormat = 0x100 * TMsDataMemMap::KSectorSize; // 128K + const TInt KDefaultMaxBytesPerFormat = 0x100 * iMsDataMemMap.BlockLength(); // 128K if (aInfo.i512ByteSectorsFormatted < 0) return KErrArgument; @@ -649,14 +666,14 @@ iMsDataMemMap.InitDataArea(caps().iSize); } - TInt64 pos = static_cast(aInfo.i512ByteSectorsFormatted) << TMsDataMemMap::KFormatSectorShift; + TInt64 pos = static_cast(aInfo.i512ByteSectorsFormatted) << iMsDataMemMap.FormatSectorShift(); TInt length = aInfo.iMaxBytesPerFormat; TInt r = Erase(pos, length); if (r == KErrNone) { - length += TMsDataMemMap::KSectorSize - 1; - length >>= TMsDataMemMap::KFormatSectorShift; + length += iMsDataMemMap.BlockLength() - 1; + length >>= iMsDataMemMap.FormatSectorShift(); aInfo.i512ByteSectorsFormatted += length; } diff -r 947f0dc9f7a8 -r 6e99f362aa46 userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.h --- a/userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.h Fri Apr 16 16:24:37 2010 +0300 +++ b/userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.h Fri Apr 23 21:54:44 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of the License "Eclipse Public License v1.0" @@ -26,21 +26,20 @@ class TMsDataMemMap { public: - static const TInt KSectorSize = 0x200; // 512 - static const TInt KFormatSectorShift = 9; TMsDataMemMap(); void Reset(); - void InitDataArea(TUint32 aFirstDataSector, TUint32 aNumSectors); + void InitDataArea(TUint32 aFirstDataSector, TUint32 aNumSectors, TUint32 aSectorSize); void InitDataArea(TUint64 aSize); - TInt BlockLength() const; + TUint32 BlockLength() const; TUint64 DataSize() const; TInt64 GetDataPos(TInt64 aPos) const; TInt TranslateDataPos(TInt64& aPos, TInt& aLength) const; TInt CheckBlockInRange(TInt64& aPos, TInt aLength) const; + TInt FormatSectorShift() const; private: // Whole media @@ -50,6 +49,12 @@ // Data Area // Offset TInt64 iDataOffset; + + // Sector Size (Media Block Size) + TUint32 iSectorSize; + + // Sector-size dependant + TInt iFormatSectorShift; }; #include "tmsmemmap.inl" diff -r 947f0dc9f7a8 -r 6e99f362aa46 userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.inl --- a/userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.inl Fri Apr 16 16:24:37 2010 +0300 +++ b/userlibandfileserver/fileserver/shostmassstorage/msproxy/tmsmemmap.inl Fri Apr 23 21:54:44 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of the License "Eclipse Public License v1.0" @@ -26,9 +26,9 @@ } -inline TInt TMsDataMemMap::BlockLength() const +inline TUint32 TMsDataMemMap::BlockLength() const { - return KSectorSize; + return iSectorSize; } @@ -37,11 +37,20 @@ return iSize - iDataOffset; } -inline void TMsDataMemMap::InitDataArea(TUint32 aFirstDataSector, TUint32 aNumSectors) - { - iDataOffset = static_cast(aFirstDataSector) * KSectorSize; - iSize = static_cast(aNumSectors) * KSectorSize; - } +inline void TMsDataMemMap::InitDataArea(TUint32 aFirstDataSector, TUint32 aNumSectors, TUint32 aSectorSize) + { + iSectorSize = aSectorSize; + + iFormatSectorShift = 0; + while(aSectorSize) + { + ++iFormatSectorShift; + aSectorSize >>= 1; + } + + iDataOffset = static_cast(aFirstDataSector) * iSectorSize; + iSize = static_cast(aNumSectors) * iSectorSize; + } inline void TMsDataMemMap::InitDataArea(TUint64 aSize) @@ -55,3 +64,8 @@ return aPos + iDataOffset; } +inline TInt TMsDataMemMap::FormatSectorShift() const + { + return iFormatSectorShift; + } +