6 size restrictions based on memory available, 2 memory ordering, 3 virtual machine registers – Intel Extensible Firmware Interface User Manual

Page 777

Advertising
background image

EFI Byte Code Virtual Machine

Version 1.10

12/01/02

19-3

19.1.6 Size Restrictions Based on Memory Available

EBC option ROM images shall not be limited to a predetermined fixed maximum size.

Current option ROM technology limits the size of a preinitialization option ROM image to 128 KB
(126 KB actual). Additionally, in the DDIM an image is not allowed to grow during initialization.
It is inevitable that 64-bit solutions will increase in complexity and size. To avoid revisiting this
issue, EBC option ROM size is only limited by available system memory. EFI memory allocation
services allow device drivers to claim as much memory as they need, within limits of available
system memory.

The PCI specification limits the size of an image stored in an option ROM to 16 MB. If the driver
is stored on the hard drive then the 16MB option ROM limit does not apply. In addition, the
PE/COFF object format limits the size of images to 2 GB.

19.2 Memory Ordering

The term memory ordering refers to the order in which a processor issues reads (loads) and writes
(stores) out onto the bus to system memory. The EBC Virtual Machine enforces strong memory
ordering, where reads and writes are issued on the system bus in the order they occur in the
instruction stream under all circumstances.

19.3 Virtual Machine Registers

The EBC virtual machine utilizes a simple register set. There are two categories of VM registers:
general purpose registers and dedicated registers. All registers are 64-bits wide. There are eight (8)
general-purpose registers (R0-R7), which are used by most EBC instructions to manipulate or fetch
data. Table 19-1 lists the general-purpose registers in the VM and the conventions for their usage
during execution.

Table 19-1. General Purpose VM Registers

Index

Register

Description

0

R0

Points to the top of the stack

1-3

R1-R3

Preserved across calls

4-7

R4-R7

Scratch, not preserved across calls

Register R0 is used as a stack pointer and is used by the

CALL

,

RET

,

PUSH

, and

POP

instructions.

The VM initializes this register to point to the incoming arguments when an EBC image is started
or entered. This register may be modified like any other general purpose VM register using EBC
instructions. Register R7 is used for function return values.

Advertising