mirror of https://github.com/ipxe/ipxe.git
[pxe] Fill in UNDIROMID pointer in !PXE structure
IBM's iSCSI Firmware Initiator checks the UNDIROMID pointer in the !PXE structure that gets created by the UNDI loader. We didn't previously fill this value in.pull/1/head
parent
32e34683c0
commit
fc0c40a5b0
|
@ -347,6 +347,9 @@ __cdecl void pxe_loader_call ( struct i386_all_regs *ix86 ) {
|
||||||
/* Copy parameter block from caller */
|
/* Copy parameter block from caller */
|
||||||
copy_from_user ( ¶ms, uparams, 0, sizeof ( params ) );
|
copy_from_user ( ¶ms, uparams, 0, sizeof ( params ) );
|
||||||
|
|
||||||
|
/* Fill in ROM segment address */
|
||||||
|
ppxe.UNDIROMID.segment = ix86->segs.ds;
|
||||||
|
|
||||||
/* Set default status in case child routine fails to do so */
|
/* Set default status in case child routine fails to do so */
|
||||||
params.Status = PXENV_STATUS_FAILURE;
|
params.Status = PXENV_STATUS_FAILURE;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ ppxe:
|
||||||
.byte 0 /* StructCksum */
|
.byte 0 /* StructCksum */
|
||||||
.byte 0 /* StructRev */
|
.byte 0 /* StructRev */
|
||||||
.byte 0 /* reserved_1 */
|
.byte 0 /* reserved_1 */
|
||||||
.word 0, 0 /* UNDIROMID */
|
.word undiheader, 0 /* UNDIROMID */
|
||||||
.word 0, 0 /* BaseROMID */
|
.word 0, 0 /* BaseROMID */
|
||||||
.word pxe_entry_sp, 0 /* EntryPointSP */
|
.word pxe_entry_sp, 0 /* EntryPointSP */
|
||||||
.word pxe_entry_esp, 0 /* EntryPointESP */
|
.word pxe_entry_esp, 0 /* EntryPointESP */
|
||||||
|
@ -55,6 +55,11 @@ pxe_segments:
|
||||||
.equ pxe_length, . - ppxe
|
.equ pxe_length, . - ppxe
|
||||||
.size ppxe, . - ppxe
|
.size ppxe, . - ppxe
|
||||||
|
|
||||||
|
/* Define undiheader=0 as a weak symbol for non-ROM builds */
|
||||||
|
.section ".weak"
|
||||||
|
.weak undiheader
|
||||||
|
undiheader:
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* PXENV+ structure
|
* PXENV+ structure
|
||||||
****************************************************************************
|
****************************************************************************
|
||||||
|
|
|
@ -113,6 +113,7 @@ prodstr_pci_id:
|
||||||
.asciz "xx:xx.x)" /* Filled in by init code */
|
.asciz "xx:xx.x)" /* Filled in by init code */
|
||||||
.size prodstr, . - prodstr
|
.size prodstr, . - prodstr
|
||||||
|
|
||||||
|
.globl undiheader
|
||||||
undiheader:
|
undiheader:
|
||||||
.ascii "UNDI" /* Signature */
|
.ascii "UNDI" /* Signature */
|
||||||
.byte undiheader_len /* Length of structure */
|
.byte undiheader_len /* Length of structure */
|
||||||
|
@ -524,18 +525,22 @@ undiloader:
|
||||||
/* Save registers */
|
/* Save registers */
|
||||||
pushl %esi
|
pushl %esi
|
||||||
pushl %edi
|
pushl %edi
|
||||||
|
pushw %ds
|
||||||
pushw %es
|
pushw %es
|
||||||
pushw %bx
|
pushw %bx
|
||||||
|
/* ROM segment address to %ds */
|
||||||
|
pushw %cs
|
||||||
|
popw %ds
|
||||||
/* UNDI loader parameter structure address into %es:%di */
|
/* UNDI loader parameter structure address into %es:%di */
|
||||||
movw %sp, %bx
|
movw %sp, %bx
|
||||||
movw %ss:16(%bx), %di
|
movw %ss:18(%bx), %di
|
||||||
movw %ss:18(%bx), %es
|
movw %ss:20(%bx), %es
|
||||||
/* Install to specified real-mode addresses */
|
/* Install to specified real-mode addresses */
|
||||||
pushw %di
|
pushw %di
|
||||||
movw %es:12(%di), %bx
|
movw %es:12(%di), %bx
|
||||||
movw %es:14(%di), %ax
|
movw %es:14(%di), %ax
|
||||||
movl %cs:image_source, %esi
|
movl image_source, %esi
|
||||||
movl %cs:decompress_to, %edi
|
movl decompress_to, %edi
|
||||||
call install_prealloc
|
call install_prealloc
|
||||||
popw %di
|
popw %di
|
||||||
/* Call UNDI loader C code */
|
/* Call UNDI loader C code */
|
||||||
|
@ -550,6 +555,7 @@ undiloader:
|
||||||
/* Restore registers and return */
|
/* Restore registers and return */
|
||||||
popw %bx
|
popw %bx
|
||||||
popw %es
|
popw %es
|
||||||
|
popw %ds
|
||||||
popl %edi
|
popl %edi
|
||||||
popl %esi
|
popl %esi
|
||||||
lret
|
lret
|
||||||
|
|
|
@ -30,6 +30,16 @@ SECTIONS {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Weak symbols that need zero values if not otherwise defined
|
||||||
|
*/
|
||||||
|
|
||||||
|
. = 0;
|
||||||
|
.weak : AT ( 0 ) {
|
||||||
|
*(.weak)
|
||||||
|
}
|
||||||
|
_assert = ASSERT ( ( . == 0 ), ".weak is non-zero length" );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The prefix
|
* The prefix
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue