From 165bc256e777f3945cf18f7d647379e65161b379 Mon Sep 17 00:00:00 2001 From: Praneeth Bajjuri Date: Thu, 17 Nov 2016 14:08:22 -0600 Subject: jacinto6: update SGX kernel module for latest kernel Update SGX kernel module for latest kernel. Kernel commit: 28bfa77ad2eafed128bff13b9df1d2be78dc6413 Kernel Version: 4.4.32 Kernel branch: p-ti-lsk-android-linux-4.4.y Change-Id: I2690eb5d3fbde23cad9a138c3e166cfa243decca Signed-off-by: Praneeth Bajjuri --- jacinto6/sgx.tgz | Bin 1673707 -> 1673703 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz index 9733fe7..743970d 100644 Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ -- cgit v1.2.3 From aa39fc7bca6c3eea0e5d3ccba586e8af420e757d Mon Sep 17 00:00:00 2001 From: Praneeth Bajjuri Date: Wed, 7 Dec 2016 22:02:35 -0600 Subject: jacinto6: update SGX kernel module for latest kernel Update SGX kernel module for latest kernel. Kernel commit: bff93c80b1c79b58c4755880c67842af0bbc6f3b Kernel Version: 4.4.36 Kernel branch: p-ti-lsk-android-linux-4.4.y Change-Id: Idddfce38d87c1e4b8cca741f50d45c437a271c59 Signed-off-by: Praneeth Bajjuri --- jacinto6/sgx.tgz | Bin 1673703 -> 1673707 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz index 743970d..5ec3d04 100644 Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ -- cgit v1.2.3 From fc6cc0c84573300e62f7d3c80765f34ecc2007f0 Mon Sep 17 00:00:00 2001 From: Praneeth Bajjuri Date: Tue, 6 Dec 2016 23:53:05 -0600 Subject: dra71-evm: Add touch firmware Based on linux firmware binary of the same. Ref: http://git.ti.com/cgit/cgit.cgi/processor-firmware/ti-linux-firmware.git/commit/?h=ti-linux-firmware-4.1.y&id=f1a8d1d0131f83bd1a775cde7075eb67c070892c dra71-evm display panel needs updated configuration. This patch adds initial firmware/cofiguration binary for a functional goodix touch panel on top of DRA71 Rev A display panel. Change-Id: Ic6247a8b573efdb4d3685b29575fc2cbd4241299 Signed-off-by: Praneeth Bajjuri --- Android.mk | 29 +++++++++++++++++++++++++++++ jacinto6/LICENCE.Spectrum-GT9271 | 30 ++++++++++++++++++++++++++++++ jacinto6/touch-full_jacinto6evm.mk | 24 ++++++++++++++++++++++++ jacinto6/touch_full_jacinto6evm.tgz | Bin 0 -> 1151 bytes 4 files changed, 83 insertions(+) create mode 100644 jacinto6/LICENCE.Spectrum-GT9271 create mode 100644 jacinto6/touch-full_jacinto6evm.mk create mode 100644 jacinto6/touch_full_jacinto6evm.tgz diff --git a/Android.mk b/Android.mk index 12fc0f3..d481147 100644 --- a/Android.mk +++ b/Android.mk @@ -41,6 +41,35 @@ $(LOCAL_BUILT_MODULE) : $(ti-ducati.untarred_timestamp) | $(ACP) endif ############################################# +############################################# +# Install J6Entry touch firmware +############################################# +ifneq ($(TOUCH_TGZ),) +ti-touch.untarred_intermediates := $(call intermediates-dir-for, FAKE, ti-touch.untarred) +ti-touch.untarred_timestamp := $(ti-touch.untarred_intermediates)/stamp + +$(ti-touch.untarred_timestamp) : $(TOUCH_TGZ) + @echo "Unzip $(dir $@) <- $<)" + $(hide) rm -rf $(dir $@) && mkdir -p $(dir $@) + $(hide) tar -C $(dir $@) -zxf $< + $(hide) touch $@ + +include $(CLEAR_VARS) +LOCAL_MODULE := $(TOUCH_BINARY) +LOCAL_MODULE_CLASS := FAKE +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware + +include $(BUILD_SYSTEM)/base_rules.mk + +$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $(ti-touch.untarred_intermediates)/$(TOUCH_BINARY) +$(LOCAL_BUILT_MODULE) : $(ti-touch.untarred_timestamp) | $(ACP) + @echo "Copy $@ <- $(PRIVATE_SRC)" + @mkdir -p $(dir $@) + $(hide) $(ACP) -fp $(PRIVATE_SRC) $@ +endif +############################################# + ############################################# # Install Tesla-binary FW ############################################# diff --git a/jacinto6/LICENCE.Spectrum-GT9271 b/jacinto6/LICENCE.Spectrum-GT9271 new file mode 100644 index 0000000..ef319c4 --- /dev/null +++ b/jacinto6/LICENCE.Spectrum-GT9271 @@ -0,0 +1,30 @@ +Copyright (c) 2016, Spectrum Digital Incorporated + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +DISCLAIMER. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/jacinto6/touch-full_jacinto6evm.mk b/jacinto6/touch-full_jacinto6evm.mk new file mode 100644 index 0000000..c1d27c0 --- /dev/null +++ b/jacinto6/touch-full_jacinto6evm.mk @@ -0,0 +1,24 @@ +# Copyright (C) 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Add Touchscreen- Define the tgz to be unpacked, and enable the +# DRA71x-RevA-GT9271_SpecDig_Config.bin package, which is defined in the top-level Android.mk +# of the proprietary-open tree + +ifeq ($(TARGET_PRODUCT),$(filter $(TARGET_PRODUCT),full_jacinto6evm)) +TOUCH_TGZ := device/ti/proprietary-open/jacinto6/touch_full_jacinto6evm.tgz +TOUCH_BINARY := DRA71x-RevA-GT9271_SpecDig_Config.bin +PRODUCT_PACKAGES += DRA71x-RevA-GT9271_SpecDig_Config.bin +endif diff --git a/jacinto6/touch_full_jacinto6evm.tgz b/jacinto6/touch_full_jacinto6evm.tgz new file mode 100644 index 0000000..5cba4f0 Binary files /dev/null and b/jacinto6/touch_full_jacinto6evm.tgz differ -- cgit v1.2.3 From 3943e6c30b06149858c21de506a38eb3795377af Mon Sep 17 00:00:00 2001 From: Vishal Mahaveer Date: Wed, 11 Jan 2017 18:03:02 -0500 Subject: jacinto6: update SGX kernel module for latest kernel Update SGX kernel module for latest kernel. Kernel commit: 267bbafd1bbce0a680b16b54bbdb781670e1aa8a Kernel Version: 4.4.41 Kernel branch: p-ti-lsk-android-linux-4.4.y Change-Id: I83cfb8f94a4e38b9c3bc4e39075b394877e336ff Signed-off-by: Vishal Mahaveer --- jacinto6/sgx.tgz | Bin 1673707 -> 1673390 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz index 5ec3d04..b5bfad8 100644 Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ -- cgit v1.2.3 From bc7f838cdc458c3d628db7bae1f1c203b7a43c37 Mon Sep 17 00:00:00 2001 From: Vishal Mahaveer Date: Thu, 12 Jan 2017 14:45:46 -0500 Subject: jacinto6: sgx-bin: bins and src update Updating SGX binaries and KM source update for latest DDK1.14 Change-Id: I6f227ebcab33baa36b52b2746fd5b24af79ab65e Signed-off-by: Vishal Mahaveer --- jacinto6/README.SGX | 4 +- jacinto6/sgx.tgz | Bin 1673390 -> 1673711 bytes .../eurasiacon/build/linux2/buildvars.mk | 4 + .../build/linux2/common/android/features.mk | 4 +- .../eurasiacon/build/linux2/omap_android/Makefile | 11 +- jacinto6/sgx_src/eurasia_km/include4/pvrversion.h | 10 +- .../services4/srvkm/devices/sgx/sgxutils.c | 35 +++++ .../tools/intern/debug/dbgdriv/Kbuild.mk | 2 +- .../intern/debug/dbgdriv/common/dbgdriv_handle.c | 141 +++++++++++++++++++++ .../tools/intern/debug/dbgdriv/common/handle.c | 141 --------------------- 10 files changed, 193 insertions(+), 159 deletions(-) create mode 100644 jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv_handle.c delete mode 100644 jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/handle.c diff --git a/jacinto6/README.SGX b/jacinto6/README.SGX index ce68344..ebdaf6c 100644 --- a/jacinto6/README.SGX +++ b/jacinto6/README.SGX @@ -16,9 +16,9 @@ sgx.tgz a set of binaries built for SGX544. [DDK Version] 1.14/4001660 [DDK commit ID] - 3ed372b um: gralloc: change stride alignment to 16 pixels + 3b54e17 km: Add am57xxevm target to build system [Branch] - android/1.14/4001660_k4.4_M + android/1.14/4081762_k4.4_M [Kernel modules built against] Kernel Version: 4.4.y with CONFIG_MODVERSIONS=y [Build type] diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz index b5bfad8..a05c54a 100644 Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk index b93243b..f20ee5b 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk @@ -161,6 +161,10 @@ TESTED_HOST_USER_FLAGS += \ KBUILD_FLAGS := \ -Wno-unused-parameter -Wno-sign-compare +# androideabi toolchain adds `pic` by default, disable it +# for kernel module build +KBUILD_FLAGS += -fno-pic + TESTED_KBUILD_FLAGS := \ $(call kernel-cc-option,-Wmissing-include-dirs) \ $(call kernel-cc-option,-Wno-type-limits) \ diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk index 68e8132..ba37064 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/features.mk @@ -245,8 +245,8 @@ PVR_ANDROID_HAS_HAL_PIXEL_FORMAT_RAWxx := 1 endif ############################################################################## -# Marshmallow onwards DDK stopped render script accleration using GPU. -# This flag stops device alloction. +# Marshmallow onwards DDK stopped render script acceleration using GPU. +# This flag stops device allocation. # ifeq ($(is_at_least_marshmallow),1) PVR_ANDROID_HAS_GRALLOC_USAGE_RENDERSCRIPT := 1 diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile index 046b8bb..23cce13 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile @@ -51,10 +51,6 @@ ifeq ($(TARGET_DEVICE),) override TARGET_DEVICE := jacinto6evm endif -ifeq ($(TARGET_DEVICE),) -override TARGET_DEVICE := am57xevm -endif - # Customize this build as per the TARGET_DEVICE setting # ifneq ($(filter blaze blaze_tablet panda tuna maguro toro mysid yakju,$(TARGET_DEVICE)),) @@ -81,7 +77,7 @@ VS_PRODUCT_VERSION := 5 # FIXME: Re-enable this ASAP SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 endif -ifneq ($(filter jacinto6evm am57xevm,$(TARGET_DEVICE)),) +ifneq ($(filter jacinto6evm am57xxevm,$(TARGET_DEVICE)),) SGXCORE := 544 SGX_CORE_REV := 116 SGX_FEATURE_MP := 1 @@ -98,9 +94,8 @@ SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 endif -ifneq ($(filter am57xevm,$(TARGET_DEVICE)),) -HAL_VARIANT := am57x - +ifneq ($(filter am57xxevm,$(TARGET_DEVICE)),) +HAL_VARIANT := am57xxevm endif # Handle any TARGET_DEVICE remapping. Not all DDK TARGET_DEVICEs diff --git a/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h b/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h index d48838f..bc0d8cc 100644 --- a/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h +++ b/jacinto6/sgx_src/eurasia_km/include4/pvrversion.h @@ -53,16 +53,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define PVRVERSION_FAMILY "sgxddk" #define PVRVERSION_BRANCHNAME "1.14" -#define PVRVERSION_BUILD 4001660 -#define PVRVERSION_BSCONTROL "SGX_DDK_Linux_XOrg" +#define PVRVERSION_BUILD 4081762 +#define PVRVERSION_BSCONTROL "SGX_DDK_Android" -#define PVRVERSION_STRING "SGX_DDK_Linux_XOrg sgxddk 1.14@" PVR_STR2(PVRVERSION_BUILD) +#define PVRVERSION_STRING "SGX_DDK_Android sgxddk 1.14@" PVR_STR2(PVRVERSION_BUILD) #define PVRVERSION_STRING_SHORT "1.14@" PVR_STR2(PVRVERSION_BUILD) "" #define COPYRIGHT_TXT "Copyright (c) Imagination Technologies Ltd. All Rights Reserved." -#define PVRVERSION_BUILD_HI 400 -#define PVRVERSION_BUILD_LO 1660 +#define PVRVERSION_BUILD_HI 408 +#define PVRVERSION_BUILD_LO 1762 #define PVRVERSION_STRING_NUMERIC PVR_STR2(PVRVERSION_MAJ) "." PVR_STR2(PVRVERSION_MIN) "." PVR_STR2(PVRVERSION_BUILD_HI) "." PVR_STR2(PVRVERSION_BUILD_LO) #endif /* _PVRVERSION_H_ */ diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxutils.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxutils.c index bce7945..6ca6bc2 100644 --- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxutils.c +++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/devices/sgx/sgxutils.c @@ -1100,6 +1100,7 @@ IMG_HANDLE SGXRegisterHWRenderContextKM(IMG_HANDLE hDeviceNode, IMG_UINT8 *pDst; PRESMAN_ITEM psResItem; IMG_UINT32 ui32PDDevPAddrInDirListFormat; + IMG_UINT8 *pStartPDDevPAddr, *pEndPDDevPAddr; eError = OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, sizeof(SGX_HW_RENDER_CONTEXT_CLEANUP), @@ -1135,6 +1136,16 @@ IMG_HANDLE SGXRegisterHWRenderContextKM(IMG_HANDLE hDeviceNode, PVR_DPF((PVR_DBG_ERROR, "SGXRegisterHWRenderContextKM: Couldn't allocate device memory for HW Render Context")); goto exit1; } + /* Ensure that the offset of Page directory dev physical address field is within the allocated context memory */ + pStartPDDevPAddr = (IMG_UINT8 *)(psCleanup->psHWRenderContextMemInfo->pvLinAddrKM) + ui32OffsetToPDDevPAddr; + pEndPDDevPAddr = pStartPDDevPAddr + sizeof(ui32PDDevPAddrInDirListFormat) - 1; + + if (pStartPDDevPAddr < (IMG_UINT8 *)psCleanup->psHWRenderContextMemInfo->pvLinAddrKM || + pEndPDDevPAddr >= (IMG_UINT8 *)(psCleanup->psHWRenderContextMemInfo->pvLinAddrKM) + ui32HWRenderContextSize) + { + PVR_DPF((PVR_DBG_ERROR, "SGXRegisterHWRenderContextKM: Offset of page directory device physical address is invalid")); + goto exit2; + } eError = OSCopyFromUser(psPerProc, psCleanup->psHWRenderContextMemInfo->pvLinAddrKM, @@ -1287,6 +1298,7 @@ IMG_HANDLE SGXRegisterHWTransferContextKM(IMG_HANDLE hDeviceNode, IMG_UINT8 *pDst; PRESMAN_ITEM psResItem; IMG_UINT32 ui32PDDevPAddrInDirListFormat; + IMG_UINT8 *pStartPDDevPAddr, *pEndPDDevPAddr; eError = OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, sizeof(SGX_HW_TRANSFER_CONTEXT_CLEANUP), @@ -1324,6 +1336,17 @@ IMG_HANDLE SGXRegisterHWTransferContextKM(IMG_HANDLE hDeviceNode, goto exit1; } + /* Ensure that the offset of Page directory dev physical address field is within the allocated context memory */ + pStartPDDevPAddr = (IMG_UINT8 *)(psCleanup->psHWTransferContextMemInfo->pvLinAddrKM) + ui32OffsetToPDDevPAddr; + pEndPDDevPAddr = pStartPDDevPAddr + sizeof(ui32PDDevPAddrInDirListFormat) - 1; + + if (pStartPDDevPAddr < (IMG_UINT8 *)psCleanup->psHWTransferContextMemInfo->pvLinAddrKM || + pEndPDDevPAddr >= (IMG_UINT8 *)(psCleanup->psHWTransferContextMemInfo->pvLinAddrKM) + ui32HWTransferContextSize) + { + PVR_DPF((PVR_DBG_ERROR, "SGXRegisterHWTransferContextKM: Offset of page directory device physical address is invalid")); + goto exit2; + } + eError = OSCopyFromUser(psPerProc, psCleanup->psHWTransferContextMemInfo->pvLinAddrKM, psHWTransferContextCpuVAddr, @@ -1628,6 +1651,7 @@ IMG_HANDLE SGXRegisterHW2DContextKM(IMG_HANDLE hDeviceNode, IMG_UINT8 *pDst; PRESMAN_ITEM psResItem; IMG_UINT32 ui32PDDevPAddrInDirListFormat; + IMG_UINT8 *pStartPDDevPAddr, *pEndPDDevPAddr; eError = OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, sizeof(SGX_HW_2D_CONTEXT_CLEANUP), @@ -1664,6 +1688,17 @@ IMG_HANDLE SGXRegisterHW2DContextKM(IMG_HANDLE hDeviceNode, goto exit1; } + /* Ensure that the offset of Page directory dev physical address field is within the allocated context memory */ + pStartPDDevPAddr = (IMG_UINT8 *)(psCleanup->psHW2DContextMemInfo->pvLinAddrKM) + ui32OffsetToPDDevPAddr; + pEndPDDevPAddr = pStartPDDevPAddr + sizeof(ui32PDDevPAddrInDirListFormat) - 1; + + if (pStartPDDevPAddr < (IMG_UINT8 *)psCleanup->psHW2DContextMemInfo->pvLinAddrKM || + pEndPDDevPAddr >= (IMG_UINT8 *)(psCleanup->psHW2DContextMemInfo->pvLinAddrKM) + ui32HW2DContextSize) + { + PVR_DPF((PVR_DBG_ERROR, "SGXRegisterHWTransferContextKM: Offset of page directory device physical address is invalid")); + goto exit2; + } + eError = OSCopyFromUser(psPerProc, psCleanup->psHW2DContextMemInfo->pvLinAddrKM, psHW2DContextCpuVAddr, diff --git a/jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/Kbuild.mk b/jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/Kbuild.mk index e1e8868..7a827ce 100644 --- a/jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/Kbuild.mk +++ b/jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/Kbuild.mk @@ -43,9 +43,9 @@ ccflags-y += \ -I$(TOP)/tools/intern/debug/client dbgdrv-y += \ + tools/intern/debug/dbgdriv/common/dbgdriv_handle.o \ tools/intern/debug/dbgdriv/common/dbgdriv.o \ tools/intern/debug/dbgdriv/common/ioctl.o \ - tools/intern/debug/dbgdriv/common/handle.o \ tools/intern/debug/dbgdriv/common/hotkey.o \ tools/intern/debug/dbgdriv/linux/main.o \ tools/intern/debug/dbgdriv/linux/hostfunc.o diff --git a/jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv_handle.c b/jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv_handle.c new file mode 100644 index 0000000..a9d37a6 --- /dev/null +++ b/jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/dbgdriv_handle.c @@ -0,0 +1,141 @@ +/*************************************************************************/ /*! +@Title Resource Handle Manager +@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved +@Description Provide resource handle management +@License Dual MIT/GPLv2 + +The contents of this file are subject to the MIT license as set out below. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +Alternatively, the contents of this file may be used under the terms of +the GNU General Public License Version 2 ("GPL") in which case the provisions +of GPL are applicable instead of those above. + +If you wish to allow use of your version of this file only under the terms of +GPL, and not to allow others to use your version of this file under the terms +of the MIT license, indicate your decision by deleting the provisions above +and replace them with the notice and other provisions required by GPL as set +out in the file called "GPL-COPYING" included in this distribution. If you do +not delete the provisions above, a recipient may use your version of this file +under the terms of either the MIT license or GPL. + +This License is also included in this distribution in the file called +"MIT-COPYING". + +EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS +PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ /**************************************************************************/ + +#include "img_defs.h" +#include "dbgdrvif.h" +#include "dbgdriv.h" + +/* max number of streams held in SID info table */ +#define MAX_SID_ENTRIES 8 + +typedef struct _SID_INFO +{ + PDBG_STREAM psStream; +} SID_INFO, *PSID_INFO; + +static SID_INFO gaSID_Xlat_Table[MAX_SID_ENTRIES]; + +IMG_SID PStream2SID(PDBG_STREAM psStream) +{ + if (psStream != (PDBG_STREAM)IMG_NULL) + { + IMG_INT32 iIdx; + + for (iIdx = 0; iIdx < MAX_SID_ENTRIES; iIdx++) + { + if (psStream == gaSID_Xlat_Table[iIdx].psStream) + { + /* idx is one based */ + return (IMG_SID)iIdx+1; + } + } + } + + return (IMG_SID)0; +} + + +PDBG_STREAM SID2PStream(IMG_SID hStream) +{ + /* changed to zero based */ + IMG_INT32 iIdx = (IMG_INT32)hStream-1; + + if (iIdx >= 0 && iIdx < MAX_SID_ENTRIES) + { + return gaSID_Xlat_Table[iIdx].psStream; + } + else + { + return (PDBG_STREAM)IMG_NULL; + } +} + + +IMG_BOOL AddSIDEntry(PDBG_STREAM psStream) +{ + if (psStream != (PDBG_STREAM)IMG_NULL) + { + IMG_INT32 iIdx; + + for (iIdx = 0; iIdx < MAX_SID_ENTRIES; iIdx++) + { + if (psStream == gaSID_Xlat_Table[iIdx].psStream) + { + /* already created */ + return IMG_TRUE; + } + + if (gaSID_Xlat_Table[iIdx].psStream == (PDBG_STREAM)IMG_NULL) + { + /* free entry */ + gaSID_Xlat_Table[iIdx].psStream = psStream; + return IMG_TRUE; + } + } + } + + return IMG_FALSE; +} + +IMG_BOOL RemoveSIDEntry(PDBG_STREAM psStream) +{ + if (psStream != (PDBG_STREAM)IMG_NULL) + { + IMG_INT32 iIdx; + + for (iIdx = 0; iIdx < MAX_SID_ENTRIES; iIdx++) + { + if (psStream == gaSID_Xlat_Table[iIdx].psStream) + { + gaSID_Xlat_Table[iIdx].psStream = (PDBG_STREAM)IMG_NULL; + return IMG_TRUE; + } + } + } + + return IMG_FALSE; +} + + +/****************************************************************************** + End of file (handle.c) +******************************************************************************/ diff --git a/jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/handle.c b/jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/handle.c deleted file mode 100644 index a9d37a6..0000000 --- a/jacinto6/sgx_src/eurasia_km/tools/intern/debug/dbgdriv/common/handle.c +++ /dev/null @@ -1,141 +0,0 @@ -/*************************************************************************/ /*! -@Title Resource Handle Manager -@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved -@Description Provide resource handle management -@License Dual MIT/GPLv2 - -The contents of this file are subject to the MIT license as set out below. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -Alternatively, the contents of this file may be used under the terms of -the GNU General Public License Version 2 ("GPL") in which case the provisions -of GPL are applicable instead of those above. - -If you wish to allow use of your version of this file only under the terms of -GPL, and not to allow others to use your version of this file under the terms -of the MIT license, indicate your decision by deleting the provisions above -and replace them with the notice and other provisions required by GPL as set -out in the file called "GPL-COPYING" included in this distribution. If you do -not delete the provisions above, a recipient may use your version of this file -under the terms of either the MIT license or GPL. - -This License is also included in this distribution in the file called -"MIT-COPYING". - -EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS -PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING -BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ /**************************************************************************/ - -#include "img_defs.h" -#include "dbgdrvif.h" -#include "dbgdriv.h" - -/* max number of streams held in SID info table */ -#define MAX_SID_ENTRIES 8 - -typedef struct _SID_INFO -{ - PDBG_STREAM psStream; -} SID_INFO, *PSID_INFO; - -static SID_INFO gaSID_Xlat_Table[MAX_SID_ENTRIES]; - -IMG_SID PStream2SID(PDBG_STREAM psStream) -{ - if (psStream != (PDBG_STREAM)IMG_NULL) - { - IMG_INT32 iIdx; - - for (iIdx = 0; iIdx < MAX_SID_ENTRIES; iIdx++) - { - if (psStream == gaSID_Xlat_Table[iIdx].psStream) - { - /* idx is one based */ - return (IMG_SID)iIdx+1; - } - } - } - - return (IMG_SID)0; -} - - -PDBG_STREAM SID2PStream(IMG_SID hStream) -{ - /* changed to zero based */ - IMG_INT32 iIdx = (IMG_INT32)hStream-1; - - if (iIdx >= 0 && iIdx < MAX_SID_ENTRIES) - { - return gaSID_Xlat_Table[iIdx].psStream; - } - else - { - return (PDBG_STREAM)IMG_NULL; - } -} - - -IMG_BOOL AddSIDEntry(PDBG_STREAM psStream) -{ - if (psStream != (PDBG_STREAM)IMG_NULL) - { - IMG_INT32 iIdx; - - for (iIdx = 0; iIdx < MAX_SID_ENTRIES; iIdx++) - { - if (psStream == gaSID_Xlat_Table[iIdx].psStream) - { - /* already created */ - return IMG_TRUE; - } - - if (gaSID_Xlat_Table[iIdx].psStream == (PDBG_STREAM)IMG_NULL) - { - /* free entry */ - gaSID_Xlat_Table[iIdx].psStream = psStream; - return IMG_TRUE; - } - } - } - - return IMG_FALSE; -} - -IMG_BOOL RemoveSIDEntry(PDBG_STREAM psStream) -{ - if (psStream != (PDBG_STREAM)IMG_NULL) - { - IMG_INT32 iIdx; - - for (iIdx = 0; iIdx < MAX_SID_ENTRIES; iIdx++) - { - if (psStream == gaSID_Xlat_Table[iIdx].psStream) - { - gaSID_Xlat_Table[iIdx].psStream = (PDBG_STREAM)IMG_NULL; - return IMG_TRUE; - } - } - } - - return IMG_FALSE; -} - - -/****************************************************************************** - End of file (handle.c) -******************************************************************************/ -- cgit v1.2.3 From 455762967fc919dec77acbb4d5dfd9791b103d77 Mon Sep 17 00:00:00 2001 From: Praneeth Bajjuri Date: Tue, 17 Jan 2017 13:10:30 -0600 Subject: SGX: README: update instructions with new toolchain Current Android version needs to be built with arm-linux-androideabi-4.9 instead of arm-eabi-4.8 Updating README accordingly. Also added pvr kernel module rebuild instructions for am57xevm target. Change-Id: Id42a14e38b241433ab025fb875aa0fde571eae55 Signed-off-by: Praneeth Bajjuri --- jacinto6/README.SGX | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jacinto6/README.SGX b/jacinto6/README.SGX index ebdaf6c..542e206 100644 --- a/jacinto6/README.SGX +++ b/jacinto6/README.SGX @@ -34,13 +34,14 @@ Make sure kernel is built before building modules # cd ANDROID_ROOT/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/ # export ANDROID_ROOT=path_to_android_fs_source # export KERNELDIR=path_to_kernel_source -# export CROSS_COMPILE=$ANDROID_ROOT/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- -# export KERNEL_CROSS_COMPILE==$ANDROID_ROOT/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- +# export CROSS_COMPILE=$ANDROID_ROOT/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi- +# export KERNEL_CROSS_COMPILE=$ANDROID_ROOT/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi- # export ARCH=arm # export PATH=:$PATH -To build for Jacinto6 (SGX 544 multi core): +To build for Jacinto6/AM57x (SGX 544 multi core): # make TARGET_PRODUCT="jacinto6evm" BUILD=release +# make TARGET_PRODUCT="am57xevm" BUILD=release Once the .ko is built, install it onto device (/system/lib/modules) -- cgit v1.2.3 From 0589075d0f44cc875d7d11f9009bc5e6ebcc2b37 Mon Sep 17 00:00:00 2001 From: Praneeth Bajjuri Date: Tue, 17 Jan 2017 13:16:44 -0600 Subject: jacinto6: update SGX kernel module for latest kernel migrating to arm-linux-androideabi-4.9 needs pvr kernel module to be rebuilt Update SGX kernel module for latest kernel. Kernel Version: 4.4.41 Kernel branch: p-ti-lsk-android-linux-4.4.y Change-Id: Iad564793252fff8afdffc5bcf3b8c5336ceab70c Signed-off-by: Praneeth Bajjuri --- jacinto6/sgx.tgz | Bin 1673711 -> 1681733 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz index a05c54a..bbb30be 100644 Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ -- cgit v1.2.3 From facbcdc1aa30adafd8c708f14939db5c68e14945 Mon Sep 17 00:00:00 2001 From: Praneeth Bajjuri Date: Thu, 19 Jan 2017 16:03:14 -0600 Subject: jacinto6: update SGX kernel module for latest kernel Update SGX kernel module for latest kernel. Kernel commit: 3f9dd3cc59fcd7702c9116652122ce99ea4e025e Kernel Version: 4.4.43 Kernel branch: p-ti-lsk-android-linux-4.4.y Change-Id: Id28adc08df4a55834fc24a1c3ca409e08bd2c740 Signed-off-by: Praneeth Bajjuri --- jacinto6/sgx.tgz | Bin 1681733 -> 1681730 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz index bbb30be..6acf550 100644 Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ -- cgit v1.2.3 From 86f6a5fa1afaefad79557f96632c754dceefe60a Mon Sep 17 00:00:00 2001 From: Vishal Mahaveer Date: Tue, 24 Jan 2017 19:42:57 -0500 Subject: jacinto6: sgx-bin: sgx binaries update Updating SGX binaries of the latest DDK 1.14 source. This update includes below fixes: 2a3afec gralloc: Dont translate formats on video encoder usage 141f494 um: gralloc: Do memset on NV12 allocations 5c4ba96 gralloc: Allocate NV12 buffers in contig region Change-Id: I4065c02e44dccfe0996a1a5b3a548ee4fe27b528 Signed-off-by: Vishal Mahaveer --- jacinto6/README.SGX | 4 ++-- jacinto6/sgx.tgz | Bin 1681730 -> 1680364 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jacinto6/README.SGX b/jacinto6/README.SGX index 542e206..ad64515 100644 --- a/jacinto6/README.SGX +++ b/jacinto6/README.SGX @@ -14,9 +14,9 @@ sgx.tgz a set of binaries built for SGX544. [DDK Version] - 1.14/4001660 + 1.14/4081762 [DDK commit ID] - 3b54e17 km: Add am57xxevm target to build system + 2a3afec gralloc: Dont translate formats on video encoder usage [Branch] android/1.14/4081762_k4.4_M [Kernel modules built against] diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz index 6acf550..e2c76f1 100644 Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ -- cgit v1.2.3 From fc3c6aacfad7b33a1f7a6fe5582ec1d0c2aa471d Mon Sep 17 00:00:00 2001 From: Praneeth Bajjuri Date: Tue, 17 Jan 2017 15:22:46 -0600 Subject: km: Makefile: fix am57xevm target typo fix typo in makefile from am57xxevm to am57xevm commit: 154647aa23d207d Change-Id: I0efdc2812ce6663892c6411a3ededd3196d1b31c Signed-off-by: Praneeth Bajjuri Reviewed-by: Gowtham Tammana --- .../eurasia_km/eurasiacon/build/linux2/omap_android/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile index 23cce13..082cd79 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android/Makefile @@ -77,7 +77,7 @@ VS_PRODUCT_VERSION := 5 # FIXME: Re-enable this ASAP SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 endif -ifneq ($(filter jacinto6evm am57xxevm,$(TARGET_DEVICE)),) +ifneq ($(filter jacinto6evm am57xevm,$(TARGET_DEVICE)),) SGXCORE := 544 SGX_CORE_REV := 116 SGX_FEATURE_MP := 1 @@ -94,8 +94,8 @@ SUPPORT_ACTIVE_POWER_MANAGEMENT := 0 endif -ifneq ($(filter am57xxevm,$(TARGET_DEVICE)),) -HAL_VARIANT := am57xxevm +ifneq ($(filter am57xevm,$(TARGET_DEVICE)),) +HAL_VARIANT := am57xevm endif # Handle any TARGET_DEVICE remapping. Not all DDK TARGET_DEVICEs -- cgit v1.2.3 From 5ef434657c246e461502b87469aaa84a850cd92a Mon Sep 17 00:00:00 2001 From: Vishal Mahaveer Date: Tue, 21 Feb 2017 07:45:54 -0500 Subject: jacinto6: update ipu2 binary This ipu2 binary is compiled from MMIP:3.00.13.00 and IPC:3.45.00.00 Change-Id: Ifa3cc89fdd642ff1e7554b2c0f10f7134e001238 Signed-off-by: Vishal Mahaveer --- jacinto6/ducati_full_jacinto6evm.tgz | Bin 1532632 -> 1635997 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/jacinto6/ducati_full_jacinto6evm.tgz b/jacinto6/ducati_full_jacinto6evm.tgz index 71b540f..2cb5680 100644 Binary files a/jacinto6/ducati_full_jacinto6evm.tgz and b/jacinto6/ducati_full_jacinto6evm.tgz differ -- cgit v1.2.3 From 3712b9d85a9eeb932fc2520d20a531f19c52d15d Mon Sep 17 00:00:00 2001 From: Praneeth Bajjuri Date: Tue, 10 Jan 2017 11:55:13 -0600 Subject: earlyboot: remove warnings in pvr build remove warnings in pvrkm build for earlyboot benchmarking Signed-off-by: Praneeth Bajjuri --- .../eurasiacon/build/linux2/buildvars.mk | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk index f20ee5b..c6ca755 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk @@ -48,13 +48,14 @@ # These flags are used for kernel, User C and User C++ # -COMMON_FLAGS := -W -Wall +COMMON_FLAGS := -W +#-Wall # Some GCC warnings are C only, so we must mask them from C++ # -COMMON_CFLAGS := $(COMMON_FLAGS) \ - -Wdeclaration-after-statement -Wno-format-zero-length \ - -Wstrict-prototypes +#COMMON_CFLAGS := $(COMMON_FLAGS) \ +# -Wdeclaration-after-statement -Wno-format-zero-length \ +# -Wstrict-prototypes # User C and User C++ optimization control. Does not affect kernel. # @@ -71,7 +72,7 @@ endif # FIXME: We should probably audit the driver for aliasing # -COMMON_USER_FLAGS += -fno-strict-aliasing +#COMMON_USER_FLAGS += -fno-strict-aliasing # We always enable debugging. Either the release binaries are stripped # and the symbols put in the symbolpackage, or we're building debug. @@ -80,9 +81,9 @@ COMMON_USER_FLAGS += -g $(ANDROID_FPGA_FORCE_32BIT) # User C and User C++ warning flags # -COMMON_USER_FLAGS += \ - -Wpointer-arith -Wunused-parameter \ - -Wmissing-format-attribute +#COMMON_USER_FLAGS += \ +# -Wpointer-arith -Wunused-parameter \ +# -Wmissing-format-attribute # Additional warnings, and optional warnings. # @@ -158,8 +159,8 @@ TESTED_TARGET_USER_FLAGS += \ TESTED_HOST_USER_FLAGS += \ $(call host-cc-optional-warning,-Wunused-but-set-variable) -KBUILD_FLAGS := \ - -Wno-unused-parameter -Wno-sign-compare +#KBUILD_FLAGS := \ +# -Wno-unused-parameter -Wno-sign-compare # androideabi toolchain adds `pic` by default, disable it # for kernel module build @@ -203,12 +204,12 @@ ALL_HOST_CFLAGS := \ # User C++ only # -ALL_CXXFLAGS := \ - -fno-rtti -fno-exceptions \ +#ALL_CXXFLAGS := \ +# -fno-rtti -fno-exceptions \ $(COMMON_USER_FLAGS) $(COMMON_FLAGS) $(TESTED_TARGET_USER_FLAGS) \ $(SYS_CXXFLAGS) -ALL_HOST_CXXFLAGS := \ - -fno-rtti -fno-exceptions \ +#ALL_HOST_CXXFLAGS := \ +# -fno-rtti -fno-exceptions \ $(COMMON_USER_FLAGS) $(COMMON_FLAGS) $(TESTED_HOST_USER_FLAGS) # Workaround for some target clangs that don't support -O0 w/ PIC. -- cgit v1.2.3 From 468a90d5a6cfd0dc46f296452c55b03d00de54ed Mon Sep 17 00:00:00 2001 From: Praneeth Bajjuri Date: Fri, 24 Feb 2017 10:12:51 -0600 Subject: sgx: 4.9 test patch temp only Change-Id: I9887ba2afd2b54b123735659f16b51a40e6afb0a Signed-off-by: Praneeth Bajjuri --- jacinto6/sgx.tgz | Bin 1680364 -> 1683142 bytes jacinto6/sgx/Android.mk | 152 --------------------- .../eurasiacon/build/linux2/buildvars.mk | 31 +---- .../eurasia_km/services4/srvkm/env/linux/mmap.c | 3 +- .../eurasia_km/services4/srvkm/env/linux/osfunc.c | 4 +- .../eurasia_km/services4/srvkm/env/linux/pvr_drm.c | 12 -- 6 files changed, 5 insertions(+), 197 deletions(-) delete mode 100644 jacinto6/sgx/Android.mk diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz index e2c76f1..045e10a 100644 Binary files a/jacinto6/sgx.tgz and b/jacinto6/sgx.tgz differ diff --git a/jacinto6/sgx/Android.mk b/jacinto6/sgx/Android.mk deleted file mode 100644 index 9d007ad..0000000 --- a/jacinto6/sgx/Android.mk +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright (C) 2011 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -define _add-sgx-vendor-lib -include $$(CLEAR_VARS) -$(if $(word 2,$1),$(error Invalid SGX module name $1)) -LOCAL_MODULE := $(basename $(notdir $1)) -LOCAL_SRC_FILES := $1 -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := $(suffix $1) -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -LOCAL_MODULE_PATH := $$(TARGET_OUT_VENDOR)/$(dir $1) -LOCAL_STRIP_MODULE := false -OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_LIBRARIES) -LOCAL_PATH := $$(img-sgx.untarred_bin) -include $$(BUILD_SYSTEM)/base_rules.mk -$$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1 -$$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP) - $(eval FIXED_SRC := $$(img-sgx.untarred_bin)/$(subst $(TARGET_BOARD_PLATFORM),jacinto6,$1)) - @echo "Copy $$@ <- $(FIXED_SRC)" - @mkdir -p $(dir $$@) - $$(hide) $$(ACP) -fp $(FIXED_SRC) $$@ -endef - -define _add-sgx-vendor-bin -include $$(CLEAR_VARS) -$(if $(word 2,$1),$(error Invalid SGX module name $1)) -LOCAL_MODULE := $(basename $(notdir $1)) -LOCAL_SRC_FILES := $1 -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := $(suffix $1) -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_MODULE_PATH := $$(TARGET_OUT_VENDOR)/$(dir $1) -LOCAL_STRIP_MODULE := false -OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_EXECUTABLES) -LOCAL_PATH := $$(img-sgx.untarred_bin) -include $$(BUILD_SYSTEM)/base_rules.mk -$$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1 -$$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP) - @echo "Copy $$@ <- $$(PRIVATE_SRC)" - @mkdir -p $$(dir $$@) - $$(hide) $$(ACP) -fp $$(PRIVATE_SRC) $$@ -endef - -define _add-sgx-vendor-etc -include $$(CLEAR_VARS) -$(if $(word 2,$1),$(error Invalid SGX module name $1)) -LOCAL_MODULE := $(basename $(notdir $1)) -LOCAL_SRC_FILES := $1 -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := $(suffix $1) -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $$(TARGET_OUT)/$(dir $1) -LOCAL_STRIP_MODULE := false -OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_ETC) -LOCAL_PATH := $$(img-sgx.untarred_bin) -include $$(BUILD_SYSTEM)/base_rules.mk -$$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1 -$$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP) - @echo "Copy $$@ <- $$(PRIVATE_SRC)" - @mkdir -p $$(dir $$@) - $$(hide) $$(ACP) -fp $$(PRIVATE_SRC) $$@ -endef - -define _add-sgx-vendor-km -include $$(CLEAR_VARS) -$(if $(word 2,$1),$(error Invalid SGX module name $1)) -LOCAL_MODULE := $(basename $(notdir $1)) -LOCAL_SRC_FILES := $1 -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := $(suffix $1) -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $$(TARGET_OUT)/lib/$(dir $1) -LOCAL_STRIP_MODULE := false -OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_ETC) -LOCAL_PATH := $$(img-sgx.untarred_bin) -include $$(BUILD_SYSTEM)/base_rules.mk -$$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1 -$$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP) - @echo "Copy $$@ <- $$(PRIVATE_SRC)" - @mkdir -p $$(dir $$@) - $$(hide) $$(ACP) -fp $$(PRIVATE_SRC) $$@ -endef - -prebuilt_sgx_vendor_libs := \ - lib/libIMGegl.so \ - lib/libglslcompiler.so \ - lib/libusc.so \ - lib/libPVRScopeServices.so \ - lib/libsrv_um.so \ - lib/hw/gralloc.$(TARGET_BOARD_PLATFORM).so \ - lib/hw/memtrack.$(TARGET_BOARD_PLATFORM).so \ - lib/libpvrANDROID_WSEGL.so \ - lib/libpvr2d.so \ - lib/libsrv_init.so \ - lib/egl/libGLESv1_CM_POWERVR_SGX544_116.so \ - lib/egl/libGLESv2_POWERVR_SGX544_116.so \ - lib/egl/libEGL_POWERVR_SGX544_116.so - -prebuilt_sgx_vendor_bins := \ - bin/pvrsrvinit \ - bin/pvrsrvctl - -#prebuilt_sgx_vendor_etc := \ -# etc/powervr.ini - -prebuilt_sgx_vendor_km := \ - modules/pvrsrvkm.ko - -prebuilt_sgx_modules := \ - $(foreach _file,$(prebuilt_sgx_vendor_libs) $(prebuilt_sgx_vendor_bins) $(prebuilt_sgx_vendor_etc) $(prebuilt_sgx_vendor_km),\ - $(notdir $(basename $(_file)))) - -include $(CLEAR_VARS) -LOCAL_MODULE := ti_jacinto6_sgx_libs -LOCAL_MODULE_TAGS := optional -LOCAL_REQUIRED_MODULES := $(prebuilt_sgx_modules) -include $(BUILD_PHONY_PACKAGE) - -$(foreach _file,$(prebuilt_sgx_vendor_libs),\ - $(eval $(call _add-sgx-vendor-lib,$(_file)))) - -$(foreach _file,$(prebuilt_sgx_vendor_bins),\ - $(eval $(call _add-sgx-vendor-bin,$(_file)))) - -$(foreach _file,$(prebuilt_sgx_vendor_etc),\ - $(eval $(call _add-sgx-vendor-etc,$(_file)))) - -$(foreach _file,$(prebuilt_sgx_vendor_km),\ - $(eval $(call _add-sgx-vendor-km,$(_file)))) - -prebuilt_sgx_modules := -prebuilt_sgx_vendor_libs := -prebuilt_sgx_vendor_bins := -prebuilt_sgx_vendor_etc := -prebuilt_sgx_vendor_km := -_add-sgx-vendor-lib := -_add-sgx-vendor-bin := -_add-sgx-vendor-etc := -_add-sgx-vendor-km := diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk index c6ca755..9b49915 100644 --- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk +++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/buildvars.mk @@ -48,7 +48,7 @@ # These flags are used for kernel, User C and User C++ # -COMMON_FLAGS := -W +# COMMON_FLAGS := -W #-Wall # Some GCC warnings are C only, so we must mask them from C++ @@ -164,35 +164,6 @@ TESTED_HOST_USER_FLAGS += \ # androideabi toolchain adds `pic` by default, disable it # for kernel module build -KBUILD_FLAGS += -fno-pic - -TESTED_KBUILD_FLAGS := \ - $(call kernel-cc-option,-Wmissing-include-dirs) \ - $(call kernel-cc-option,-Wno-type-limits) \ - $(call kernel-cc-option,-Wno-pointer-arith) \ - $(call kernel-cc-option,-Wno-aggregate-return) \ - $(call kernel-cc-option,-Wno-unused-but-set-variable) \ - $(call kernel-cc-option,-Wno-old-style-declaration) \ - $(call kernel-cc-optional-warning,-Wbad-function-cast) \ - $(call kernel-cc-optional-warning,-Wcast-qual) \ - $(call kernel-cc-optional-warning,-Wcast-align) \ - $(call kernel-cc-optional-warning,-Wconversion) \ - $(call kernel-cc-optional-warning,-Wdisabled-optimization) \ - $(call kernel-cc-optional-warning,-Wlogical-op) \ - $(call kernel-cc-optional-warning,-Wmissing-declarations) \ - $(call kernel-cc-optional-warning,-Wmissing-include-dirs) \ - $(call kernel-cc-optional-warning,-Wnested-externs) \ - $(call kernel-cc-optional-warning,-Wno-missing-field-initializers) \ - $(call kernel-cc-optional-warning,-Wold-style-definition) \ - $(call kernel-cc-optional-warning,-Woverlength-strings) \ - $(call kernel-cc-optional-warning,-Wpacked) \ - $(call kernel-cc-optional-warning,-Wpacked-bitfield-compat) \ - $(call kernel-cc-optional-warning,-Wpadded) \ - $(call kernel-cc-optional-warning,-Wredundant-decls) \ - $(call kernel-cc-optional-warning,-Wshadow) \ - $(call kernel-cc-optional-warning,-Wswitch-default) \ - $(call kernel-cc-optional-warning,-Wvla) \ - $(call kernel-cc-optional-warning,-Wwrite-strings) # User C only # diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mmap.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mmap.c index e7fb667..a20f876 100644 --- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mmap.c +++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/mmap.c @@ -48,6 +48,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #include +#include #include #include #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) @@ -787,7 +788,7 @@ DoMapToUser(LinuxMemArea *psLinuxMemArea, #if defined(PVR_MAKE_ALL_PFNS_SPECIAL) if (bMixedMap) { - result = vm_insert_mixed(ps_vma, ulVMAPos, pfn); + result = vm_insert_mixed(ps_vma, ulVMAPos, pfn_to_pfn_t(pfn)); if(result != 0) { PVR_DPF((PVR_DBG_ERROR,"%s: Error - vm_insert_mixed failed (%d)", __FUNCTION__, result)); diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c index 1302edb..81b9985 100644 --- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c +++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/osfunc.c @@ -3547,7 +3547,7 @@ PVRSRV_ERROR OSReleasePhysPageAddr(IMG_HANDLE hOSWrapMem) SetPageDirty(psPage); } } - page_cache_release(psPage); + put_page(psPage); } break; } @@ -3729,7 +3729,7 @@ PVRSRV_ERROR OSAcquirePhysPageAddr(IMG_VOID *pvCPUVAddr, bMMapSemHeld = IMG_TRUE; /* Get page list */ - psInfo->iNumPagesMapped = get_user_pages(current, current->mm, uStartAddr, psInfo->iNumPages, 1, 0, psInfo->ppsPages, NULL); + psInfo->iNumPagesMapped = get_user_pages_remote(current, current->mm, uStartAddr, psInfo->iNumPages, FOLL_WRITE, psInfo->ppsPages, NULL); if (psInfo->iNumPagesMapped >= 0) { diff --git a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c index 8b862a9..5ba106c 100644 --- a/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c +++ b/jacinto6/sgx_src/eurasia_km/services4/srvkm/env/linux/pvr_drm.c @@ -591,18 +591,6 @@ static struct drm_driver sPVRDrmDriver = #endif }, #endif -#endif - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)) -#if defined(LDM_PLATFORM) - .set_busid = drm_platform_set_busid, -#else -#if defined(LDM_PCI) - .set_busid = drm_pci_set_busid, -#else - #error "LDM_PLATFORM or LDM_PCI must be set" -#endif -#endif #endif .name = "pvr", .desc = PVR_DRM_DESC, -- cgit v1.2.3