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.

90 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. ixreboot.c
  5. Abstract:
  6. Provides the interface to the firmware for x86. Since there is no
  7. firmware to speak of on x86, this is just reboot support.
  8. Author:
  9. John Vert (jvert) 12-Aug-1991
  10. Revision History:
  11. --*/
  12. #include "halp.h"
  13. #include <inbv.h>
  14. //
  15. // Defines to let us diddle the CMOS clock and the keyboard
  16. //
  17. #define CMOS_CTRL (PUCHAR )0x70
  18. #define CMOS_DATA (PUCHAR )0x71
  19. #define RESET 0xfe
  20. #define KEYBPORT (PUCHAR )0x64
  21. VOID HalpVideoReboot(VOID);
  22. VOID HalpReboot(VOID);
  23. #if defined(NEC_98)
  24. BOOLEAN HalpPowerDownFlag;
  25. #endif // defined(NEC_98)
  26. VOID
  27. HalReturnToFirmware(
  28. IN FIRMWARE_ENTRY Routine
  29. )
  30. /*++
  31. Routine Description:
  32. Returns control to the firmware routine specified. Since the x86 has
  33. no useful firmware, it just stops the system.
  34. Arguments:
  35. Routine - Supplies a value indicating which firmware routine to invoke.
  36. Return Value:
  37. Does not return.
  38. --*/
  39. {
  40. switch (Routine) {
  41. case HalPowerDownRoutine:
  42. #if defined(NEC_98)
  43. HalpPowerDownFlag = TRUE;
  44. #endif // defined(NEC_98)
  45. case HalHaltRoutine:
  46. case HalRestartRoutine:
  47. case HalRebootRoutine:
  48. InbvAcquireDisplayOwnership();
  49. //
  50. // Never returns
  51. //
  52. HalpReboot();
  53. break;
  54. default:
  55. DbgPrint("HalReturnToFirmware called\n");
  56. DbgBreakPoint();
  57. break;
  58. }
  59. }