mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 01:22:37 +03:00
undipci_probe() has to calculate busdevfn anyway, so we may as well pass
it directly to undi_load_pci().
This commit is contained in:
@@ -49,7 +49,7 @@ static SEGOFF16_t __data16 ( undi_loader_entry );
|
||||
* @v undirom UNDI ROM
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int undi_load ( struct undi_device *undi, struct undi_rom *undirom ) {
|
||||
int undi_load ( struct undi_device *undi, struct undi_rom *undirom ) {
|
||||
struct s_PXE ppxe;
|
||||
uint16_t fbms;
|
||||
unsigned int fbms_seg;
|
||||
@@ -138,22 +138,6 @@ static int undi_load ( struct undi_device *undi, struct undi_rom *undirom ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call UNDI loader to create a pixie
|
||||
*
|
||||
* @v undi UNDI device
|
||||
* @v undirom UNDI ROM
|
||||
* @v pci_busdevfn PCI bus:dev.fn
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int undi_load_pci ( struct undi_device *undi, struct undi_rom *undirom,
|
||||
unsigned int bus, unsigned int devfn ) {
|
||||
undi->pci_busdevfn = ( ( bus << 8 ) | devfn );
|
||||
undi->isapnp_csn = 0xffff;
|
||||
undi->isapnp_read_port = 0xffff;
|
||||
return undi_load ( undi, undirom );
|
||||
}
|
||||
|
||||
/**
|
||||
* Unload a pixie
|
||||
*
|
||||
@@ -172,7 +156,7 @@ int undi_unload ( struct undi_device *undi ) {
|
||||
/* Erase signatures */
|
||||
if ( undi->pxenv.segment )
|
||||
put_real ( dead, undi->pxenv.segment, undi->pxenv.offset );
|
||||
if ( undi->ppxe_segment )
|
||||
if ( undi->ppxe.segment )
|
||||
put_real ( dead, undi->ppxe.segment, undi->ppxe.offset );
|
||||
|
||||
/* Free base memory, if possible */
|
||||
|
||||
Reference in New Issue
Block a user