Source code of Windows XP (NT5)
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.

140 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. ramdisk.h
  5. Abstract:
  6. Provides the ARC emulation routines for I/O to a RAM disk device.
  7. Author:
  8. Chuck Lenzmeier (chuckl) 29-Apr-2001
  9. Revision History:
  10. --*/
  11. //
  12. // Ramdisk error Codes. These are defined in \bldr\msg.* or
  13. // \setup\msgs.*. They are redefined here since ramdisk.c
  14. // is in \lib and is used in both osloader and setupldr.
  15. //
  16. #define RAMDISK_GENERAL_FAILURE 15000
  17. #define RAMDISK_INVALID_OPTIONS 15001
  18. #define RAMDISK_BUILD_FAILURE 15002
  19. #define RAMDISK_BOOT_FAILURE 15003
  20. #define RAMDISK_BUILD_DISCOVER 15004
  21. #define RAMDISK_BUILD_REQUEST 15005
  22. #define RAMDISK_BUILD_PROGRESS_TIMEOUT 15006
  23. #define RAMDISK_BUILD_PROGRESS_PENDING 15007
  24. #define RAMDISK_BUILD_PROGRESS_ERROR 15008
  25. #define RAMDISK_BUILD_PROGRESS 15009
  26. #define RAMDISK_DOWNLOAD 15010
  27. #define RAMDISK_DOWNLOAD_NETWORK 15011
  28. #define RAMDISK_DOWNLOAD_NETWORK_MCAST 15012
  29. //
  30. // Ramdisk Initialization
  31. //
  32. ARC_STATUS
  33. RamdiskInitialize(
  34. IN PCHAR LoadOptions,
  35. IN BOOLEAN SdiBoot
  36. );
  37. #if defined(_X86_)
  38. VOID
  39. RamdiskSdiBoot(
  40. PCHAR SdiFile
  41. );
  42. #endif
  43. //
  44. // ARC I/O functions
  45. //
  46. ARC_STATUS
  47. RamdiskClose(
  48. IN ULONG FileId
  49. );
  50. ARC_STATUS
  51. RamdiskMount(
  52. IN CHAR * FIRMWARE_PTR MountPath,
  53. IN MOUNT_OPERATION Operation
  54. );
  55. ARC_STATUS
  56. RamdiskOpen(
  57. IN PCHAR OpenPath,
  58. IN OPEN_MODE OpenMode,
  59. OUT PULONG FileId
  60. );
  61. ARC_STATUS
  62. RamdiskRead(
  63. IN ULONG FileId,
  64. OUT PVOID Buffer,
  65. IN ULONG Length,
  66. OUT PULONG Count
  67. );
  68. ARC_STATUS
  69. RamdiskReadStatus(
  70. IN ULONG FileId
  71. );
  72. ARC_STATUS
  73. RamdiskSeek (
  74. IN ULONG FileId,
  75. IN PLARGE_INTEGER Offset,
  76. IN SEEK_MODE SeekMode
  77. );
  78. ARC_STATUS
  79. RamdiskWrite(
  80. IN ULONG FileId,
  81. OUT PVOID Buffer,
  82. IN ULONG Length,
  83. OUT PULONG Count
  84. );
  85. ARC_STATUS
  86. RamdiskGetFileInfo(
  87. IN ULONG FileId,
  88. OUT PFILE_INFORMATION Finfo
  89. );
  90. ARC_STATUS
  91. RamdiskSetFileInfo (
  92. IN ULONG FileId,
  93. IN ULONG AttributeFlags,
  94. IN ULONG AttributeMask
  95. );
  96. ARC_STATUS
  97. RamdiskRename (
  98. IN ULONG FileId,
  99. IN CHAR * FIRMWARE_PTR NewName
  100. );
  101. ARC_STATUS
  102. RamdiskGetDirectoryEntry (
  103. IN ULONG FileId,
  104. OUT PDIRECTORY_ENTRY Buffer,
  105. IN ULONG Length,
  106. OUT ULONG * FIRMWARE_PTR Count
  107. );
  108. //
  109. // Global variables
  110. //
  111. ULONG_PTR SdiAddress;