Break, Break syntax, Description – Intel Extensible Firmware Interface User Manual

Page 789

Advertising
background image

EFI Byte Code Virtual Machine

Version 1.10

12/01/02

19-15

BREAK

SYNTAX:

BREAK [break code]

DESCRIPTION

The BREAK instruction is used to perform special processing by the VM. The break code specifies
the functionality to perform.

BREAK 0 – Runaway program break. This indicates that the VM is likely executing code
from cleared memory. This results in a bad break exception.

BREAK 1 – Get virtual machine version. This instruction returns the 64-bit virtual machine
revision number in VM register R7. The encoding is shown in Table 19-11 and Table 19-12.
A VM that conforms to this version of the specification should return a version number of
0x00010000.

Table 19-11 VM Version format

BITS DESCRIPTION

63-32

Reserved = 0

31..16

VM major version

15..0

VM minor version


BREAK 3
– Debug breakpoint. Executing this instruction results in a debug break exception.
If a debugger is attached or available, then it may halt execution of the image.

BREAK 4 – System call. There are no system calls supported for use with this break code, so
the VM will ignore the instruction and continue execution at the following instruction.

BREAK 5 – Create thunk. This causes the interpreter to create a thunk for the EBC entry
point whose 32-bit IP-relative offset is stored at the 64-bit address in VM register R7. The
interpreter then replaces the contents of the memory location pointed to by R7 to point to the
newly created thunk. Since all EBC IP-relative offsets are relative to the next instruction or
data object, the original offset is off by 4, so must be incremented by 4 to get the actual
address of the entry point.

BREAK 6 – Set compiler version. An EBC C compiler can insert this break instruction into
an executable to set the compiler version used to build an EBC image. When the VM
executes this instruction it takes the compiler version from register R7 and may perform
version compatibility checking. The compiler version number follows the same format as the
VM version number returned by the BREAK 1 instruction.

Advertising