diff options
Diffstat (limited to '')
-rw-r--r-- | private/ntos/miniport/always/ntenv.c | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/private/ntos/miniport/always/ntenv.c b/private/ntos/miniport/always/ntenv.c new file mode 100644 index 000000000..0a4eb402e --- /dev/null +++ b/private/ntos/miniport/always/ntenv.c @@ -0,0 +1,80 @@ +/* Copyright (C) 1991, 1992 by Always Technology Corporation. + This module contains information proprietary to + Always Technology Corporation, and is be treated as confidential. + +*/ + +#include "environ.h" +#include "rqm.h" +#include "api.h" +#include "apiscsi.h" +#include "debug.h" + +#include <stdarg.h> +#include <stdio.h> + +#if defined(DEBUG_ON) +int DEBUG_TOKEN=0; +#endif + + +void +PanicMsg (char *Message) +{ + + TRACE(0,Message); + BreakPoint(HA); + +} + + + +U32 +MapToPhysical (void ALLOC_D *HA, SegmentDescr *Descr) +{ + U32 T; + U32 Size = Descr->SegmentLength; + + TRACE(5, ("MapToPhysical(): Request to map addr: 0x%x for a length of: %d\n", + Descr->SegmentPtr, Size)); + + T = (U32)ScsiPortConvertPhysicalAddressToUlong( + ScsiPortGetPhysicalAddress(HA, NULL, (PVOID)(Descr->SegmentPtr), &Size)); + if (Size < Descr->SegmentLength) + Descr->SegmentLength = Size; + + Descr->SegmentPtr = T; + Descr->Flags.IsPhysical = TRUE; + + TRACE(5, ("MapToPhysical(): Mapped to 0x%lx\n", T)); + + return T; +} + + + +#if !defined(NO_MALLOC) +ALLOC_T +allocm (unsigned Count) +{ + // This is a cludge until we do it the right way. + // It's too late in the evening to do anything else: + static U8 MemoryPool[8192]; + static int MemPoolIndex=0; + ALLOC_T T; + + TRACE(4, ("allocm(): Requesting %d bytes; current pool index at: %d\n", + Count, MemPoolIndex)); + T = (ALLOC_T)&MemoryPool[MemPoolIndex]; + MemPoolIndex += Count; + + return T; +} +#endif + + +void +EnvLib_Init (void) +{ + +} |