CN109426506B - Loading method for selecting read-only memory - Google Patents

Loading method for selecting read-only memory Download PDF

Info

Publication number
CN109426506B
CN109426506B CN201710722487.8A CN201710722487A CN109426506B CN 109426506 B CN109426506 B CN 109426506B CN 201710722487 A CN201710722487 A CN 201710722487A CN 109426506 B CN109426506 B CN 109426506B
Authority
CN
China
Prior art keywords
memory
rom
replacement
read
index table
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201710722487.8A
Other languages
Chinese (zh)
Other versions
CN109426506A (en
Inventor
段文华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitac Computer Shunde Ltd
Mitac Computing Technology Corp
Original Assignee
Mitac Computer Shunde Ltd
Mitac Computing Technology Corp
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 Mitac Computer Shunde Ltd, Mitac Computing Technology Corp filed Critical Mitac Computer Shunde Ltd
Priority to CN201710722487.8A priority Critical patent/CN109426506B/en
Publication of CN109426506A publication Critical patent/CN109426506A/en
Application granted granted Critical
Publication of CN109426506B publication Critical patent/CN109426506B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

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

Abstract

A loading method of a selected read-only memory is suitable for an electronic device with a processing unit and a memory unit, wherein the memory unit stores a BIOS, and the BIOS comprises the preset selected read-only memory, and the method comprises the following steps: when the replacing function is enabled, the BIOS is executed by the processing unit to perform the following steps: judging whether a storage device has a replacement index table or not; when the storage device has a replacement index table, judging whether the identifier of the default selected read-only memory is consistent with the identifier of the replacement selected read-only memory in the replacement index table; when the two paths match, the replacement index table is analyzed to obtain an access path, and the read-only memory is loaded and replaced through the obtained access path to execute the replacement; and when the data is not consistent, the loading preset is executed by using a read-only memory.

Description

Loading method for selecting read-only memory
Technical Field
The invention relates to a loading method of an Option read only memory (Option ROM), in particular to a method for loading the Option ROM by a storage device.
Background
Currently, in the basic input/output system (BIOS) technology field, in order to enable an electronic device (e.g., a personal computer or a server, etc.) to use other hardware devices (e.g., a display adapter or a network card, etc.) after booting, a selected read only memory (Option-ROM) required for storing the BIOS is generally stored in a memory (e.g., an Electrically Erasable Programmable Read Only Memory (EEPROM) or a Flash memory), and when the electronic device is started and executes a BIOS to perform a self test (POST), initialize basic hardware devices, etc., the selected read only memory is loaded to drive the corresponding hardware devices. That is, the Option-ROM (Option-ROM) is actually the firmware called by the BIOS of the electronic device to communicate with the hardware device, and the Option-ROM is usually included in a portion of the BIOS image file.
Generally, when a developer of an Option ROM performs new version development or debugging (debug), in order to determine whether the Option ROM of the new version can normally operate on an electronic device, the updated Option ROM must be recorded in a memory for storing a BIOS, that is, the developer must recompile the BIOS, replace Option-ROMs of different versions into the BIOS, record a new BIOS into a machine, and then wait for the BIOS to load the Option ROM of the new version through the boot process to execute, and then confirm the operation status of the Option ROM of the new version. However, the read-only memory is selected for testing, and the process of repeatedly writing the entire BIOS and then testing takes a lot of time and is very inconvenient.
Disclosure of Invention
The present invention provides a method for loading a rom, which can greatly shorten the development time for selecting a rom without repeatedly rewriting the whole rom.
To solve the above technical problems, the present invention provides a loading method for selecting a rom, which is applicable to an electronic device having a processing unit and a memory unit, wherein the memory unit is used for storing a basic input/output unit (BIOS), and the BIOS includes at least one predetermined rom, and the method includes: when the replacing function is enabled, the BIOS is executed by the processing unit to perform the following steps: determining whether a storage device accessible by the processing unit has a replacement index table, wherein the replacement index table is used to indicate at least a first identifier and an access path of the replacement ROM; when the storage device has a replacement index table, judging whether the second identifier of the default selected read-only memory is consistent with the first identifier of the replacement selected read-only memory in the replacement index table; when the second identifier of the default selected ROM matches the first identifier of the replacement selected ROM indicated in the replacement index table, analyzing the replacement index table to obtain the access path of the matching replacement selected ROM, and loading the matching replacement selected ROM through the obtained access path for execution; and loading the preset option read-only memory to execute when the second identifier of the preset option read-only memory does not accord with the first identifier of the alternative option read-only memory.
Preferably, the method further includes loading the default selected rom for execution when it is determined that the storage device does not have the replacement index table.
Preferably, the method further includes analyzing the replacement index table to obtain a matching access path of the replacement option rom when the second identifier of the default option rom matches the first identifier of the replacement option rom indicated in the replacement index table, and determining whether the obtained access path stores the replacement option rom. In addition, when the obtained access path does not store the alternative read-only memory, the preset alternative read-only memory is loaded to execute. On the other hand, when the obtained access path stores the replacement option ROM, the corresponding replacement option ROM is loaded for execution.
Preferably, the enabling of the replacing function can be set in a basic input output unit (BIOS Setup) of the electronic device, and when the replacing function is not enabled, the processing unit executes the BIOS to load the default rom for execution.
Compared with the prior art, the invention enables the replacing function of the invention, developers can directly store the new or modified selected read-only memory in the storage device (such as the selected read-only memory) when performing the new version development or debugging of the selected read-only memory, and adds the corresponding identifier and the access path in the replacement index table, so that whether the selected read-only memory newly added in the storage device can normally operate in the electronic device can be tested, therefore, the whole BIOS does not need to be repeatedly re-recorded, and the development time of the selected read-only memory is greatly shortened.
[ description of the drawings ]
Fig. 1 is a schematic diagram illustrating an electronic device according to an embodiment of the invention.
FIG. 2 is a flowchart illustrating an operation of a loading method for selecting a ROM according to an embodiment of the invention.
[ detailed description ] embodiments
The embodiments or examples shown in the figures are expressed in a particular manner as set forth below. It is to be understood that the embodiment or examples are not to be construed as limiting. Any alterations and modifications in the described embodiments, and any further applications of the principles of the invention as described herein are contemplated as would normally occur to one skilled in the art to which the invention relates.
Fig. 1 is a diagram illustrating an electronic device 10 according to an embodiment of the invention. As shown in fig. 1, the electronic device 100 includes a memory unit 110 and a processing unit 120, wherein the memory unit 110 stores a basic input/output unit 112 (hereinafter, BIOS112), and the BIOS112 further includes a predetermined Option read only memory (Option ROM) 114. When the electronic device 100 is powered on, the processing unit 120 obtains the BIOS112 from the memory unit 110 for execution, and when the replacement function of the present invention is disabled (disable), the processing unit 120 directly loads the predetermined option rom 114 for execution during the execution of the BIOS112, thereby driving the corresponding hardware device (not shown) in the electronic device 100. In addition, the user may determine whether the override function is enabled after the processing unit 120 executes the BIOS112 to enter the BIOS Setup interface (BIOS Setup). On the other hand, the processing unit 120 is communicatively linked with the storage device 200, and the storage device 200 stores the replacement index table 210 and the optional rom 220 for replacement. It should be understood that in some embodiments, the BIOS112 may comprise a plurality of predetermined optional ROM memories 114 respectively corresponding to different hardware devices, and the storage device 200 may also comprise a plurality of alternative optional ROM memories 220 respectively corresponding to different hardware devices.
In some embodiments of the present invention, the storage device 200 may be an external storage device (e.g., a USB flash drive) or a storage device (e.g., a hard disk) disposed in the electronic device 100. In addition, the replacement index table 210 may be a Header file, a file, a table data file, or the like, for indicating the identifier (e.g., a globally unique identifier; GUID) of the selected ROM 220 in the storage device 200 and the access path thereof. Thus, when the replacement function of the present invention is in an enabled state, the processing unit 120 can determine whether the selected rom 220 in the storage device 200 is used to replace the predetermined selected rom 114 according to the identifier indicated by the replacement index table 210 during the execution of the BIOS112, and load the replaced selected rom 220 to execute the replacement when determining the replacement, thereby driving the corresponding hardware device in the electronic device 100. For example, when the identifier of the selected ROM 114 matches the identifier of the replaced ROM 220, the selected ROM 220 is loaded into the storage device 200 instead of the selected ROM 114 in the BIOS 112.
The following describes the operation flow of the loading method for selecting ROM according to the present invention with reference to FIG. 2 and FIG. 1. In some embodiments of the present invention, after the electronic device 100 is powered on, the processing unit 120 obtains the BIOS112 from the memory unit 110 for execution, and executes the BIOS112 to perform the following procedures of the present invention. First, in step S202, the processing unit 120 determines whether the replacing function is enabled, for example, the processing unit 120 may determine whether the replacing function is enabled by obtaining a setting value corresponding to the replacing function, wherein the setting value is "1" to indicate enabled, and the setting value is "0" to indicate not enabled. If the replacing function is enabled, the step S204 is continued, otherwise, if the replacing function is not enabled, the step S214 is continued. In some embodiments, after the electronic device 100 is powered on, a user may enter a basic input output unit (BIOS Setup) user interface to set a setting value corresponding to the replacement function, and when the electronic device is powered on next time, the processing unit 120 executes the BIOS112 again, and may determine whether to apply the replacement function according to the setting of the user.
In step S204, it is determined whether the storage device 200 stores the replacement index table 210, if yes, step S206 is continued, otherwise step S214 is continued. Next, in step S206, the processing unit 120 determines whether the identifier of the replaced option rom 220 indicated in the replacement index table 210 matches the identifier of the option rom 114 preset in the BIOS112, if so, continues to step S208, otherwise, continues to step S214. In step S208, the processing unit 120 parses the replacement index table 210 to obtain the access path of the selected rom 220 indicated in the replacement index table 210, and determines whether the obtained access path has the selected rom 220 in step S210, if so, continues to step S212, otherwise, continues to step S214.
Finally, in step S212, the processing unit 120 loads the optional rom 220 through the obtained access path for execution. On the other hand, in step S214, the processing unit 120 loads the option rom 114 preset in the BIOS112 for execution.
In summary, by enabling the replacement function of the present invention, when a developer performs a new version development or debugging of the selected rom, the developer can directly store the new or modified selected rom in the storage device 200 (e.g., the selected rom 220) and add a corresponding identifier and access path in the replacement index table 210, so as to test whether the selected rom newly added in the storage device 200 can normally operate in the electronic device 100, thereby avoiding the need to repeatedly write the entire BIOS112 again and greatly shortening the development time of the selected rom.
The methods of the present invention, or certain aspects or portions thereof, may take the form of program code. The program code may be embodied in tangible media, such as floppy diskettes, cd-roms, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine thereby becomes an apparatus for practicing the invention. The program code may also be transmitted over some transmission medium, such as over electrical wiring or cabling, through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention. When implemented in a general-purpose processing unit, the program code combines with the processing unit to provide a unique apparatus that operates analogously to specific logic circuits.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (3)

1. A loading method of an option ROM is suitable for an electronic device, the electronic device has a processing unit and a memory unit, the memory unit is used to store a basic input/output unit, and the basic input/output unit includes at least one default option ROM, the method includes: when a replacing function is enabled, the processing unit executes the basic input/output unit to perform the following steps:
determining whether a storage device accessible by the processing unit has a replacement index table, wherein the replacement index table is used for indicating a first identifier and an access path of at least one replacement option read-only memory;
when the storage device has the replacement index table, judging whether a second identifier of a preset selected read-only memory is consistent with the first identifier of the replacement selected read-only memory in the replacement index table;
when the second identifier of the pre-selected ROM matches the first identifier of the alternative ROM indicated in the alternative index table, parsing the alternative index table to obtain the corresponding access path of the alternative ROM, and loading the corresponding alternative ROM through the obtained access path for execution; and
loading the pre-set option ROM for execution when the second identifier of the pre-set option ROM does not match the first identifier of the replacement option ROM,
the enabling of the replacing function is set in the setting of the basic input and output unit of the electronic device, and when the replacing function is not enabled, the basic input and output unit is executed through the processing unit to load the default selected read-only memory for execution.
2. The method of claim 1, further comprising: and loading the preset read-only memory for execution when the storage device is judged not to have the replacement index table.
3. The method of claim 1, further comprising:
when the second identifier of the pre-selected rom matches the first identifier of the alternative rom indicated in the alternative index table, analyzing the alternative index table to obtain the access path of the matching alternative rom, and determining whether the access path stores the alternative rom;
when the obtained access path does not store the replacement option read-only memory, loading the preset option read-only memory for execution; and
when the obtained access path stores the alternative read-only memory, the corresponding alternative read-only memory is loaded for execution.
CN201710722487.8A 2017-08-22 2017-08-22 Loading method for selecting read-only memory Active CN109426506B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710722487.8A CN109426506B (en) 2017-08-22 2017-08-22 Loading method for selecting read-only memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710722487.8A CN109426506B (en) 2017-08-22 2017-08-22 Loading method for selecting read-only memory

Publications (2)

Publication Number Publication Date
CN109426506A CN109426506A (en) 2019-03-05
CN109426506B true CN109426506B (en) 2022-01-28

Family

ID=65497713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710722487.8A Active CN109426506B (en) 2017-08-22 2017-08-22 Loading method for selecting read-only memory

Country Status (1)

Country Link
CN (1) CN109426506B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1254129A (en) * 1998-11-12 2000-05-24 英业达集团(西安)电子技术有限公司 Device for safely updating read-only memory and its method
CN1281180A (en) * 1999-07-15 2001-01-24 国际商业机器公司 Transparently load resource in ROM for application program
CN1971513A (en) * 2005-11-23 2007-05-30 晨星半导体股份有限公司 Amending method for content of built-in program code of ROM
CN101114230A (en) * 2006-07-26 2008-01-30 英业达股份有限公司 Method for reading and electing read only memory program code on self-storing mechanism
CN105792751A (en) * 2013-11-27 2016-07-20 雅培糖尿病护理公司 Systems and methods for revising permanent ROM-based programming

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6961791B2 (en) * 2001-10-17 2005-11-01 Hewlett-Packard Development Company, L.P. Method for expansion and integration of option ROM support utilities for run-time/boot-time usage
CN101131649A (en) * 2006-08-23 2008-02-27 乐金电子(昆山)电脑有限公司 Updating speed improving method for read-only memory of device with flash memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1254129A (en) * 1998-11-12 2000-05-24 英业达集团(西安)电子技术有限公司 Device for safely updating read-only memory and its method
CN1281180A (en) * 1999-07-15 2001-01-24 国际商业机器公司 Transparently load resource in ROM for application program
CN1971513A (en) * 2005-11-23 2007-05-30 晨星半导体股份有限公司 Amending method for content of built-in program code of ROM
CN101114230A (en) * 2006-07-26 2008-01-30 英业达股份有限公司 Method for reading and electing read only memory program code on self-storing mechanism
CN105792751A (en) * 2013-11-27 2016-07-20 雅培糖尿病护理公司 Systems and methods for revising permanent ROM-based programming

Also Published As

Publication number Publication date
CN109426506A (en) 2019-03-05

Similar Documents

Publication Publication Date Title
US8943302B2 (en) Method of flashing bios using service processor and computer system using the same
US9262283B2 (en) Method for reading kernel log upon kernel panic in operating system
US8132055B2 (en) Operating system-firmware interface update recovery
US20100058314A1 (en) Computer System and Related Method of Logging BIOS Update Operation
KR101143679B1 (en) Automated firmware recovery
JP2015507303A (en) Code coverage rate determination method and system
US20200250313A1 (en) Bios recovery and update
CN106598637B (en) Method for selective loading of components within a node
CN115547395A (en) Test method, system and flash memory device
CN106775847B (en) Board card software version updating method and device
CN113315675B (en) White box switch U-Boot automatic testing method, system and storage medium
CN107273249B (en) Mainboard test method, processor and mainboard test system
CN113127283B (en) Chip repair system, method, apparatus, computer device, and storage medium
CN103365772B (en) Software test automatic evaluation device and method
CN114116505A (en) Code testing method and device
CN113377586A (en) Automatic server detection method and device and storage medium
US20090259835A1 (en) System and method for tracking and recording system configurations of electronic devices
US11422916B2 (en) Usage amount monitoring method and monitoring unit of electronic control unit for vehicle
CN109426506B (en) Loading method for selecting read-only memory
EP4296860A1 (en) Method for running startup program of electronic device, and electronic device
US20220188221A1 (en) Regression testing method and regression testing apparatus
CN111858198A (en) Multi-scheme memory plugging test method, system, terminal and storage medium
CN110908725A (en) Application program starting method and device, electronic equipment and readable medium
US11507385B1 (en) Embedded electronic device, boot method, and embedded electronic device readable recording medium with stored program
JP6902513B2 (en) Source code generation support device and source code generation support method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant