?? platform.h
字號:
/*----------------------------------------------------------------------------
COPYRIGHT (c) 1997 by Philips Semiconductors
THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED AND COPIED IN
ACCORDANCE WITH THE TERMS AND CONDITIONS OF SUCH A LICENSE AND WITH THE
INCLUSION OF THE THIS COPY RIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES
OF THIS SOFTWARE MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER
PERSON. THE OWNERSHIP AND TITLE OF THIS SOFTWARE IS NOT TRANSFERRED.
THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT ANY PRIOR NOTICE
AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY Philips Semiconductor.
PHILIPS ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF THIS SOFTWARE
ON PLATFORMS OTHER THAN THE ONE ON WHICH THIS SOFTWARE IS FURNISHED.
----------------------------------------------------------------------------*/
/*
HISTORY
970703 Tilakraj Roy Created
*/
/*----------------------------------------------------------------------------
SYSTEM INCLUDE FILES
----------------------------------------------------------------------------*/
#include "ntddk.h"
/*----------------------------------------------------------------------------
DRIVER SPECIFIC INCLUDE FILES
----------------------------------------------------------------------------*/
#include "tmtypes.h"
#include "tmmanapi.h"
#define constTMMANPCIRegisters 0x10
// required by the hal for bit settings
#define constTMManBIU_CTL_SE 0x0001
#define constTMManBIU_CTL_BO 0x0002
#define constTMManBIU_CTL_IE 0x0100
#define constTMManBIU_CTL_HE 0x0200
#define constTMManBIU_CTL_CR 0x0400
#define constTMManBIU_CTL_SR 0x0800
#define constTMManDC_LOCK_CTL_MASK 0x00000060
#define constTMManDC_LOCK_CTL_POSITION 5 /* LEFT SHIFT POSITIONS */
#define constTMManDC_LOCK_CTL_HEN 0x0 /* HOLE ENABLE */
#define constTMManDC_LOCK_CTL_HDS 0x1 /* HOLE DISABLE */
#define constTMManDC_LOCK_CTL_PDS 0x2 /* PCI DSIABLE */
#define constTMManDC_LOCK_CTL_RES 0x3 /* RESERVED */
//#define constTMManHostTraceBufferSize 2048
typedef struct tagDebugObject
{
UInt32 DBGLevelBitmap;
UInt32 DBGType;
UInt8 DBGBuffer[constTMManStringLength];
UInt8 TraceBufferData[constTMManHostTraceBufferSize]; /*HARDCODED */
UInt8* TraceBuffer;
UInt32 TracePosition;
UInt32 TraceLength;
Bool TraceWrapped;
} DebugObject;
typedef struct tagClientDeviceObject
{
PVOID Device;
PUCHAR SDRAMAddrUser;
PUCHAR MMIOAddrUser;
PUCHAR MemoryAddrUser; // pagelocked shared memory
UInt32 SDRAMHandleUser;
UInt32 MMIOHandleUser;
UInt32 MemoryHandleUser;
} ClientDeviceObject;
typedef struct tagPageLockBufferDescription
{
PIRP IORequestPacket;
} PageLockBufferDescription;
typedef struct tagClientObject
{
PEPROCESS Process;
ULONG DeviceCount;
ClientDeviceObject Device[1];
} ClientObject;
typedef struct tagGlobalObject
{
ULONG MaximumDevices;
ULONG DeviceCount;
PVOID DeviceList[constTMMANMaximumDeviceCount];
ULONG MaximumClients;
ULONG ClientCount;
PVOID ClientList[constTMMANMaximumClientCount];
PDRIVER_OBJECT DriverObject;
UNICODE_STRING DriverRegistryPath;
PDEVICE_OBJECT DeviceObject;
DebugObject Debug;
ULONG BitFlags;
HANDLE RegistryHandle;
ULONG XlatedAddress;
/* settings read from the registry */
ULONG TargetTraceBufferSize;
ULONG TargetTraceLeveBitmap;
ULONG TargetTraceType;
ULONG MemorySize;
ULONG MailboxCount;
ULONG ChannelCount;
ULONG VIntrCount;
ULONG MessageCount;
ULONG EventCount;
ULONG StreamCount;
ULONG NameSpaceCount;
ULONG MemoryCount;
ULONG SGBufferCount;
ULONG SpeculativeLoadFix;
ULONG PCIInterruptNumber;
ULONG MMIOInterruptNumber;
ULONG MapSDRAM;
} GlobalObject;
typedef struct taghalParameters
{
ULONG TMDeviceVendorID;
ULONG TMSubsystemID;
ULONG TMClassRevisionID;
ULONG BridgeDeviceVendorID;
ULONG BridgeSubsystemID;
ULONG BridgeClassRevisionID;
ULONG BusNumber;
PCI_SLOT_NUMBER SlotNumber;
ULONG DSPNumber;
ULONG PCIIrq;
ULONG TMIrq;
ULONG InterruptLevel;
ULONG InterruptVector;
ULONG InterruptAffinity;
PHYSICAL_ADDRESS MMIOAddrPhysical;
ULONG MMIOLength;
PHYSICAL_ADDRESS SDRAMAddrPhysical;
ULONG SDRAMLength;
PDEVICE_OBJECT DeviceObject;
PDRIVER_OBJECT DriverObject;
Pointer SharedData;
ULONG SpeculativeLoadFix;
ULONG SystemBaseAddress;
ULONG MMIOBaseAddress;
ULONG SDRAMBaseAddress;
ULONG PCIRegisters[constTMMANPCIRegisters];
} halParameters;
typedef struct tagTMManDeviceObject
{
/* generic part */
// user set Flags - for storing device specific information
UInt32 Flags;
// handle to the CRT Object
// just stored here by tmman32 for later retrieval
// not interpreted in kernel mode.
UInt32 CRunTimeHandle;
// current state of the DSP
// LOADED, RESET, RUNNING, DEAD, DEFUNCT
UInt32 Status;
UInt32 DSPNumber;
// why is this here
UInt8* SharedMapped;
TMManSharedStruct* SharedData;
// handle to all the component objects
UInt32 HalHandle;
UInt32 ChannelManagerHandle;
UInt32 VIntrManagerHandle;
UInt32 EventManagerHandle;
UInt32 MessageManagerHandle;
UInt32 MemoryManagerHandle;
UInt32 SGBufferManagerHandle;
UInt32 NameSpaceManagerHandle;
Pointer HalSharedData;
Pointer MemorySharedData;
Pointer NameSpaceSharedData;
UInt32 ChannelSharedData;
UInt32 VIntrSharedData;
UInt32 EventSharedData;
UInt32 SGBufferSharedData;
UInt32 SharedDataHandle;
Pointer MemoryBlock;
UInt32 MemoryBlockSize;
// physical addresses needed by the loader for relocation
PHYSICAL_ADDRESS HalSharedAddress;
PHYSICAL_ADDRESS EventSharedAddress;
PHYSICAL_ADDRESS ChannelSharedAddress;
PHYSICAL_ADDRESS VIntrSharedAddress;
PHYSICAL_ADDRESS DebugSharedAddress;
PHYSICAL_ADDRESS MemorySharedAddress;
PHYSICAL_ADDRESS MemoryBlockAddress;
PHYSICAL_ADDRESS NameSpaceSharedAddress;
PHYSICAL_ADDRESS SGBufferSharedAddress;
PHYSICAL_ADDRESS TMManSharedAddress;
// hardware initialization parameters
halParameters HalParameters;
HANDLE RegistryHandle;
} TMManDeviceObject;
extern GlobalObject *TMManGlobal;
// added SubSystemID/SubVendorID based enumeration option
BOOLEAN pnpFindPCIDevices ( USHORT wVendor, USHORT wDevice, IN PULONG pulTMSubSystemIDAccepted );
BOOLEAN halMapSDRAM ( UInt32 HalHandle );
BOOLEAN halUnmapSDRAM ( UInt32 HalHandle );
BOOLEAN halAllocateBusMasterChannel (
UInt32 HalHandle,
Pointer Context,
PDRIVER_CONTROL ExecutionRoutine );
BOOLEAN halFreeBusMasterChannel (
UInt32 HalHandle,
Pointer MapRegisetBase,
UInt32 MapRegiserCount );
Pointer sectionMapPhysicalAddress (
UInt32 Address,
UInt32 Length,
UInt32 *SectionHandlePointer );
void sectionUnmapPhysicalAddress (
Pointer UserModeVirtualAddress,
UInt32 SectionHandle );
PVOID halMapAdapterMemory (
ULONG BusNumber,
PHYSICAL_ADDRESS PhysicalAddress,
ULONG Length );
VOID halUnmapAdapterMemory (
PVOID MappedAddress,
ULONG Length );
Bool halHookISR (
UInt32 HalHandle,
Pointer Function,
Pointer Context,
UInt32 Flags );
Bool halUnhookISR (
UInt32 HalHandle );
Bool halHookDPC (
UInt32 HalHandle,
Pointer Function,
Pointer Context,
UInt32 Flags );
Bool halUnhookDPC (
UInt32 HalHandle );
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -