# HG changeset patch # User hgs # Date 1274723146 -3600 # Node ID 5e441a173c6319c325907308274c0261316ef8fd # Parent 95847726fe57fb5f4ebccab50cbd007daffed66e 201019_10 diff -r 95847726fe57 -r 5e441a173c63 build.config.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build.config.xml Mon May 24 18:45:46 2010 +0100 @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 95847726fe57 -r 5e441a173c63 kernel/eka/bld.inf --- a/kernel/eka/bld.inf Mon May 24 18:38:55 2010 +0100 +++ b/kernel/eka/bld.inf Mon May 24 18:45:46 2010 +0100 @@ -262,6 +262,8 @@ include/drivers/resourcecontrol_trace.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(drivers/) include/drivers/resource_category.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(drivers/) include/drivers/resource_extend.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(drivers/) +include/drivers/resourcecontrol_settings.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(drivers/) +include/drivers/resourcecontrol_clientsettings.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(drivers/) // Power Resource Manager User-Side API include/drivers/resmanus_trace.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(drivers/) @@ -379,6 +381,8 @@ include/d32resmanus.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(d32resmanus.h) include/d32resmanus.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(d32resmanus.inl) +include/heap_hybrid.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(kernel/) + //Unified Trace Framework API include/e32utf.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(e32utf.h) include/e32utrace.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(e32utrace.inl) @@ -386,20 +390,20 @@ include/e32utrace.mmh SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(e32utrace.mmh) //Open System Trace API -include/opensystemtrace.h /epoc32/include/platform/ -include/opensystemtrace.inl /epoc32/include/platform/ -include/opensystemtrace_types.h /epoc32/include/platform/ -include/opensystemtrace.mmh /epoc32/include/platform/ +include/opensystemtrace.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(opensystemtrace.h) +include/opensystemtrace.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(opensystemtrace.inl) +include/opensystemtrace_types.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(opensystemtrace_types.h) +include/opensystemtrace.mmh SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(opensystemtrace.mmh) // ROM building scripts -rombuild/base.iby /epoc32/rom/include/ // -rombuild/PlatSecEnforcement.oby /epoc32/rom/include/ // -rombuild/PlatSecDiagnostics.oby /epoc32/rom/include/ // -rombuild/btrace.iby /epoc32/rom/include/ // +rombuild/base.iby /epoc32/rom/include/ +rombuild/PlatSecEnforcement.oby /epoc32/rom/include/ +rombuild/PlatSecDiagnostics.oby /epoc32/rom/include/ +rombuild/btrace.iby /epoc32/rom/include/ rombuild/kernel.hby /epoc32/rom/include/ rombuild/rm_debug_svr.iby /epoc32/rom/include/ // Run mode debug driver -rombuild/utrace.iby /epoc32/rom/include/ //utrace -rombuild/ost.iby /epoc32/rom/include/ //ost +rombuild/utrace.iby /epoc32/rom/include/ +rombuild/ost.iby /epoc32/rom/include/ // Byte pair compressor include/byte_pair_compress.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(byte_pair_compress.h) diff -r 95847726fe57 -r 5e441a173c63 kernel/eka/include/drivers/dma_v2.h --- a/kernel/eka/include/drivers/dma_v2.h Mon May 24 18:38:55 2010 +0100 +++ b/kernel/eka/include/drivers/dma_v2.h Mon May 24 18:45:46 2010 +0100 @@ -70,7 +70,7 @@ Some peripherals may require a post-increment address mode. - @see DDmaRequest::Fragment + @see DDmaRequest::Fragment() Note: This enum is only required for backwards compatibility with the old DMA framework, it can be removed once this is no longer needed. @@ -337,10 +337,11 @@ Works like ExpandDesList except that it uses the iSrcFirstHdr and iSrcLastHdr fields. - @see ExpandDesList + @see ExpandDesList() - This function can only be used if SDmacCaps::iAsymHwDescriptors is - true, otherwise it will just return KErrGeneral. + This function should only be used if SDmacCaps::iAsymHwDescriptors is + reported as true, as only then the framework will actually use the + allocated descriptors. @param aCount Number of descriptors to append. @@ -357,10 +358,11 @@ Works like ExpandDesList except that it uses the iDstFirstHdr and iDstLastHdr fields. - @see ExpandDesList + @see ExpandDesList() - This function can only be used if SDmacCaps::iAsymHwDescriptors is - true, otherwise it will just return KErrGeneral. + This function should only be used if SDmacCaps::iAsymHwDescriptors is + reported as true, as only then the framework will actually use the + allocated descriptors. @param aCount Number of descriptors to append. @@ -373,7 +375,9 @@ /** Free resources associated with this request. - Assume the request is not being transferred or pending. + Assumes the request is not being transferred or pending. + + @see ExpandDesList() @released */ @@ -383,10 +387,9 @@ /** Free resources associated with this request. This function variant operates on the source port descriptor chain. - @see FreeDesList + Assumes the request is not being transferred or pending. - This function can only be used if SDmacCaps::iAsymHwDescriptors is - true, otherwise it will do nothing. + @see ExpandSrcDesList() @prototype */ @@ -396,10 +399,9 @@ /** Free resources associated with this request. This function variant operates on the destination port descriptor chain. - @see FreeDesList + Assumes the request is not being transferred or pending. - This function can only be used if SDmacCaps::iAsymHwDescriptors is - true, otherwise it will do nothing. + @see ExpandDstDesList() @prototype */ diff -r 95847726fe57 -r 5e441a173c63 kernel/eka/include/drivers/resourcecontrol_clientsettings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/kernel/eka/include/drivers/resourcecontrol_clientsettings.h Mon May 24 18:45:46 2010 +0100 @@ -0,0 +1,109 @@ +// Copyright (c) 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: +// e32\include\drivers\resourcecontrol_clientsettings.h +// +// + +#ifndef __RESOURCECONTROL_CLIENTSETTINGS_H__ +#define __RESOURCECONTROL_CLIENTSETTINGS_H__ + +#include + +const TUint KBitPerClientSettings = 5; // 0 - 31, Max of 32 elements defined for use per client +const TUint KClientElementIdBase = 0x10; // Max of 16 elements defined for use by resman +const TUint8 KStaticResourceTableSize = 5; + +inline TUint ElementId_ClientSettingBase(TUint aClientToken) + { + return ((aClientToken << KBitPerClientSettings) + KClientElementIdBase); + } + +inline HCR::TElementId ElementId_ClientName(TUint aClientToken) + { + return ((HCR::TElementId) ElementId_ClientSettingBase(aClientToken)); + } + +inline HCR::TElementId ElementId_ClientPropertyFlag(TUint aClientToken) + { + return ((HCR::TElementId) (ElementId_ClientSettingBase(aClientToken) + 1)); + } + +inline HCR::TElementId ElementId_ClientPreallocation(TUint aClientToken) + { + return ((HCR::TElementId) (ElementId_ClientSettingBase(aClientToken) + 2)); + } + +inline HCR::TElementId ElementId_ClientStaticResource(TUint aClientToken, TUint aResource) + { + return ((HCR::TElementId) (ElementId_ClientSettingBase(aClientToken) + 3 + aResource)); + } + +inline HCR::TElementId ElementId_ClientDynamicResource(TUint aClientToken, TUint aResource) + { + return ((HCR::TElementId) (ElementId_ClientSettingBase(aClientToken) + 3 + KStaticResourceTableSize + aResource)); + } + + +// Dynamic Resource Settings + +const TUint KDynamicResourceElementIdBase = 0x20000; +const TUint KBitPerDynamicResourceSettings = 5; // 0 - 31, Max of 32 elements defined for use per dynamic resource + +inline TUint ElementId_DynamicResourceBase(TUint aDynamicResource) + { + return ((aDynamicResource << KBitPerDynamicResourceSettings) + KDynamicResourceElementIdBase); + } + +inline HCR::TElementId ElementId_DynamicResourceName(TUint aDynamicResource) + { + return ((HCR::TElementId) (ElementId_DynamicResourceBase(aDynamicResource))); + } + +inline HCR::TElementId ElementId_DynamicResourcePropertyFlag(TUint aDynamicResource) + { + return ((HCR::TElementId) (ElementId_DynamicResourceBase(aDynamicResource) + 1)); + } + +inline HCR::TElementId ElementId_DynamicResourceMaxLevel(TUint aDynamicResource) + { + return ((HCR::TElementId) (ElementId_DynamicResourceBase(aDynamicResource) + 2)); + } + +inline HCR::TElementId ElementId_DynamicResourceMinLevel(TUint aDynamicResource) + { + return ((HCR::TElementId) (ElementId_DynamicResourceBase(aDynamicResource) + 3)); + } + +inline HCR::TElementId ElementId_DynamicResourceDefaultLevel(TUint aDynamicResource) + { + return ((HCR::TElementId) (ElementId_DynamicResourceBase(aDynamicResource) + 4)); + } + +inline HCR::TElementId ElementId_DynamicResourceDependencyMask1(TUint aDynamicResource) + { + return ((HCR::TElementId) (ElementId_DynamicResourceBase(aDynamicResource) + 5)); + } + +inline HCR::TElementId ElementId_DynamicResourceDependencyMask2(TUint aDynamicResource) + { + return ((HCR::TElementId) (ElementId_DynamicResourceBase(aDynamicResource) + 6)); + } + +inline HCR::TElementId ElementId_DynamicResourceDependencyMask3(TUint aDynamicResource) + { + return ((HCR::TElementId) (ElementId_DynamicResourceBase(aDynamicResource) + 7)); + } + +#endif + diff -r 95847726fe57 -r 5e441a173c63 kernel/eka/include/drivers/resourcecontrol_settings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/kernel/eka/include/drivers/resourcecontrol_settings.h Mon May 24 18:45:46 2010 +0100 @@ -0,0 +1,29 @@ +// Copyright (c) 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: +// e32\include\drivers\resourcecontrol_settings.h +// +// + +#ifndef __RESOURCECONTROL_SETTINGS_H__ +#define __RESOURCECONTROL_SETTINGS_H__ + +#include + +const HCR::TElementId KPRMPoolSizeKernelClient = 0; +const HCR::TElementId KPRMPoolSizeUserClient = 1; +const HCR::TElementId KPRMPoolSizeClientLevel = 2; +const HCR::TElementId KPRMPoolSizeClientRequest = 3; + +#endif + diff -r 95847726fe57 -r 5e441a173c63 kernel/eka/include/e32ver.h --- a/kernel/eka/include/e32ver.h Mon May 24 18:38:55 2010 +0100 +++ b/kernel/eka/include/e32ver.h Mon May 24 18:45:46 2010 +0100 @@ -28,7 +28,7 @@ const TInt KE32MajorVersionNumber=2; const TInt KE32MinorVersionNumber=0; -const TInt KE32BuildVersionNumber=3083; +const TInt KE32BuildVersionNumber=3085; const TInt KMachineConfigurationMajorVersionNumber=1; const TInt KMachineConfigurationMinorVersionNumber=0; diff -r 95847726fe57 -r 5e441a173c63 kernel/eka/release.txt --- a/kernel/eka/release.txt Mon May 24 18:38:55 2010 +0100 +++ b/kernel/eka/release.txt Mon May 24 18:45:46 2010 +0100 @@ -1,3 +1,27 @@ +Version 2.00.3085 +================= +(Made by vfebvre 18/05/2010) + +1. gayarama + 1. ou1cimx1#382130 DEV HCR settings to be used by PRM and its clients + +2. mipetzol + 1. MINOR_CHANGE Updated comments in dma_v2.h + + +Version 2.00.3084 +================= +(Made by vfebvre 17/05/2010) + +1. indrasin + 1. MINOR_CHANGE: TITANIUM (SIROCCO MIGRATION): submitting build.config.xml for sirocco migration to identify components to be build + +2. shubmurt + 1. DEF144569 t_datapaging passes when data paging is not enabled + t_datapaging should fail if data paging is not reported in a ROM that is meant to be be data paged + 2. ou1cimx1#361046 T_WSD* test set fails to compile / run when built with RVCT4.0 compiler + + Version 2.00.3083 ================= (Made by vfebvre 13/05/2010) diff -r 95847726fe57 -r 5e441a173c63 kernel/eka/rombuild/not_data_paged.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/kernel/eka/rombuild/not_data_paged.txt Mon May 24 18:45:46 2010 +0100 @@ -0,0 +1,1 @@ +#Check if the rom is meant to be datapaged \ No newline at end of file diff -r 95847726fe57 -r 5e441a173c63 kernel/eka/rombuild/user.iby --- a/kernel/eka/rombuild/user.iby Mon May 24 18:38:55 2010 +0100 +++ b/kernel/eka/rombuild/user.iby Mon May 24 18:45:46 2010 +0100 @@ -174,6 +174,10 @@ #endif #endif // PAGED_DATA +#if !defined(PAGED_DATA) +data=##BASEPATH##kernelhwsrv\kernel\eka\rombuild\not_data_paged.txt Test\not_data_paged.txt unpaged paging_unmovable +#endif //#if !defined(PAGED_DATA) + // Test constant patching works by setting KHeapMinCellSize to zero, which is the default anyway patchdata ekern.exe @ KHeapMinCellSize 0 patchdata euser.dll @ KHeapMinCellSize 0 diff -r 95847726fe57 -r 5e441a173c63 kerneltest/e32test/demandpaging/t_datapaging.cpp --- a/kerneltest/e32test/demandpaging/t_datapaging.cpp Mon May 24 18:38:55 2010 +0100 +++ b/kerneltest/e32test/demandpaging/t_datapaging.cpp Mon May 24 18:45:46 2010 +0100 @@ -38,7 +38,7 @@ #include #include #include - +#include #include "t_dpcmn.h" #include "../mmu/mmudetect.h" #include "../mmu/d_memorytest.h" @@ -1202,6 +1202,17 @@ test.Title(); test_KErrNone(GetGlobalPolicies()); + _LIT(KFileName,"Z:\\Test\\not_data_paged.txt"); + RFs fs; + RFile file; + TInt error; + test(KErrNone == fs.Connect()); + error = file.Open(fs, KFileName, EFileRead); + TBool isFilePresent = (error == KErrNone); + file.Close(); + fs.Close(); + test(gDataPagingSupported == !isFilePresent); + test.Start(_L("Test HAL APIs")); TestHal(); diff -r 95847726fe57 -r 5e441a173c63 kerneltest/e32test/group/t_datapaging.mmp --- a/kerneltest/e32test/group/t_datapaging.mmp Mon May 24 18:38:55 2010 +0100 +++ b/kerneltest/e32test/group/t_datapaging.mmp Mon May 24 18:45:46 2010 +0100 @@ -20,7 +20,7 @@ sourcepath ../demandpaging source t_datapaging.cpp ../mmu/paging_info.cpp source t_dpcmn.cpp -library euser.lib hal.lib dptest.lib +library euser.lib hal.lib dptest.lib efsrv.lib OS_LAYER_SYSTEMINCLUDE_SYMBIAN capability all vendorid 0x70000001 diff -r 95847726fe57 -r 5e441a173c63 kerneltest/e32test/mmu/t_wsd_tst.h --- a/kerneltest/e32test/mmu/t_wsd_tst.h Mon May 24 18:38:55 2010 +0100 +++ b/kerneltest/e32test/mmu/t_wsd_tst.h Mon May 24 18:45:46 2010 +0100 @@ -47,7 +47,7 @@ // Exports of DLL1 #ifdef T_WSD_DL1 #else -IMPORT_D TInt32 ExportedData; +IMPORT_D extern TInt32 ExportedData; IMPORT_C TInt CheckExportedDataAddress(void *aDataAddr); #endif // T_WSD_DL1 @@ -65,10 +65,10 @@ #ifdef T_WSD_DL3 #else IMPORT_C void** GetAddressOfData(TInt& aSize, void*& aCodeAddr, void*& aDataAddr); -IMPORT_D TInt32 TestDataSize; -IMPORT_D void* WritableTestData[1 /* refer TestDataSize */]; -IMPORT_D const void* const* PointerToStaticData; -IMPORT_D void** PointerToWritableData; +IMPORT_D extern TInt32 TestDataSize; +IMPORT_D extern void* WritableTestData[1 /* refer TestDataSize */]; +IMPORT_D extern const void* const* PointerToStaticData; +IMPORT_D extern void** PointerToWritableData; #endif // T_WSD_DL3 #endif // __T_WSD_TST_H__ diff -r 95847726fe57 -r 5e441a173c63 kerneltest/e32test/resourceman/t_rescontrolcli.cpp --- a/kerneltest/e32test/resourceman/t_rescontrolcli.cpp Mon May 24 18:38:55 2010 +0100 +++ b/kerneltest/e32test/resourceman/t_rescontrolcli.cpp Mon May 24 18:45:46 2010 +0100 @@ -28,6 +28,9 @@ #include #include "d_rescontrolcli.h" +#include +#include + #define MAX_STATIC_RESOURCE_NUM 24 //Maximum number of static resources in simulated PSL #define MAX_STATIC_DEPENDENCY_RESOURCE_NUM 7 //Maximum number of static dependency resources in simulated PSL #define DEPENDENCY_RESOURCE_BIT_MASK 0x00010000 @@ -4237,10 +4240,87 @@ Clients.Close(); } +void TestClientSettings(TInt aClientToken, TUint aExpectedBase) + { + TUint clientBase = ElementId_ClientSettingBase(aClientToken); + test(clientBase == aExpectedBase); + + HCR::TElementId Id; + + Id = ElementId_ClientName(aClientToken); + test(Id == aExpectedBase); + + Id = ElementId_ClientPropertyFlag(aClientToken); + test(Id == (aExpectedBase + 1)); + + Id = ElementId_ClientPreallocation(aClientToken); + test(Id == (aExpectedBase + 2)); + + TInt firstResource = 0; + Id = ElementId_ClientStaticResource(aClientToken, firstResource); + test(Id == (aExpectedBase + 3)); + + TInt thirdResource = 2; + Id = ElementId_ClientStaticResource(aClientToken, thirdResource); + test(Id == (aExpectedBase + 5)); + } + +void TestDynamicResourceSettings(TInt aDynamicResource, TUint aExpectedBase) + { + TUint dynamicResourceBase = ElementId_DynamicResourceBase(aDynamicResource); + test(dynamicResourceBase == aExpectedBase); + + HCR::TElementId Id; + + Id = ElementId_DynamicResourceName(aDynamicResource); + test(Id == aExpectedBase); + + Id = ElementId_DynamicResourcePropertyFlag(aDynamicResource); + test(Id == (aExpectedBase + 1)); + + Id = ElementId_DynamicResourceMaxLevel(aDynamicResource); + test(Id == (aExpectedBase + 2)); + + Id = ElementId_DynamicResourceMinLevel(aDynamicResource); + test(Id == (aExpectedBase + 3)); + + Id = ElementId_DynamicResourceDefaultLevel(aDynamicResource); + test(Id == (aExpectedBase + 4)); + + Id = ElementId_DynamicResourceDependencyMask1(aDynamicResource); + test(Id == (aExpectedBase + 5)); + + Id = ElementId_DynamicResourceDependencyMask2(aDynamicResource); + test(Id == (aExpectedBase + 6)); + + Id = ElementId_DynamicResourceDependencyMask3(aDynamicResource); + test(Id == (aExpectedBase + 7)); + } + +void TestClientHCRSettingMacros() + { + TInt clientToken = 2; // Random token number + TUint expectedBase = 80; // refer resourcecontrol_clientsettings.h for calculations + TestClientSettings(clientToken, expectedBase); + + clientToken = 0; + expectedBase = 16; // refer resourcecontrol_clientsettings.h for calculations + TestClientSettings(clientToken, expectedBase); + + // Dynamic Resource settings + TUint dynamicResource = 3; // Random token number + expectedBase = 131168; // refer resourcecontrol_clientsettings.h for calculations + TestDynamicResourceSettings(dynamicResource, expectedBase); + + test.Printf(_L("Testing HCR client setting Macro's for Resource Manager successful \n")); + } + GLDEF_C TInt E32Main() { test.Title(); test.Start(_L("Testing Resource Manager...\n")); + test.Printf(_L("Testing HCR client setting Macro's for Resource Manager \n")); + TestClientHCRSettingMacros(); // test.Printf(_L("TEST SKIPPED UNTIL FIX FOR DEF145087 IS AVAILABLE TO PREVENT CRASHING\n")); test(0);