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.

165 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. stubs.c
  5. Abstract:
  6. This module implements memory check routine for the boot debugger.
  7. Author:
  8. David N. Cutler (davec) 3-Dec-96
  9. Environment:
  10. Kernel mode only.
  11. Revision History:
  12. --*/
  13. #include "bd.h"
  14. extern BOOLEAN PaeEnabled;
  15. BOOLEAN
  16. BdCheckPdeValid (
  17. IN PVOID Address
  18. )
  19. /*++
  20. Routine Description:
  21. This routine determines if the PDE for the specified address has the
  22. valid bit set.
  23. Agruments:
  24. Address - Supplies the virtual address to check.
  25. Return Value:
  26. A value of TRUE indicates that the PDE for the supplied virtual address
  27. does have the valid bit set, FALSE if it does not.
  28. --*/
  29. {
  30. return FALSE;
  31. }
  32. BOOLEAN
  33. BdCheckPteValid (
  34. IN PVOID Address
  35. )
  36. /*++
  37. Routine Description:
  38. This routine determines if the PTE for the specified address has the
  39. valid bit set.
  40. Agruments:
  41. Address - Supplies the virtual address to check.
  42. Return Value:
  43. A value of TRUE indicates that the PTE for the supplied virtual address
  44. does have the valid bit set, FALSE if it does not.
  45. --*/
  46. {
  47. return FALSE;
  48. }
  49. PVOID
  50. BdReadCheck (
  51. IN PVOID Address
  52. )
  53. /*++
  54. Routine Description:
  55. This routine determines if the specified address can be read.
  56. Arguments:
  57. Address - Supplies the virtual address to check.
  58. Return Value:
  59. A value of NULL is returned if the address is not valid or readable.
  60. Otherwise, the physical address of the corresponding virtual address
  61. is returned.
  62. --*/
  63. {
  64. return Address;
  65. }
  66. PVOID
  67. BdWriteCheck (
  68. IN PVOID Address
  69. )
  70. /*++
  71. Routine Description:
  72. This routine determines if the specified address can be written.
  73. Arguments:
  74. Address - Supplies the virtual address to check.
  75. Return Value:
  76. A value of NULL is returned if the address is not valid or writeable.
  77. Otherwise, the physical address of the corresponding virtual address
  78. is returned.
  79. --*/
  80. {
  81. return Address;
  82. }
  83. PVOID
  84. BdTranslatePhysicalAddress (
  85. IN PHYSICAL_ADDRESS Address
  86. )
  87. /*++
  88. Routine Description:
  89. This routine returns the phyiscal address for a physical address
  90. which is valid (mapped).
  91. Arguments:
  92. Address - Supplies the physical address to check.
  93. Return Value:
  94. Returns NULL if the address is not valid or readable. Otherwise,
  95. returns the physical address of the corresponding virtual address.
  96. --*/
  97. {
  98. return (PVOID)UlongToPtr(Address.LowPart);
  99. }