Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.1 KiB

  1. The AMD64 kernel is loaded with an X86 loader. This is to enable a single
  2. loader to dual-boot either an i386 or Amd64 build. The remainder of this
  3. text refers to only the i386 version of the loader.
  4. There are two new AMD64-specific exports in boot.lib:
  5. ARC_STATUS
  6. BlAmd64CheckForLongMode(
  7. IN ULONG LoadDeviceId,
  8. IN OUT PCHAR KernelPath,
  9. IN PCHAR KernelFileName
  10. );
  11. extern BOOLEAN BlAmd64UseLongMode;
  12. BlAmd64CheckForLongMode() is called from the loader. If an AMD64 kernel
  13. image is found, then the global BlAmd64UseLongMode is set to TRUE. From
  14. this point forward, all images are expected to be AMD64 images.
  15. Almost all of the code specific to AMD64 support is found in
  16. boot\lib\amd64. At present, the contents of this directory is available to
  17. only a few people. However the loader, obviously, must build for
  18. everybody.
  19. To facilitate this, _X86AMD64_ is defined while building the boot\lib
  20. directory if files within the amd64 directory are present on the build
  21. machine. If they are not present, then a stub version of
  22. BlAmd64CheckForLongMode() is created.