Download Print this page

HP Vectra Technical Reference Manual page 274

Hide thumbs Also See for Vectra:

Advertisement

The driver data area for each driver is dynamically allocated by the V_SYSTEM driver. Each
driver's data area is at its data segment (DS) and is generally composed of a standard header
followed by any data particular to the driver. If the driver wishes a data area from the EX-BIOS
memory it must follow the allocation process described below.
Space is allocated starting from the base of the global data area toward the top of the
HP_VECTOR-TABLE as shown in figure 9.1. When a driver is initialized, the base address of the
last driver data area ("last used DS") is passed to the driver. The driver decrements this value by
the number of paragraphs (16 bytes) it needs for its data area, then returns this value as the new
"last used DS".
Driver Data Area Allocation
HP_VECTOR_TABLE
HP_ENTRY's CS:O
HP_ENTRY_CODE
HP_ENTRY's CS:IP
"Max DS"
"Last used DS"
TOP of RAM
HP_VECTOR_TABLE
HP_ENTRY_CODE
EX-BIOS
Memory
Pool
~
EX-BIOS Resident
Driver's Data
Segments
EX-BIOS Global
Data Segment
EX-BIOS
Memory
Pool
Figure 9.1
If a driver needs a particularly large data area, there might not be enough room. The driver must
determine the amount of RAM it requires, then see if that amount is available by comparing its
requirements against the amount of RAM available ("last used DS" -"Max DS").
If
there is an insufficient amount of RAM available, the driver may increase the amount of RAM
allocated to the EX-BIOS data area in the following manner. The memory size stored in CMOS
RAM is the amount of physical RAM less the amount occupied by the EX-BIOS Data Area. When
the system is booted, the boot code determines the amount of physical memory, then subtracts
the "top of memory" stored in CMOS RAM to determine how much space to allocate for the
EX-BIOS Data Area. Adjusting the memory size in CMOS RAM downward, then rebooting will
increase the size of the EX-BIOS Data Area and hence the amount of RAM available to the driver.
This technique may be used to create an EX-BIOS data area up to 64 KBytes in size. A program
listing demonstrating this process follows. (Functions F _RAM_GET, F_RAM_RET,
F_CMOS_GET and F_CMOS_RET are described in detail later in this section).
System Drivers
265

Advertisement

loading
Need help?

Need help?

Do you have a question about the Vectra and is the answer not in the manual?

Questions and answers