mirror of
https://github.com/ipxe/ipxe
synced 2025-12-29 11:03:15 +03:00
[build] Allow ISA ROMs to be built
The build process has for a long time assumed that every ROM is a PCI ROM, and will always include the PCI header and PCI-related functionality (such as checking the PCI BIOS version, including the PCI bus:dev.fn address within the ROM product name string, etc.). While real ISA cards are no longer in use, some virtualisation environments (notably VirtualBox) have support only for ISA ROMs. This can cause problems: in particular, VirtualBox will call our initialisation entry point with random garbage in %ax, which we then treat as the PCI bus:dev.fn address of the autoboot device: this generally prevents the default boot sequence from using any network devices. Create .isarom and .pcirom prefixes which can be used to explicitly specify the type of ROM to be created. (Note that the .mrom prefix always implies a PCI ROM, since the .mrom mechanism relies on reconfiguring PCI BARs.) Make .rom a magic prefix which will automatically select the appropriate PCI or ISA ROM prefix for ROMs defined via a PCI_ROM() or ISA_ROM() macro. To maintain backwards compatibility, we default to building a PCI ROM for anything which is not directly derived from a PCI_ROM() or ISA_ROM() macro (e.g. bin/intel.rom). Add a selection of targets to "make everything" to ensure that the (relatively obscure) ISA ROM build process is included within the per-commit QA checks. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -94,6 +94,29 @@ print_character:
|
||||
ret
|
||||
.size print_character, . - print_character
|
||||
|
||||
/*****************************************************************************
|
||||
* Utility function: print space
|
||||
*
|
||||
* Parameters:
|
||||
* %ds:di : output buffer (or %di=0 to print to console)
|
||||
* Returns:
|
||||
* %ds:di : next character in output buffer (if applicable)
|
||||
*****************************************************************************
|
||||
*/
|
||||
.section ".prefix.lib", "awx", @progbits
|
||||
.code16
|
||||
.globl print_space
|
||||
print_space:
|
||||
/* Preserve registers */
|
||||
pushw %ax
|
||||
/* Print space */
|
||||
movb $( ' ' ), %al
|
||||
call print_character
|
||||
/* Restore registers and return */
|
||||
popw %ax
|
||||
ret
|
||||
.size print_space, . - print_space
|
||||
|
||||
/*****************************************************************************
|
||||
* Utility function: print a NUL-terminated string
|
||||
*
|
||||
@@ -231,12 +254,10 @@ print_kill_line:
|
||||
movb $( '\r' ), %al
|
||||
call print_character
|
||||
/* Print 79 spaces */
|
||||
movb $( ' ' ), %al
|
||||
movw $79, %cx
|
||||
1: call print_character
|
||||
1: call print_space
|
||||
loop 1b
|
||||
/* Print CR */
|
||||
movb $( '\r' ), %al
|
||||
call print_character
|
||||
/* Restore registers and return */
|
||||
popw %cx
|
||||
|
||||
Reference in New Issue
Block a user