Allocating non-cached memory
To allocate memory that will not be cached:
- For DDI 8
-
Allocate the memory with the
kmem_alloc_phys(D3)
function.
Convert the memory address
(32 or 64 bits depending on the value of
the
phys_dmasize member of the
physreq(D4)
structure)
to memory block number and offset,
and map the virtual address using the
devmem_mapin(D3)
function.
- For DDI 7.2
-
Allocate the memory with the
kmem_alloc_phys(D3)
function.
You must populate a
physreq(D4)
structure, being sure to set the
phys_dmasize member
to a value less than 32, even if your device
is 64-bit capable.
Then use the
physmap(D3)
function to map in the memory.
The mapping generated by
physmap( )
is not cached.
- On SCO OpenServer systems
-
Allocate the memory with the
sptalloc(D3oddi)
function, setting the PG_PCD bit
in the mode argument.
This sets the cache disable bit
(
pg_cd) in the corresponding page table entry.
© 1999 The Santa Cruz Operation, Inc. All rights reserved.
HDK 7.1.0 - June 1999