Index: /trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc	(revision 534)
+++ /trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc	(revision 535)
@@ -22,5 +22,7 @@
 
 ; EBIOS specification returned by INT 13h, AH=41h
-EBIOS_VERSION						EQU	21h		; 21h = EDD version 1.1
+
+EDD_V1_1							EQU	21h		; 21h = EDD version 1.1
+EBIOS_VERSION						EQU	EDD_V1_1
 
 ; Support bits returned by INT 13h, AH=41h
@@ -39,8 +41,9 @@
 	.qwTotalSectors			resb	8	; 16, Total number of addressable sectors
 	.wSectorSize			resb	2	; 24, Number of bytes per sector
-	.fpEDDparams			resb	8	; 26, Optional pointer to Enhanced Disk Drive (EDD) configuration parameters
+	.fpDPTE					resb	4	; 26, Optional pointer to Device Parameter Table Extension
 endstruc
 
 MINIMUM_EDRIVEINFO_SIZE		EQU		26	; 26 bytes does not include EDD pointer
+EDRIVEINFO_SIZE_WITH_DPTE	EQU		EDRIVE_INFO_size
 
 ; Flags for EDRIVE_INFO.wFlags
@@ -52,4 +55,42 @@
 FLG_LOCKABLE										EQU	(1<<5)	; Removable media only
 FLG_NO_MEDIA_PRESENT_AND_CHS_SET_TO_MAX				EQU	(1<<6)	; Removable media only
+
+
+; Device Parameter Table Extension
+struc DPTE
+	.wBasePort				resb	2	; 0, Command Block Base Port Address
+	.wControlBlockPort		resb	2	; 2, Control Block Base Port Address
+	.bDrvnhead				resb	1	; 4, Drive and Head Select Register upper nibble
+	.bBiosVendor			resb	1	; 5, BIOS Vendor Specific
+	.bIRQ					resb	1	; 6, IRQ for this device
+	.bBlockSize				resb	1	; 7, Current block size in sectors
+	.bDmaChannelAndType		resb	1	; 8, DMA information
+	.bPioMode				resb	1	; 9, PIO mode
+	.wFlags					resb	2	; 10, BIOS selected hardware specific option flags
+	.wReserved				resb	2	; 12, Reserved. Must be zero.
+	.bRevision				resb	1	; 14, Revision level of this table (11h)
+	.bChecksum				resb	1	; 15, Checksum, 2's complement of the sum of bytes 0-14
+endstruc
+
+; Flags for DPTE.wFlags
+FLG_FAST_PIO_ENABLED		EQU	(1<<0)	; Set is using PIO mode 1 or above (DPTE.bPioMode is valid when set)
+FLG_DMA_ENABLED				EQU	(1<<1)	; Set if DMA enabled (DPTE.bDmaChannelAndType is valid when set)
+FLG_BLOCK_MODE_ENABLED		EQU	(1<<2)	; Set if Block Mode transfers are enabled (DPTE.bBlockSize is valid when set)
+FLG_CHS_TRANSLATION_ENABLED	EQU	(1<<3)	; Set for drives with more than 1024 cylinders
+FLG_LBA_TRANSLATION_ENABLED	EQU	(1<<4)	; Set when LBA addersses from DAP are passed directly to the drive
+FLG_REMOVABLE_MEDIA			EQU	(1<<5)
+FLG_ATAPI_DEVICE			EQU	(1<<6)
+FLG_32BIT_XFER_MODE			EQU	(1<<7)	; Set when using 32-bit data transfers
+FLG_ATAPI_USES_IRQ			EQU	(1<<8)	; ATAPI Device uses IRQ for data transfers
+; L-CHS translation type for old INT 13h (when FLG_CHS_TRANSLATION_ENABLED is set)
+MASK_CHS_TRANSLATION_TYPE	EQU	(3<<TRANSLATION_TYPE_FIELD_POSITION)
+	TRANSLATION_TYPE_FIELD_POSITION	EQU	9
+	BIT_SHIFT_TRANSLATION			EQU	0	; LARGE
+	LBA_ASSISTED_TRANSLATION		EQU	1	; Assisted LBA
+										; 2 = reserved
+	VENDOR_SPECIFIC_TRANSLATION		EQU	3
+
+
+DPTE_REVISION				EQU		11h
 
 
Index: /trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 534)
+++ /trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 535)
@@ -183,5 +183,5 @@
 MASK_DRVPARAMS_TRANSLATEMODE	EQU	(3<<TRANSLATEMODE_FIELD_POSITION)	; Bits 2...3, Position shared with DPT
 	TRANSLATEMODE_FIELD_POSITION	EQU	2
-	TRANSLATEMODE_NORMAL			EQU	0
+	TRANSLATEMODE_NORMAL			EQU	0	; Must be zero
 	TRANSLATEMODE_LARGE				EQU	1
 	TRANSLATEMODE_ASSISTED_LBA		EQU	2	; 28-bit or 48-bit LBA
Index: /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm	(revision 534)
+++ /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm	(revision 535)
@@ -26,6 +26,5 @@
 ;		DS:DI:	Ptr to DPT (in RAMVARS segment)
 ;	Returns:
-;		CF:		Set if wait done by operating system
-;				Cleared if BIOS must perform task flag polling
+;		Nothing
 ;	Corrupts registers:
 ;		AX
@@ -33,16 +32,4 @@
 ALIGN JUMP_ALIGN
 IdeIrq_WaitForIRQ:
-
-;--------------------------------------------------------------------
-; .NotifyOperatingSystemAboutWaitingForIRQ
-;	Parameters:
-;		Nothing
-;	Returns:
-;		CF:		Set if wait done by operating system
-;				Cleared if BIOS must perform task flag polling
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-.NotifyOperatingSystemAboutWaitingForIRQ:
 	push	ds
 
@@ -53,10 +40,5 @@
 	jc		SHORT .ReturnFromWaitNotify	;  If so, skip OS notification
 	int		BIOS_SYSTEM_INTERRUPT_15h	; OS hook, device busy
-	jnc		SHORT .ReturnFromWaitNotify	; CF cleared, BIOS handles waiting
 
-	; Make sure that OS hooks are supported, otherwise the CF means unsupported function
-	test	ah, ah						; OS hook supported? (clears CF)
-	jnz		SHORT .ReturnFromWaitNotify	; AH has error, BIOS must do the wait
-	stc									; Set CF since wait done by OS
 .ReturnFromWaitNotify:
 	sti									; Enable interrupts
@@ -99,4 +81,5 @@
 
 	; Issue Int 15h, function AX=9100h (Interrupt ready)
+	clc									; Must be called with CF clear
 	mov		ax, OS_HOOK_DEVICE_POST<<8	; Interrupt ready, device 0 (HD)
 	int		BIOS_SYSTEM_INTERRUPT_15h
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm	(revision 534)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm	(revision 535)
@@ -43,7 +43,47 @@
 	mov		BYTE [bp+IDEPACK.intpack+INTPACK.ah], EBIOS_VERSION
 	mov		WORD [bp+IDEPACK.intpack+INTPACK.bx], 0AA55h
+
+%ifdef RETURN_DPTE_ON_AH48H
+	call	AH41h_GetSupportBitsToCX
+	mov		[bp+IDEPACK.intpack+INTPACK.cx], cx
+%else
 	mov		WORD [bp+IDEPACK.intpack+INTPACK.cx], ENHANCED_DRIVE_ACCESS_SUPPORT
+%endif
+
 	and		BYTE [bp+IDEPACK.intpack+INTPACK.flags], ~FLG_FLAGS_CF	; Return with CF cleared
 	jmp		Int13h_ReturnFromHandlerWithoutStoringErrorCode
 .EbiosNotSupported:
 	jmp		Int13h_DirectCallToAnotherBios
+
+
+%ifdef RETURN_DPTE_ON_AH48H
+;--------------------------------------------------------------------
+; AH41h_GetSupportBitsToCX
+;	Parameters:
+;		DS:DI:	Ptr to DPT (in RAMVARS segment)
+;	Returns:
+;		CX:		Support bits returned by AH=41h
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+AH41h_GetSupportBitsToCX:
+	mov		cx, ENHANCED_DRIVE_ACCESS_SUPPORT
+
+	; DPTE needs buffer from RAM so do not return it in lite mode
+%ifndef USE_AT
+	test	BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
+	jz		SHORT .DoNotSetEDDflag
+%endif
+
+%ifdef MODULE_8BIT_IDE OR MODULE_SERIAL
+	; DPTE contains information for device drivers. We should not return
+	; DPTE for 8-bit devices since software would think they are 16-bit devices.
+	cmp		BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_ATA
+	jae		SHORT .DoNotSetEDDflag
+%endif
+
+	or		cl, ENHANCED_DISK_DRIVE_SUPPORT	; AH=48h returns DPTE
+.DoNotSetEDDflag:
+	ret
+
+%endif ; RETURN_DPTE_ON_AH48H
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm	(revision 534)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm	(revision 535)
@@ -59,7 +59,6 @@
 ; BIOS that does just that.
 ;
-; Since I don't have any better knowledge, I decided that when RESERVE_DIAGNOSTIC_CYLINDER
-; is defined, we do what the Award BIOS does. When it is not defined, we multiply
-; P-CHS values together and use that as total sector count.
+; I decided that we multiply P-CHS values and do not waste space like the
+; Award BIOS does.
 ;
 ;
@@ -78,33 +77,63 @@
 ;--------------------------------------------------------------------
 AH48h_HandlerForGetExtendedDriveParameters:
+	mov		si, di
+	push	ds
+	pop		es		; ES = RAMVARS segment
+	xor		bx, bx
+	dec		bx		; Set to FFFFh to assume we do not return DPTE
+
+	; Create DPTE (hardware information for device drivers)
+%ifdef RETURN_DPTE_ON_AH48H
+	call	AH41h_GetSupportBitsToCX
+	test	cl, ENHANCED_DISK_DRIVE_SUPPORT
+	jz		SHORT .DoNotCreateDPTE
+	call	CreateDeviceParameterTableExtensionToESBXfromDPTinDSSI
+.DoNotCreateDPTE:
+%endif
+
+	; Point DS:DI to Extended Drive Information Table to fill
+	mov		di, [bp+IDEPACK.intpack+INTPACK.si]
+	mov		ds, [bp+IDEPACK.intpack+INTPACK.ds]
+
+	; Check and adjust Extended Drive Information Table size
+	; to MINIMUM_EDRIVEINFO_SIZE or EDRIVEINFO_SIZE_WITH_DPTE
+	mov		ax, MINIMUM_EDRIVEINFO_SIZE
+	mov		cx, [di+EDRIVE_INFO.wSize]
+	cmp		cx, ax
+	jb		Prepare_ReturnFromInt13hWithInvalidFunctionError
+	mov		[di+EDRIVE_INFO.wSize], ax
+	add		al, EDRIVEINFO_SIZE_WITH_DPTE - MINIMUM_EDRIVEINFO_SIZE
+	cmp		cx, ax
+	jb		SHORT .SkipEddConfigurationParameters
+	mov		[di+EDRIVE_INFO.wSize], ax
+
+	; Store DPTE for standard controllers only,
+	; FFFF:FFFF for non standard controllers
+%ifdef RETURN_DPTE_ON_AH48H
+	mov		[di+EDRIVE_INFO.fpDPTE], bx
+	mov		[di+EDRIVE_INFO.fpDPTE+2], es
+	inc		bx
+	jnz		SHORT .SkipEddConfigurationParameters	; Already stored
+	dec		bx
+	mov		[di+EDRIVE_INFO.fpDPTE+2], bx	; Segment = FFFFh
+%else
+	mov		[di+EDRIVE_INFO.fpDPTE], bx
+	mov		[di+EDRIVE_INFO.fpDPTE+2], bx
+%endif
+
+	; Fill Extended Drive Information Table in DS:DI from DPT in ES:SI
+.SkipEddConfigurationParameters:
+	mov		WORD [di+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS
+
+	; Store total sector count
+	call	Registers_ExchangeDSSIwithESDI
 	call	AccessDPT_GetLbaSectorCountToBXDXAX
-
-	; Point DS:SI to Extended Drive Information Table to fill
-	push	ds
-	pop		es			; DPT now in ES:DI
-	mov		ds, [bp+IDEPACK.intpack+INTPACK.ds]
-	mov		cx, MINIMUM_EDRIVEINFO_SIZE
-	cmp		[si+EDRIVE_INFO.wSize], cx
-	jb		Prepare_ReturnFromInt13hWithInvalidFunctionError
-	je		SHORT .SkipEddConfigurationParameters
-
-	; We do not support EDD Configuration Parameters so set to FFFF:FFFFh
-	sub		cx, BYTE MINIMUM_EDRIVEINFO_SIZE+1	; CX => FFFFh
-	mov		[si+EDRIVE_INFO.fpEDDparams], cx
-	mov		[si+EDRIVE_INFO.fpEDDparams+2], cx
-	mov		cx, EDRIVE_INFO_size
-
-	; Fill Extended Drive Information Table in DS:SI
-.SkipEddConfigurationParameters:
-	mov		[si+EDRIVE_INFO.wSize], cx
-	mov		WORD [si+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS
-
-	; Store total sector count
-	mov		[si+EDRIVE_INFO.qwTotalSectors], ax
-	mov		[si+EDRIVE_INFO.qwTotalSectors+2], dx
-	mov		[si+EDRIVE_INFO.qwTotalSectors+4], bx
+	call	Registers_ExchangeDSSIwithESDI
+	mov		[di+EDRIVE_INFO.qwTotalSectors], ax
+	mov		[di+EDRIVE_INFO.qwTotalSectors+2], dx
+	mov		[di+EDRIVE_INFO.qwTotalSectors+4], bx
 	xor		cx, cx
-	mov		[si+EDRIVE_INFO.qwTotalSectors+6], cx	; Always zero
-	mov		WORD [si+EDRIVE_INFO.wSectorSize], 512
+	mov		[di+EDRIVE_INFO.qwTotalSectors+6], cx	; Always zero
+	mov		WORD [di+EDRIVE_INFO.wSectorSize], 512
 
 	; Store P-CHS. Based on phoenix specification this is returned only if
@@ -114,17 +143,17 @@
 	sbb		bx, cx		; Zero
 	jnc		SHORT .ReturnWithSuccess	; More than EC4000h
-	or		WORD [si+EDRIVE_INFO.wFlags], FLG_CHS_INFORMATION_IS_VALID
-
-	eMOVZX	dx, BYTE [es:di+DPT.bPchsHeads]
-	mov		[si+EDRIVE_INFO.dwHeads], dx
-	mov		[si+EDRIVE_INFO.dwHeads+2], cx
-
-	mov		dl, [es:di+DPT.bPchsSectorsPerTrack]
-	mov		[si+EDRIVE_INFO.dwSectorsPerTrack], dx
-	mov		[si+EDRIVE_INFO.dwSectorsPerTrack+2], cx
-
-	mov		dx, [es:di+DPT.wPchsCylinders]
-	mov		[si+EDRIVE_INFO.dwCylinders], dx
-	mov		[si+EDRIVE_INFO.dwCylinders+2], cx
+	or		WORD [di+EDRIVE_INFO.wFlags], FLG_CHS_INFORMATION_IS_VALID
+
+	eMOVZX	dx, BYTE [es:si+DPT.bPchsHeads]
+	mov		[di+EDRIVE_INFO.dwHeads], dx
+	mov		[di+EDRIVE_INFO.dwHeads+2], cx
+
+	mov		dl, [es:si+DPT.bPchsSectorsPerTrack]
+	mov		[di+EDRIVE_INFO.dwSectorsPerTrack], dx
+	mov		[di+EDRIVE_INFO.dwSectorsPerTrack+2], cx
+
+	mov		dx, [es:si+DPT.wPchsCylinders]
+	mov		[di+EDRIVE_INFO.dwCylinders], dx
+	mov		[di+EDRIVE_INFO.dwCylinders+2], cx
 
 .ReturnWithSuccess:
@@ -132,2 +161,107 @@
 .ReturnWithError:
 	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+
+
+%ifdef RETURN_DPTE_ON_AH48H
+;--------------------------------------------------------------------
+; CreateDeviceParameterTableExtensionToESBXfromDPTinDSSI
+;	Parameters:
+;		DS:SI:	Ptr to DPT (in RAMVARS segment)
+;		ES:		RAMVARS segment
+;	Returns:
+;		ES:BX:	Ptr to Device Parameter Table Extension (DPTE)
+;	Corrupts registers:
+;		AX, CX, DX, DI
+;--------------------------------------------------------------------
+CreateDeviceParameterTableExtensionToESBXfromDPTinDSSI:
+	; Point ES:DI to DPTE buffer (valid until next AH=48h call)
+	mov		di, [cs:ROMVARS.bStealSize]
+	eSHL_IM	di, 10							; DI = RAMVARS size in bytes
+	sub		di, BYTE DPTE_size				; DI = Offset to DPTE
+	xor		dx, dx							; Clear for checksum
+
+	; Set 32-bit flag for 32-bit controllers
+	mov		cx, FLG_LBA_TRANSLATION_ENABLED	; DPTE.wFlags
+	cmp		BYTE [si+DPT_ATA.bDevice], DEVICE_32BIT_ATA
+	eCMOVE	cl, FLG_LBA_TRANSLATION_ENABLED | FLG_32BIT_XFER_MODE
+
+	; DPTE.wBasePort
+	mov		ax, [si+DPT.wBasePort]
+	call	StoswThenAddALandAHtoDL			; Bytes 0 and 1
+
+	; DPTE.wControlBlockPort
+	eMOVZX	bx, BYTE [si+DPT.bIdevarsOffset]
+	mov		ax, [cs:bx+IDEVARS.wControlBlockPort]
+	call	StoswThenAddALandAHtoDL			; Bytes 2 and 3
+
+	; DPTE.bDrvnhead and DPTE.bBiosVendor
+	xchg	di, si
+	call	AccessDPT_GetDriveSelectByteForEbiosToAL
+	xchg	si, di
+	call	StoswThenAddALandAHtoDL			; Bytes 4 and 5
+
+	; DPTE.bIRQ and DPTE.bBlockSize
+	mov		al, [cs:bx+IDEVARS.bIRQ]		; No way to define that we might not use IRQ
+	mov		ah, [si+DPT_ATA.bBlockSize]
+	cmp		ah, 1
+	jbe		SHORT .DoNotSetBlockModeFlag
+	or		cl, FLG_BLOCK_MODE_ENABLED
+.DoNotSetBlockModeFlag:
+	call	StoswThenAddALandAHtoDL			; Bytes 6 and 7
+
+	; DPTE.bDmaChannelAndType and DPTE.bPioMode
+	xor		ax, ax
+%ifdef MODULE_ADVANCED_ATA
+	or		ah, [si+DPT_ADVANCED_ATA.bPioMode]
+	jz		SHORT .NoDotSetFastPioFlag
+	cmp		WORD [si+DPT_ADVANCED_ATA.wControllerID], BYTE 0
+	je		SHORT .NoDotSetFastPioFlag
+	inc		cx		; FLG_FAST_PIO_ENABLED
+.NoDotSetFastPioFlag:
+%endif
+	call	StoswThenAddALandAHtoDL			; Bytes 8 and 9
+
+	; Set CHS translation flags and store DPTE.wFlags
+	mov		al, [si+DPT.bFlagsLow]
+	and		al, MASKL_DPT_TRANSLATEMODE
+	jz		SHORT .NoChsTranslationOrBitShiftTranslationSet
+	or		cl, FLG_CHS_TRANSLATION_ENABLED
+	test	al, FLGL_DPT_ASSISTED_LBA
+	jz		SHORT .NoChsTranslationOrBitShiftTranslationSet
+	or		cx, LBA_ASSISTED_TRANSLATION << TRANSLATION_TYPE_FIELD_POSITION
+.NoChsTranslationOrBitShiftTranslationSet:
+	xchg	ax, cx
+	call	StoswThenAddALandAHtoDL			; Bytes 10 and 11
+
+	; DPTE.wReserved (must be zero)
+	xor		ax, ax
+	call	StoswThenAddALandAHtoDL			; Bytes 12 and 13
+
+	; DPTE.bRevision and DPTE.bChecksum
+	mov		ax, DPTE_REVISION | (DPTE_REVISION<<8)
+	add		ah, dl
+	neg		ah
+	stosw
+	lea		bx, [di-DPTE_size]
+	ret
+
+
+;--------------------------------------------------------------------
+; StoswThenAddALandAHtoDL
+;	Parameters:
+;		AX:		WORD to store
+;		ES:DI:	Ptr to where to store AX
+;		DL:		Checksum byte
+;	Returns:
+;		DL:		Checksum byte
+;		DI:		Incremented by 2
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+StoswThenAddALandAHtoDL:
+	stosw
+	add		dl, al
+	add		dl, ah
+	ret
+
+%endif ; RETURN_DPTE_ON_AH48H
Index: /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm	(revision 534)
+++ /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm	(revision 535)
@@ -120,4 +120,8 @@
 	mov		[di+DPT.bPchsSectorsPerTrack], bh
 
+; This is what Award BIOS from 1997 Pentium motherboard does. I can't think
+; of any good reason to do the same but let's keep this here just in case,
+; at least for a while.
+%if 0
 %ifdef RESERVE_DIAGNOSTIC_CYLINDER
 	; Do not store P-Cylinders, instead calculate it from L-CHS total sector count.
@@ -130,4 +134,5 @@
 	div		bx							; AX = Calculated cylinders
 %endif ; RESERVE_DIAGNOSTIC_CYLINDER
+%endif ; 0
 
 	mov		[di+DPT.wPchsCylinders], ax
Index: /trunk/XTIDE_Universal_BIOS/makefile
===================================================================
--- /trunk/XTIDE_Universal_BIOS/makefile	(revision 534)
+++ /trunk/XTIDE_Universal_BIOS/makefile	(revision 535)
@@ -32,4 +32,5 @@
 # RELOCATE_INT13H_STACK **    Relocates INT 13h stack to beginning of stolen conventional memory   #
 # RESERVE_DIAGNOSTIC_CYLINDER Reserve one L-CHS cylinder for compatibility with old BIOSes         #
+# RETURN_DPTE_ON_AH48H        Returns extra hardware related information on AH=48h for OS drivers  #
 # USE_186                     Use instructions supported by 80188/80186 and V20/V30 and later      #
 # USE_286                     Use instructions supported by 286 and later (defines USE_UNDOC_INTEL)#
@@ -110,5 +111,5 @@
 
 DEFINES_XT_TINY = MODULE_STRINGS_COMPRESSED MODULE_8BIT_IDE
-DEFINES_386_8K = $(DEFINES_AT) USE_386
+DEFINES_386_8K = $(DEFINES_AT) USE_386 RETURN_DPTE_ON_AH48H
 
 DEFINES_ALL_FEATURES = MODULE_8BIT_IDE MODULE_8BIT_IDE_ADVANCED MODULE_ADVANCED_ATA MODULE_EBIOS MODULE_BOOT_MENU MODULE_HOTKEYS MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_STRINGS_COMPRESSED MODULE_FEATURE_SETS
