WO2012155439A1 - System and method for bios booting - Google Patents

System and method for bios booting Download PDF

Info

Publication number
WO2012155439A1
WO2012155439A1 PCT/CN2011/080541 CN2011080541W WO2012155439A1 WO 2012155439 A1 WO2012155439 A1 WO 2012155439A1 CN 2011080541 W CN2011080541 W CN 2011080541W WO 2012155439 A1 WO2012155439 A1 WO 2012155439A1
Authority
WO
WIPO (PCT)
Prior art keywords
module
service routine
rom
operating system
opt
Prior art date
Application number
PCT/CN2011/080541
Other languages
French (fr)
Chinese (zh)
Inventor
程旭
李皓
郑衍松
佟冬
管雪涛
Original Assignee
北京北大众志微系统科技有限责任公司
济南众志信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京北大众志微系统科技有限责任公司, 济南众志信息技术有限公司 filed Critical 北京北大众志微系统科技有限责任公司
Publication of WO2012155439A1 publication Critical patent/WO2012155439A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Definitions

  • the present invention relates to the field of computer applications, and in particular, to a basic input/output system (BIOS) booting system and method.
  • BIOS basic input/output system
  • the general-purpose PC BIOS consists of two parts: First, the board-level module, which is specific to each system platform, is used to initialize all the devices in the system platform to a stable state that can work, including the central processing unit (CPU), south bridge, north bridge.
  • CPU central processing unit
  • south bridge north bridge
  • the hardware modules connected to the north and south bridges one is the interface module, which is generally applicable to all platforms, and serves as a general-purpose interface, and communicates with the board-level device by abstracting the board-level device to the unified interface of the operating system.
  • Its functions mainly include: 1) Power On Self Test (POST), after the computer system is powered on, control is given to the BIOS, and the BIOS performs system detection, including initialization of the CPU and various conventional devices.
  • POST Power On Self Test
  • Programming interval timer Programming interval timer, programmable interrupt controller, direct memory access controller, etc.; 2) Initialize the registers of the cache memory, motherboard chipset, graphics card and related peripherals; 3) Save system settings, store in non-volatile In the memory; 4) Save the interrupt service routine in memory, and provide the call to the operating system startup process and running process.
  • Typical interrupt service routines include INT10H's graphics service routines, INT13H's disk service routines, INT16H's keyboard service routines, and more.
  • PC BIOS is not open due to hardware and software interfaces, industry industry specifications are extensive, PC BIOS running under x86 system is mostly implemented in assembly language, and assembly language provides less language-level abstraction. Complex, and the constant addition of new functional modules in the PC BIOS makes the size and capacity of the traditional PC BIOS huge and redundant, obscure, outdated, slow to start and bugs (BUG). Therefore, before the introduction of the Extensible Firmware Interface (UEFI) specification, open source BIOS emerged, such as the coreboot system (formerly known as LinuxBIOS) created by Los Alamos National Laboratory, and now by Germany's DENX Software Engineering Center Wolfgang Denk.
  • UEFI Extensible Firmware Interface
  • the main functions of the open source BIOS include: 1) Power-on self-test (POST). When the computer system is powered up, the system control is given to the open source BIOS, and the open source BIOS performs system detection, including CPU registers, programmable interval timers, and Program interrupt controller and direct memory access controller; 2) Initialize the registers of the cache, motherboard chipset, graphics card and related peripherals; 3) Save the system settings and store them in non-volatile memory.
  • POST Power-on self-test
  • the problem to be solved by the present invention is to provide a BIOS-based booting system and a booting method that can support both an open source operating system and a non-open source commercial operating system.
  • BIOS startup method which includes: an interrupt service routine of an operating system interface (INTERFACE) module of a basic input/output system (BIOS), using optional read-only memory (Option) ROM) module (Module) mode implementation;
  • INTERFACE operating system interface
  • BIOS basic input/output system
  • Option read-only memory
  • Mode Mode
  • the BIOS-level board-level core module (CORE) initializes the board-level device and outputs system information
  • the BIOS's board-level core module abstraction layer (MAPPER) module converts the system information according to the system information.
  • a system information table identified by the operating system interface module, wherein the board level core module sequentially initializes the interrupt service routine included in the operating system interface module according to information in the system information table, where the system information includes The hardware list of the computer system, the corresponding port address, and the information of the memory size.
  • the operating system interface module implements the interrupt service routine by using an Option ROM Module.
  • the operating system interface module includes multiple Option ROMs, and each Option ROM corresponds to a service routine.
  • the ROM includes the service routine, an initialization routine of the service routine, and an optional read-only memory header (Option ROM Header),
  • the initialization routine of the service routine includes entry address information of the service routine, and the Option ROM Header includes information of a size of the Option ROM and an initialization routine address of the service routine.
  • the board level core module is an extensible open source BIOS; and the MAPPER module is related to the open source BIOS.
  • the board-level core module further saves an address range of the operating system interface module, and the step of sequentially performing the initialization of the Option ROM includes:
  • the board core module scans the operating system interface module within the address range of the operating system interface module according to the size of the data unit specified by the Option ROM, and scans to the first Option.
  • a ROM calling a function entry of a service routine initialization routine of the Option ROM specified in an Option ROM Header of the Option ROM, and initializing a monthly service routine corresponding to the Option ROM;
  • the board core module scans the next Option ROM of the Option ROM in the operating system interface module, and invokes the Option specified in the Option ROM Header of the Option ROM that is currently scanned.
  • the function routine of the ROM service routine initialization routine initializes the service routine corresponding to the current Option ROM until the service routine corresponding to the last Option ROM of the operating system interface module is initialized.
  • the Option ROM header further includes signature information
  • the step of the board core module determining to scan the Option ROM includes: the board level core module is configured according to a size of the data unit specified by the Option ROM.
  • the operating system interface module is scanned within the address range of the operating system interface module. If the first two bytes are detected as the signature information, one of the Option ROMs is scanned.
  • the board-level core module scans the Option ROM, and after scanning the signature, performs parity check on the entire Option ROM according to the information about the size of the corresponding service routine saved in the Option ROM Header. If the parity check is correct, the service routine corresponding to the Option ROM is initialized.
  • the method further includes: after the parity check is correct, the board core module initializes a service routine corresponding to the Option ROM, and further, according to the Option ROM Header
  • the saved information of the service routine size updates the base address of the Option ROM scanning algorithm; if the parity check is incorrect, the board level core module is updated in units of data unit sizes provided in the Option ROM Header The base address of the Option ROM scanning algorithm;
  • the board-level core module After updating the base address of the scanning algorithm, the board-level core module further determines whether the base address exceeds an address range of the operating system interface module, and if so, loads the file into a floppy disk, a hard disk, or a CD ROM according to user settings. The operating system, if no, scans the next Option ROM.
  • the step of the Option ROM corresponding to the service routine being initialized according to the system information table includes:
  • the operating system interface module obtains the system information table maintained by the MAPPER module by querying the system information table maintained by the MAPPER module when the service routine needs to determine whether the related hardware of the service routine operation exists or when the port address or the available memory size is queried.
  • the required information, the system information table is stored in a BIOS data area or a non-volatile memory (Non-Volatile RAM).
  • the service routine initialization routine in the Option ROM further registers an entry address of the service routine into an Interrupt Vector Table (Interrupt Vector Table).
  • Interrupt Vector Table is maintained by the MAPPER module.
  • the interrupt service routine of the operating system interface module is a service routine required for starting the computer operating system, including a graphics service routine INT10H, a memory size service routine INT12H, a disk service routine INT13H, and a miscellaneous service.
  • the present invention also provides a BIOS booting system, which includes a board level core module, a board level core module abstraction layer (MAPPER) module, and an operating system interface module, wherein:
  • the board level core module is configured to: after the computer system is powered on, initialize the board level device and output system information, where the system information includes a hardware list of the computer system, a corresponding port, and a memory size information;
  • the MAPPER module is configured to: convert, according to the system information, a system information table that is identifiable by the operating system interface module;
  • the operating system interface module is configured to: implement an interrupt service routine by using an optional ROM (Option ROM) module, and sequentially initialize the interrupt service routine according to the system information table.
  • Option ROM optional ROM
  • the operating system interface module includes a plurality of Option ROMs, each Option ROM corresponding to a service routine, where the Option ROM includes a service routine itself, an initialization routine of the service routine, and a selective Read the memory head (Option ROM Header), where
  • the initialization routine of the service routine is configured to: save entry address information of the service routine, configure hardware, and register entry address information of the service routine into an interrupt vector table;
  • the Option ROM Header is set to: store information of a size of the service routine and an initialization routine address of the service routine.
  • the board level core module is further configured to: after initializing the board level device, jumping to the MAPPER module, where the board level core module is an expandable open source BIOS;
  • the MAPPER module is further configured to: perform an initialization function of the internal initialization function, read and parse the system information output by the board core module, and create and maintain the system information table according to the system information, and jump To the board level core module, the MAPPER module is related to the open source BIOS.
  • the board level core module is further configured to: save an address range of the operating system interface module, initialize an INTERFACE module, scan the INTERFACE module according to the address range, scan to the first Option ROM, and save the location a base address of the Option ROM, calling a function entry of a service routine initialization routine of the Option ROM specified in an Option ROM Header of the Option ROM, jumping back from the Option ROM, and scanning the operating system interface module Updating the base address of the scanning algorithm according to the size of the Option ROM specified in the Option ROM Header of the Option ROM that is currently scanned, and determining whether the base address is exceeded.
  • the address range of the operating system interface module if yes, loading the operating system into the floppy disk, the hard disk, or the CD ROM according to the user setting, and if not, scanning the next Option ROM of the current Option ROM;
  • the MAPPER module is further configured to: maintain a BIOS data area and an interrupt service vector table;
  • the operating system interface module is further configured to: a function entry of a service routine initialization routine of the Option ROM is invoked, and the Option ROM is executed An initialization routine of the corresponding service routine initializes the service routine, and the initialization completes jumping back to the board-level core module;
  • the service routine initialization routine of the Option ROM of the operating system interface module is further configured to: register an entry address of the service routine to the interrupt service vector table.
  • the Option ROM header further includes signature information, where
  • the board-level core module is further configured to: scan the INTERFACE module according to the address range of the INTERFACE module, and if the first two bytes are detected as the signature information, scan the Option ROM, according to the Option ROM.
  • the information about the size of the corresponding service routine saved in the header is parity-checked to the entire Option ROM. If the parity is correct, the Option ROM specified in the Option ROM header of the Option ROM is called.
  • a function entry of the service routine initialization routine updating the base address of the scan algorithm according to the information of the size of the service routine saved by the Option ROM Header; if the parity check is incorrect, updating in units of 512 bytes a base address of the scan algorithm, after updating the base address of the scan, determining whether the base address exceeds an address range of the operating system interface module, and if so, loading operations to a floppy disk, a hard disk, or a CD ROM according to user settings The system, if no, scans the next Option ROM.
  • the operating system interface module is further configured to: query, when the service routine needs to determine whether the related hardware of the service routine exists or query a port address or an available memory size, query the MAPPER module.
  • the maintained system information form gets the information you need.
  • the board level core module selects an open source basic input/output system (BIOS) to initialize a board level device, and outputs system information, and the system information includes a memory size and a device type, etc.
  • BIOS basic input/output system
  • the Interrupt Service Routine in the system interface module is implemented by using an Option ROM module, and the interrupt service routine converts the system information table that can be recognized by the operating system interface (INTERFACE) module according to the system information conversion. Initialize in sequence, and register the interrupt service routine into the interrupt vector table.
  • INTERFACE operating system interface
  • MAPPER board-level core module abstraction layer
  • the interface between the interface modules, and the operating system interface module uses the Option ROM module to implement the service routines required for the startup of the computer operating system, and develops a BIOS system combining the operating system interface module and the open source BIOS, which can not only support open source.
  • the operating system can also support non-open source commercial operating systems, such as the Windows operating system, with good compatibility.
  • FIG. 1 is a schematic diagram showing the structure of a computer system based on a BIOS system and method according to an embodiment of the present invention
  • FIG. 2(a) is a schematic structural diagram of a BIOS system based on an open source BIOS in a computer flash memory (FLASH) according to an embodiment of the present invention
  • FIG. 2(b) is a schematic structural diagram of a BIOS system based on an open source BIOS in a computer memory according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a BIOS system based on an open source BIOS according to Embodiment 1 of the present invention
  • FIG. 4 is a flowchart of a method for a BIOS system in a computer startup process according to an embodiment of the present invention
  • FIG. 5 is a flowchart of a method according to an embodiment of the present invention.
  • the board-level core module CORE initializes the flow chart of an Option ROM of the operating system interface module INTERFACE.
  • FIG. 1 is a schematic structural diagram of a computer system based on a BIOS system and method according to the present invention, including an interconnected south bridge and a north bridge, a central processing unit (CPU) connected to the north bridge, a graphics card and a memory, and a large connection with the south bridge.
  • CPU central processing unit
  • LPC less pin interface
  • PCI peripheral component interconnect standard
  • PCI device connected to the PCI bus.
  • the structure of the System BIOS of the present application in the flash memory (FLASH) is as shown in FIG. 2(a), including Board Level Core Module (CORE), Board Level Core Module Abstraction Layer (MAPPER) module and Operating System Interface Module (INTERFACE).
  • the BIOS system of the present application is obtained by extending the open source BIOS.
  • the operating system interface module implements an interrupt service routine by using an optional read-only memory (Option ROM) module, which is a compressed binary code formed by compressing the compiled binary code. .
  • Option ROM optional read-only memory
  • BIOS of the application After the BIOS of the application is powered on by the computer hardware system, in order to obtain a faster execution speed, the board-level core module and the MAPPER module are copied into the memory for execution, and the operating system interface module is decompressed and copied into the memory for execution.
  • the service routine in the operating system interface module is decompressed into binary code.
  • the structure of the BIOS in memory is as shown in Figure 2(b), including the System BIOS (ie, the board-level core module, the MAPPER module, and the operating system interface module), the VGA BIOS and the data area, in descending order of address, Traditional DOS application workspace, BIOS data area, and interrupt vector table.
  • the board-level core module is configured to: after the computer hardware system is powered on, initialize the board-level device and output system information, and jump to the MAPPER module, the system information includes a hardware list of the computer system, a corresponding port address, and a memory size. Information, also used to save the address range of the operating system interface module.
  • the board-level core module is open source BIOS-related, and its function and structure depend on the function and structure of the open source BIOS.
  • the board level core module abstraction layer (MAPPER) module is configured to: execute an internal initialization function to complete its own initialization, read and parse system information output by the board level core module, and create and maintain according to the system information.
  • the system information table identified by the operating system interface (INTERFACE) module jumps to the board level core module, and the MAPPER module is related to the open source BIOS.
  • the format of the system information table is determined according to the open source BIOS and stored in the BIOS data area or Non-Volatile RAM.
  • the MAPPER module is also used to maintain an interrupt service vector table.
  • the operating system interface module is configured to: implement an interrupt service routine required for starting the computer operating system by using an optional read-only memory (Option ROM) module, and the interrupt service routine is maintained according to the MAPPER module.
  • Option ROM optional read-only memory
  • the system information table is initialized in sequence.
  • the operating system interface module includes multiple Option ROMs, and each Option ROM corresponds to one service.
  • the Option ROM includes a service routine, an initialization routine of the service routine, and an optional ROM head (Option ROM Header), wherein
  • the initialization routine of the service routine is set to: configure the hardware and save the entry address information of the service routine;
  • the Option ROM Header is set to: save the signature information, the size of the Option ROM, and the address of the initialization routine address of the service routine.
  • the size of the service routine is an integer multiple of the data unit size specified by the Option ROM.
  • the data unit of the Option ROM is exemplified by 512 bytes.
  • the service routine is a compressed binary code formed by compression of the compiled binary code.
  • the board-level core module and the MAPPER module of the BIOS system are directly copied into the memory for execution, and the service routine in the operating system interface module is decompressed into binary code and copied into the memory. .
  • the board core module scans the first Option ROM in the operating system interface module, saves the base address of the Option ROM, and scans the signature in the Option ROM Header according to the Option ROM.
  • the information about the size of the corresponding service routine saved in the header is parity-checked to the entire Option ROM. If the parity is correct, the service routine initialization example of the Option ROM specified in the Option ROM Header of the Option ROM is called.
  • the function entry of the program, and the base address of the update scan algorithm is the sum of the base address of the current Option ROM scan algorithm and the size of the current Option ROM, and the base address of the scan algorithm is still an integer multiple of 512 bytes.
  • the board core module updates the scanned base address in a set size address segment, such as 512 bytes. After updating the scanned base address, it is determined whether the base address is exceeded. The address range of the operating system interface module, if yes, indicates that all Option ROMs are initialized, and the operating system can be loaded into the floppy disk, the hard disk, or the CD ROM according to the user settings. If not, the next Option ROM is scanned.
  • the operating system interface module is further configured to: the function entry of the service routine initialization routine of the Option ROM is invoked, execute an initialization routine of the service routine corresponding to the Option ROM, and initialize the service routine, the Option ROM
  • the service routine initialization routine registers the entry address of the service routine to the interrupt service vector table maintained by the MAPPER module, and the initialization completes the jump back to the board level core module.
  • the board core module scans the next Option ROM of the current Option ROM in the operating system interface module, and scans the signature of the Option ROM according to the corresponding service example saved in the Option ROM Header. The size of the information is parity checked on the entire Option ROM.
  • the function entry of the service routine initialization routine of the Option ROM specified in the Option ROM Header of the Option ROM is invoked.
  • the information of the service routine size saved by the Option ROM Header updates the base address of the scan algorithm, and calls the function entry of the service routine initialization routine of the Option ROM specified in the Option ROM Header of the Option ROM currently scanned, as described above.
  • the parity check is incorrect, and the board level core module updates the scanned base address in units of 512 bytes.
  • the board-level core module determines whether the base address exceeds an address range of the operating system interface module.
  • the operating system can be loaded into a floppy disk, a hard disk, or a CD ROM according to user settings. If no, the next Option ROM of the current Option ROM is scanned to initialize the service routine corresponding to the next Option ROM in the same manner.
  • the interrupt service routine stored by the operating system interface module includes the service routines necessary for the computer system to start, including the graphics service routine INT10H, the memory size service routine INT12H, the disk service routine INT13H, the miscellaneous service routine INT15H, the keyboard The service routine INT16H and the external device interconnection bus device basic input/output system (PCI BIOS) service routine INT1AH and the like.
  • PCI BIOS PCI BIOS
  • the operating system interface module is further configured to: need to determine whether the relevant hardware of the service routine operation exists during the initialization of the service routine, or query the system information table maintained by the MAPPER module when querying the port address or the available memory size Information. If the disk service routine INT13H needs to determine whether there is a floppy disk, a hard disk or a CD, the operating system interface module queries the hardware list in the system information table maintained by the MAPPER module to obtain the required information. If the corresponding hardware exists, the Option The initialization routine of the service routine corresponding to the ROM registers the function entry address of the service routine INT13H into the interrupt service vector table maintained by the MAPPER. For INT12H, which is used to report the memory size to the operating system, during the INT12H initialization process, the operating system interface module does not need to detect the size of the memory, and directly queries the system information table maintained by the MAPPER module.
  • BIOS startup method based on open source basic input/output system (BIOS) of embodiment of the present invention
  • BIOS operating system interface module is implemented by an optional read-only memory (Option ROM) module.
  • Option ROM optional read-only memory
  • the BIOS initializes the board level device and outputs system information when the computer hardware system is powered on, the system information includes a hardware list of the computer system, a corresponding port address, and a memory size, and the operating system interface module is configured according to the operating system interface module.
  • the system information table recognized by the operating system interface (INTERFACE) module obtained by the system information conversion sequentially initializes the Option ROM therein. The details will be described below in conjunction with specific embodiments.
  • the schematic diagram of the structure of the open source BIOS based BIOS system of this embodiment is shown in FIG. 3, and the open source BIOS is an expandable BIOS.
  • the BIOS system shown in Figure 3 is 4Mb in size, and its physical addresses OxDOOOO to OxFFFFF include a board-level core module (CORE), a board-level core module abstraction layer (MAPPER) module, and an operating system interface module (INTERFACE).
  • the physical addresses OxFOOOO to OxFFFFFFF include the board-level core module and the board-level core module abstraction layer module.
  • the board-level core module is located at a high-order address starting from OxFFFFF
  • the MAPPER module is located at a low level of the board-level core module, and the specific location is compiled. When determined.
  • Board Level Core Module Set to control the computer system after power up, initialize board level equipment, including central processing unit, cache memory, memory controller, north bridge and north bridge related equipment and south bridge And the south bridge related device, etc., output system information, and jump to the MAPPER module, the system information includes a hardware list of the computer system, a corresponding port address, and a memory size information, and is further configured to: save the The address range of the operating system interface module, jumps back from the MAPPER module, and scans the Option ROM of the operating system interface module.
  • CORE Board Level Core Module
  • the MAPPER module is set to: execute an internal initialization function to complete its own initialization, read and parse the system information output by the board-level core module, and create and maintain according to the system information by the operating system interface (INTERFACE)
  • the system information table identified by the module jumps to the board level core module and maintains the interrupt service vector table.
  • Operating system interface module From the physical address OxDOOOO to OxEFFFF, set to: use the optional read-only memory (Option ROM) module mode to implement the interrupt service routine, the Option ROM is based on the MAPPER module.
  • the maintained system information table is initialized in sequence.
  • the operating system interface module of this embodiment includes three Option ROMs, each Option ROM.
  • the size is an integer multiple of 512 bytes.
  • the physical address OxDOOOO to OxDFFFF contains two Option ROMs, so there are two Option ROM Headers. These two Option ROMs provide the INT 16H keyboard service routine (Keyboard Service) and the INT 15H miscellaneous service routine (System). Service) belong
  • the Disk ROM of the INT 13H is provided by the Option ROM whose physical address ranges from OxEOOOO to OxEFFFF.
  • the invention does not limit the size of the Option ROM, and the in-memory service routine Option ROM The location within the operating system interface module.
  • the operating system interface module In order to ensure independence, and to provide compatibility support for the operating system interface module to provide advanced operating systems such as Windows operating system and Linux operating system boot, the operating system interface module also conforms to the ROM in the Plug and Play BIOS Specification. The standard format.
  • the board-level core module scans the Option ROM in the operating system interface module, scans the Option ROM Header in the operating system interface module, and queries the signature saved in the Option ROM Header according to the corresponding saved in the Option ROM Header.
  • the information of the service routine size is parity-checked to the entire Option ROM. If the parity check is correct, the search or the search is performed according to the information about the size of the service routine corresponding to the Option ROM provided in the Option ROM Header. Update the base address of the scan algorithm, call the entry function of the service routine initialization routine of the Option ROM, and jump to the operating system interface module to initialize the corresponding function.
  • the board-level core module updates the base address of the scan algorithm in units of 512 bytes. After updating the scan base address, the board level core module further determines whether the base address exceeds the address range of the operating system interface module. If yes, it indicates that all Option ROMs have been initialized, and can continue to be based on user settings to the floppy disk and the hard disk. Or load the operating system in the CD ROM. If no, scan the next Option ROM.
  • the operating system interface module obtains control, that is, after the function entry of the service routine initialization routine of the Option ROM is invoked, the initialization routine of the service routine corresponding to the Option ROM is executed, and the service routine is initialized.
  • the service routine initialization routine of the Option ROM registers the entry address of the service routine to the interrupt service vector table maintained by the MAPPER module, and the initialization completes the jump back to the board-level core module.
  • the board-level core module scans the next Option ROM and initializes the service routine corresponding to the Option ROM.
  • the operating system interface module is further configured to: determine the service during the initialization of the service routine If the relevant hardware of the routine operation exists, or when querying the port address or the available memory size, query the system information table maintained by the MAPPER module to obtain the required information. If the disk service routine INT13H needs to determine whether there is a floppy disk, a hard disk or a CD, the operating system interface module queries the hardware list in the system information table maintained by the MAPPER module to obtain the required information. If the corresponding hardware exists, the Option The initialization routine of the service routine corresponding to the ROM registers the function entry address of the service routine INT13H into the interrupt service vector table maintained by the MAPPER. For the INT12H information for reporting the memory size to the operating system, during the INT12H initialization process, the operating system interface module does not need to detect the size of the memory, and directly queries the information from the system information table maintained by the MAPPER module.
  • the board-level core module, MAPPER module, and operating system interface module are all stored in non-volatile read-only memory.
  • the BIOS system of the present invention is extensible, and the one or more Option ROMs and their corresponding service examples can be set as needed, because the BIOS system uses the Option ROM module to implement services required during startup or operation of the operating system. Cheng. Because the open source BIOS system provides the same functionality as the industrial PC BIOS, it is compatible with industrial PC BIOS and provides a hardware and software interface compatible with industrial PC BIOS.
  • the open source BIOS system also includes a system detection module, a BIOS Extensible Firmware Interface (UEFI) module, and a system debug tool module.
  • UEFI BIOS Extensible Firmware Interface
  • the computer system supported by the firmware BIOS based on the open source BIOS system includes an X86 compatible processor, a computer supporting the PCI bus standard, and an advanced operating system such as a Windows operating system and a Linux operating system, including but not limited to DOS, Windows 98, and Windows. 2000, Windows XP, Windows Vista, Window 7, and Linux major distributions.
  • the X86 processor is taken as an example, and the BIOS startup method processing process based on the open source BIOS is as shown in FIG. 4, and includes the following steps:
  • Step 301 The computer system is powered on, and the central processor fetches instructions from the physical address 0xF000: OxFFFO of the BIOS, invokes the board-level core module, and gives control to the board-level core module, copying
  • the board level core module and the MAPPER module are in memory, the board level core module decompresses and copies the operating system interface module into the memory, initializes the board level device in the computer system, and outputs system information;
  • the system information includes a list of hardware of the computer system, corresponding port addresses, and information about the size of the memory.
  • the board level core module invokes an entry function of the MAPPER module, and the MAPPER module performs an initialization function saved internally by the module to complete its own initialization, and reads and parses system information output by the board level core module. And creating and maintaining the system information table according to the system information.
  • the table includes a list of hardware for the computer system, corresponding port addresses, and memory size information.
  • the MAPPER module also initializes data in the BIOS data area (BDA) and extended BIOS data area (EBDA), maintains the table prepared for booting the operating system including the Programmable Interrupt Request (PIRQ) table and the Advanced Configuration and Power Interface (ACPI) ) forms, etc.
  • the board-level core module and the MAPPER module are both open source BIOS-related, that is, their function and structure depend on the function and structure of the open source BIOS.
  • Step 302 The board core module is set to scan the Option ROM algorithm to scan the base address as
  • the operating system interface module includes a plurality of Option ROMs, each Option ROM corresponding to a service routine, the Option ROM including a service routine, an initialization routine of the service routine, and an optional read-only memory head (Option ROM Header) ).
  • the initialization routine of the service routine includes entry address information of the service routine
  • the ROM Header includes information on the signature, size, and initialization routine address of the service routine.
  • the size information of the service routine is information about the size of the memory space when the service routine is uncompressed.
  • the format of the Option ROM is compatible with the industry "Plug and Play BIOS Specification".
  • Step 303 The board-level core module scans the Option ROM in the operating system interface module according to the saved scan algorithm base address, and performs parity check.
  • the board-level core module scans the Option ROM Header at the address OxDOOOO to check whether it contains the signature "55AA". If yes, it determines that there is an Option ROM at the address. Otherwise, the board-level core module updates the scan in units of 512 bytes. Base address. The board level core module is definitely An Option ROM exists in the address, and the information about the size of the service routine stored in the Option ROM Header is also queried, and the entire Option ROM is parity-checked according to the size of the Option ROM.
  • Step 304 The board level core module determines whether the parity check is correct, correct, step 305 is performed, otherwise, step 306 is performed;
  • the parity of the Option ROM as a whole is to ensure data integrity, and other verification algorithms for ensuring data integrity, such as the CRC algorithm, are also applicable to the method of the present invention.
  • Step 305 The board-level core module initializes the Option ROM, and performs step 307;
  • the board-level core module updates the start address of the scan Option ROM algorithm according to the information indicating the size of the Option ROM in the Option ROM Header, and invokes the initialization routine of the service routine corresponding to the Option ROM specified in the Option ROM Header.
  • Function entry initialize the service routine.
  • the initialization routine of the service routine corresponding to the Option ROM registers the entry address of the service routine into the interrupt service vector table (IVT) maintained by the MAPPER module.
  • IVTT interrupt service vector table
  • the operating system interface module queries the system information table maintained by the MAPPER module to obtain the required information. If the disk service routine INT13H needs to determine whether there is a floppy disk, a hard disk or a CD, the operating system interface module queries the hardware list in the system information table maintained by the MAPPER module to obtain the required information. If there is corresponding hardware, the Option The initialization routine of the service routine corresponding to the ROM registers the function entry address of the service routine INT13H into the interrupt service vector table maintained by the MAPPER module. For INT12H, which is used to report the memory size to the operating system, during the INT12H initialization process, the operating system interface module does not need to detect the size of the memory, and directly queries the system information table maintained by the MAPPER module.
  • Step 306 The board-level core module is incremented by 1 unit in units of 512 bytes, and the base address of the scan Option ROM algorithm is incremented by one unit, and step 307 is performed;
  • Step 307 Determine whether the scan algorithm base address is greater than OxEFFFF, if yes, go to step 308, otherwise, go to step 303;
  • Step 308 After the operating system interface module is initialized, the board core module loads the operating system from the specified address according to the user's setting, and the specified address is a floppy disk, a hard disk, or a CD ROM;
  • Step 309 Boot and run the operating system.
  • the control right is given to the MAPPER module, and the MAPPER module executes an INT19H interrupt processing routine through a function call, and the routine outputs display information, prompting the user to input information to select to start, and operate. The guidance of the system.
  • the processing of the Option ROM in the operating system interface module of the board-level core module is as shown in FIG. 5, and the service routine corresponding to the Option ROM uses the disk service routine INT13H as an example. Specifically, the following steps are included:
  • Step 401 The board-level core module scans an Option ROM in the operating system interface module, and scans the signature of the Option ROM "55AA";
  • Step 402 Calculate a parity checksum of the entire Option ROM according to the information indicating the size of the service routine corresponding to the Option ROM in the Option ROM Header.
  • the data unit of the Option ROM is in units of 512 bytes, and the size of the service routine corresponding to the Option ROM is an integer multiple of 512 bytes.
  • Step 403 Determine whether the parity check is correct, if yes, go to step 405, otherwise go to step 404;
  • Step 404 In increments of 512 bytes, the starting address of the scanning Option ROM algorithm is incremented by one unit, and step 409 is performed;
  • Step 405 Update the base address of the scan Option ROM algorithm according to the Option ROM size information in the Option ROM Header, call the Option ROM specified in the Option ROM Header, that is, the function entry of the INT13H, and call and execute the INT13H service routine.
  • Initialization routine initializes the interrupt service routine INT13H and registers the entry address of the INT13H service routine into the interrupt service vector table maintained by the MAPPER module; Steps 406-408 are all related to the Option ROM in the operating system interface module.
  • Step 406 The control is given to the Option ROM in the operating system interface module, INT13H;
  • INT13H is critical for large commercial non-open source operating systems, such as the Windows operating system, which is responsible for booting the entire operating system.
  • Step 407 The Option ROM detects and initializes INT13H related hardware, including a floppy disk, a hard disk, and a CD ROM, and initializes a corresponding controller;
  • the Option ROM checks whether the hardware is damaged by reading the hardware register information, detects and initializes, and modifies the corresponding vector INT13H*4 in the interrupt vector table, and writes the entry address of the service routine of the Option ROM into the interrupt service vector table.
  • the entry address can be written to the interrupt service vector table in the form of segment values and offsets, and the detected hardware information is stored in a non-volatile memory, such as a complementary metal oxide semiconductor (CMOS), for operation.
  • CMOS complementary metal oxide semiconductor
  • Step 408 The current Option ROM gives up the control right, and returns the control right to the board core module;
  • Step 409 The board core module regains control and scans the next Option ROM to perform detection of the next Option ROM.
  • Both the board-level core module and the operating system interface module of the embodiment of the present invention support the Option ROM Header format, and communicate using the information in the Option ROM Header. Since the Option ROM in the operating system interface module is independent of the board level core module, the present invention can conveniently provide the necessary support for the open source BIOS to support non-open source operating systems, such as the Windows operating system.
  • the development environment of the board-level core module and the operating system interface module of the present invention may be the same or different, and the development environment includes: a programming language, a compilation environment, and a cross-compilation requirement.
  • the board level core module selects an open source basic input/output system (BIOS) to initialize a board level device, and outputs system information, and the system information includes a memory size and a device type, and an interrupt service example in the operating system interface module.
  • the Interrupt Service Routine is implemented by using an Option ROM module, and the interrupt service routine is sequentially initialized according to the system information table recognized by the operating system interface (INTERFACE) module by the system information conversion, and the interrupt service is registered.
  • the routine is in the interrupt vector table.
  • the board level core module abstraction layer (MAPPER) module is introduced as the interface between the board level core module and the operating system interface module, and the operating system interface module uses the Option ROM module mode to implement the computer operating system boot.
  • MAPPER board level core module abstraction layer

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

A method and a system for BIOS booting relate to the field of computer application. The method comprises that the interrupt service routine of the operating system interface module of BIOS is implemented in the form of OptionROM module; when the operating system of computer powers on, the on-board core module of BIOS initializes on-board devices and outputs the system information, a MAPPER module converts the system information into a system information sheet recognizable by the operating system interface module, the on-board core module initializes the interrupt service routine in sequence based on the information in the system information sheet. The solution provided by the invention can be applied to the computer system with the open-source BIOS based BIOS system, to boot the open-source operating system and the large-scale business non-open-source operating system.

Description

一种 BIOS启动系统和方法  BIOS startup system and method
技术领域 Technical field
本发明涉及计算机应用领域, 尤其涉及一种基本输入输出系统 (BIOS)的 启动系统和方法。  The present invention relates to the field of computer applications, and in particular, to a basic input/output system (BIOS) booting system and method.
背景技术 Background technique
自从 1981年, IBM为世界上第一台个人计算机 (PC)开发出针对其的基本 输入输出系统(BIOS)以来, 为了保持向后兼容, 虽然各种计算机软硬件层出 不穷, 但传统的 PC BIOS作为软硬件接口, 它的架构并没有发生太大改变。 通用的 PC BIOS由两部分组成: 一是板级模块, 特定于每个系统平台, 用于 初始化系统平台中所有的设备到可以工作的稳定状态, 包括中央处理器 (CPU), 南桥、 北桥以及连接在南北桥上的硬件模块等; 一是接口模块, 普遍 适用于所有平台, 作为通用接口, 通过对板级设备进行抽象提供给操作系统 统一的接口与板级设备进行通信。 其功能主要包括: 1 )开机自测试 (POST, Power On Self Test), 计算机系统加电后, 控制权交给 BIOS, BIOS执行系统 检测,包括 CPU和各种传统设备的初始化,传统设备包括可编程间隔计时器、 可编程中断控制器、 直接内存访问控制器等; 2 )初始化高速緩冲存储器、 主 板芯片组、 显卡及相关外围设备的寄存器; 3 )保存系统的设置, 存储在非易 失性存储器中; 4 )将中断服务例程保存于内存中, 提供给操作系统启动过程 和运行过程的调用。 典型的中断服务例程包括 INT10H 的图形服务例程, INT13H的磁盘服务例程, INT16H的键盘服务例程等。  Since IBM developed the basic input/output system (BIOS) for the world's first personal computer (PC) in 1981, in order to maintain backward compatibility, although various computer hardware and software emerged one after another, the traditional PC BIOS The hardware and software interface, its architecture has not changed much. The general-purpose PC BIOS consists of two parts: First, the board-level module, which is specific to each system platform, is used to initialize all the devices in the system platform to a stable state that can work, including the central processing unit (CPU), south bridge, north bridge. And the hardware modules connected to the north and south bridges; one is the interface module, which is generally applicable to all platforms, and serves as a general-purpose interface, and communicates with the board-level device by abstracting the board-level device to the unified interface of the operating system. Its functions mainly include: 1) Power On Self Test (POST), after the computer system is powered on, control is given to the BIOS, and the BIOS performs system detection, including initialization of the CPU and various conventional devices. Programming interval timer, programmable interrupt controller, direct memory access controller, etc.; 2) Initialize the registers of the cache memory, motherboard chipset, graphics card and related peripherals; 3) Save system settings, store in non-volatile In the memory; 4) Save the interrupt service routine in memory, and provide the call to the operating system startup process and running process. Typical interrupt service routines include INT10H's graphics service routines, INT13H's disk service routines, INT16H's keyboard service routines, and more.
但是随着计算机的发展, PC BIOS由于软硬件接口不公开、 业界工业规 范内容广泛、 运行在 x86系统下的 PC BIOS大部分釆用汇编语言实现, 而汇 编语言提供的语言级抽象较少, 编译复杂, 并且 PC BIOS中不断加入新的功 能模块使得传统 PC BIOS的规模和容量变得庞大冗余、晦涩难懂,架构陈旧, 启动速度慢并且存在较多漏洞 (BUG)。 因此,在可扩展固件接口(UEFI)规范推 出之前, 开源 BIOS应运而生, 如由 Los Alamos国家实验室创建的 coreboot 系统 (原名 LinuxBIOS),以及现由德国 DENX软件工程中心 Wolfgang Denk维 护的 U-Boot系统, 它们普遍具备模块化架构设计、 可扩展性强、 使用高级语 言开发、 可移植性强以及系统平台支持丰富等优势。 开源 BIOS 的主要功能 包括: 1)开机自测试 (POST) , 当计算机系统加电后, 系统控制权交给开源 BIOS,开源 BIOS执行系统检测, 包括 CPU各项寄存器、可编程间隔计时器、 可编程中断控制器和直接内存访问控制器等; 2)初始化高速緩冲存储器、 主 板芯片组、 显卡及相关外围设备的寄存器; 3)保存系统设置, 存储在非易失 性存储器中。 However, with the development of computers, PC BIOS is not open due to hardware and software interfaces, industry industry specifications are extensive, PC BIOS running under x86 system is mostly implemented in assembly language, and assembly language provides less language-level abstraction. Complex, and the constant addition of new functional modules in the PC BIOS makes the size and capacity of the traditional PC BIOS huge and redundant, obscure, outdated, slow to start and bugs (BUG). Therefore, before the introduction of the Extensible Firmware Interface (UEFI) specification, open source BIOS emerged, such as the coreboot system (formerly known as LinuxBIOS) created by Los Alamos National Laboratory, and now by Germany's DENX Software Engineering Center Wolfgang Denk. Protected U-Boot systems, which generally have the advantages of modular architecture design, high scalability, high-level language development, portability, and rich system platform support. The main functions of the open source BIOS include: 1) Power-on self-test (POST). When the computer system is powered up, the system control is given to the open source BIOS, and the open source BIOS performs system detection, including CPU registers, programmable interval timers, and Program interrupt controller and direct memory access controller; 2) Initialize the registers of the cache, motherboard chipset, graphics card and related peripherals; 3) Save the system settings and store them in non-volatile memory.
但是这些开源 BIOS 由于不提供商业非开源操作系统所依赖的中断服务 例程, 无法支持如 Windows家族在内的大型商业非开源操作系统。 因此, 开 发出一种支持传统和现代操作系统的基于开源 BIOS 启动操作系统的系统和 方法是亟待解决的问题。 发明内容  However, these open source BIOSes cannot support large commercial non-open source operating systems such as the Windows family because they do not provide interrupt service routines that commercial non-open source operating systems rely on. Therefore, it is an urgent problem to develop a system and method based on an open source BIOS to boot an operating system that supports both traditional and modern operating systems. Summary of the invention
本发明要解决的问题是提供一种基于 BIOS 启动系统和启动方法, 既能 够支持开源操作系统, 也能够支持非开源商业操作系统。  The problem to be solved by the present invention is to provide a BIOS-based booting system and a booting method that can support both an open source operating system and a non-open source commercial operating system.
为解决上述技术问题, 本发明提供了一种 BIOS启动方法, 其包括: 基本输入输出系统 (BIOS)的操作系统接口(INTERFACE)模块的中断服务 例程釆用可选择性唯读记忆体 (Option ROM)模组 (Module)方式实现;  In order to solve the above technical problem, the present invention provides a BIOS startup method, which includes: an interrupt service routine of an operating system interface (INTERFACE) module of a basic input/output system (BIOS), using optional read-only memory (Option) ROM) module (Module) mode implementation;
在计算机系统加电时, 所述 BIOS的板级核心模块 (CORE)初始化板级设 备并输出系统信息, 所述 BIOS的板级核心模块抽象层 (MAPPER)模块根据所 述系统信息转换得到可由所述操作系统接口模块识别的系统信息表格, 所述 板级核心模块对所述操作系统接口模块包含的所述中断服务例程根据所述系 统信息表格中的信息依次进行初始化, 所述系统信息包括所述计算机系统的 硬件列表、 相应的端口地址以及内存大小的信息。  When the computer system is powered on, the BIOS-level board-level core module (CORE) initializes the board-level device and outputs system information, and the BIOS's board-level core module abstraction layer (MAPPER) module converts the system information according to the system information. a system information table identified by the operating system interface module, wherein the board level core module sequentially initializes the interrupt service routine included in the operating system interface module according to information in the system information table, where the system information includes The hardware list of the computer system, the corresponding port address, and the information of the memory size.
可选的, 所述操作系统接口模块釆用 Option ROM Module方式实现所述 中断服务例程包括, 所述操作系统接口模块包括多个 Option ROM, 每个 Option ROM对应一个服务例程, 所述 Option ROM包括所述服务例程、 所述 服务例程的初始化例程和可选择性唯读记忆体头 (Option ROM Header), 所述 服务例程的初始化例程包括所述服务例程的入口地址信息 ,所述 Option ROM Header包括所述 Option ROM的大小和所述服务例程的初始化例程地址的信 息。 Optionally, the operating system interface module implements the interrupt service routine by using an Option ROM Module. The operating system interface module includes multiple Option ROMs, and each Option ROM corresponds to a service routine. The ROM includes the service routine, an initialization routine of the service routine, and an optional read-only memory header (Option ROM Header), The initialization routine of the service routine includes entry address information of the service routine, and the Option ROM Header includes information of a size of the Option ROM and an initialization routine address of the service routine.
可选的, 所述板级核心模块为可扩展开源 BIOS; 所述 MAPPER模块是 所述开源 BIOS相关的。  Optionally, the board level core module is an extensible open source BIOS; and the MAPPER module is related to the open source BIOS.
可选的, 所述板级核心模块还保存所述操作系统接口模块的地址范围, 所述 Option ROM依次进行初始化的步骤包括:  Optionally, the board-level core module further saves an address range of the operating system interface module, and the step of sequentially performing the initialization of the Option ROM includes:
所述 MAPPER模块初始化完成后, 所述板级核心模块根据所述 Option ROM规定的数据单元的大小在所述操作系统接口模块的地址范围内扫描所 述操作系统接口模块, 扫描到第一个 Option ROM, 调用所述 Option ROM 的 Option ROM Header中指定的所述 Option ROM的服务例程初始化例程的 函数入口, 初始化所述 Option ROM对应的月良务例程;  After the MAPPER module is initialized, the board core module scans the operating system interface module within the address range of the operating system interface module according to the size of the data unit specified by the Option ROM, and scans to the first Option. a ROM, calling a function entry of a service routine initialization routine of the Option ROM specified in an Option ROM Header of the Option ROM, and initializing a monthly service routine corresponding to the Option ROM;
所述 Option ROM初始化完成后, 所述板级核心模块扫描所述操作系统 接口模块中所述 Option ROM 的下一 Option ROM, 调用当前扫描的所述 Option ROM的 Option ROM Header中指定的所述 Option ROM的服务例程初 始化例程的函数入口, 初始化当前所述 Option ROM对应的服务例程, 直到 所述操作系统接口模块最后一个 Option ROM对应的服务例程初始化完毕。  After the Option ROM is initialized, the board core module scans the next Option ROM of the Option ROM in the operating system interface module, and invokes the Option specified in the Option ROM Header of the Option ROM that is currently scanned. The function routine of the ROM service routine initialization routine initializes the service routine corresponding to the current Option ROM until the service routine corresponding to the last Option ROM of the operating system interface module is initialized.
可选的, 所述 Option ROM Header中还包含签名信息, 所述板级核心模 块判断扫描到所述 Option ROM的步骤包括: 所述板级核心模块根据所述 Option ROM规定的数据单元的大小在所述 操作系统接口模块的地址范围内扫描所述操作系统接口模块, 如检测前两个 字节为所述签名信息, 则扫描到一个所述 Option ROM。  Optionally, the Option ROM header further includes signature information, and the step of the board core module determining to scan the Option ROM includes: the board level core module is configured according to a size of the data unit specified by the Option ROM. The operating system interface module is scanned within the address range of the operating system interface module. If the first two bytes are detected as the signature information, one of the Option ROMs is scanned.
可选的, 所述板级核心模块扫描所述 Option ROM, 扫描到所述签名后, 还根据所述 Option ROM Header中保存的对应的服务例程大小的信息对所述 Option ROM 整体进行奇偶校验, 如所述奇偶校验和正确, 则初始化所述 Option ROM对应的服务例程。  Optionally, the board-level core module scans the Option ROM, and after scanning the signature, performs parity check on the entire Option ROM according to the information about the size of the corresponding service routine saved in the Option ROM Header. If the parity check is correct, the service routine corresponding to the Option ROM is initialized.
可选的, 所述方法还包括: 如所述奇偶校验和正确, 所述板级核心模块 初始化所述 Option ROM对应的服务例程后,还根据所述 Option ROM Header 保存的所述服务例程大小的信息更新 Option ROM扫描算法的基址; 如所述奇偶校验和不正确 ,所述板级核心模块以所述 Option ROM Header 中提供的数据单元大小为单位更新 Option ROM扫描算法的基址; Optionally, the method further includes: after the parity check is correct, the board core module initializes a service routine corresponding to the Option ROM, and further, according to the Option ROM Header The saved information of the service routine size updates the base address of the Option ROM scanning algorithm; if the parity check is incorrect, the board level core module is updated in units of data unit sizes provided in the Option ROM Header The base address of the Option ROM scanning algorithm;
所述板级核心模块更新完所述扫描算法的基址后还判断所述基址是否超 出所述操作系统接口模块的地址范围, 如是, 则根据用户设置, 到软盘、 硬 盘或 CD ROM中加载操作系统, 如否 , 则扫描下一 Option ROM。  After updating the base address of the scanning algorithm, the board-level core module further determines whether the base address exceeds an address range of the operating system interface module, and if so, loads the file into a floppy disk, a hard disk, or a CD ROM according to user settings. The operating system, if no, scans the next Option ROM.
可选的, 所述 Option ROM对应服务例程的根据所述系统信息表格进行 初始化的步骤包括:  Optionally, the step of the Option ROM corresponding to the service routine being initialized according to the system information table includes:
所述服务例程初始化过程中需要判断所述服务例程操作的相关硬件是否 存在, 或查询端口地址或可用内存大小时, 所述操作系统接口模块通过查询 所述 MAPPER模块维护的系统信息表格获得需要的信息,所述系统信息表格 存储在 BIOS数据区或非易失性存储器(Non- Volatile RAM ) 中。  The operating system interface module obtains the system information table maintained by the MAPPER module by querying the system information table maintained by the MAPPER module when the service routine needs to determine whether the related hardware of the service routine operation exists or when the port address or the available memory size is queried. The required information, the system information table is stored in a BIOS data area or a non-volatile memory (Non-Volatile RAM).
可选的 ,所述 Option ROM对应的服务例程初始化时 ,还包括所述 Option ROM 中的服务例程初始化例程注册所述服务例程的入口地址到中断服务向 量表( Interrupt Vector Table )中, 所述中断服务向量表由所述 MAPPER模块 维护。  Optionally, when the service routine corresponding to the Option ROM is initialized, the service routine initialization routine in the Option ROM further registers an entry address of the service routine into an Interrupt Vector Table (Interrupt Vector Table). The interrupt service vector table is maintained by the MAPPER module.
可选的, 所述操作系统接口模块的中断服务例程为计算机操作系统启动 所必须的服务例程, 包括图形服务例程 INT10H, 获取内存大小服务例程 INT12H, 磁盘服务例程 INT13H, 杂项服务例程 INT15H, 键盘服务例程 INT16H 和外部设备互联总线设备基本输入输出系统 (PCI BIOS)服务例程 INT1AH等。  Optionally, the interrupt service routine of the operating system interface module is a service routine required for starting the computer operating system, including a graphics service routine INT10H, a memory size service routine INT12H, a disk service routine INT13H, and a miscellaneous service. The routine INT15H, the keyboard service routine INT16H and the external device interconnection bus device basic input/output system (PCI BIOS) service routine INT1AH and the like.
为了解决上述技术问题, 本发明还提供了一种 BIOS 启动系统, 其包括 板级核心模块、板级核心模块抽象层 (MAPPER)模块和操作系统接口模块,其 中: In order to solve the above technical problem, the present invention also provides a BIOS booting system, which includes a board level core module, a board level core module abstraction layer (MAPPER) module, and an operating system interface module, wherein:
所述板级核心模块设置为: 计算机系统加电后, 初始化板级设备并输出 系统信息, 所述系统信息包括所述计算机系统的硬件列表、 相应的端口以及 内存大小的信息; 所述 MAPPER模块设置为:根据所述系统信息转换得到可由所述操作系 统接口模块识别的系统信息表格; The board level core module is configured to: after the computer system is powered on, initialize the board level device and output system information, where the system information includes a hardware list of the computer system, a corresponding port, and a memory size information; The MAPPER module is configured to: convert, according to the system information, a system information table that is identifiable by the operating system interface module;
所述操作系统接口模块设置为: 釆用可选择性唯读记忆体 (Option ROM) 模组 (Module)方式实现中断服务例程, 根据所述系统信息表格依次进行初始 化所述中断服务例程。  The operating system interface module is configured to: implement an interrupt service routine by using an optional ROM (Option ROM) module, and sequentially initialize the interrupt service routine according to the system information table.
可选的,所述操作系统接口模块包括多个 Option ROM,每个 Option ROM 对应一个服务例程, 所述 Option ROM包括服务例程本身、 所述服务例程的 初始化例程和可选择性唯读记忆体头 (Option ROM Header) , 其中,  Optionally, the operating system interface module includes a plurality of Option ROMs, each Option ROM corresponding to a service routine, where the Option ROM includes a service routine itself, an initialization routine of the service routine, and a selective Read the memory head (Option ROM Header), where
所述服务例程的初始化例程设置为:保存所述服务例程的入口地址信息, 配置硬件, 并注册所述服务例程的入口地址信息至中断向量表中;  The initialization routine of the service routine is configured to: save entry address information of the service routine, configure hardware, and register entry address information of the service routine into an interrupt vector table;
所述 Option ROM Header设置为: 保存所述服务例程的大小和所述服务 例程的初始化例程地址的信息。  The Option ROM Header is set to: store information of a size of the service routine and an initialization routine address of the service routine.
可选的, 所述板级核心模块, 还设置为: 初始化板级设备后, 跳转到所 述 MAPPER模块, 所述板级核心模块是可扩展开源 BIOS;  Optionally, the board level core module is further configured to: after initializing the board level device, jumping to the MAPPER module, where the board level core module is an expandable open source BIOS;
所述 MAPPER模块, 还设置为: 执行内部的初始化函数完成自身的初始 化, 读取并解析所述板级核心模块输出的系统信息, 根据所述系统信息创建 和维护所述系统信息表格, 跳转到所述板级核心模块, 所述 MAPPER模块是 所述开源 BIOS相关的。  The MAPPER module is further configured to: perform an initialization function of the internal initialization function, read and parse the system information output by the board core module, and create and maintain the system information table according to the system information, and jump To the board level core module, the MAPPER module is related to the open source BIOS.
可选的, 所述板级核心模块还设置为: 保存所述操作系统接口模块的地 址范围,初始化 INTERFACE模块,根据所述地址范围扫描所述 INTERFACE 模块, 扫描到第一个 Option ROM, 保存所述 Option ROM的基址, 调用所述 Option ROM的 Option ROM Header中指定的所述 Option ROM的服务例程初 始化例程的函数入口, 从所述 Option ROM跳转回来, 扫描所述操作系统接 口模块中所述 Option ROM的下一 Option ROM , 根据当前扫描的所述 Option ROM的 Option ROM Header中指定的所述 Option ROM的大小, 更新所述扫 描算法的基址,并判断所述基址是否超出所述操作系统接口模块的地址范围, 如是, 则根据用户设置, 到软盘、 硬盘或 CD ROM中加载操作系统, 如否, 则扫描当前 Option ROM的下一 Option ROM; 所述 MAPPER模块还设置为: 维护 BIOS数据区和中断服务向量表; 所述操作系统接口模块还设置为: 所述 Option ROM的服务例程初始化 例程的函数入口被调用 , 执行所述 Option ROM对应的服务例程的初始化例 程, 对所述服务例程进行初始化, 初始化完成跳回所述板级核心模块; Optionally, the board level core module is further configured to: save an address range of the operating system interface module, initialize an INTERFACE module, scan the INTERFACE module according to the address range, scan to the first Option ROM, and save the location a base address of the Option ROM, calling a function entry of a service routine initialization routine of the Option ROM specified in an Option ROM Header of the Option ROM, jumping back from the Option ROM, and scanning the operating system interface module Updating the base address of the scanning algorithm according to the size of the Option ROM specified in the Option ROM Header of the Option ROM that is currently scanned, and determining whether the base address is exceeded. The address range of the operating system interface module, if yes, loading the operating system into the floppy disk, the hard disk, or the CD ROM according to the user setting, and if not, scanning the next Option ROM of the current Option ROM; The MAPPER module is further configured to: maintain a BIOS data area and an interrupt service vector table; the operating system interface module is further configured to: a function entry of a service routine initialization routine of the Option ROM is invoked, and the Option ROM is executed An initialization routine of the corresponding service routine initializes the service routine, and the initialization completes jumping back to the board-level core module;
所述操作系统接口模块的所述 Option ROM的服务例程初始化例程还设 置为: 注册所述服务例程的入口地址到所述中断服务向量表。  The service routine initialization routine of the Option ROM of the operating system interface module is further configured to: register an entry address of the service routine to the interrupt service vector table.
可选的, 所述 Option ROM Header中还包含签名信息,  Optionally, the Option ROM header further includes signature information, where
所述板级核心模块还设置为: 根据所述 INTERFACE模块地址范围扫描 所述 INTERFACE模块, 如检测前两个字节为所述签名信息, 则扫描到一个 所述 Option ROM,根据所述 Option ROM Header中保存的对应的服务例程大 小的信息对所述 Option ROM整体进行奇偶校验, 如所述奇偶校验和正确, 则调用所述 Option ROM的 Option ROM Header中指定的所述 Option ROM的 服务例程初始化例程的函数入口, 根据所述 Option ROM Header保存的所述 服务例程大小的信息更新扫描算法的基址;如所述奇偶校验和不正确,以 512 字节为单位更新扫描算法的基址, 更新完所述扫描的基址后还判断所述基址 是否超出所述操作系统接口模块的地址范围, 如是, 则根据用户设置, 到软 盘、 硬盘或 CD ROM中加载操作系统, 如否, 则扫描下一 Option ROM。  The board-level core module is further configured to: scan the INTERFACE module according to the address range of the INTERFACE module, and if the first two bytes are detected as the signature information, scan the Option ROM, according to the Option ROM. The information about the size of the corresponding service routine saved in the header is parity-checked to the entire Option ROM. If the parity is correct, the Option ROM specified in the Option ROM header of the Option ROM is called. a function entry of the service routine initialization routine, updating the base address of the scan algorithm according to the information of the size of the service routine saved by the Option ROM Header; if the parity check is incorrect, updating in units of 512 bytes a base address of the scan algorithm, after updating the base address of the scan, determining whether the base address exceeds an address range of the operating system interface module, and if so, loading operations to a floppy disk, a hard disk, or a CD ROM according to user settings The system, if no, scans the next Option ROM.
可选的, 所述操作系统接口模块还设置为: 所述服务例程初始化过程中 需要判断所述服务例程操作的相关硬件是否存在或查询端口地址或可用内存 大小时, 查询所述 MAPPER模块维护的系统信息表格获得需要的信息。  Optionally, the operating system interface module is further configured to: query, when the service routine needs to determine whether the related hardware of the service routine exists or query a port address or an available memory size, query the MAPPER module. The maintained system information form gets the information you need.
本发明提供的一个或多个实施例, 该板级核心模块 (CORE)选择开源基本 输入输出系统 (BIOS)初始化板级设备, 输出系统信息, 该系统信息包括内存 大小和设备类型等,该操作系统接口模块中的中断服务例程( Interrupt Service Routine )釆用 Option ROM模组方式实现, 该中断服务例程根据由所述系统 信息转换得到可由该操作系统接口(INTERFACE)模块识别的系统信息表格依 次初始化, 并注册该中断服务例程至中断向量表中。 通过扩展开源 BIOS 的 架构,引入板级核心模块抽象层 (MAPPER)模块作为板级核心模块和操作系统 接口模块之间的接口, 并且操作系统接口模块釆用 Option ROM模组方式实 现计算机操作系统启动所需的服务例程, 开发出操作系统接口模块和开源 BIOS相结合的 BIOS系统, 不仅能够支持开源操作系统, 也能够支持非开源 商业操作系统, 如 Windows操作系统等, 具有很好的兼容性。 According to one or more embodiments provided by the present invention, the board level core module (CORE) selects an open source basic input/output system (BIOS) to initialize a board level device, and outputs system information, and the system information includes a memory size and a device type, etc. The Interrupt Service Routine in the system interface module is implemented by using an Option ROM module, and the interrupt service routine converts the system information table that can be recognized by the operating system interface (INTERFACE) module according to the system information conversion. Initialize in sequence, and register the interrupt service routine into the interrupt vector table. Introducing the board-level core module abstraction layer (MAPPER) module as a board-level core module and operating system by extending the architecture of the open source BIOS The interface between the interface modules, and the operating system interface module uses the Option ROM module to implement the service routines required for the startup of the computer operating system, and develops a BIOS system combining the operating system interface module and the open source BIOS, which can not only support open source. The operating system can also support non-open source commercial operating systems, such as the Windows operating system, with good compatibility.
附图概述 BRIEF abstract
图 1为基于本发明实施方式的 BIOS系统和方法的计算机系统的结构示 意图;  1 is a schematic diagram showing the structure of a computer system based on a BIOS system and method according to an embodiment of the present invention;
图 2(a)为本发明实施方式基于开源 BIOS 的 BIOS 系统在计算机闪存 (FLASH)中的结构示意图;  2(a) is a schematic structural diagram of a BIOS system based on an open source BIOS in a computer flash memory (FLASH) according to an embodiment of the present invention;
图 2(b)为本发明实施方式的基于开源 BIOS的 BIOS系统在计算机内存中 的结构示意图;  2(b) is a schematic structural diagram of a BIOS system based on an open source BIOS in a computer memory according to an embodiment of the present invention;
图 3为本发明实施例一的基于开源 BIOS的 BIOS系统的结构示意图; 图 4为本发明实施方式的 BIOS系统在计算机启动过程中的方法流程图; 图 5为本发明实施方式的方法在计算机启动过程中板级核心模块 CORE 初始化操作系统接口模块 INTERFACE的一 Option ROM的流程图。  3 is a schematic structural diagram of a BIOS system based on an open source BIOS according to Embodiment 1 of the present invention; FIG. 4 is a flowchart of a method for a BIOS system in a computer startup process according to an embodiment of the present invention; FIG. 5 is a flowchart of a method according to an embodiment of the present invention; During the startup process, the board-level core module CORE initializes the flow chart of an Option ROM of the operating system interface module INTERFACE.
本发明的较佳实施方式 Preferred embodiment of the invention
下面将结合附图及具体实施例对本发明的实施方式作进一步的详细描 述。 需要说明的是, 在不冲突的情况下, 本申请中的实施例及实施例中的特 征可以相互任意组合。  Embodiments of the present invention will be further described in detail below with reference to the drawings and specific embodiments. It should be noted that the features in the embodiments and the embodiments of the present application may be arbitrarily combined with each other without conflict.
图 1为基于本发明的 BIOS系统和方法的计算机系统的结构示意图, 包 括相互连接的南桥和北桥, 与北桥相连接的中央处理器 (CPU)、 显卡和内存, 与南桥相连接的大容量存储和系统基本输入输出系统 (System BIOS), 少针脚 型接口(LPC)总线,外设部件互联标准 (PCI)总线以及与 PCI总线相连接的 PCI 设备。 1 is a schematic structural diagram of a computer system based on a BIOS system and method according to the present invention, including an interconnected south bridge and a north bridge, a central processing unit (CPU) connected to the north bridge, a graphics card and a memory, and a large connection with the south bridge. Capacity storage and system basic input/output system (System BIOS), less pin interface (LPC) bus, peripheral component interconnect standard (PCI) bus, and PCI device connected to the PCI bus.
其中本申请的 System BIOS在闪存 (FLASH)中的结构如图 2(a)所示,包括 板级核心模块 (CORE)、 板级核心模块抽象层 (MAPPER)模块和操作系统接口 模块 (INTERFACE)。本申请的 BIOS系统通过扩展开源 BIOS得到。其中该操 作系统接口模块釆用可选择性唯读记忆体 (Option ROM)模组 (Module)方式实 现中断服务例程, 该服务例程为编译后的二进制代码经过压缩后形成的压缩 的二进制代码。 The structure of the System BIOS of the present application in the flash memory (FLASH) is as shown in FIG. 2(a), including Board Level Core Module (CORE), Board Level Core Module Abstraction Layer (MAPPER) module and Operating System Interface Module (INTERFACE). The BIOS system of the present application is obtained by extending the open source BIOS. The operating system interface module implements an interrupt service routine by using an optional read-only memory (Option ROM) module, which is a compressed binary code formed by compressing the compiled binary code. .
本申请的 BIOS在计算机硬件系统上电后, 为了得到更快的执行速度, 该板级核心模块和该 MAPPER模块拷贝到内存中执行,该操作系统接口模块 经过解压缩后拷贝到内存中执行, 该操作系统接口模块中的服务例程解压缩 为二进制代码。 BIOS在内存中的结构如图 2(b)所示, 按照地址从高到低的顺 序包括 System BIOS (即板级核心模块、该 MAPPER模块和该操作系统接口模 块)、 VGA BIOS及数据区、 传统 DOS应用程序工作区、 BIOS数据区和中断 向量表。  After the BIOS of the application is powered on by the computer hardware system, in order to obtain a faster execution speed, the board-level core module and the MAPPER module are copied into the memory for execution, and the operating system interface module is decompressed and copied into the memory for execution. The service routine in the operating system interface module is decompressed into binary code. The structure of the BIOS in memory is as shown in Figure 2(b), including the System BIOS (ie, the board-level core module, the MAPPER module, and the operating system interface module), the VGA BIOS and the data area, in descending order of address, Traditional DOS application workspace, BIOS data area, and interrupt vector table.
该板级核心模块设置为: 计算机硬件系统加电后, 初始化板级设备并输 出系统信息, 跳转到该 MAPPER模块, 该系统信息包括该计算机系统的硬件 列表、 相应的端口地址以及内存大小的信息, 还用于保存该操作系统接口模 块的地址范围。  The board-level core module is configured to: after the computer hardware system is powered on, initialize the board-level device and output system information, and jump to the MAPPER module, the system information includes a hardware list of the computer system, a corresponding port address, and a memory size. Information, also used to save the address range of the operating system interface module.
该板级核心模块是开源 BIOS相关的, 其功能和结构依赖于所釆用的开 源 BIOS的功能和结构。  The board-level core module is open source BIOS-related, and its function and structure depend on the function and structure of the open source BIOS.
该板级核心模块抽象层 (MAPPER)模块设置为:执行内部的初始化函数完 成自身的初始化, 读取并解析所述板级核心模块输出的系统信息, 根据所述 系统信息创建和维护可由所述操作系统接口(INTERFACE)模块识别的系统信 息表格,跳转到所述板级核心模块,该 MAPPER模块是该开源 BIOS相关的。 该系统信息表格的格式根据该开源 BIOS确定,存储在 BIOS数据区或非易失 性存储器( Non- Volatile RAM ) 中。 该 MAPPER模块还用于维护一中断服务 向量表。  The board level core module abstraction layer (MAPPER) module is configured to: execute an internal initialization function to complete its own initialization, read and parse system information output by the board level core module, and create and maintain according to the system information. The system information table identified by the operating system interface (INTERFACE) module jumps to the board level core module, and the MAPPER module is related to the open source BIOS. The format of the system information table is determined according to the open source BIOS and stored in the BIOS data area or Non-Volatile RAM. The MAPPER module is also used to maintain an interrupt service vector table.
该操作系统接口模块设置为: 釆用可选择性唯读记忆体 (Option ROM)模 组方式实现计算机操作系统启动时所需的中断服务例程, 该中断服务例程根 据由该 MAPPER模块维护的系统信息表格依次进行初始化。  The operating system interface module is configured to: implement an interrupt service routine required for starting the computer operating system by using an optional read-only memory (Option ROM) module, and the interrupt service routine is maintained according to the MAPPER module. The system information table is initialized in sequence.
操作系统接口模块包括多个 Option ROM,每个 Option ROM对应一个服 务例程, 所述 Option ROM包括服务例程、 该服务例程的初始化例程和可选 择性唯读记忆体头 (Option ROM Header) , 其中, The operating system interface module includes multiple Option ROMs, and each Option ROM corresponds to one service. The Option ROM includes a service routine, an initialization routine of the service routine, and an optional ROM head (Option ROM Header), wherein
该服务例程的初始化例程设置为: 配置硬件和保存该服务例程的入口地 址信息;  The initialization routine of the service routine is set to: configure the hardware and save the entry address information of the service routine;
该 Option ROM Header设置为: 保存签名信息、 该 Option ROM的大小 和该服务例程的初始化例程地址的信息。该服务例程的大小为该 Option ROM 规定的数据单元大小的整数倍,本实施例中该 Option ROM的数据单元以 512 字节为例。  The Option ROM Header is set to: save the signature information, the size of the Option ROM, and the address of the initialization routine address of the service routine. The size of the service routine is an integer multiple of the data unit size specified by the Option ROM. In this embodiment, the data unit of the Option ROM is exemplified by 512 bytes.
在该计算机闪存 (FLASH)中, 该服务例程为编译后的二进制代码经过压 缩后形成的压缩的二进制代码。 该计算机硬件系统启动后, 为了提高执行速 度, 该 BIOS系统的板级核心模块和 MAPPER模块直接拷贝到内存中执行, 同时该操作系统接口模块中的服务例程解压缩为二进制代码拷贝到内存中。  In the computer flash memory (FLASH), the service routine is a compressed binary code formed by compression of the compiled binary code. After the computer hardware system is started, in order to improve the execution speed, the board-level core module and the MAPPER module of the BIOS system are directly copied into the memory for execution, and the service routine in the operating system interface module is decompressed into binary code and copied into the memory. .
该板级核心模块在该 MAPPER模块初始化完成后,扫描该操作系统接口 模块中的第一个 Option ROM, 保存该 Option ROM的基址, 扫描到该 Option ROM Header中的签名后,根据该 Option ROM Header中保存的对应的服务例 程大小的信息对该 Option ROM整体进行奇偶校验, 如该奇偶校验和正确, 调用该 Option ROM的 Option ROM Header中指定的该 Option ROM的服务例 程初始化例程的函数入口 , 同时更新扫描算法的基址为当前 Option ROM扫 描算法的基址与当前 Option ROM的大小之和, 该扫描算法的基址仍为 512 字节的整数倍。 如该奇偶校验和不正确, 该板级核心模块以设定大小的地址 段, 如 512字节为单位更新扫描的基址, 更新完所述扫描的基址后还判断该 基址是否超出该操作系统接口模块的地址范围, 如是, 则表明所有 Option ROM以初始化完毕, 可继续根据用户设置, 到软盘、 硬盘或 CD ROM中加 载操作系统, 如否, 则扫描下一 Option ROM。  After the MAPPER module is initialized, the board core module scans the first Option ROM in the operating system interface module, saves the base address of the Option ROM, and scans the signature in the Option ROM Header according to the Option ROM. The information about the size of the corresponding service routine saved in the header is parity-checked to the entire Option ROM. If the parity is correct, the service routine initialization example of the Option ROM specified in the Option ROM Header of the Option ROM is called. The function entry of the program, and the base address of the update scan algorithm is the sum of the base address of the current Option ROM scan algorithm and the size of the current Option ROM, and the base address of the scan algorithm is still an integer multiple of 512 bytes. If the parity check is incorrect, the board core module updates the scanned base address in a set size address segment, such as 512 bytes. After updating the scanned base address, it is determined whether the base address is exceeded. The address range of the operating system interface module, if yes, indicates that all Option ROMs are initialized, and the operating system can be loaded into the floppy disk, the hard disk, or the CD ROM according to the user settings. If not, the next Option ROM is scanned.
该操作系统接口模块还设置为: 该 Option ROM的服务例程初始化例程 的函数入口被调用, 执行该 Option ROM对应的服务例程的初始化例程, 对 该服务例程进行初始化, 该 Option ROM的服务例程初始化例程注册该服务 例程的入口地址到该 MAPPER模块维护的中断服务向量表,初始化完成跳转 回该板级核心模块。 该板级核心模块在初始化完当前 Option ROM后 , 扫描该操作系统接口 模块中当前 Option ROM的下一 Option ROM, 扫描到该 Option ROM的签名 后, 根据该 Option ROM Header 中保存的对应的服务例程大小的信息对该 Option ROM整体进行奇偶校验,如该奇偶校验和正确,则调用该 Option ROM 的 Option ROM Header中指定的该 Option ROM的服务例程初始化例程的函 数入口, 根据该 Option ROM Header保存的该服务例程大小的信息更新扫描 算法的基址,调用当前扫描的该 Option ROM的 Option ROM Header中指定的 该 Option ROM的服务例程初始化例程的函数入口 , 如所述奇偶校验和不正 确, 所述板级核心模块以 512字节为单位更新扫描的基址。 该板级核心模块 判断该基址是否超出所述操作系统接口模块的地址范围, 如是, 则表明所有 Option ROM以初始化完毕, 可继续根据用户设置, 到软盘、硬盘或 CD ROM 中加载操作系统,如否, 则扫描当前 Option ROM的下一 Option ROM按照同 样方式初始化下一 Option ROM对应的服务例程。 The operating system interface module is further configured to: the function entry of the service routine initialization routine of the Option ROM is invoked, execute an initialization routine of the service routine corresponding to the Option ROM, and initialize the service routine, the Option ROM The service routine initialization routine registers the entry address of the service routine to the interrupt service vector table maintained by the MAPPER module, and the initialization completes the jump back to the board level core module. After the current Option ROM is initialized, the board core module scans the next Option ROM of the current Option ROM in the operating system interface module, and scans the signature of the Option ROM according to the corresponding service example saved in the Option ROM Header. The size of the information is parity checked on the entire Option ROM. If the parity is correct, the function entry of the service routine initialization routine of the Option ROM specified in the Option ROM Header of the Option ROM is invoked. The information of the service routine size saved by the Option ROM Header updates the base address of the scan algorithm, and calls the function entry of the service routine initialization routine of the Option ROM specified in the Option ROM Header of the Option ROM currently scanned, as described above. The parity check is incorrect, and the board level core module updates the scanned base address in units of 512 bytes. The board-level core module determines whether the base address exceeds an address range of the operating system interface module. If yes, it indicates that all Option ROMs are initialized, and the operating system can be loaded into a floppy disk, a hard disk, or a CD ROM according to user settings. If no, the next Option ROM of the current Option ROM is scanned to initialize the service routine corresponding to the next Option ROM in the same manner.
该操作系统接口模块存储的中断服务例程包括计算机系统启动所必须的 服务例程, 包括图形服务例程 INT10H, 获取内存大小服务例程 INT12H, 磁 盘服务例程 INT13H, 杂项服务例程 INT15H、 键盘服务例程 INT16H和外部 设备互联总线设备基本输入输出系统 (PCI BIOS)服务例程 INT1AH等。  The interrupt service routine stored by the operating system interface module includes the service routines necessary for the computer system to start, including the graphics service routine INT10H, the memory size service routine INT12H, the disk service routine INT13H, the miscellaneous service routine INT15H, the keyboard The service routine INT16H and the external device interconnection bus device basic input/output system (PCI BIOS) service routine INT1AH and the like.
该操作系统接口模块还设置为: 该服务例程初始化过程中需要判断该服 务例程操作的相关硬件是否存在, 或查询端口地址或可用内存大小时, 查询 该 MAPPER模块维护的系统信息表格获得需要的信息。 如磁盘服务例程 INT13H初始化需要判断是否存在软盘、硬盘或光盘, 则该操作系统接口模块 查询该 MAPPER模块维护的系统信息表格中的硬件列表得到需要的信息,如 果存在相应的硬件, 则该 Option ROM对应的服务例程的初始化例程注册该 服务例程 INT13H的函数入口地址到该 MAPPER维护的中断服务向量表中。 对于 INT12H其用于向操作系统报告内存大小的信息,在 INT12H初始化过程 中, 该操作系统接口模块无需检测内存的大小, 直接从该 MAPPER模块维护 的系统信息表格中查询所述信息。  The operating system interface module is further configured to: need to determine whether the relevant hardware of the service routine operation exists during the initialization of the service routine, or query the system information table maintained by the MAPPER module when querying the port address or the available memory size Information. If the disk service routine INT13H needs to determine whether there is a floppy disk, a hard disk or a CD, the operating system interface module queries the hardware list in the system information table maintained by the MAPPER module to obtain the required information. If the corresponding hardware exists, the Option The initialization routine of the service routine corresponding to the ROM registers the function entry address of the service routine INT13H into the interrupt service vector table maintained by the MAPPER. For INT12H, which is used to report the memory size to the operating system, during the INT12H initialization process, the operating system interface module does not need to detect the size of the memory, and directly queries the system information table maintained by the MAPPER module.
本发明实施方式的基于开源基本输入输出系统 (BIOS)的 BIOS 启动方法 中, BIOS 的操作系统接口模块釆用可选择性唯读记忆体 (Option ROM)模组 ( Module )方式实现。 该 BIOS在计算机硬件系统加电时板级核心模块初始 化板级设备并输出系统信息, 该系统信息包括所述计算机系统的硬件列表、 相应的端口地址以及内存大小的信息, 该操作系统接口模块根据由该系统信 息转换得到的可由该操作系统接口(INTERFACE)模块识别的系统信息表格对 其中的 Option ROM依次进行初始化。 下面结合具体实施例进行详细说明。 BIOS startup method based on open source basic input/output system (BIOS) of embodiment of the present invention The BIOS operating system interface module is implemented by an optional read-only memory (Option ROM) module. The BIOS initializes the board level device and outputs system information when the computer hardware system is powered on, the system information includes a hardware list of the computer system, a corresponding port address, and a memory size, and the operating system interface module is configured according to the operating system interface module. The system information table recognized by the operating system interface (INTERFACE) module obtained by the system information conversion sequentially initializes the Option ROM therein. The details will be described below in conjunction with specific embodiments.
实施例一  Embodiment 1
本实施例的基于开源 BIOS的 BIOS系统的结构示意图如图 3所示,该开 源 BIOS为可扩展 BIOS。 图 3中所示的 BIOS系统大小为 4Mb, 其物理地址 OxDOOOO 到 OxFFFFF 包括板级核心模块 (CORE)、 板级核心模块抽象层 (MAPPER)模块和操作系统接口模块 (INTERFACE)三个部分, 其中物理地址 OxFOOOO到 OxFFFFF包括该板级核心模块和该板级核心模块抽象层模块, 该 板级核心模块位于高位地址从 OxFFFFF开始,该 MAPPER模块位于该板级核 心模块的低位, 其具体位置在编译时确定。  The schematic diagram of the structure of the open source BIOS based BIOS system of this embodiment is shown in FIG. 3, and the open source BIOS is an expandable BIOS. The BIOS system shown in Figure 3 is 4Mb in size, and its physical addresses OxDOOOO to OxFFFFF include a board-level core module (CORE), a board-level core module abstraction layer (MAPPER) module, and an operating system interface module (INTERFACE). The physical addresses OxFOOOO to OxFFFFF include the board-level core module and the board-level core module abstraction layer module. The board-level core module is located at a high-order address starting from OxFFFFF, and the MAPPER module is located at a low level of the board-level core module, and the specific location is compiled. When determined.
1 )板级核心模块 (CORE): 设置为计算机系统加电后, 获得控制权, 初 始化板级设备, 包括中央处理器、 高速緩冲存储器、 内存控制器、 北桥及北 桥相关的设备和南桥及南桥相关的设备等, 输出系统信息, 跳转到所述 MAPPER模块, 所述系统信息包括所述计算机系统的硬件列表、 相应的端口 地址以及内存大小的信息, 还设置为: 保存所述操作系统接口模块的地址范 围 , 从该 MAPPER模块跳转回来 , 扫描操作系统接口模块的 Option ROM。  1) Board Level Core Module (CORE): Set to control the computer system after power up, initialize board level equipment, including central processing unit, cache memory, memory controller, north bridge and north bridge related equipment and south bridge And the south bridge related device, etc., output system information, and jump to the MAPPER module, the system information includes a hardware list of the computer system, a corresponding port address, and a memory size information, and is further configured to: save the The address range of the operating system interface module, jumps back from the MAPPER module, and scans the Option ROM of the operating system interface module.
2 ) MAPPER模块, 设置为: 执行内部的初始化函数完成自身的初始化, 读取并解析所述板级核心模块输出的系统信息, 根据所述系统信息创建和维 护可由所述操作系统接口(INTERFACE)模块识别的系统信息表格, 跳转到所 述板级核心模块, 维护中断服务向量表。  2) The MAPPER module is set to: execute an internal initialization function to complete its own initialization, read and parse the system information output by the board-level core module, and create and maintain according to the system information by the operating system interface (INTERFACE) The system information table identified by the module jumps to the board level core module and maintains the interrupt service vector table.
3 )操作系统接口模块 (INTERFACE): 从物理地址 OxDOOOO到 OxEFFFF , 设置为:釆用可选择性唯读记忆体 (Option ROM)模组方式实现中断服务例程, 该 Option ROM根据由该 MAPPER模块维护的系统信息表格依次进行初始 化。  3) Operating system interface module (INTERFACE): From the physical address OxDOOOO to OxEFFFF, set to: use the optional read-only memory (Option ROM) module mode to implement the interrupt service routine, the Option ROM is based on the MAPPER module. The maintained system information table is initialized in sequence.
本实施例的操作系统接口模块包含 3个 Option ROM , 每个 Option ROM 的大小是 512字节的整数倍。物理地址 OxDOOOO到 OxDFFFF范围内包含两个 Option ROM, 因此具有两个 Option ROM Header„ 这两个 Option ROM分别 提供了 INT 16H的键盘服务例程 (Keyboard Service)和 INT 15H的杂项服务例 程 (System Service)„ 对 Windows操作系统, 物理地址从 OxEOOOO到 OxEFFFF 范围的 Option ROM提供了 INT 13H的磁盘服务例程 (Disk Service)„本发明不 限定 Option ROM的大小,以及内存中服务例程 Option ROM在操作系统接口 模块范围内的摆放位置。 The operating system interface module of this embodiment includes three Option ROMs, each Option ROM. The size is an integer multiple of 512 bytes. The physical address OxDOOOO to OxDFFFF contains two Option ROMs, so there are two Option ROM Headers. These two Option ROMs provide the INT 16H keyboard service routine (Keyboard Service) and the INT 15H miscellaneous service routine (System). Service) „ For the Windows operating system, the Disk ROM of the INT 13H is provided by the Option ROM whose physical address ranges from OxEOOOO to OxEFFFF. The invention does not limit the size of the Option ROM, and the in-memory service routine Option ROM The location within the operating system interface module.
为了保证独立性, 以及为了该操作系统接口模块提供高级操作系统如 Windows操作系统和 Linux操作系统启动所需的兼容性支持, 该操作系统接 口模块还符合《即插即用 BIOS规范》 中的 ROM的标准格式。  In order to ensure independence, and to provide compatibility support for the operating system interface module to provide advanced operating systems such as Windows operating system and Linux operating system boot, the operating system interface module also conforms to the ROM in the Plug and Play BIOS Specification. The standard format.
该板级核心模块依次扫描该操作系统接口模块中的 Option ROM,扫描到 该操作系统接口模块中的 Option ROM Header, 查询该 Option ROM Header 中保存的签名, 根据该 Option ROM Header中保存的对应的服务例程大小的 信息对该 Option ROM整体进行奇偶校验, 如该奇偶校验和正确, 则根据该 Option ROM Header中提供的关于该 Option ROM对应的服务例程大小的信息 进行递增或递减搜索, 更新扫描算法的基址, 调用该 Option ROM的服务例 程初始化例程的入口函数, 跳转到该操作系统接口模块进行相应功能的初始 化。 如该奇偶校验和不正确, 该板级核心模块以 512字节为单位更新扫描算 法的基址。 该板级核心模块更新完所述扫描基址后还判断该基址是否超出该 操作系统接口模块的地址范围, 如是, 则表明所有 Option ROM已经初始化 完毕, 可以继续根据用户设置, 到软盘、 硬盘或 CD ROM中加载操作系统, 如否, 则扫描下一 Option ROM。  The board-level core module scans the Option ROM in the operating system interface module, scans the Option ROM Header in the operating system interface module, and queries the signature saved in the Option ROM Header according to the corresponding saved in the Option ROM Header. The information of the service routine size is parity-checked to the entire Option ROM. If the parity check is correct, the search or the search is performed according to the information about the size of the service routine corresponding to the Option ROM provided in the Option ROM Header. Update the base address of the scan algorithm, call the entry function of the service routine initialization routine of the Option ROM, and jump to the operating system interface module to initialize the corresponding function. If the parity check is incorrect, the board-level core module updates the base address of the scan algorithm in units of 512 bytes. After updating the scan base address, the board level core module further determines whether the base address exceeds the address range of the operating system interface module. If yes, it indicates that all Option ROMs have been initialized, and can continue to be based on user settings to the floppy disk and the hard disk. Or load the operating system in the CD ROM. If no, scan the next Option ROM.
该操作系统接口模块得到控制权, 即该 Option ROM的服务例程初始化 例程的函数入口被调用后, 执行该 Option ROM对应的服务例程的初始化例 程, 对该服务例程进行初始化, 该 Option ROM的服务例程初始化例程注册 该服务例程的入口地址到该 MAPPER模块维护的中断服务向量表,初始化完 成跳转回该板级核心模块。 该板级核心模块扫描下一 Option ROM, 初始化该 Option ROM对应的服务例程。  The operating system interface module obtains control, that is, after the function entry of the service routine initialization routine of the Option ROM is invoked, the initialization routine of the service routine corresponding to the Option ROM is executed, and the service routine is initialized. The service routine initialization routine of the Option ROM registers the entry address of the service routine to the interrupt service vector table maintained by the MAPPER module, and the initialization completes the jump back to the board-level core module. The board-level core module scans the next Option ROM and initializes the service routine corresponding to the Option ROM.
该操作系统接口模块还设置为: 该服务例程初始化过程中需要判断该服 务例程操作的相关硬件是否存在, 或查询端口地址或可用内存大小时, 查询 该 MAPPER模块维护的系统信息表格获得需要的信息。 如磁盘服务例程 INT13H初始化需要判断是否存在软盘、硬盘或光盘, 则该操作系统接口模块 查询该 MAPPER模块维护的系统信息表格中的硬件列表得到需要的信息,如 果存在相应的硬件, 则该 Option ROM对应的服务例程的初始化例程注册该 服务例程 INT13H的函数入口地址到该 MAPPER维护的中断服务向量表中。 对于 INT12H其用于向操作系统报告内存大小的信息,在 INT12H初始化过程 中, 该操作系统接口模块无需检测内存的大小, 直接从该 MAPPER模块维护 的系统信息表格中查询所述信息。 The operating system interface module is further configured to: determine the service during the initialization of the service routine If the relevant hardware of the routine operation exists, or when querying the port address or the available memory size, query the system information table maintained by the MAPPER module to obtain the required information. If the disk service routine INT13H needs to determine whether there is a floppy disk, a hard disk or a CD, the operating system interface module queries the hardware list in the system information table maintained by the MAPPER module to obtain the required information. If the corresponding hardware exists, the Option The initialization routine of the service routine corresponding to the ROM registers the function entry address of the service routine INT13H into the interrupt service vector table maintained by the MAPPER. For the INT12H information for reporting the memory size to the operating system, during the INT12H initialization process, the operating system interface module does not need to detect the size of the memory, and directly queries the information from the system information table maintained by the MAPPER module.
该板级核心模块、 MAPPER模块和操作系统接口模块均保存在非易失性 只读存储器中。  The board-level core module, MAPPER module, and operating system interface module are all stored in non-volatile read-only memory.
由于该 BIOS系统釆用 Option ROM模组方式实现操作系统启动或运行期 间所需要的服务, 本发明的 BIOS 系统是可扩展的, 可以根据需要设置一个 或多个 Option ROM及其所对应的服务例程。由于该开源 BIOS系统提供的服 务与工业界 PC BIOS功能相同, 因此能够与工业界 PC BIOS相兼容, 能够提 供与工业界 PC BIOS相兼容的软硬件接口。  The BIOS system of the present invention is extensible, and the one or more Option ROMs and their corresponding service examples can be set as needed, because the BIOS system uses the Option ROM module to implement services required during startup or operation of the operating system. Cheng. Because the open source BIOS system provides the same functionality as the industrial PC BIOS, it is compatible with industrial PC BIOS and provides a hardware and software interface compatible with industrial PC BIOS.
该开源 BIOS系统还包括系统检测模块、 BIOS可扩展固件接口(UEFI)模 块和系统调试工具模块。  The open source BIOS system also includes a system detection module, a BIOS Extensible Firmware Interface (UEFI) module, and a system debug tool module.
基于该开源 BIOS系统开发的固件 BIOS支持的计算机系统包括 X86兼 容处理器、 支持 PCI总线标准的计算机和高级操作系统, 如 Windows操作系 统和 Linux操作系统等, 包括但不限于 DOS、 Windows 98、 Windows 2000、 Windows XP、 Windows Vista、 Window 7和 Linux的各主 发行版本。  The computer system supported by the firmware BIOS based on the open source BIOS system includes an X86 compatible processor, a computer supporting the PCI bus standard, and an advanced operating system such as a Windows operating system and a Linux operating system, including but not limited to DOS, Windows 98, and Windows. 2000, Windows XP, Windows Vista, Window 7, and Linux major distributions.
实施例二 Embodiment 2
本实施例以 X86处理器为例, 基于开源 BIOS的 BIOS启动方法处理流 程如图 4所示, 包括以下步骤:  In this embodiment, the X86 processor is taken as an example, and the BIOS startup method processing process based on the open source BIOS is as shown in FIG. 4, and includes the following steps:
步骤 301 : 计算机系统加电, 中央处理器从 BIOS的物理地址 0xF000: OxFFFO处取指令, 调用板级核心模块并将控制权交给该板级核心模块, 拷贝 该板级核心模块和该 MAPPER模块到内存,该板级核心模块解压缩并拷贝该 操作系统接口模块到内存中, 对该计算机系统中的板级设备进行初始化, 并 输出系统信息; Step 301: The computer system is powered on, and the central processor fetches instructions from the physical address 0xF000: OxFFFO of the BIOS, invokes the board-level core module, and gives control to the board-level core module, copying The board level core module and the MAPPER module are in memory, the board level core module decompresses and copies the operating system interface module into the memory, initializes the board level device in the computer system, and outputs system information;
该系统信息包括该计算机系统的硬件列表、 相应的端口地址以及内存大 小的信息。  The system information includes a list of hardware of the computer system, corresponding port addresses, and information about the size of the memory.
该板级设备初始化完, 该板级核心模块调用该 MAPPER模块的入口函 数, 该 MAPPER模块执行该模块内部保存的初始化函数完成自身的初始化, 读取并解析所述板级核心模块输出的系统信息, 根据所述系统信息创建和维 护所述系统信息表格。 该表格包括该计算机系统的硬件列表、 相应的端口地 址以及内存大小的信息。 该 MAPPER模块还初始化 BIOS数据区中 (BDA)和 扩展 BIOS数据区 (EBDA)的数据, 维护该为启动操作系统所准备的表格包括 可编程中断请求 (PIRQ)表格和高级配置与电源接口(ACPI)表格等。 该板级核 心模块和该 MAPPER模块都是开源 BIOS相关的, 即其功能和结构都取决于 该开源 BIOS的功能和结构。  After the board level device is initialized, the board level core module invokes an entry function of the MAPPER module, and the MAPPER module performs an initialization function saved internally by the module to complete its own initialization, and reads and parses system information output by the board level core module. And creating and maintaining the system information table according to the system information. The table includes a list of hardware for the computer system, corresponding port addresses, and memory size information. The MAPPER module also initializes data in the BIOS data area (BDA) and extended BIOS data area (EBDA), maintains the table prepared for booting the operating system including the Programmable Interrupt Request (PIRQ) table and the Advanced Configuration and Power Interface (ACPI) ) forms, etc. The board-level core module and the MAPPER module are both open source BIOS-related, that is, their function and structure depend on the function and structure of the open source BIOS.
步骤 302 : 该板级核心模块设置扫描 Option ROM 算法扫描基址为 Step 302: The board core module is set to scan the Option ROM algorithm to scan the base address as
OxDOOOO, 并保存该扫描基址; OxDOOOO, and save the scan base address;
该操作系统接口模块包括多个 Option ROM,每个 Option ROM对应一个 服务例程, 该 Option ROM包括服务例程、 该服务例程的初始化例程和可选 择性唯读记忆体头 (Option ROM Header)。  The operating system interface module includes a plurality of Option ROMs, each Option ROM corresponding to a service routine, the Option ROM including a service routine, an initialization routine of the service routine, and an optional read-only memory head (Option ROM Header) ).
该服务例程的初始化例程包括该服务例程的入口地址信息; 该 Option The initialization routine of the service routine includes entry address information of the service routine;
ROM Header包括该服务例程的签名、大小和该服务例程的初始化例程地址的 信息。 该服务例程的大小信息是该服务例程未压缩时占内存空间的大小的信 息。 该 Option ROM的格式兼容工业《即插即用 BIOS规范》 。 The ROM Header includes information on the signature, size, and initialization routine address of the service routine. The size information of the service routine is information about the size of the memory space when the service routine is uncompressed. The format of the Option ROM is compatible with the industry "Plug and Play BIOS Specification".
步骤 303: 该板级核心模块根据保存的扫描算法基址扫描该操作系统接 口模块中的 Option ROM, 并进行奇偶校验;  Step 303: The board-level core module scans the Option ROM in the operating system interface module according to the saved scan algorithm base address, and performs parity check.
该板级核心模块扫描地址 OxDOOOO处的 Option ROM Header, 查询其是 否包含签名 "55AA" , 如是, 则确定该地址处存在一个 Option ROM, 否则, 该板级核心模块以 512字节为单位更新扫描的基址。 该板级核心模块确定地 址处存在一个 Option ROM,还查询该 Option ROM Header中保存的该服务例 程大小的信息,根据该 Option ROM的大小,对该 Option ROM整体进行奇偶 校验。 The board-level core module scans the Option ROM Header at the address OxDOOOO to check whether it contains the signature "55AA". If yes, it determines that there is an Option ROM at the address. Otherwise, the board-level core module updates the scan in units of 512 bytes. Base address. The board level core module is definitely An Option ROM exists in the address, and the information about the size of the service routine stored in the Option ROM Header is also queried, and the entire Option ROM is parity-checked according to the size of the Option ROM.
步骤 304: 该板级核心模块判断该奇偶校验和是否正确, 正确, 执行步 骤 305, 否则, 执行步骤 306;  Step 304: The board level core module determines whether the parity check is correct, correct, step 305 is performed, otherwise, step 306 is performed;
对该 Option ROM整体进行奇偶校验是为了保证数据的完整性, 其他用 于保证数据完整性的校验算法, 如 CRC算法也适用于本发明所述的方法。  The parity of the Option ROM as a whole is to ensure data integrity, and other verification algorithms for ensuring data integrity, such as the CRC algorithm, are also applicable to the method of the present invention.
步骤 305: 该板级核心模块初始化该 Option ROM, 执行步骤 307;  Step 305: The board-level core module initializes the Option ROM, and performs step 307;
该板级核心模块根据该 Option ROM Header中表示该 Option ROM大小 的信息, 更新扫描 Option ROM算法的起始地址, 调用该 Option ROM Header 中指定的该 Option ROM对应的服务例程的初始化例程的函数入口, 初始化 该服务例程。 该 Option ROM对应的服务例程的初始化例程注册该服务例程 的入口地址到该 MAPPER模块维护的中断服务向量表 (IVT)中。  The board-level core module updates the start address of the scan Option ROM algorithm according to the information indicating the size of the Option ROM in the Option ROM Header, and invokes the initialization routine of the service routine corresponding to the Option ROM specified in the Option ROM Header. Function entry, initialize the service routine. The initialization routine of the service routine corresponding to the Option ROM registers the entry address of the service routine into the interrupt service vector table (IVT) maintained by the MAPPER module.
该服务例程初始化过程中需要判断该服务例程操作的相关硬件是否存 在,或查询端口地址或可用内存大小时 ,该操作系统接口模块查询该 MAPPER 模块维护的系统信息表格获得需要的信息。 如磁盘服务例程 INT13H初始化 需要判断是否存在软盘、硬盘或光盘,则该操作系统接口模块查询该 MAPPER 模块维护的系统信息表格中的硬件列表得到需要的信息, 如果存在相应的硬 件 , 则该 Option ROM对应的服务例程的初始化例程注册该服务例程 INT13H 的函数入口地址到该 MAPPER模块维护的中断服务向量表中。 对于 INT12H 其用于向操作系统报告内存大小的信息, 在 INT12H初始化过程中, 该操作 系统接口模块无需检测内存的大小,直接从该 MAPPER模块维护的系统信息 表格中查询所述信息。  When the service routine needs to determine whether the relevant hardware of the operation of the service routine exists, or when the port address or the available memory size is queried, the operating system interface module queries the system information table maintained by the MAPPER module to obtain the required information. If the disk service routine INT13H needs to determine whether there is a floppy disk, a hard disk or a CD, the operating system interface module queries the hardware list in the system information table maintained by the MAPPER module to obtain the required information. If there is corresponding hardware, the Option The initialization routine of the service routine corresponding to the ROM registers the function entry address of the service routine INT13H into the interrupt service vector table maintained by the MAPPER module. For INT12H, which is used to report the memory size to the operating system, during the INT12H initialization process, the operating system interface module does not need to detect the size of the memory, and directly queries the system information table maintained by the MAPPER module.
步骤 306: 该板级核心模块以 512字节为单位, 对该扫描 Option ROM算 法的基址递增 1个单位, 执行步骤 307;  Step 306: The board-level core module is incremented by 1 unit in units of 512 bytes, and the base address of the scan Option ROM algorithm is incremented by one unit, and step 307 is performed;
步骤 307: 判断扫描算法基址是否大于 OxEFFFF, 是, 则执行步骤 308, 否则, 执行步骤 303;  Step 307: Determine whether the scan algorithm base address is greater than OxEFFFF, if yes, go to step 308, otherwise, go to step 303;
由于板级核心模块的物理地址从 0xF0000开始, 因此, 对操作系统接口 模块中 Option ROM的扫描不能超过该地址, 如果该扫描算法基址是否大于 OxEFFFF, 说明所有 Option ROM已经扫描完毕。 Since the physical address of the board-level core module starts from 0xF0000, therefore, the operating system interface The scan of the Option ROM in the module cannot exceed the address. If the base address of the scan algorithm is greater than OxEFFFF, all Option ROMs have been scanned.
步骤 308: 该操作系统接口模块初始化完毕后, 该板级核心模块根据用 户的设置, 从指定的地址加载操作系统, 该指定的地址为软盘、 硬盘或 CD ROM;  Step 308: After the operating system interface module is initialized, the board core module loads the operating system from the specified address according to the user's setting, and the specified address is a floppy disk, a hard disk, or a CD ROM;
步骤 309: 引导并运行操作系统。  Step 309: Boot and run the operating system.
该操作系统接口模块初始化各服务模块后,将控制权交给该 MAPPER模 块, 该 MAPPER模块通过函数调用, 执行 INT19H中断处理例程, 该例程输 出显示信息, 提示用户输入信息选择启动, 进行操作系统的引导。  After the operating system interface module initializes each service module, the control right is given to the MAPPER module, and the MAPPER module executes an INT19H interrupt processing routine through a function call, and the routine outputs display information, prompting the user to input information to select to start, and operate. The guidance of the system.
上述步骤 303-306该计算机系统启动过程中该板级核心模块初始化操作 系统接口模块中的 Option ROM的处理如图 5所示,该 Option ROM对应的服 务例程以磁盘服务例程 INT13H为例, 具体包括以下步骤: The processing of the Option ROM in the operating system interface module of the board-level core module is as shown in FIG. 5, and the service routine corresponding to the Option ROM uses the disk service routine INT13H as an example. Specifically, the following steps are included:
步骤 401 : 该板级核心模块扫描该操作系统接口模块中的一个 Option ROM, 扫描到该 Option ROM的签名 "55AA" ;  Step 401: The board-level core module scans an Option ROM in the operating system interface module, and scans the signature of the Option ROM "55AA";
步骤 402:根据该 Option ROM Header中表示该 Option ROM对应的服务 例程的大小的信息计算整个该 Option ROM的奇偶校验和;  Step 402: Calculate a parity checksum of the entire Option ROM according to the information indicating the size of the service routine corresponding to the Option ROM in the Option ROM Header.
该 Option ROM的数据单元以 512字节为单位,该 Option ROM对应的服 务例程的大小为 512字节的整数倍。  The data unit of the Option ROM is in units of 512 bytes, and the size of the service routine corresponding to the Option ROM is an integer multiple of 512 bytes.
步骤 403: 判断该奇偶校验和是否正确, 是, 则执行步骤 405, 否则执行 步骤 404;  Step 403: Determine whether the parity check is correct, if yes, go to step 405, otherwise go to step 404;
步骤 404: 以 512字节为单位, 对该扫描 Option ROM算法的起始地址递 增 1个单位, 执行步骤 409;  Step 404: In increments of 512 bytes, the starting address of the scanning Option ROM algorithm is incremented by one unit, and step 409 is performed;
步骤 405:根据该 Option ROM Header中该 Option ROM大小的信息更新 该扫描 Option ROM算法的基址, 调用该 Option ROM Header 中指定的该 Option ROM即 INT13H的函数入口, 调用并执行该 INT13H服务例程的初始 化例程,初始化中断服务例程 INT13H并注册 INT13H服务例程的入口地址到 到该 MAPPER模块维护的中断服务向量表中; 步骤 406-408均为该操作系统接口模块中该 Option ROM相关的处理。 步骤 406:控制权交给该操作系统接口模块中的该 Option ROM, INT13H;Step 405: Update the base address of the scan Option ROM algorithm according to the Option ROM size information in the Option ROM Header, call the Option ROM specified in the Option ROM Header, that is, the function entry of the INT13H, and call and execute the INT13H service routine. Initialization routine, initializes the interrupt service routine INT13H and registers the entry address of the INT13H service routine into the interrupt service vector table maintained by the MAPPER module; Steps 406-408 are all related to the Option ROM in the operating system interface module. Step 406: The control is given to the Option ROM in the operating system interface module, INT13H;
INT13H对于大型商业非开源操作系统, 如 Windows操作系统, 至关重 要, 该服务负责引导整个操作系统运行。 INT13H is critical for large commercial non-open source operating systems, such as the Windows operating system, which is responsible for booting the entire operating system.
步骤 407:该 Option ROM检测和初始化 INT13H相关的硬件,包括软盘、 硬盘和光盘 CD ROM, 初始化相应的控制器;  Step 407: The Option ROM detects and initializes INT13H related hardware, including a floppy disk, a hard disk, and a CD ROM, and initializes a corresponding controller;
该 Option ROM通过读取硬件寄存器信息检查这些硬件是否损坏, 检测 和初始化完毕, 修改中断向量表中的相应向量 INT13H*4, 将该 Option ROM 的服务例程的入口地址写入中断服务向量表中, 该入口地址可以以段值和偏 移的形式写入该中断服务向量表, 并将检测得到的硬件信息保存在非易失性 存储器中, 如互补型金属氧化物半导体 (CMOS), 以便操作系统使用。  The Option ROM checks whether the hardware is damaged by reading the hardware register information, detects and initializes, and modifies the corresponding vector INT13H*4 in the interrupt vector table, and writes the entry address of the service routine of the Option ROM into the interrupt service vector table. The entry address can be written to the interrupt service vector table in the form of segment values and offsets, and the detected hardware information is stored in a non-volatile memory, such as a complementary metal oxide semiconductor (CMOS), for operation. System use.
步骤 408: 当前 Option ROM放弃控制权, 将该控制权交还给该板级核心 模块;  Step 408: The current Option ROM gives up the control right, and returns the control right to the board core module;
步骤 409: 该板级核心模块重新获得控制权, 进行扫描下一个 Option ROM, 进行该下一个 Option ROM的检测。  Step 409: The board core module regains control and scans the next Option ROM to perform detection of the next Option ROM.
本发明实施方式的板级核心模块和操作系统接口模块都支持 Option ROM Header格式, 并利用该 Option ROM Header中的信息进行通信。 由于该 操作系统接口模块中的 Option ROM独立于板级核心模块, 因此本发明可以 方便地为开源 BIOS支持非开源操作系统, 如 Windows操作系统, 提供必要 的支持。 而且本发明该板级核心模块和该操作系统接口模块釆用的开发环境 可以相同亦可以不同, 该开发环境包括: 编程语言、 编译环境和交叉编译需 求等。  Both the board-level core module and the operating system interface module of the embodiment of the present invention support the Option ROM Header format, and communicate using the information in the Option ROM Header. Since the Option ROM in the operating system interface module is independent of the board level core module, the present invention can conveniently provide the necessary support for the open source BIOS to support non-open source operating systems, such as the Windows operating system. Moreover, the development environment of the board-level core module and the operating system interface module of the present invention may be the same or different, and the development environment includes: a programming language, a compilation environment, and a cross-compilation requirement.
由于大多数开源 BIOS对板级设备支持较好, 上述方法只需对现有开源 BIOS做少量修改进行扩展, 即可实现该板级核心模块的功能。  Since most open source BIOS supports board-level devices better, the above method only needs to make a small modification to the existing open source BIOS to extend the functionality of the board-level core module.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现, 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。 One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct the associated hardware, such as a read only memory, a magnetic disk, or an optical disk. Optionally, all or part of the steps of the above embodiments may also be used. One or more integrated circuits are implemented. Correspondingly, each module/unit in the above embodiment may be implemented in the form of hardware or in the form of a software function module. The invention is not limited to any specific form of combination of hardware and software.
以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。  The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性 Industrial applicability
上述实施方式中板级核心模块 (CORE)选择开源基本输入输出系统 (BIOS) 初始化板级设备, 输出系统信息, 该系统信息包括内存大小和设备类型等, 该操作系统接口模块中的中断服务例程( Interrupt Service Routine )釆用 Option ROM模组方式实现,该中断服务例程根据由所述系统信息转换得到可由该操 作系统接口(INTERFACE)模块识别的系统信息表格依次初始化, 并注册该中 断服务例程至中断向量表中。 通过扩展开源 BIOS 的架构, 引入板级核心模 块抽象层 (MAPPER)模块作为板级核心模块和操作系统接口模块之间的接口, 并且操作系统接口模块釆用 Option ROM模组方式实现计算机操作系统启动 所需的服务例程,开发出操作系统接口模块和开源 BIOS相结合的 BIOS系统, 不仅能够支持开源操作系统, 也能够支持非开源商业操作系统, 如 Windows 操作系统等, 具有很好的兼容性。  In the above embodiment, the board level core module (CORE) selects an open source basic input/output system (BIOS) to initialize a board level device, and outputs system information, and the system information includes a memory size and a device type, and an interrupt service example in the operating system interface module. The Interrupt Service Routine is implemented by using an Option ROM module, and the interrupt service routine is sequentially initialized according to the system information table recognized by the operating system interface (INTERFACE) module by the system information conversion, and the interrupt service is registered. The routine is in the interrupt vector table. By extending the architecture of the open source BIOS, the board level core module abstraction layer (MAPPER) module is introduced as the interface between the board level core module and the operating system interface module, and the operating system interface module uses the Option ROM module mode to implement the computer operating system boot. The required service routines, the development of a combination of operating system interface module and open source BIOS BIOS system, not only can support open source operating systems, but also support non-open source commercial operating systems, such as Windows operating systems, etc., with good compatibility .

Claims

权 利 要 求 书 Claim
1、 一种基本输入输出系统(BIOS)启动方法, 其包括: 1. A basic input/output system (BIOS) booting method, comprising:
BIOS 的操作系统接口(INTERFACE)模块的中断服务例程釆用可选择性唯 读记忆体(Op t i on ROM)模组 (Modu 1 e)方式实现;  The interrupt service routine of the BIOS operating system interface (INTERFACE) module is implemented by an optional read-only memory (Modt 1 e) module (Modu 1 e);
在计算机系统加电时,所述 BIOS的板级核心模块(CORE)初始化板级设备 并输出系统信息,所述 BIOS的板级核心模块抽象层(MAPPER)模块根据所述系 统信息转换得到可由所述操作系统接口模块识别的系统信息表格, 所述板级 核心模块对所述操作系统接口模块包含的所述中断服务例程根据所述系统信 息表格中的信息依次进行初始化, 所述系统信息包括所述计算机系统的硬件 列表、 相应的端口地址以及内存大小的信息。  When the computer system is powered on, the BIOS-level board-level core module (CORE) initializes the board-level device and outputs system information, and the BIOS's board-level core module abstraction layer (MAPPER) module converts the system information according to the system information. a system information table identified by the operating system interface module, wherein the board level core module sequentially initializes the interrupt service routine included in the operating system interface module according to information in the system information table, where the system information includes The hardware list of the computer system, the corresponding port address, and the information of the memory size.
2、根据权利要求 1所述的方法,其中,所述操作系统接口模块釆用 Op t i on ROM Module方式实现所述中断服务例程包括, 所述操作系统接口模块包括多 个 Opt ion ROM, 每个 Opt ion ROM对应一个月良务例程, 所述 Opt ion ROM包括 所述服务例程、所述服务例程的初始化例程和可选择性唯读记忆体头(Opt ion ROM Header) , 所述服务例程的初始化例程包括所述服务例程的入口地址信 息, 所述 Opt ion ROM Header包括所述 Opt ion ROM的大小和所述服务例程的 初始化例程地址的信息。  2. The method according to claim 1, wherein the operating system interface module implements the interrupt service routine by using an Op ti on ROM Module method, wherein the operating system interface module comprises a plurality of Opt ion ROMs, each The Opt ion ROM corresponds to a one-month service routine, the Opt ion ROM includes the service routine, an initialization routine of the service routine, and an optional read-only memory head (Opt ion ROM Header). The initialization routine of the service routine includes entry address information of the service routine, and the Option ROM Header includes information of a size of the Opt ion ROM and an initialization routine address of the service routine.
3、 根据权利要求 1所述的方法, 其中, 所述板级核心模块为可扩展开源 BIOS; 所述 MAPPER模块是所述开源 BIOS相关的。  3. The method according to claim 1, wherein the board level core module is an extensible open source BIOS; and the MAPPER module is related to the open source BIOS.
4、 根据权利要求 1或 2或 3所述的方法, 其中, 所述板级核心模块还保 存所述操作系统接口模块的地址范围, 所述 Opt ion ROM依次进行初始化的步 骤包括:  The method according to claim 1 or 2 or 3, wherein the board level core module further saves an address range of the operating system interface module, and the step of initializing the Opt ion ROM in sequence comprises:
所述 MAPPER模块初始化完成后,所述板级核心模块根据所述 Opt ion ROM 规定的数据单元的大小在所述操作系统接口模块的地址范围内扫描所述操 作系统接口模块,扫描到第一个 Opt ion ROM,调用所述 Opt ion ROM的 Opt ion ROM Header中指定的所述 Opt ion ROM的良务例程初始化例程的函数入口, 初始化所述 Opt ion ROM对应的服务例程;  After the MAPPER module is initialized, the board core module scans the operating system interface module within the address range of the operating system interface module according to the size of the data unit specified by the Opt ion ROM, and scans to the first Opting the ROM, calling a function entry of the service routine initialization routine of the Opt ion ROM specified in the Opt ion ROM Header of the Opt ion ROM, and initializing a service routine corresponding to the Opt ion ROM;
所述 Opt ion ROM初始化完成后, 所述板级核心模块扫描所述操作系统接 口模块中所述 Opt ion ROM的下一 Opt ion ROM, 调用当前扫描的所述 Opt ion ROM的 Opt ion ROM Header中指定的所述 Opt ion ROM的服务例程初始化例程 的函数入口, 初始化当前所述 Opt ion ROM对应的服务例程, 直到所述操作系 统接口模块最后一个 Opt ion ROM对应的服务例程初始化完毕。 After the initialization of the Opt ion ROM is completed, the board level core module scans the operating system to connect The next Opt ion ROM of the Opt ion ROM in the port module, calling the function entry of the service routine initialization routine of the Opt ion ROM specified in the Opt ion ROM Header of the Opt ion ROM currently scanned, initializing the current The service routine corresponding to the Opt ion ROM is initialized until the service routine corresponding to the last Opt ion ROM of the operating system interface module is initialized.
5、 根据权利要求 4所述的方法, 其中, 所述 Opt ion ROM Header中还包 含签名信息, 所述板级核心模块判断扫描到所述 Opt ion ROM的步骤包括: 所述板级核心模块根据所述 Opt ion ROM规定的数据单元的大小在所述操 作系统接口模块的地址范围内扫描所述操作系统接口模块, 如检测前两个字 节为所述签名信息, 则扫描到一个所述 Opt ion R0M。 The method according to claim 4, wherein the Opt ion ROM header further includes signature information, and the step of the board core module determining to scan the Opt ion ROM comprises: the board level core module according to The size of the data unit specified by the Opt ion ROM scans the operating system interface module within an address range of the operating system interface module. If the first two bytes are detected as the signature information, one of the Opt is scanned. Ion R0M.
6、根据权利要求 5所述的方法,其中,所述板级核心模块扫描所述 Opt ion6. The method of claim 5 wherein said board level core module scans said Opt ion
ROM, 扫描到所述签名后, 还根据所述 Opt ion ROM Header中保存的对应的服 务例程大小的信息对所述 Opt ion ROM整体进行奇偶校验, 如所述奇偶校验和 正确, 则初始化所述 Opt ion ROM对应的服务例程。 After scanning the signature, the ROM further performs parity check on the entire Opt ion ROM according to the information about the size of the corresponding service routine stored in the Opt ion ROM header, and if the parity check is correct, Initializing the service routine corresponding to the Opt ion ROM.
7、 根据权利要求 6所述的方法, 所述方法还包括: 如所述奇偶校验和正 确, 所述板级核心模块初始化所述 Opt ion ROM对应的服务例程后, 还根据所 述 Opt ion ROM Header保存的所述服务例程大小的信息更新 Opt ion ROM扫描 算法的基址; 7. The method according to claim 6, the method further comprising: after the parity check is correct, the board level core module initializes a service routine corresponding to the Opt ion ROM, and further according to the Opt The information of the size of the service routine saved by the ion ROM Header updates the base address of the Opt ion ROM scanning algorithm;
如所述奇偶校验和不正确, 所述板级核心模块以所述 Opt ion ROM Header 中提供的数据单元大小为单位更新 Opt ion ROM扫描算法的基址;  If the parity check is incorrect, the board core module updates the base address of the Opt ion ROM scanning algorithm in units of data unit sizes provided in the Opt ion ROM Header;
所述板级核心模块更新完所述扫描算法的基址后还判断所述基址是否超 出所述操作系统接口模块的地址范围, 如是, 则根据用户设置, 到软盘、 硬 盘或 CD ROM中加载操作系统, 如否, 则扫描下一 Opt ion R0M。  After updating the base address of the scanning algorithm, the board-level core module further determines whether the base address exceeds an address range of the operating system interface module, and if so, loads the file into a floppy disk, a hard disk, or a CD ROM according to user settings. The operating system, if no, scans the next Opt ion R0M.
8、 根据权利要求 1或 2或 3所述的方法, 其中, 所述 Opt ion ROM对应 服务例程的根据所述系统信息表格进行初始化的步骤包括:  The method according to claim 1 or 2 or 3, wherein the step of initializing the Opt ion ROM corresponding to the service routine according to the system information table comprises:
所述服务例程初始化过程中需要判断所述服务例程操作的相关硬件是否 存在, 或查询端口地址或可用内存大小时, 所述操作系统接口模块通过查询 所述 MAPPER模块维护的系统信息表格获得需要的信息,所述系统信息表格存 储在 BIOS数据区或非易失性存储器 ( Non-Volat i le RAM ) 中。 The operating system interface module obtains the system information table maintained by the MAPPER module by querying the system information table maintained by the MAPPER module when the service routine needs to determine whether the related hardware of the service routine operation exists or when the port address or the available memory size is queried. Required information, the system information table is stored Stored in the BIOS data area or non-volatile memory (Non-Volat i le RAM).
9、 根据权利要求 4所述的方法, 其中, 所述 Opt ion ROM对应的服务例 程初始化时, 还包括所述 Opt ion ROM中的服务例程初始化例程注册所述服务 例程的入口地址到中断服务向量表( Interrupt Vector Table ) 中, 所述中 断服务向量表由所述 MAPPER模块维护。  9. The method according to claim 4, wherein the service routine corresponding to the Opt ion ROM is initialized, further comprising a service routine initialization routine in the Opt ion ROM registering an entry address of the service routine In the Interrupt Vector Table, the interrupt service vector table is maintained by the MAPPER module.
10、 根据权利要求 1所述的方法, 其中, 所述操作系统接口模块的中断 月良务例程为计算机操作系统启动所必须的服务例程, 包括图形服务例程 10. The method according to claim 1, wherein the interrupt service routine of the operating system interface module is a service routine necessary for starting a computer operating system, including a graphics service routine.
INT10H, 获取内存大小服务例程 INT12H, 磁盘服务例程 INT13H, 杂项服务例 程 INT15H、 键盘服务例程 INT16H和外部设备互联总线设备基本输入输出系 统 (PCI BIOS)服务例程 INT1AH等。 INT10H, get memory size service routine INT12H, disk service routine INT13H, miscellaneous service routine INT15H, keyboard service routine INT16H and external device interconnect bus device basic input/output system (PCI BIOS) service routine INT1AH, etc.
11、 一种基本输入输出系统(BIOS)启动系统, 其包括板级核心模块、 板 级核心模块抽象层(MAPPER)模块和操作系统接口模块, 其中: 11. A basic input/output system (BIOS) booting system, comprising a board level core module, a board level core module abstraction layer (MAPPER) module, and an operating system interface module, wherein:
所述板级核心模块设置为: 计算机系统加电后, 初始化板级设备并输出 系统信息, 所述系统信息包括所述计算机系统的硬件列表、 相应的端口以及 内存大小的信息;  The board level core module is configured to: after the computer system is powered on, initialize the board level device and output system information, where the system information includes a hardware list of the computer system, a corresponding port, and a memory size information;
所述 MAPPER模块设置为:根据所述系统信息转换得到可由所述操作系统 接口模块识别的系统信息表格;  The MAPPER module is configured to: convert, according to the system information, a system information table that is identifiable by the operating system interface module;
所述操作系统接口模块设置为: 釆用可选择性唯读记忆体(Opt ion ROM) 模组(Module)方式实现中断服务例程, 根据所述系统信息表格依次进行初始 化所述中断服务例程。  The operating system interface module is configured to: implement an interrupt service routine by using an optional Opto-Ion module (Module) module, and sequentially initialize the interrupt service routine according to the system information table. .
12、 根据权利要求 11所述的系统, 其中, 所述操作系统接口模块包括多 个 Opt ion ROM, 每个 Opt ion ROM对应一个月良务例程, 所述 Opt ion ROM包括 服务例程本身、所述服务例程的初始化例程和可选择性唯读记忆体头(Opt ion ROM Header) , 其中, 12. The system according to claim 11, wherein the operating system interface module comprises a plurality of Opt ion ROMs, each Opt ion ROM corresponding to a one-month service routine, the Opt ion ROM comprising a service routine itself, An initialization routine of the service routine and an optional read-only memory header (Opt ion ROM Header), wherein
所述服务例程的初始化例程设置为:保存所述服务例程的入口地址信息, 配置硬件, 并注册所述服务例程的入口地址信息至中断向量表中;  The initialization routine of the service routine is configured to: save entry address information of the service routine, configure hardware, and register entry address information of the service routine into an interrupt vector table;
所述 Opt ion ROM Header设置为: 保存所述服务例程的大小和所述服务 例程的初始化例程地址的信息。 The Opt ion ROM Header is set to: save the size of the service routine and the service The initialization routine address information for the routine.
13、 根据权利要求 11所述的系统, 其中, 13. The system according to claim 11, wherein
所述板级核心模块还设置为: 初始化板级设备后, 跳转到所述 MAPPER模 块, 所述板级核心模块是可扩展开源 BIOS;  The board level core module is further configured to: after initializing the board level device, jump to the MAPPER module, where the board level core module is an expandable open source BIOS;
所述 MAPPER模块还设置为: 执行内部的初始化函数完成自身的初始化, 读取并解析所述板级核心模块输出的系统信息, 根据所述系统信息创建和维 护所述系统信息表格, 跳转到所述板级核心模块, 所述 MAPPER模块是所述开 源 BIOS相关的。  The MAPPER module is further configured to: perform an initialization function of the internal initialization function, read and parse the system information output by the board level core module, create and maintain the system information table according to the system information, and jump to The board level core module, the MAPPER module is related to the open source BIOS.
14、 根据权利要求 11或 12或 13所述的系统, 其中, 14. The system according to claim 11 or 12 or 13, wherein
所述板级核心模块还设置为: 保存所述操作系统接口模块的地址范围, 初始化 INTERFACE模块, 4艮据所述地址范围扫描所述 INTERFACE模块, 扫描 到第一个 Opt ion ROM, 保存所述 Opt ion ROM的基址, 调用所述 Opt ion ROM 的 Opt ion ROM Header中指定的所述 Opt ion ROM的服务例程初始化例程的函 数入口, 从所述 Opt ion ROM跳转回来, 扫描所述操作系统接口模块中所述 Opt ion ROM的下一 Opt ion ROM, 才艮据当前扫描的所述 Opt ion ROM的 Opt ion ROM Header 中指定的所述 Opt ion ROM的大小, 更新所述扫描算法的基址, 并判断所述基址是否超出所述操作系统接口模块的地址范围, 如是, 则根据 用户设置,到软盘、硬盘或 CD ROM中加载操作系统,如否,则扫描当前 Opt ion ROM的下一 Opt ion ROM;  The board level core module is further configured to: save an address range of the operating system interface module, initialize an INTERFACE module, scan the INTERFACE module according to the address range, scan to a first Opt ion ROM, save the a base address of the Opt ion ROM, calling a function entry of a service routine initialization routine of the Opt ion ROM specified in an Opt ion ROM Header of the Opt ion ROM, jumping back from the Opt ion ROM, scanning the The next Opt ion ROM of the Opt ion ROM in the operating system interface module updates the scanning algorithm according to the size of the Opt ion ROM specified in the Opt ion ROM Header of the Opt ion ROM currently scanned. Base address, and determining whether the base address exceeds an address range of the operating system interface module, and if so, loading an operating system into a floppy disk, a hard disk, or a CD ROM according to user settings, and if not, scanning the current Opt ion ROM Next Opt ion ROM;
所述 MAPPER模块还设置为: 维护 BIOS数据区和中断服务向量表; 所述操作系统接口模块还设置为: 所述 Opt ion ROM的服务例程初始化例 程的函数入口被调用时,执行所述 Opt ion ROM对应的服务例程的初始化例程, 对所述服务例程进行初始化, 初始化完成跳回所述板级核心模块;  The MAPPER module is further configured to: maintain a BIOS data area and an interrupt service vector table; the operating system interface module is further configured to: when the function entry of the service routine initialization routine of the Opt ion ROM is invoked, perform the An initialization routine of the service routine corresponding to the Opt ion ROM, initializing the service routine, and completing the initialization to jump back to the board level core module;
所述操作系统接口模块的所述 Opt ion ROM的服务例程初始化例程还设置 为注册所述服务例程的入口地址到所述中断服务向量表。  The service routine initialization routine of the Option ROM of the operating system interface module is further configured to register an entry address of the service routine to the interrupt service vector table.
15、 根据权利要求 10或 11或 12所述的系统, 其中, 所述 Opt ion ROM Header中还包含签名信息, 所述板级核心模块还设置为: 根据所述 INTERFACE模块地址范围扫描所 述 INTERFACE模块, 如检测前两个字节为所述签名信息, 则扫描到一个所述 Opt ion ROM, 根据所述 Opt ion ROM Header中保存的对应的服务例程大小的 信息对所述 Opt ion ROM整体进行奇偶校验, 如所述奇偶校验和正确, 则调用 所述 Opt ion ROM的 Opt ion ROM Header中指定的所述 Opt ion ROM的服务例 程初始化例程的函数入口, 根据所述 Opt ion ROM Header保存的所述服务例 程大小的信息更新扫描算法的基址; 如所述奇偶校验和不正确, 以 512字节 为单位更新扫描算法的基址, 更新完所述扫描的基址后还判断所述基址是否 超出所述操作系统接口模块的地址范围, 如是, 则根据用户设置, 到软盘、 硬盘或 CD ROM中加载操作系统, 如否, 则扫描下一 Opt ion R0M。 The system according to claim 10 or 11 or 12, wherein the Opt ion ROM Header further includes signature information. The board level core module is further configured to: scan the INTERFACE module according to the INTERFACE module address range, and if the first two bytes are detected as the signature information, scan the Opt ion ROM according to the Opt The information of the corresponding service routine size saved in the ion ROM header is parity-checked to the entire Opt ion ROM. If the parity is correct, the Opt ion ROM header specified in the Opt ion ROM is called. a function entry of the service routine initialization routine of the Opt ion ROM, updating a base address of the scan algorithm according to the information of the size of the service routine saved by the Opt ion ROM Header; if the parity check is incorrect, Updating the base address of the scanning algorithm in units of 512 bytes, and after updating the base address of the scan, determining whether the base address exceeds an address range of the operating system interface module, and if so, according to user settings, to a floppy disk, Load the operating system on the hard disk or CD ROM. If no, scan the next Opt ion R0M.
16、 根据权利要求 10或 11或 12所述的系统, 其中, 16. The system according to claim 10 or 11 or 12, wherein
所述操作系统接口模块还设置为: 所述服务例程初始化过程中需要判断 所述服务例程操作的相关硬件是否存在或查询端口地址或可用内存大小时, 查询所述 MAPPER模块维护的系统信息表格获得需要的信息。  The operating system interface module is further configured to: query the system information maintained by the MAPPER module when it is necessary to determine whether the related hardware of the service routine operation exists or query the port address or the available memory size during the initialization of the service routine The form gets the information you need.
PCT/CN2011/080541 2011-05-16 2011-10-08 System and method for bios booting WO2012155439A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110126311.9A CN102169446B (en) 2011-05-16 2011-05-16 BIOS (basic input/output system) system and method based on basic input/output system of open source system
CN201110126311.9 2011-05-16

Publications (1)

Publication Number Publication Date
WO2012155439A1 true WO2012155439A1 (en) 2012-11-22

Family

ID=44490612

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/080541 WO2012155439A1 (en) 2011-05-16 2011-10-08 System and method for bios booting

Country Status (2)

Country Link
CN (1) CN102169446B (en)
WO (1) WO2012155439A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169446B (en) * 2011-05-16 2014-01-15 北京北大众志微系统科技有限责任公司 BIOS (basic input/output system) system and method based on basic input/output system of open source system
CN105955822A (en) * 2016-04-22 2016-09-21 浪潮电子信息产业股份有限公司 Method for improving space utilization rate of BIOS Legacy Option ROM
CN108460282A (en) * 2017-02-22 2018-08-28 北京大学 A kind of computer safety start method based on multi-core chip
CN107832238B (en) * 2017-10-09 2021-08-31 江苏航天龙梦信息技术有限公司 Cache memory method based on Loongson processor platform
CN109032581A (en) * 2018-07-19 2018-12-18 北京首汽智行科技有限公司 The integrated approach of multimode project

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030023812A1 (en) * 2001-06-19 2003-01-30 Nalawadi Rajeev K. Initialization with caching
CN1977243A (en) * 2004-06-30 2007-06-06 英特尔公司 System and method for simulating real-mode memory access with access to extended memory
CN102033763A (en) * 2010-11-26 2011-04-27 武汉噢易科技有限公司 Method for realizing network communication by utilizing universal network driver interface (UNDI)
CN102169446A (en) * 2011-05-16 2011-08-31 北京北大众志微系统科技有限责任公司 BIOS (basic input/output system) system and method based on basic input/output system of open source system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5671413A (en) * 1994-10-31 1997-09-23 Intel Corporation Method and apparatus for providing basic input/output services in a computer
CN101609406B (en) * 2009-07-17 2012-07-04 浪潮电子信息产业股份有限公司 Multi-BIOS mapping parallel initialization method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030023812A1 (en) * 2001-06-19 2003-01-30 Nalawadi Rajeev K. Initialization with caching
CN1977243A (en) * 2004-06-30 2007-06-06 英特尔公司 System and method for simulating real-mode memory access with access to extended memory
CN102033763A (en) * 2010-11-26 2011-04-27 武汉噢易科技有限公司 Method for realizing network communication by utilizing universal network driver interface (UNDI)
CN102169446A (en) * 2011-05-16 2011-08-31 北京北大众志微系统科技有限责任公司 BIOS (basic input/output system) system and method based on basic input/output system of open source system

Also Published As

Publication number Publication date
CN102169446A (en) 2011-08-31
CN102169446B (en) 2014-01-15

Similar Documents

Publication Publication Date Title
US9501289B2 (en) Method of a UEFI firmware and computer system thereof
JP6124994B2 (en) Method and system for restoring from legacy OS environment to Unified Extensible Firmware Interface (UEFI) pre-boot environment, and computer program
US10139876B2 (en) Efficient reboot of an operating system executed in a virtual machine
US7017039B2 (en) Method of booting a computer operating system to run from a normally unsupported system device
US7134007B2 (en) Method for sharing firmware across heterogeneous processor architectures
US7146512B2 (en) Method of activating management mode through a network for monitoring a hardware entity and transmitting the monitored information through the network
US20090094447A1 (en) Universal serial bus flash drive for booting computer and method for loading programs to the flash drive
EP3491519A1 (en) Optimized uefi reboot process
JP5307196B2 (en) Providing a system integrated with silicon code
US11169819B2 (en) Information handling system (IHS) and method to proactively restore firmware components to a computer readable storage device of an IHS
EP1485797B1 (en) Boot process
US20110055540A1 (en) Pre-Boot Loader for Reducing System Boot Time
US7581037B2 (en) Effecting a processor operating mode change to execute device code
CN110069361B (en) Method and apparatus for TPM failover
WO2012155439A1 (en) System and method for bios booting
US10586048B2 (en) Efficient reboot of an operating system
US9348603B2 (en) Electronic apparatus and booting method
KR20140083530A (en) System on chip including boot shell debugging hardware and driving method thereof
US7484083B1 (en) Method, apparatus, and computer-readable medium for utilizing BIOS boot specification compliant devices within an extensible firmware interface environment
US9778936B1 (en) Booting a computing system into a manufacturing mode
JP5348813B2 (en) Boot ROM mounted board
Dice Quick boot: a guide for embedded firmware developers
US9208112B1 (en) Permanent allocation of a large host memory
TWI765329B (en) Bios switch system and method
Crouse et al. Breaking the Chains—Using LinuxBIOS to Liberate Embedded x86 Processors

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11865900

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11865900

Country of ref document: EP

Kind code of ref document: A1