Data storage

The minidriver program usually requires a space to store the received hardware data and any other information that the full driver will later need at process time. You need to determine the amount of data you require and allocate the memory.

As we'll see, you allocate the data area in the startup's main() function and provide the area's physical address when you register the handler function. When the handler is invoked, it's passed the area's virtual address.

CAUTION:
This area of memory isn't internally managed by the system; it's your driver's responsibility to avoid overwriting system memory. If your handler function writes outside of its data area, a system failure could occur, and the operating system might not boot.