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.

82 lines
2.9 KiB

  1. //
  2. // The following memory address definitions apply to
  3. // indentity mapped objects for the x86 environment.
  4. //
  5. #define RM_PROTECT_BASE_VA 0x000000
  6. #define RM_PROTECT_BASE_PA 0x000000
  7. #define RM_PROTECT_SIZE 0x001000
  8. #define RM_PROTECT_ATTRIBUTES PAGE_ROSP
  9. #define BPB_BASE_VA 0x007000
  10. #define BPB_BASE_PA 0x007000
  11. #define BPB_SIZE 0x001000
  12. #define BPB_ATTRIBUTES PAGE_ROSP
  13. #define SU_MODULE_BASE_VA 0x020000
  14. #define SU_MODULE_BASE_PA 0x020000
  15. #define SU_MODULE_SIZE 0x020000
  16. #define SU_MODULE_ATTRIBUTES PAGE_RWSP
  17. #define LOADER_BASE_VA 0x040000
  18. #define LOADER_BASE_PA 0x040000
  19. #define LOADER_SIZE 0x020000
  20. #define LOADER_ATTRIBUTES PAGE_RWSP
  21. #define SYSTEM_STRUCTS_BASE_VA 0x80420000
  22. #define SYSTEM_STRUCTS_BASE_PA 0x00017000
  23. #define SYSTEM_STRUCTS_SIZE 0x002000
  24. #define SYSTEM_STRUCTS_ATTRIBUTES PAGE_RWSP + PAGE_PERSIST
  25. #define PAGE_TABLE_AREA_BASE_VA 0x00099000
  26. #define PAGE_TABLE_AREA_BASE_PA 0x00099000
  27. #define PAGE_TABLE_AREA_SIZE 0x002000
  28. #define PAGE_TABLE_AREA_ATTRIBUTES PAGE_RWSP + PAGE_PERSIST
  29. #define LDR_STACK_BASE_VA 0x09b000
  30. #define LDR_STACK_BASE_PA 0x09b000
  31. #define LDR_STACK_SIZE 0x001000
  32. #define LDR_STACK_ATTRIBUTES PAGE_RWSP
  33. #define LDR_STACK_POINTER 0x09bffe // in su.inc also
  34. #define VIDEO_BUFFER_BASE_VA 0x0B8000
  35. #define VIDEO_BUFFER_BASE_PA 0x0B8000
  36. #define VIDEO_BUFFER_SIZE 0x004000
  37. #define VIDEO_BUFFER_ATTRIBUTES PAGE_RWSP
  38. #define HYPER_PAGE_DIRECTORY 0xC0300C00
  39. #define HYPER_SPACE_BEGIN 0xC0000000 // points to 1st page table
  40. #define HYPER_SPACE_SIZE 0x8000L
  41. #define HYPER_SPACE_ENTRY 768
  42. #define PAGE_TABLE1_ADDRESS 0xC0000000L
  43. #define PD_PHYSICAL_ADDRESS PAGE_TABLE_AREA_BASE_PA // in su.inc also.
  44. #define PT_PHYSICAL_ADDRESS PAGE_TABLE_AREA_BASE_PA + PAGE_SIZE
  45. #define VIDEO_ENTRY 0xB8
  46. /*
  47. Switching to Realmode
  48. ~~~~~~~~~~~~~~~~~~~~~
  49. When switching to realmode "sp" will be initialized to
  50. 0xfffe and (ss) will be set to the base of the SU module's
  51. data segment. This has several effects.
  52. 1) The stack will remain withing the 0x20000 - 0x3ffff range
  53. reserved for the original SU module and loader image prior to
  54. relocation, and since the loader will already have been relocated
  55. it is no longer necessary to preserve this area.
  56. 2) This will preserve the SU module's small model character which
  57. requires that offsets can be used interchangably through (ss) or (ds).
  58. 3) This allows for the maximum stack size for small model apps (which is
  59. what the SU module is). Bios calls should not be tromping on any
  60. data or code while in realmode.
  61. */