copy extended memory.

Peter Stuge stuge-linuxbios at
Sun Oct 27 19:47:01 CET 2002

On Sat, Oct 26, 2002 at 08:32:48AM -0400, Adam Sulmicki wrote:
> hello,
> 	can anyone point me to an documenation on bios's
> 	interrupt 15, ah=87. It is 'copy extended memory'.

This is such a bitch.  I simply could not get this to work and I didn't have
proper tools to debug what was going on.  Here's what RB says anyway:

        AH = 87h
        CX = number of words to copy (max 8000h)
        ES:SI -> global descriptor table (see #0393)
Return: CF set on error
        CF clear if successful
        AH = status (see #0392)
Notes:  copy is done in protected mode with interrupts disabled by the
          BIOS handler; many 386 memory managers perform the copy with
          interrupts enabled
        this function is incompatible with the OS/2 compatibility box
SeeAlso: AH=88h,AH=89h,INT 1F/AH=90h

(Table 0392)
Values for extended-memory copy status:
 00h    source copied into destination
 01h    parity error
 02h    interrupt error
 03h    address line 20 gating failed
 80h    invalid command (PC,PCjr)
 86h    unsupported function (XT,PS30)

Format of global descriptor table:
Offset  Size    Description     (Table 0393)
 00h 16 BYTEs   zeros (used by BIOS)
 10h    WORD    source segment length in bytes (2*CX-1 or greater)
 12h  3 BYTEs   24-bit linear source address, low byte first
 15h    BYTE    source segment access rights (93h)
 16h    WORD    zero
 18h    WORD    destination segment length in bytes (2*CX-1 or greater)
 1Ah  3 BYTEs   24-bit linear destination address, low byte first
 1Dh    BYTE    destination segment access rights (93h)
 1Eh 18 BYTEs   zeros (used by BIOS)

It should all be pretty straight forward.  The 16 bytes at 00h and the 18
bytes at 1Eh are probably best used by BIOS to set up it's own segments for
usage during the copy.  And don't forget the 32-bit opcodes when in pmode.


More information about the coreboot mailing list