30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
|
The AMD64 kernel is loaded with an X86 loader. This is to enable a single
|
||
|
loader to dual-boot either an i386 or Amd64 build. The remainder of this
|
||
|
text refers to only the i386 version of the loader.
|
||
|
|
||
|
There are two new AMD64-specific exports in boot.lib:
|
||
|
|
||
|
ARC_STATUS
|
||
|
BlAmd64CheckForLongMode(
|
||
|
IN ULONG LoadDeviceId,
|
||
|
IN OUT PCHAR KernelPath,
|
||
|
IN PCHAR KernelFileName
|
||
|
);
|
||
|
|
||
|
extern BOOLEAN BlAmd64UseLongMode;
|
||
|
|
||
|
BlAmd64CheckForLongMode() is called from the loader. If an AMD64 kernel
|
||
|
image is found, then the global BlAmd64UseLongMode is set to TRUE. From
|
||
|
this point forward, all images are expected to be AMD64 images.
|
||
|
|
||
|
Almost all of the code specific to AMD64 support is found in
|
||
|
boot\lib\amd64. At present, the contents of this directory is available to
|
||
|
only a few people. However the loader, obviously, must build for
|
||
|
everybody.
|
||
|
|
||
|
To facilitate this, _X86AMD64_ is defined while building the boot\lib
|
||
|
directory if files within the amd64 directory are present on the build
|
||
|
machine. If they are not present, then a stub version of
|
||
|
BlAmd64CheckForLongMode() is created.
|
||
|
|