OcAppleBootCompatLib: Improve slide and kernel size documentation
#error "Unsupported architecture!"
#endif
+//
+// The kernel is normally allocated at base 0x100000 + slide address.
+//
+// For slide=0x1~0x7F the kernel is allocated from
+// 0x100000 + 0x200000 till 0x100000 + 0xFE00000.
+//
+// For slide = 0x80~0xFF on Sandy Bridge or Ivy Bridge CPUs from
+// 0x100000 + 0x20200000 till 0x100000? + 0x30000000??.
+//
+// For slide = 0x80~0xFF on Other CPUs from
+// 0x100000 + 0x10000000 till 0x100000 + 0x1FE00000.
+//
+
/**
Maximum number of supported runtime reloc protection areas.
Currently hardocded for simplicity.
/**
Slide offset per slide entry
**/
-#define SLIDE_GRANULARITY ((UINTN) 0x200000)
+#define SLIDE_GRANULARITY ((UINTN) SIZE_2MB)
/**
Total possible number of KASLR slide offsets.
/**
Assume the kernel is roughly 128 MBs.
**/
-#define ESTIMATED_KERNEL_SIZE ((UINTN) 0x8000000)
+#define ESTIMATED_KERNEL_SIZE ((UINTN) SIZE_128MB)
/**
Preserved relocation entry.
