blob: baa12f958d06b9246fece71aa7c7d2541dcf122f [file] [log] [blame]
/*************************************************************************/ /*!
@File
@Title Environment related functions
@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
@License MIT
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.
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 <shared_mutex>
#include <zircon/syscalls.h>
#include "magma_util/macros.h"
extern "C" {
#include "log2.h"
#include "osfunc.h"
#include "cache_km.h"
#include "img_types.h"
#include "allocmem.h"
#include "pvr_debug.h"
#include "pvrsrv_memallocflags.h"
#if defined(PVRSRV_ENABLE_PROCESS_STATS)
#include "process_stats.h"
#endif
}
#define NOT_IMPLEMENTED() fprintf(stderr, "msd-img-rgx-mtk: Not implemented in %s:%s:%d\n", __func__, __FILE__, __LINE__);
void
OSThreadDumpInfo(IMG_HANDLE hDbgReqestHandle, DUMPDEBUG_PRINTF_FUNC *pfnDumpDebugPrintf, void *pvDumpDebugFile)
{
}
PVRSRV_ERROR
OSPhyContigPagesAlloc(PVRSRV_DEVICE_NODE *psDevNode, size_t uiSize, PG_HANDLE *psMemHandle, IMG_DEV_PHYADDR *psDevPAddr)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
void
OSPhyContigPagesFree(PVRSRV_DEVICE_NODE *psDevNode, PG_HANDLE *psMemHandle)
{
NOT_IMPLEMENTED();
}
PVRSRV_ERROR
OSPhyContigPagesMap(PVRSRV_DEVICE_NODE *psDevNode,
PG_HANDLE *psMemHandle,
size_t uiSize,
IMG_DEV_PHYADDR *psDevPAddr,
void **pvPtr)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
void
OSPhyContigPagesUnmap(PVRSRV_DEVICE_NODE *psDevNode, PG_HANDLE *psMemHandle, void *pvPtr)
{
NOT_IMPLEMENTED();
}
PVRSRV_ERROR
OSPhyContigPagesClean(PVRSRV_DEVICE_NODE *psDevNode, PG_HANDLE *psMemHandle, IMG_UINT32 uiOffset, IMG_UINT32 uiLength)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
IMG_UINT32
OSCPUCacheAttributeSize(IMG_DCACHE_ATTRIBUTE eCacheAttribute)
{
return zx_system_get_dcache_line_size();
}
IMG_UINT32
OSVSScanf(IMG_CHAR *pStr, const IMG_CHAR *pszFormat, ...)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_INT
OSMemCmp(void *pvBufA, void *pvBufB, size_t uiLen)
{
NOT_IMPLEMENTED();
return 0;
}
size_t
OSStringLCopy(IMG_CHAR *pszDest, const IMG_CHAR *pszSrc, size_t uSize)
{
return 0;
}
IMG_CHAR *
OSStringNCopy(IMG_CHAR *pszDest, const IMG_CHAR *pszSrc, size_t uSize)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_INT32
OSSNPrintf(IMG_CHAR *pStr, size_t ui32Size, const IMG_CHAR *pszFormat, ...)
{
NOT_IMPLEMENTED();
return 0;
}
size_t
OSStringLength(const IMG_CHAR *pStr)
{
NOT_IMPLEMENTED();
return 0;
}
size_t
OSStringNLength(const IMG_CHAR *pStr, size_t uiCount)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_INT32
OSStringCompare(const IMG_CHAR *pStr1, const IMG_CHAR *pStr2)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_INT32
OSStringNCompare(const IMG_CHAR *pStr1, const IMG_CHAR *pStr2, size_t uiSize)
{
NOT_IMPLEMENTED();
return 0;
}
PVRSRV_ERROR
OSStringToUINT32(const IMG_CHAR *pStr, IMG_UINT32 ui32Base, IMG_UINT32 *ui32Result)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSInitEnvData(void)
{
return PVRSRV_OK;
}
void
OSDeInitEnvData(void)
{
NOT_IMPLEMENTED();
}
#if defined(PVRSRV_USE_BRIDGE_LOCK)
PVRSRV_ERROR
OSGetGlobalBridgeBuffers(void **ppvBridgeInBuffer, void **ppvBridgeOutBuffer)
{
NOT_IMPLEMENTED();
return PVRSRV_OK;
}
#endif
void
OSReleaseThreadQuanta(void)
{
NOT_IMPLEMENTED();
}
IMG_UINT64
OSClockns64(void)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_UINT64
OSClockus64(void)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_UINT32
OSClockus(void)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_UINT32
OSClockms(void)
{
NOT_IMPLEMENTED();
return 0;
}
PVRSRV_ERROR
OSClockMonotonicns64(IMG_UINT64 *pui64Time)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSClockMonotonicus64(IMG_UINT64 *pui64Time)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
IMG_UINT64
OSClockMonotonicRawns64(void)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_UINT64
OSClockMonotonicRawus64(void)
{
NOT_IMPLEMENTED();
return 0;
}
/*
OSWaitus
*/
void
OSWaitus(IMG_UINT32 ui32Timeus)
{
NOT_IMPLEMENTED();
}
/*
OSSleepms
*/
void
OSSleepms(IMG_UINT32 ui32Timems)
{
NOT_IMPLEMENTED();
}
IMG_UINT64
OSGetCurrentProcessVASpaceSize(void)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_PID
OSGetCurrentProcessID(void)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_CHAR *
OSGetCurrentProcessName(void)
{
NOT_IMPLEMENTED();
return 0;
}
uintptr_t
OSGetCurrentThreadID(void)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_PID
OSGetCurrentClientProcessIDKM(void)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_CHAR *
OSGetCurrentClientProcessNameKM(void)
{
NOT_IMPLEMENTED();
return 0;
}
uintptr_t
OSGetCurrentClientThreadIDKM(void)
{
NOT_IMPLEMENTED();
return 0;
}
size_t
OSGetPageSize(void)
{
return magma::page_size();
}
size_t
OSGetPageShift(void)
{
return magma::page_shift();
}
size_t
OSGetPageMask(void)
{
// Lower bits set.
return magma::page_size() - 1;
}
size_t
OSGetOrder(size_t uSize)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_UINT64
OSGetRAMSize(void)
{
NOT_IMPLEMENTED();
return 0;
}
int
PVRSRVToNativeError(PVRSRV_ERROR e)
{
NOT_IMPLEMENTED();
return 0;
}
/*
OSInstallMISR
*/
PVRSRV_ERROR
OSInstallMISR(IMG_HANDLE *hMISRData, PFN_MISR pfnMISR, void *hData)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
/*
OSUninstallMISR
*/
PVRSRV_ERROR
OSUninstallMISR(IMG_HANDLE hMISRData)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
/*
OSScheduleMISR
*/
PVRSRV_ERROR
OSScheduleMISR(IMG_HANDLE hMISRData)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
static int
OSThreadRun(void *data)
{
NOT_IMPLEMENTED();
return 0;
}
PVRSRV_ERROR
OSThreadCreate(IMG_HANDLE *phThread,
IMG_CHAR *pszThreadName,
PFN_THREAD pfnThread,
IMG_HANDLE pfnDebugDumpCB,
IMG_BOOL bIsSupportingThread,
void *hData)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSThreadCreatePriority(IMG_HANDLE *phThread,
IMG_CHAR *pszThreadName,
PFN_THREAD pfnThread,
IMG_HANDLE pfnDebugDumpCB,
IMG_BOOL bIsSupportingThread,
void *hData,
OS_THREAD_LEVEL eThreadPriority)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSThreadDestroy(IMG_HANDLE hThread)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
void
OSPanic(void)
{
NOT_IMPLEMENTED();
}
PVRSRV_ERROR
OSSetThreadPriority(IMG_HANDLE hThread, IMG_UINT32 nThreadPriority, IMG_UINT32 nThreadWeight)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
void *
OSMapPhysToLin(IMG_CPU_PHYADDR BasePAddr, size_t ui32Bytes, IMG_UINT32 ui32MappingFlags)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_BOOL
OSUnMapPhysToLin(void *pvLinAddr, size_t ui32Bytes, IMG_UINT32 ui32MappingFlags)
{
NOT_IMPLEMENTED();
return IMG_FALSE;
}
IMG_HANDLE
OSAddTimer(PFN_TIMER_FUNC pfnTimerFunc, void *pvData, IMG_UINT32 ui32MsTimeout)
{
NOT_IMPLEMENTED();
return 0;
}
PVRSRV_ERROR
OSRemoveTimer(IMG_HANDLE hTimer)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSEnableTimer(IMG_HANDLE hTimer)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSDisableTimer(IMG_HANDLE hTimer)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSEventObjectCreate(const IMG_CHAR *pszName, IMG_HANDLE *hEventObject)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSEventObjectDestroy(IMG_HANDLE hEventObject)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
/*
* EventObjectWaitTimeout()
*/
static PVRSRV_ERROR
EventObjectWaitTimeout(IMG_HANDLE hOSEventKM, IMG_UINT64 uiTimeoutus, IMG_BOOL bHoldBridgeLock)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSEventObjectWait(IMG_HANDLE hOSEventKM)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSEventObjectWaitTimeoutAndHoldBridgeLock(IMG_HANDLE hOSEventKM, IMG_UINT64 uiTimeoutus)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSEventObjectWaitAndHoldBridgeLock(IMG_HANDLE hOSEventKM)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSEventObjectWaitKernel(IMG_HANDLE hOSEventKM, IMG_UINT64 uiTimeoutus)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSEventObjectOpen(IMG_HANDLE hEventObject, IMG_HANDLE *phOSEvent)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSEventObjectClose(IMG_HANDLE hOSEventKM)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSEventObjectSignal(IMG_HANDLE hEventObject)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSCopyToUser(void *pvProcess, void __user *pvDest, const void *pvSrc, size_t ui32Bytes)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
PVRSRV_ERROR
OSCopyFromUser(void *pvProcess, void *pvDest, const void __user *pvSrc, size_t ui32Bytes)
{
PVR_UNREFERENCED_PARAMETER(pvProcess);
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
IMG_UINT64
OSDivide64r64(IMG_UINT64 ui64Divident, IMG_UINT32 ui32Divisor, IMG_UINT32 *pui32Remainder)
{
NOT_IMPLEMENTED();
return 0;
}
IMG_UINT32
OSDivide64(IMG_UINT64 ui64Divident, IMG_UINT32 ui32Divisor, IMG_UINT32 *pui32Remainder)
{
NOT_IMPLEMENTED();
return 0;
}
/* One time osfunc initialisation */
PVRSRV_ERROR
PVROSFuncInit(void)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
/*
* Osfunc deinitialisation.
* Note that PVROSFuncInit may not have been called
*/
void
PVROSFuncDeInit(void)
{
NOT_IMPLEMENTED();
}
void
OSDumpStack(void)
{
NOT_IMPLEMENTED();
}
#if defined(PVRSRV_USE_BRIDGE_LOCK)
void
OSAcquireBridgeLock(void)
{
NOT_IMPLEMENTED();
}
void
OSReleaseBridgeLock(void)
{
NOT_IMPLEMENTED();
}
IMG_BOOL
BridgeLockIsLocked(void)
{
NOT_IMPLEMENTED();
return 0;
}
#endif
/*************************************************************************/ /*!
@Function OSCreateStatisticEntry
@Description Create a statistic entry in the specified folder.
@Input pszName String containing the name for the entry.
@Input pvFolder Reference from OSCreateStatisticFolder() of the
folder to create the entry in, or NULL for the
root.
@Input pfnStatsPrint Pointer to function that can be used to print the
values of all the statistics.
@Input pfnIncMemRefCt Pointer to function that can be used to take a
reference on the memory backing the statistic
entry.
@Input pfnDecMemRefCt Pointer to function that can be used to drop a
reference on the memory backing the statistic
entry.
@Input pvData OS specific reference that can be used by
pfnGetElement.
@Return Pointer void reference to the entry created, which can be
passed to OSRemoveStatisticEntry() to remove the entry.
*/ /**************************************************************************/
void *
OSCreateStatisticEntry(IMG_CHAR *pszName,
void *pvFolder,
OS_STATS_PRINT_FUNC *pfnStatsPrint,
OS_INC_STATS_MEM_REFCOUNT_FUNC *pfnIncMemRefCt,
OS_DEC_STATS_MEM_REFCOUNT_FUNC *pfnDecMemRefCt,
void *pvData)
{
NOT_IMPLEMENTED();
return 0;
} /* OSCreateStatisticEntry */
/*************************************************************************/ /*!
@Function OSRemoveStatisticEntry
@Description Removes a statistic entry.
@Input pvEntry Pointer void reference to the entry created by
OSCreateStatisticEntry().
*/ /**************************************************************************/
void
OSRemoveStatisticEntry(void *pvEntry)
{
NOT_IMPLEMENTED();
} /* OSRemoveStatisticEntry */
#if defined(PVRSRV_ENABLE_MEMTRACK_STATS_FILE)
void *
OSCreateRawStatisticEntry(const IMG_CHAR *pszFileName, void *pvParentDir, OS_STATS_PRINT_FUNC *pfStatsPrint)
{
NOT_IMPLEMENTED();
return 0;
}
void
OSRemoveRawStatisticEntry(void *pvEntry)
{
NOT_IMPLEMENTED();
}
#endif
/*************************************************************************/ /*!
@Function OSCreateStatisticFolder
@Description Create a statistic folder to hold statistic entries.
@Input pszName String containing the name for the folder.
@Input pvFolder Reference from OSCreateStatisticFolder() of the folder
to create the folder in, or NULL for the root.
@Return Pointer void reference to the folder created, which can be
passed to OSRemoveStatisticFolder() to remove the folder.
*/ /**************************************************************************/
void *
OSCreateStatisticFolder(IMG_CHAR *pszName, void *pvFolder)
{
NOT_IMPLEMENTED();
return 0;
} /* OSCreateStatisticFolder */
/*************************************************************************/ /*!
@Function OSRemoveStatisticFolder
@Description Removes a statistic folder.
@Input ppvFolder Reference from OSCreateStatisticFolder() of the
folder that should be removed.
This needs to be double pointer because it has to
be NULLed right after memory is freed to avoid
possible races and use-after-free situations.
*/ /**************************************************************************/
void
OSRemoveStatisticFolder(void **ppvFolder)
{
NOT_IMPLEMENTED();
} /* OSRemoveStatisticFolder */
PVRSRV_ERROR
OSChangeSparseMemCPUAddrMap(void **psPageArray,
IMG_UINT64 sCpuVAddrBase,
IMG_CPU_PHYADDR sCpuPAHeapBase,
IMG_UINT32 ui32AllocPageCount,
IMG_UINT32 *pai32AllocIndices,
IMG_UINT32 ui32FreePageCount,
IMG_UINT32 *pai32FreeIndices,
IMG_BOOL bIsLMA)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
/*************************************************************************/ /*!
@Function OSDebugSignalPID
@Description Sends a SIGTRAP signal to a specific PID in user mode for
debugging purposes. The user mode process can register a handler
against this signal.
This is necessary to support the Rogue debugger. If the Rogue
debugger is not used then this function may be implemented as
a stub.
@Input ui32PID The PID for the signal.
@Return PVRSRV_OK on success, a failure code otherwise.
*/ /**************************************************************************/
PVRSRV_ERROR
OSDebugSignalPID(IMG_UINT32 ui32PID)
{
NOT_IMPLEMENTED();
return PVRSRV_ERROR_NOT_SUPPORTED;
}
void
OSDumpVersionInfo(DUMPDEBUG_PRINTF_FUNC *pfnDumpDebugPrintf, void *pvDumpDebugFile)
{
NOT_IMPLEMENTED();
}
void
OSWriteMemoryBarrier(void)
{
NOT_IMPLEMENTED();
}
/*************************************************************************/ /*!
@Function OSMemoryBarrier
@Description Insert a read/write memory barrier.
The read and write memory barrier guarantees that all load
(read) and all store (write) operations specified before the
barrier will appear to happen before all of the load/store
operations specified after the barrier.
@Return None.
*/ /**************************************************************************/
void
OSMemoryBarrier(void)
{
NOT_IMPLEMENTED();
}
struct _OSWR_LOCK_ {
std::shared_mutex mutex;
};
PVRSRV_ERROR OSWRLockCreate(POSWR_LOCK *ppsLock) {
*ppsLock = new _OSWR_LOCK_;
return PVRSRV_OK;
}
void OSWRLockDestroy(POSWR_LOCK psLock) {
delete psLock;
}
void OSWRLockAcquireRead(POSWR_LOCK psLock) {
psLock->mutex.lock_shared();
}
void OSWRLockReleaseRead(POSWR_LOCK psLock) {
psLock->mutex.unlock_shared();
}
void OSWRLockAcquireWrite(POSWR_LOCK psLock) {
psLock->mutex.lock();
}
void OSWRLockReleaseWrite(POSWR_LOCK psLock) {
psLock->mutex.unlock();
}
/*************************************************************************/ /*!
@Function OSReadHWReg8
@Description Read from an 8-bit memory-mapped device register.
The implementation should not permit the compiler to
reorder the I/O sequence.
The implementation should ensure that for a NO_HARDWARE
build the code does not attempt to read from a location
but instead returns a constant value.
@Input pvLinRegBaseAddr The virtual base address of the register
block.
@Input ui32Offset The byte offset from the base address of
the register to be read.
@Return The byte read.
*/ /**************************************************************************/
IMG_UINT8
OSReadHWReg8(volatile void *pvLinRegBaseAddr, IMG_UINT32 ui32Offset)
{
NOT_IMPLEMENTED();
return 0;
}
/*************************************************************************/ /*!
@Function OSReadHWReg16
@Description Read from a 16-bit memory-mapped device register.
The implementation should not permit the compiler to
reorder the I/O sequence.
The implementation should ensure that for a NO_HARDWARE
build the code does not attempt to read from a location
but instead returns a constant value.
@Input pvLinRegBaseAddr The virtual base address of the register
block.
@Input ui32Offset The byte offset from the base address of
the register to be read.
@Return The word read.
*/ /**************************************************************************/
IMG_UINT16
OSReadHWReg16(volatile void *pvLinRegBaseAddr, IMG_UINT32 ui32Offset)
{
NOT_IMPLEMENTED();
return 0;
}
/*************************************************************************/ /*!
@Function OSReadHWReg32
@Description Read from a 32-bit memory-mapped device register.
The implementation should not permit the compiler to
reorder the I/O sequence.
The implementation should ensure that for a NO_HARDWARE
build the code does not attempt to read from a location
but instead returns a constant value.
@Input pvLinRegBaseAddr The virtual base address of the register
block.
@Input ui32Offset The byte offset from the base address of
the register to be read.
@Return The long word read.
*/ /**************************************************************************/
IMG_UINT32
OSReadHWReg32(volatile void *pvLinRegBaseAddr, IMG_UINT32 ui32Offset)
{
NOT_IMPLEMENTED();
return 0;
}
/*************************************************************************/ /*!
@Function OSReadHWReg64
@Description Read from a 64-bit memory-mapped device register.
The implementation should not permit the compiler to
reorder the I/O sequence.
The implementation should ensure that for a NO_HARDWARE
build the code does not attempt to read from a location
but instead returns a constant value.
@Input pvLinRegBaseAddr The virtual base address of the register
block.
@Input ui32Offset The byte offset from the base address of
the register to be read.
@Return The long long word read.
*/ /**************************************************************************/
IMG_UINT64
OSReadHWReg64(volatile void *pvLinRegBaseAddr, IMG_UINT32 ui32Offset)
{
NOT_IMPLEMENTED();
return 0;
}
/*************************************************************************/ /*!
@Function OSWriteHWReg8
@Description Write to an 8-bit memory-mapped device register.
The implementation should not permit the compiler to
reorder the I/O sequence.
The implementation should ensure that for a NO_HARDWARE
build the code does not attempt to write to a location.
@Input pvLinRegBaseAddr The virtual base address of the register
block.
@Input ui32Offset The byte offset from the base address of
the register to be written to.
@Input ui8Value The byte to be written to the register.
@Return None.
*/ /**************************************************************************/
void
OSWriteHWReg8(volatile void *pvLinRegBaseAddr, IMG_UINT32 ui32Offset, IMG_UINT8 ui8Value)
{
NOT_IMPLEMENTED();
}
/*************************************************************************/ /*!
@Function OSWriteHWReg16
@Description Write to a 16-bit memory-mapped device register.
The implementation should not permit the compiler to
reorder the I/O sequence.
The implementation should ensure that for a NO_HARDWARE
build the code does not attempt to write to a location.
@Input pvLinRegBaseAddr The virtual base address of the register
block.
@Input ui32Offset The byte offset from the base address of
the register to be written to.
@Input ui16Value The word to be written to the register.
@Return None.
*/ /**************************************************************************/
void
OSWriteHWReg16(volatile void *pvLinRegBaseAddr, IMG_UINT32 ui32Offset, IMG_UINT16 ui16Value)
{
NOT_IMPLEMENTED();
}
/*************************************************************************/ /*!
@Function OSWriteHWReg32
@Description Write to a 32-bit memory-mapped device register.
The implementation should not permit the compiler to
reorder the I/O sequence.
The implementation should ensure that for a NO_HARDWARE
build the code does not attempt to write to a location.
@Input pvLinRegBaseAddr The virtual base address of the register
block.
@Input ui32Offset The byte offset from the base address of
the register to be written to.
@Input ui32Value The long word to be written to the register.
@Return None.
*/ /**************************************************************************/
void
OSWriteHWReg32(volatile void *pvLinRegBaseAddr, IMG_UINT32 ui32Offset, IMG_UINT32 ui32Value)
{
NOT_IMPLEMENTED();
}
/*************************************************************************/ /*!
@Function OSWriteHWReg64
@Description Write to a 64-bit memory-mapped device register.
The implementation should not permit the compiler to
reorder the I/O sequence.
The implementation should ensure that for a NO_HARDWARE
build the code does not attempt to write to a location.
@Input pvLinRegBaseAddr The virtual base address of the register
block.
@Input ui32Offset The byte offset from the base address of
the register to be written to.
@Input ui64Value The long long word to be written to the
register.
@Return None.
*/ /**************************************************************************/
void
OSWriteHWReg64(volatile void *pvLinRegBaseAddr, IMG_UINT32 ui32Offset, IMG_UINT64 ui64Value)
{
NOT_IMPLEMENTED();
}