技术领域technical field
本发明是有关于一种用于选择只读存储器模块间的沟通方法及系统,且特别是有关于一种利用中断指令来沟通模块的方法及系统。The present invention relates to a communication method and system for selecting read-only memory modules, and in particular to a method and system for communicating modules by using an interrupt command.
背景技术Background technique
在计算机系统开机的程序时,在操作系统启动前,须对外围装置做初始化的动作,以使操作系统能够对这些外围装置进行数据的存取。具有外围装置相关信息的韧件部分,通常存在选择只读存储器(Option ROM)中,以在计算机系统开机时,加载至计算机系统的系统随机存取内存中,以供初始化。然而,通常系统随机存取内存仅提供有限的内存区段供韧件部分使用,加上现有的基本输入输出系统(BIOS)提供愈来愈多的功能,其所需内存空间也随之加大,在内存有限的情况下,不能同时下载所有需要的选择只读存储器模块,必须分割成多个模块。When the computer system is turned on, before the operating system is started, the peripheral devices must be initialized so that the operating system can access data from these peripheral devices. The firmware portion with information related to the peripheral device is usually stored in an option ROM, so that when the computer system is turned on, it is loaded into the system random access memory of the computer system for initialization. However, usually the system random access memory only provides a limited memory segment for use by the firmware. In addition, the existing basic input output system (BIOS) provides more and more functions, and the required memory space also increases. Large, in the case of limited memory, it is not possible to download all required optional ROM modules at the same time, and must be divided into multiple modules.
因此,设计一种新的模块间的沟通方法,使模块与模块之间的沟通快速且方便。Therefore, a new communication method between modules is designed to make the communication between modules fast and convenient.
发明内容Contents of the invention
本发明所要解决的技术问题在于提供一种用于选择只读存储器模块间的沟通方法及系统,以使模块与模块之间的沟通快速且方便。The technical problem to be solved by the present invention is to provide a communication method and system for selecting ROM modules, so that the communication between modules is fast and convenient.
为了实现上述目的,本发明一较佳实施例中提出一种用于选择只读存储器模块间的沟通方法,包括以下步骤:自数个函数中判定用以沟通运行时间模块与至少一应用模块的至少一目标函数,其中数个函数是来自于选择只读存储器韧件;修改目标函数的函数呼叫为对应目标函数的中断指令呼叫;以及根据中断指令呼叫的使用限制,将选择只读存储器韧件分割为数个选择只读存储器模块。In order to achieve the above object, a preferred embodiment of the present invention proposes a method for selecting a communication method between ROM modules, including the following steps: determining the communication method between the runtime module and at least one application module from several functions At least one target function, wherein several functions are from selecting the ROM firmware; modifying the function call of the target function to be an interrupt command call corresponding to the target function; and according to the use restriction of the interrupt command call, the ROM firmware will be selected Divide into several optional ROM blocks.
为了实现上述目的,本发明另一较佳实施例中提出一种用于选择只读存储器模块间的沟通系统,包括:选择只读存储器韧件,包括运行时间模块及至少一应用模块,其中运行时间模块及应用模块各自包括数个函数;系统随机存取内存,用以加载选择只读存储器韧件;处理器,用以自数个函数中判定用以沟通运行时间模块与应用模块的至少一目标函数,处理器修改目标函数的函数呼叫为对应目标函数的中断指令呼叫,并根据中断指令呼叫的使用限制,将运行时间模块及应用模块分割为数个选择只读存储器模块。In order to achieve the above object, another preferred embodiment of the present invention proposes a communication system for selecting ROM modules, including: selecting ROM firmware, including a runtime module and at least one application module, wherein the operating The time module and the application module each include several functions; the system random access memory is used to load the selected ROM firmware; the processor is used to determine at least one of the functions used to communicate the runtime module and the application module For the target function, the processor modifies the function call of the target function into an interrupt command call corresponding to the target function, and divides the runtime module and the application module into several optional read-only memory modules according to the use restriction of the interrupt command call.
利用本发明的选择只读存储器模块与模块之间的沟通方法及系统,不需知道基本输入输出系统将这些模块加载的内存位置即可执行,使得模块之间的沟通极为快速及方便。The communication method and system between selected ROM modules and modules of the present invention can be executed without knowing the memory locations where these modules are loaded by the BIOS, making the communication between modules extremely fast and convenient.
附图说明Description of drawings
为使本发明的上述和其它目的、特征、优点与实施例能更明显易懂,所附附图的详细说明如下:In order to make the above and other objects, features, advantages and embodiments of the present invention more comprehensible, the detailed description of the accompanying drawings is as follows:
图1是依照本发明一实施例的一种用于选择只读存储器模块间的沟通方法流程图;FIG. 1 is a flow chart of a communication method for selecting ROM modules according to an embodiment of the present invention;
图2是依照本发明另一实施例的一种用于选择只读存储器模块间的沟通系统的方块图。FIG. 2 is a block diagram of a communication system for selecting ROM modules according to another embodiment of the present invention.
【主要组件符号说明】[Description of main component symbols]
102-110:步骤 226:第二应用模块102-110: Step 226: The second application module
212:选择只读存储器韧件 232:处理器212: Select ROM Firmware 232: Processor
214:系统随机存取内存 236:参数判定单元214: System random access memory 236: Parameter determination unit
222:运行时间模块 250:外围装置222: Runtime Module 250: Peripherals
224:第一应用模块224: First application module
具体实施方式Detailed ways
接下来请参照本发明实施例的详细说明,其中所提到的范例会连同附图一同进行说明。在任何可能的情况下,附图及说明中所使用的相同参考数标都代表了相同或类似的组件。Next, please refer to the detailed description of the embodiments of the present invention, in which the mentioned examples will be described together with the accompanying drawings. Wherever possible, the same reference numerals are used in the drawings and description to refer to the same or like components.
在选择只读存储器韧件被分割成多个模块的情况下,需要用到其中某些模块时,每一模块可被下载至系统随机存取内存内不同的位置上,而且每一模块在不同时间点可被下载至不固定的位置,若模块与模块之间有函数(function)需要互相沟通时,极为困难与不便。本发明揭露一种选择只读存储器模块与模块之间的沟通方法,极为快速及方便。In the case that the optional ROM firmware is divided into multiple modules, each module can be downloaded to a different location in the system random access memory when some modules are needed, and each module can The time point can be downloaded to an unfixed location. If there are functions between modules that need to communicate with each other, it is extremely difficult and inconvenient. The invention discloses a communication method between selected read-only memory modules and modules, which is extremely fast and convenient.
参照图1,其示出了依照本发明一实施例的一种用于选择只读存储器模块间的沟通方法流程图。该沟通方法包含以下步骤(应了解到,在本实施例中所提及的步骤,除特别叙明其顺序者外,均可依实际需要调整其前后顺序,甚至可能同时或部分同时执行):Referring to FIG. 1 , it shows a flowchart of a communication method for selecting ROM modules according to an embodiment of the present invention. The communication method includes the following steps (it should be understood that the steps mentioned in this embodiment, unless the order is specifically stated, can be adjusted according to actual needs, and may even be executed simultaneously or partially simultaneously):
(1)自函数(function)中判定用以沟通一运行时间(run time)模块与至少一应用模块的至少一目标函数(步骤102)。其中所提到的函数是来自于选择只读存储器韧件中的功能函数,这些功能函数执行其特定的功能,而选择只读存储器韧件对应外围装置,该步骤的目的是确定所有会用于模块之间沟通的目标函数。再者,其中所提到的应用模块在此可用来指除运行时间模块之外的其它模块。该步骤还可包含另一步骤:判定对应每一目标函数的所有传入参数(步骤104)。在进行函数呼叫(function call)时,一般会将所有需要用到的参数一并传入,举例来说,可从AX=01开始依序列出。(1) Determine at least one target function for communicating a runtime module with at least one application module from functions (step 102). The functions mentioned therein come from selecting the functional functions in the ROM firmware, these functional functions perform their specific functions, and selecting the corresponding peripheral devices of the ROM firmware, the purpose of this step is to determine all the functions that will be used for Objective function for communication between modules. Furthermore, the application module mentioned therein can be used to refer to other modules except the runtime module. This step may also include another step: determining all incoming parameters corresponding to each objective function (step 104 ). When making a function call (function call), generally all parameters that need to be used will be passed in together. For example, they can be listed sequentially starting from AX=01.
(2)修改目标函数的函数呼叫为对应目标函数的中断指令呼叫(步骤106)。例如,在一实施例中,可修改目标函数的函数呼叫为DOS操作系统中INT 21h功能函数的呼叫。DOS操作系统提供将近130个有用的中断处理功能,该处可使用INT指令执行编号为21h的中断来实施该步骤。(2) Modify the function call of the target function to be the interrupt instruction call of the corresponding target function (step 106). For example, in one embodiment, the function call of the target function can be modified to be the call of the INT 21h function in the DOS operating system. The DOS operating system provides nearly 130 useful interrupt processing functions, where the INT instruction can be used to execute the interrupt numbered 21h to implement this step.
(3)根据中断指令呼叫的使用限制,将选择只读存储器韧件分割为数个选择只读存储器模块(步骤108)。例如,在一实施例中,根据DOS操作系统的使用限制,将选择只读存储器韧件分割为小于64kb的选择只读存储器模块。(3) Divide the optional ROM firmware into several optional ROM modules according to the usage restriction of the interrupt command call (step 108). For example, in one embodiment, the select ROM firmware is partitioned into select ROM modules smaller than 64kb according to the usage restrictions of the DOS operating system.
(4)呼叫中断指令以执行运行时间模块与应用模块之间的沟通(步骤110)。每一应用模块都是通过呼叫中断指令来与运行时间模块进行沟通。在一实施例中,可通过呼叫INT 21h功能函数以执行运行时间模块与应用模块之间的沟通。(4) Call the interrupt instruction to execute the communication between the runtime module and the application module (step 110). Each application module communicates with the runtime module by calling the interrupt command. In one embodiment, the communication between the runtime module and the application module can be performed by calling the INT 21h function.
请参照图2,其示出了依照本发明另一实施例的一种用于选择只读存储器模块间的沟通系统的方块图。该沟通系统包括:选择只读存储器韧件212、系统随机存取内存214、以及处理器232。选择只读存储器韧件212对应外围装置250。选择只读存储器韧件212包括运行时间(run time)模块222及至少一应用模块(在该实施例中以第一应用模块224及第二应用模块226为例说明)。系统随机存取内存214用以加载选择只读存储器韧件212。Please refer to FIG. 2 , which shows a block diagram of a communication system for selecting ROM modules according to another embodiment of the present invention. The communication system includes: optional ROM firmware 212 , system random access memory 214 , and processor 232 . The selected ROM firmware 212 corresponds to the peripheral device 250 . The optional ROM firmware 212 includes a runtime module 222 and at least one application module (in this embodiment, the first application module 224 and the second application module 226 are taken as examples). The system random access memory 214 is used for loading the optional ROM firmware 212 .
选择只读存储器韧件212的运行时间模块222、第一应用模块224、及第二应用模块226各自包括数个函数。处理器232是用以自这些函数中判定用以沟通运行时间模块222与第一应用模块224或运行时间模块222与第二应用模块226的至少一目标函数,处理器232修改目标函数的函数呼叫(function call)为对应目标函数的中断指令呼叫,并根据中断指令呼叫的使用限制,将运行时间模块222、第一应用模块224、及第二应用模块226分割为符合限制的选择只读存储器模块。The runtime module 222, the first application module 224, and the second application module 226 of the select ROM firmware 212 each include a plurality of functions. The processor 232 is used to determine at least one target function for communicating between the runtime module 222 and the first application module 224 or the runtime module 222 and the second application module 226 from these functions, and the processor 232 modifies the function call of the target function (function call) is the interrupt instruction call corresponding to the target function, and according to the use restriction of the interrupt instruction call, the runtime module 222, the first application module 224, and the second application module 226 are divided into selected ROM modules that meet the restrictions .
其中处理器232可包括参数判定单元236。参数判定单元236是用以判定对应目标函数的所有传入参数。应用模块呼叫中断指令以与运行时间模块沟通。在该实施例中,处理器232修改目标函数的函数呼叫为DOS操作系统中INT 21h功能函数的呼叫,并根据DOS操作系统的使用限制,将运行时间模块222、第一应用模块224、及第二应用模块226分割为小于64kb的选择只读存储器模块。第一应用模块224及第二应用模块226各自视其实际需要来呼叫DOS操作系统中的INT 21h功能函数以与运行时间模块222沟通。The processor 232 may include a parameter determining unit 236 . The parameter determination unit 236 is used to determine all incoming parameters corresponding to the objective function. The application module calls the interrupt instruction to communicate with the runtime module. In this embodiment, the processor 232 modifies the function call of the target function to be the call of the INT 21h function function in the DOS operating system, and according to the use restriction of the DOS operating system, the runtime module 222, the first application module 224, and the second application module Two application modules 226 are partitioned into select ROM modules smaller than 64kb. The first application module 224 and the second application module 226 call the INT 21h function in the DOS operating system to communicate with the runtime module 222 according to their actual needs.
总而言之,上述实施例揭露选择只读存储器模块与模块之间的沟通方法及系统,不需知道基本输入输出系统将这些模块加载的内存位置即可执行,使得模块之间的沟通极为快速及方便。In a word, the above-mentioned embodiment discloses the communication method and system between the selected ROM modules and the modules, which can be executed without knowing the memory locations where these modules are loaded by the BIOS, making the communication between the modules extremely fast and convenient.
虽然本发明已以实施例揭露如上,然其并非用以限定本发明,熟悉本领域的技术人员,在不脱离本发明的精神和范围内,当可作各种的更动与润饰,因此本发明的保护范围当视后附的权利要求所界定者为准。Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, this The scope of protection of the invention shall prevail as defined by the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200910005502ACN101782854A (en) | 2009-01-19 | 2009-01-19 | Communication method and system for selecting between read-only memory modules |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200910005502ACN101782854A (en) | 2009-01-19 | 2009-01-19 | Communication method and system for selecting between read-only memory modules |
| Publication Number | Publication Date |
|---|---|
| CN101782854Atrue CN101782854A (en) | 2010-07-21 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN200910005502APendingCN101782854A (en) | 2009-01-19 | 2009-01-19 | Communication method and system for selecting between read-only memory modules |
| Country | Link |
|---|---|
| CN (1) | CN101782854A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5123098A (en)* | 1989-02-28 | 1992-06-16 | Hewlett-Packard Company | Method for executing programs within expanded memory of a computer system using MS or PC DOS |
| CN1369788A (en)* | 2001-02-12 | 2002-09-18 | 英业达股份有限公司 | Method of Realizing Software Interrupt on Windows Operating System |
| CN1467751A (en)* | 2002-07-12 | 2004-01-14 | 光宝科技股份有限公司 | Flash memory and program planning and repeated burning method thereof |
| US6813765B1 (en)* | 2000-05-16 | 2004-11-02 | Palm Source, Inc. | Binding using absolute memory references |
| CN1943160A (en)* | 2003-10-29 | 2007-04-04 | 高通股份有限公司 | System for calling a privileged function in a device |
| WO2008058101A2 (en)* | 2006-11-07 | 2008-05-15 | Sandisk Corporation | Memory controllers for performing resilient firmware upgrades to a functioning memory |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5123098A (en)* | 1989-02-28 | 1992-06-16 | Hewlett-Packard Company | Method for executing programs within expanded memory of a computer system using MS or PC DOS |
| US6813765B1 (en)* | 2000-05-16 | 2004-11-02 | Palm Source, Inc. | Binding using absolute memory references |
| CN1369788A (en)* | 2001-02-12 | 2002-09-18 | 英业达股份有限公司 | Method of Realizing Software Interrupt on Windows Operating System |
| CN1467751A (en)* | 2002-07-12 | 2004-01-14 | 光宝科技股份有限公司 | Flash memory and program planning and repeated burning method thereof |
| CN1943160A (en)* | 2003-10-29 | 2007-04-04 | 高通股份有限公司 | System for calling a privileged function in a device |
| WO2008058101A2 (en)* | 2006-11-07 | 2008-05-15 | Sandisk Corporation | Memory controllers for performing resilient firmware upgrades to a functioning memory |
| Publication | Publication Date | Title |
|---|---|---|
| JP6912583B2 (en) | Service processing method and equipment | |
| US9678767B2 (en) | Unified extensible firmware interface (UEFI) driver and protocol | |
| US9274804B2 (en) | Overlapped boot task fetches and boot task execution to reduce boot time in an electrical device | |
| KR20130142073A (en) | Method and terminal for using mobile memory card to boot up mobile phone operating system | |
| CN114253619A (en) | Method, device, computer equipment and storage medium for SSD multi-level boot | |
| CN113377418A (en) | File loading method, storage medium and equipment | |
| CN110399168A (en) | System startup method, device and equipment for multi-data disk storage server | |
| US8458730B2 (en) | Multi-level driver configuration | |
| CN110399166B (en) | Method, device, device and storage medium for saving ME Nonce value | |
| CN111309358A (en) | A kind of CPLD firmware upgrade method, apparatus, equipment and readable storage medium | |
| CN101782854A (en) | Communication method and system for selecting between read-only memory modules | |
| CN111427550A (en) | Object creating method, terminal device and storage medium | |
| US9003364B2 (en) | Overriding system attributes and function returns in a software subsystem | |
| KR101569001B1 (en) | System for configurating fpga data and method therefor | |
| CN107463408A (en) | The method and device of clearing password is prevented during a kind of upgrading BIOS | |
| CN110083394B (en) | Serial port driving method, device and storage medium | |
| CN108804144B (en) | Control method/system for starting operating system, storage medium and electronic equipment | |
| US20090216987A1 (en) | Method and apparatus for allocating host memory for a memory-less add-on devices | |
| KR101118111B1 (en) | Mobile communication terminal and booting method thereof | |
| CN105988804B (en) | Software transfer method and terminal | |
| CN115586981B (en) | Method, system, computer and storage medium for preventing SIO signal loss | |
| KR102696026B1 (en) | Initegrated spi apparatus and intnerfacing method thereof | |
| US20080222385A1 (en) | Parameter setting method and apparatus for network controller | |
| CN119003015B (en) | Operating system startup item management method, device, medium and computer program product | |
| CN112445525B (en) | Data processing method, related device and computer readable medium |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
| WD01 | Invention patent application deemed withdrawn after publication | Application publication date:20100721 |