On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTTarget-32 Programming Manual
RTTarget-32 Reference Manual
Introduction
RTTarget-32 Configuration
Screen I/O
Interrupt Handling
Port I/O
System Functions
Program Loading
Memory Mapping and Management
Real-Time Clock and CMOS RAM
Keyboard
Mouse and Touch Screen Driver
Parallel Port Printer
Serial Port I/O
PCI BIOS
Plug-and-Play BIOS
PC Cards (PCMCIA)
MetaWINDOW Initialization
Run-Time System Support
System Management BIOS (SMBIOS)
Advanced Programmable Interrupt Controller (APIC)
Multiprocessor Management
Spinlocks
Advanced Configuration and Power Interface (ACPI) Tables
Extended RAM Management
Function RTT_ERAM_BlocksAvail
Function RTT_ERAM_AllocBlocks
Function RTT_ERAM_Alloc
Function RTT_ERAM_MapBlock
RTVmf-32
RTRth-32
RTKernel-32
RTFiles-32
RTIP-32
RTPEG-32
RTUSB-32
|
Function RTT_ERAM_Alloc
RTT_ERAM_Alloc allocates a set of 4 megabyte blocks of Extended RAM located at physical addresses above 4G:
RTT_ERAM_Handle RTT_ERAM_Alloc(int Blocks, DWORD Flags);
ParametersBlocksThe number of 4 megabyte blocks to allocate. If this parameter is 0, all available Extended RAM is allocated. The number of allocated blocks can be queried with function RTT_ERAM_BlocksAvail.
Flags0 or a combination of these values:
Value |
Meaning |
RTT_ERAM_CACHEABLE |
The allocated Extended RAM is mapped as cacheable. By default, the RAM is mapped as not cacheable. |
RTT_ERAM_2_WINDOWS |
Two instead of just one window in the virtual address space is allocated. Two windows can be useful, for example to copy or compare records both located in Extended RAM. |
RTT_ERAM_NO_PCI_CHECK |
This option instructs function RTT_ERAM_Alloc not to check for virtual address conflicts with PCI devices when allocating address space for the virtual address window(s). This option should be specified when RTT_ERAM_Alloc is called after all PCI devices the applications needs have been initialised. |
return valueOn success, a handle >= 0, which can be used in subsequent calls to RTT_ERAM_BlocksAvail or RTT_ERAM_MapBlock to access the allocated Extended RAM. If the function fails, one of the following negative error codes is returned:
Value |
Meaning |
RTT_ERAM_TOO_MANY |
Too many sets of Extended RAM have been allocated. RTTarget-32 supports up to 8 sets. |
RTT_ERAM_NO_ERAM |
No Extended RAM is installed. |
RTT_ERAM_OUT_OF_ERAM |
No Extended RAM is left as all has already been allocated to other sets. |
RTT_ERAM_OUT_OF_VADDR |
Out of virtual address space to allocate the requested window(s). If flag RTT_ERAM_2_WINDOWS was specified, the function might succeed without RTT_ERAM_2_WINDOWS. |
RTT_ERAM_NOT_SUPPORTED |
The CPU does not support mapping physical pages above 4G into the virtual address space below 4G. |
RTT_ERAM_NO_PAGING |
No page table was located. |
To access the allocated Extended RAM, the application must call RTT_ERAM_MapBlock to map single blocks into the program's address space.
Extended RAM Management
Function RTT_ERAM_AllocBlocks
Function RTT_ERAM_MapBlock
|