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.

144 lines
4.5 KiB

  1. #ifndef OSMCA_H_INCLUDED
  2. #define OSMCA_H_INCLUDED
  3. //###########################################################################
  4. //**
  5. //** Copyright (C) 1996-98 Intel Corporation. All rights reserved.
  6. //**
  7. //** The information and source code contained herein is the exclusive
  8. //** property of Intel Corporation and may not be disclosed, examined
  9. //** or reproduced in whole or in part without explicit written authorization
  10. //** from the company.
  11. //**
  12. //###########################################################################
  13. //-----------------------------------------------------------------------------
  14. // Version control information follows.
  15. //
  16. // $Header: I:/DEVPVCS/OSMCA/osmca.h_v 2.2 09 Mar 1999 10:30:26 smariset $
  17. // $Log: I:/DEVPVCS/OSMCA/osmca.h_v $
  18. //
  19. // Rev 2.2 09 Mar 1999 10:30:26 smariset
  20. // *.h consolidation
  21. //
  22. // Rev 2.0 Dec 11 1998 11:42:18 khaw
  23. // Post FW 0.5 release sync-up
  24. //
  25. // Rev 1.4 29 Oct 1998 14:25:02 smariset
  26. //Consolidated Sources
  27. //
  28. // Rev 1.3 07 Aug 1998 13:47:50 smariset
  29. //
  30. //
  31. // Rev 1.2 10 Jul 1998 11:04:24 smariset
  32. //just checking in
  33. //
  34. // Rev 1.1 08 Jul 1998 14:23:16 smariset
  35. //
  36. //
  37. // Rev 1.0 02 Jul 1998 09:20:56 smariset
  38. //
  39. //
  40. //
  41. //*****************************************************************************//
  42. // SAL_MC_SET_PARAMS
  43. // typedef's
  44. typedef (*fptr)(void);
  45. typedef SAL_PAL_RETURN_VALUES (*fpSalProc)(ULONGLONG,ULONGLONG,ULONGLONG,ULONGLONG,ULONGLONG,ULONGLONG,ULONGLONG,ULONGLONG);
  46. typedef struct tagPLabel
  47. {
  48. ULONGLONG fPtr;
  49. ULONGLONG gp;
  50. } PLabel;
  51. typedef struct tagSalHandOffState
  52. {
  53. ULONGLONG OsGp;
  54. ULONGLONG pPalProc;
  55. fptr pSalProc;
  56. ULONGLONG SalGp;
  57. LONGLONG RendzResult;
  58. ULONGLONG SalRtnAddr;
  59. ULONGLONG MinStatePtr;
  60. } SalHandOffState;
  61. #define SAL_RZ_NOT_REQUIRED 0
  62. #define SAL_RZ_WITH_MC_RENDEZVOUS 1
  63. #define SAL_RZ_WITH_MC_RENDEZVOUS_AND_INIT 2
  64. #define SAL_RZ_FAILED -1
  65. #define SalRendezVousSucceeded( _SalHandOffState ) \
  66. ((_SalHandOffState).RendzResult > SAL_RZ_NOT_REQUIRED)
  67. //
  68. // HAL Private SalRendezVousSucceeded definition,
  69. // using ntos\inc\ia64.h: _SAL_HANDOFF_STATE.
  70. //
  71. #define HalpSalRendezVousSucceeded( _SalHandOffState ) \
  72. ((_SalHandOffState).RendezVousResult > SAL_RZ_NOT_REQUIRED)
  73. typedef struct tagOsHandOffState
  74. {
  75. ULONGLONG Result;
  76. ULONGLONG SalGp;
  77. ULONGLONG nMinStatePtr;
  78. ULONGLONG SalRtnAddr;
  79. ULONGLONG NewCxFlag;
  80. } OsHandOffState;
  81. typedef SAL_PAL_RETURN_VALUES (*fpOemMcaDispatch)(ULONGLONG);
  82. // function prototypes
  83. void HalpOsMcaDispatch(void);
  84. void HalpOsInitDispatch(void);
  85. VOID HalpCMCEnable ( VOID );
  86. VOID HalpCMCDisable( VOID );
  87. VOID HalpCMCDisableForAllProcessors( VOID );
  88. VOID HalpCPEEnable ( VOID );
  89. VOID HalpCPEDisable( VOID );
  90. BOOLEAN HalpInitializeOSMCA( ULONG Number );
  91. VOID HalpCmcHandler( VOID );
  92. VOID HalpCpeHandler( VOID );
  93. SAL_PAL_RETURN_VALUES HalpMcaHandler(ULONG64 RendezvousState, PPAL_MINI_SAVE_AREA Pmsa);
  94. extern VOID HalpAcquireMcaSpinLock( PKSPIN_LOCK );
  95. extern VOID HalpReleaseMcaSpinLock( PKSPIN_LOCK );
  96. void HalpOsMcaDispatch1(void);
  97. //
  98. // wrappers to SAL procedure calls
  99. //
  100. SAL_PAL_RETURN_VALUES
  101. HalpGetErrLogSize( ULONGLONG Reserved,
  102. ULONGLONG EventType
  103. );
  104. #define HalpGetStateInfoSize( /* ULONGLONG */ _EventType ) HalpGetErrLogSize( 0, (_EventType) )
  105. SAL_PAL_RETURN_VALUES
  106. HalpGetErrLog( ULONGLONG Reserved,
  107. ULONGLONG EventType,
  108. ULONGLONG *MemAddr
  109. );
  110. #define HalpGetStateInfo( /* ULONGLONG */ _EventType, /* ULONGLONG * */ _Buffer ) \
  111. HalpGetErrLog( 0, (ULONGLONG)(_EventType), (PULONGLONG)(_Buffer) )
  112. SAL_PAL_RETURN_VALUES
  113. HalpClrErrLog( ULONGLONG Reserved,
  114. ULONGLONG EventType // MCA_EVENT,INIT_EVENT,CMC_EVENT,CPE_EVENT
  115. );
  116. #define HalpClearStateInfo( /* ULONGLONG */ _EventType ) HalpClrErrLog( 0, (_EventType) )
  117. SAL_PAL_RETURN_VALUES HalpSalSetParams(ULONGLONG, ULONGLONG, ULONGLONG, ULONGLONG, ULONGLONG);
  118. SAL_PAL_RETURN_VALUES HalpSalSetVectors(ULONGLONG, ULONGLONG, PHYSICAL_ADDRESS, ULONGLONG, ULONGLONG);
  119. SAL_PAL_RETURN_VALUES HalpSalRendz(void);
  120. #define GetGp() __getReg(CV_IA64_IntGp)
  121. #endif // OSMCA_H_INCLUDED