Windows NT 4.0 source code leak
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.

105 lines
1.7 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1993 Digital Equipment Corporation
  3. Module Name:
  4. bios.c
  5. Abstract:
  6. This module implements ROM BIOS call support for Alpha AXP NT.
  7. Author:
  8. Eric Rehm (rehm@zso.dec.com) 9-December-1993
  9. Revision History:
  10. --*/
  11. #include "halp.h"
  12. #include "arccodes.h"
  13. #include "alpharef.h"
  14. #include "fwcallbk.h"
  15. //
  16. // Static data.
  17. //
  18. // none.
  19. BOOLEAN
  20. HalCallBios (
  21. IN ULONG BiosCommand,
  22. IN OUT PULONG pEax,
  23. IN OUT PULONG pEbx,
  24. IN OUT PULONG pEcx,
  25. IN OUT PULONG pEdx,
  26. IN OUT PULONG pEsi,
  27. IN OUT PULONG pEdi,
  28. IN OUT PULONG pEbp
  29. )
  30. /*++
  31. Routine Description:
  32. This function invokes specified ROM BIOS code by executing
  33. "INT BiosCommand." A callback to the i386 emulator loaded by
  34. the firmware accomplishes this task. This function always
  35. returns success reguardless of the result of the BIOS call.
  36. Arguments:
  37. BiosCommand - specifies which ROM BIOS function to invoke.
  38. BiosArguments - specifies a pointer to the context which will be used
  39. to invoke ROM BIOS.
  40. Return Value:
  41. TRUE if function succees, FALSE otherwise.
  42. --*/
  43. {
  44. X86_BIOS_ARGUMENTS context;
  45. context.Edi = *pEdi;
  46. context.Esi = *pEsi;
  47. context.Eax = *pEax;
  48. context.Ebx = *pEbx;
  49. context.Ecx = *pEcx;
  50. context.Edx = *pEdx;
  51. context.Ebp = *pEbp;
  52. //
  53. // Now call the firmware to actually perform the int 10 operation.
  54. //
  55. VenCallBios(BiosCommand, &context);
  56. //
  57. // fill in struct with any return values from the context
  58. //
  59. *pEdi = context.Edi;
  60. *pEsi = context.Esi;
  61. *pEax = context.Eax;
  62. *pEbx = context.Ebx;
  63. *pEcx = context.Ecx;
  64. *pEdx = context.Edx;
  65. *pEbp = context.Ebp;
  66. //
  67. // Indicate success
  68. //
  69. return TRUE;
  70. }