Author: cfinck
Date: Wed Aug 16 10:44:15 2017
New Revision: 75564
URL:
http://svn.reactos.org/svn/reactos?rev=75564&view=rev
Log:
[FREELDR]
Lower MAX_DISKREADBUFFER_SIZE to let INT 13h, AH=42h only read a maximum of 127 sectors
(instead of 128 previously).
This fixes USB booting into the kernel on at least Dell Latitude D531 and Lenovo ThinkPad
X61.
Now CORE-13184 remains (in a VM and on real hardware, probably related to the CDFS
driver)
Modified:
trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1]
(original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] Wed Aug 16
10:44:15 2017
@@ -22,7 +22,12 @@
#define BIOSCALLBUFOFFSET HEX(0000) /* Buffer to store temporary data for any Int386()
call */
#define BIOSCALLBUFSIZE PAGE_SIZE /* max is sizeof(VESA_SVGA_INFO) = 512 */
#define MAX_FREELDR_PE_SIZE (MEMORY_MARGIN - FREELDR_PE_BASE - PAGE_SIZE)
-#define MAX_DISKREADBUFFER_SIZE HEX(10000)
+
+/* MAX_DISKREADBUFFER_SIZE is later passed to INT 13h, AH=42h.
+ According to
https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH.3D42h:_Extended_Read_Secto…
+ some BIOSes can only read a maximum of 127 sectors. (0xFE00 / 512 = 127)
+ Confirmed when booting from USB on Dell Latitude D531 and Lenovo ThinkPad X61. */
+#define MAX_DISKREADBUFFER_SIZE HEX(FE00)
/* These addresses specify the realmode "BSS section" layout */
#define BSS_RealModeEntry (BSS_START + 0)