/* -*- Mode: C; tab-width: 4; indent-tabs-mode: 't; c-basic-offset: 4 -*- * * Name : $RCSfile: mmap.h $ * * Copyright : 2001,2002 by Imagination Technologies Limited. * All rights reserved. * No part of this software, either material or conceptual * may be copied or distributed, transmitted, transcribed, * stored in a retrieval system or translated into any * human or computer language in any form by any means, * electronic, mechanical, manual or other-wise, or * disclosed to third parties without the express written * permission of: * Imagination Technologies Limited, * HomePark Industrial Estate, * Kings Langley, * Hertfordshire, * WD4 8LZ, * UK * * Description : Linux mmap interface declaration * * Version : $Revision: 1.15 $ * **********************************************************************/ #if !defined(__MMAP_H__) #include "linuxsrv.h" typedef struct tagLINBUFSTRUCT { void *pBase; unsigned long dwPagesReserved; unsigned long dwPagesCommitted; unsigned long dwRegion; unsigned long bAGPMode; struct agp_map_entry *map; unsigned long *pageList; struct agp_memory *pAGPList; } LINBUFSTRUCT; #ifdef _LINUX_LIST_H struct pvrProcRecord { struct list_head list; struct list_head mmapList; pid_t pid; long count; int drmMMAP; }; struct pvrMMAPRecord { struct list_head list; unsigned long userAddress; unsigned long length; unsigned long kernelAddress; }; extern struct list_head pvrProcList; #endif /* Functions to allow the kernel to register mmapable areas */ void pvr_mmap_register_area(void* pkvVirtArea, unsigned long nBytes, PVR_MMAP_TYPE eMapType, unsigned long bCached); void pvr_mmap_remove_registered_area(void* pMemArea); /* Used by kernel code in case it receives user pointers during crash cleanup */ unsigned long pvr_mmap_user_to_kern(unsigned long nUserAddress); struct file; struct vm_area_struct; int pvr_mmap(struct file* pFile, struct vm_area_struct* ps_vma); void DeallocateTable(void); #endif /* __MMAP_H__ */