/**************************************************************************** REMARKS: Initialise the PM library. ****************************************************************************/ void PMAPI PM_init(void) { /* Override the default memory allocators for all SNAP drivers * loaded in SDDHELP/PMHELP. We do this so that we can ensure all memory * dynamically allocated by SNAP drivers and internal C runtime * library functions are shared memory blocks that all processes * connecting to SDDHELP can see. */ PM_useLocalMalloc(NTDRV_malloc,NTDRV_calloc,NTDRV_realloc,NTDRV_free); /* Initialiase the MTRR module */ MTRR_init(); }
void PMAPI PM_init(void) { char *force; if (VRegs == NULL) { #ifdef __QNXNTO__ ThreadCtl(_NTO_TCTL_IO, 0); /* Get IO privilidge */ #endif force = getenv("VBIOS_METHOD"); VRegs = VBIOSinit(force ? atoi(force) : 0); } MTRR_init(); }
/**************************************************************************** REMARKS: Initialise the PM library. ****************************************************************************/ void PMAPI PM_init(void) { static ibool inited = false; /* Exit if we are already inited */ if (inited) return; /* Override the default memory allocators for all SNAP drivers * loaded in SDDHELP/PMHELP. We do this so that we can ensure all memory * dynamically allocated by SNAP drivers and internal C runtime * library functions are shared memory blocks that all processes * connecting to SDDHELP can see. */ PM_useLocalMalloc(NTDRV_malloc,NTDRV_calloc,NTDRV_realloc,NTDRV_free); /* Initialiase the MTRR module */ MTRR_init(); /* Map the first Mb of physical memory into lowMem */ if ((lowMem = PM_mapPhysicalAddr(0,0xFFFFF,true)) == NULL) PM_fatalError("Unable to map first Mb physical memory!"); inited = true; }
/**************************************************************************** REMARKS: Initialise the PM library. ****************************************************************************/ void PMAPI PM_init(void) { // TODO: dO any special init code in here. MTRR_init(); }