[go: up one dir, main page]

CN1731357A - Computer system and booting method thereof - Google Patents

Computer system and booting method thereof Download PDF

Info

Publication number
CN1731357A
CN1731357A CN 200510096515 CN200510096515A CN1731357A CN 1731357 A CN1731357 A CN 1731357A CN 200510096515 CN200510096515 CN 200510096515 CN 200510096515 A CN200510096515 A CN 200510096515A CN 1731357 A CN1731357 A CN 1731357A
Authority
CN
China
Prior art keywords
event
microprocessor
computer system
priority
events
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.)
Granted
Application number
CN 200510096515
Other languages
Chinese (zh)
Other versions
CN100371896C (en
Inventor
周建新
王江波
Original Assignee
Via Technologies Inc
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 Via Technologies Inc filed Critical Via Technologies Inc
Priority to CNB2005100965157A priority Critical patent/CN100371896C/en
Publication of CN1731357A publication Critical patent/CN1731357A/en
Application granted granted Critical
Publication of CN100371896C publication Critical patent/CN100371896C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a computer system and a starting method thereof. The computer system comprises a storage device for storing a starting system and a multitask core; and a microprocessor, coupled to the storage device, for loading the multitask core to execute the boot system.

Description

计算机系统及其开机方法Computer system and booting method thereof

技术领域technical field

本发明涉及一种计算机系统及其开机方法,特别是涉及一种利用一多任务核心的架构来多任务处理可扩充固件接口事件的计算机系统与开机方法。The present invention relates to a computer system and its booting method, in particular to a computer system and booting method which utilizes a multi-task core architecture to multi-task processing scalable firmware interface events.

背景技术Background technique

对于现有计算机系统而言,其包含有一基本输入/输出系统(basic inputoutput system,BIOS)来处理开机程序,亦即,于该计算机系统加载执行一操作系统(operating system,OS)之前,该基本输入/输出系统负责计算机硬件的初始化工作,例如,该基本输入/输出系统会检查该计算机系统所使用的硬设备是否正常连接等等。一直以来,基本输入/输出系统是由低阶程序语言(例如:汇编语言)所编译而成,如业界所熟知,基本输入/输出系统一般都会固定地储存在计算机系统中主机板上的只读存储器(read-only memory,ROM)内,这样做最大的好处在于可以保证基本输入/输出系统的内容不会被其它程序所修改而影响开机程序的执行。然而,目前现有的基本输入/输出系统具有不少的缺点,例如,其本身没有办法支持计算机系统以提供即插即用的功能,而是仍需要对硬件的驱动和输入/输出(Input/Output,IO)资源进行调整。For existing computer systems, it includes a basic input/output system (basic input/output system, BIOS) to handle the boot process, that is, before the computer system loads and executes an operating system (operating system, OS), the basic The input/output system is responsible for the initialization of computer hardware, for example, the basic input/output system will check whether the hardware devices used by the computer system are connected normally and so on. For a long time, the basic input/output system is compiled by a low-level programming language (such as: assembly language). As is well known in the industry, the basic input/output system is generally stored in a read-only system on the motherboard of the computer system. In the read-only memory (ROM), the biggest advantage of doing this is that it can ensure that the contents of the basic input/output system will not be modified by other programs and affect the execution of the boot program. Yet existing basic input/output system has many shortcoming at present, for example, itself has no way to support computer system to provide the function of plug and play, but still needs the driver and input/output (Input/Output) of hardware. Output, IO) resources are adjusted.

为了改善现有基本输入/输出系统的缺陷,本领域的技术人员曾提出一可扩充固件接口(extensible firmware interface,EFI),意图取代现行的基本输入/输出系统。可扩充固件接口的基础仍是基本输入/输出系统,而与计算机系统相关的硬件与软件间的衔接部分则被更进一步地标准化,用以在功能上赋予更大的扩展功能。可扩充固件接口采用高阶程序语言(例如:C语言)编写而成,其就像是一个被简化的操作系统,介于计算机系统本身的硬设备以及操作系统之间,此外,相较于现有基本输入/输出系统的文字接口,可扩充固件接口还提供了一个图形化的操作界面,其所提供的显示模式对使用者而言更加地易懂且实用。可扩充固件接口的功能与运作叙述如下。In order to improve the defects of the existing BIOS, those skilled in the art have proposed an extensible firmware interface (EFI), intending to replace the current BIOS. The base of the scalable firmware interface is still the basic input/output system, and the link between the hardware and software related to the computer system is further standardized to give greater expansion in function. The scalable firmware interface is written in a high-level programming language (for example: C language), which is like a simplified operating system, between the hardware device of the computer system itself and the operating system. In addition, compared with the current There is a text interface of the basic input/output system, and the expandable firmware interface also provides a graphical operation interface, and the display mode provided by it is more understandable and practical for users. The function and operation of the XFI are described as follows.

于计算机系统的开机过程中,可扩充固件接口的工作流程大致可以归纳为以下数个步骤:(1)启动;(2)标准固件平台(firmware platform)的初始化;(3)加载可扩充固件接口的驱动程序库以及执行相关程序;以及(4)于可扩充固件接口的启动选单中选取所要进入的操作系统,并向可扩充固件接口提出启动引导代码。之后,被选取的操作系统便会被加载执行而完成整个计算机系统的开机流程。During the boot process of the computer system, the workflow of the extensible firmware interface can be roughly summarized into the following steps: (1) startup; (2) initialization of the standard firmware platform; (3) loading of the extensible firmware interface and (4) select the operating system to be entered in the boot menu of the extensible firmware interface, and propose the boot code to the extensible firmware interface. Afterwards, the selected operating system will be loaded and executed to complete the boot process of the entire computer system.

然而,在计算机系统的开机过程中,无论是现有基本输入/输出系统或是上述可扩充固件接口,两者皆无法支持多任务处理(multi-tasking)的功能,因此,对于可扩充固件接口而言,当计算机系统的微处理器,例如中央处理器(central processing unit,CPU),接收到一相对较高优先级的事件(event)时,其无法立即中断目前执行中的一相对较低优先级的事件,而是必须等到目前执行中的事件完成后,才能够去执行该对应较高优先级的事件。也就是说,因为不具备多任务处理的机制的缘故,导致可扩充固件界面的应用范围受到限制。However, in the booting process of the computer system, neither the existing BIOS nor the above-mentioned XFI can support the function of multi-tasking. Therefore, for the XFI In other words, when a microprocessor of a computer system, such as a central processing unit (CPU), receives a relatively high-priority event (event), it cannot immediately interrupt a relatively low-priority currently executing event. Priority events, but you must wait until the currently executing event is completed before you can execute the corresponding higher priority event. That is to say, because there is no multi-tasking mechanism, the application range of the scalable firmware interface is limited.

发明内容Contents of the invention

有鉴于此,本发明的目的之一在于提供一种利用一多任务核心的架构来多任务处理可扩充固件接口事件的计算机系统与开机方法,以解决上述问题。In view of this, one of the objectives of the present invention is to provide a computer system and a booting method that utilizes a multi-tasking core architecture to multi-task processing XFI events, so as to solve the above-mentioned problems.

本发明根据上述目的,提供一种可多任务处理可扩充固件接口事件的计算机系统。该计算机系统包含有:一储存装置,用来储存一开机系统与一多任务核心(multi-tasking kernel);以及一微处理器(micro-processor),耦接于该储存装置,用来加载该多任务核心以执行该开机系统。According to the above purpose, the present invention provides a computer system capable of multi-tasking processing of extensible firmware interface events. The computer system includes: a storage device, used to store a boot system and a multi-tasking kernel (multi-tasking kernel); and a microprocessor (micro-processor), coupled to the storage device, used to load the A multitasking core to execute the boot system.

此外,本发明还提供一种可多任务处理可扩充固件接口事件的开机方法。该开机方法包含有:提供一多任务核心;以及加载该多任务核心以执行该开机系统。In addition, the present invention also provides a booting method capable of multitasking processing the event of the extensible firmware interface. The booting method includes: providing a multitasking kernel; and loading the multitasking kernel to execute the booting system.

附图说明Description of drawings

图1为本发明计算机系统的功能方块图。FIG. 1 is a functional block diagram of the computer system of the present invention.

图2为图1所示的存储器中多个队列的示意图。FIG. 2 is a schematic diagram of multiple queues in the memory shown in FIG. 1 .

图3至图6为图2所示的存储器不同操作状态的示意图。3 to 6 are schematic diagrams of different operating states of the memory shown in FIG. 2 .

图7为图2所示的存储器于微处理器启用一遮蔽机制下的操作状态的示意图。FIG. 7 is a schematic diagram of the operation state of the memory shown in FIG. 2 when the microprocessor activates a masking mechanism.

图8为图1所示的存储器中多个队列的另一示意图。FIG. 8 is another schematic diagram of multiple queues in the memory shown in FIG. 1 .

图9为图8所示的存储器于微处理器启用一遮蔽机制下的操作状态的示意图。FIG. 9 is a schematic diagram of the operation state of the memory shown in FIG. 8 when the microprocessor activates a masking mechanism.

附图符号说明Description of reference symbols

10              计算机系统    12            硬盘10 Computer System 12 Hard Disk

14              存储器        16            微处理器14 Memory 16 Microprocessor

18a、18b        硬件装置      20            操作系统18a, 18b Hardware device 20 Operating system

22a、22b、22c   固件          24            可扩充固件接口22a, 22b, 22c Firmware 24 Expandable firmware interface

26              核心          40、41、42、43队列26 cores 40, 41, 42, 43 queues

50-56、60、71-77事件50-56, 60, 71-77 events

具体实施方式Detailed ways

请参阅图1,图1为本发明计算机系统10的功能方块图。计算机系统10包含有一硬盘12、一存储器14、一微处理器(例如一中央处理器)16与多个其它的硬件装置(例如光驱与显示卡等等)18a、18b。为了便于说明并简化图示,图1中仅显示出两个其它的硬件装置18a、18b。硬盘12与存储器14用来作为计算机系统10的储存装置,其中硬盘12内储存有一操作系统(operating system,OS)20、一可扩充固件接口(extensible firmwareinterface,EFI)24,一固件22与一实时操作系统(μC/OS-II)核心(kernel)26;而存储器14用来提供一储存空间以暂存数据。微处理器16耦接于硬盘12、存储器14以及硬件装置18a、18b。当计算机系统10执行开机程序时,微处理器16从硬盘12读取核心26与可扩充固件接口24,并将其加载存储器14内;接着,微处理器16便从存储器14内读取且执行核心26及可扩充固件接口24。在开机程序的后段中,微处理器16会从硬盘12读取操作系统20,并将其加载存储器14内;最后,微处理器16便从存储器14内读取并执行操作系统20,以完成整个开机程序。请注意,如前所述,可扩充固件接口24为一单工(single-tasking)的开机系统,用以作为操作系统20与硬盘12及其它的硬件装置18a、18b的固件22a、22b、22c之间的沟通媒介。至于核心26,因其符合μC/OS-II架构,所以在本发明披露的实施例中,核心26为一多任务(multi-tasking)核心。请注意,可扩充固件界面24与符合μC/OS-II架构的核心26仅为本发明的较佳实施例,任何以多任务核心来执行单工开机系统的计算机架构,均属本发明的范畴。Please refer to FIG. 1 , which is a functional block diagram of a computer system 10 of the present invention. The computer system 10 includes a hard disk 12, a memory 14, a microprocessor (such as a central processing unit) 16 and a plurality of other hardware devices (such as an optical drive and a graphics card, etc.) 18a, 18b. For ease of illustration and simplification of illustration, only two other hardware devices 18a, 18b are shown in FIG. 1 . The hard disk 12 and the memory 14 are used as storage devices for the computer system 10, wherein the hard disk 12 stores an operating system (operating system, OS) 20, an extensible firmware interface (extensible firmware interface, EFI) 24, a firmware 22 and a real-time The operating system (μC/OS-II) kernel (kernel) 26; and the memory 14 is used to provide a storage space for temporarily storing data. The microprocessor 16 is coupled to the hard disk 12, the memory 14, and the hardware devices 18a, 18b. When the computer system 10 executes the boot program, the microprocessor 16 reads the core 26 and the extensible firmware interface 24 from the hard disk 12, and loads them into the memory 14; then, the microprocessor 16 reads and executes them from the memory 14. Core 26 and Extensible Firmware Interface 24 . In the latter part of the boot procedure, the microprocessor 16 will read the operating system 20 from the hard disk 12, and load it in the memory 14; finally, the microprocessor 16 will read and execute the operating system 20 from the memory 14, to Complete the entire boot procedure. Please note that, as mentioned above, the extensible firmware interface 24 is a single-tasking boot system used as the operating system 20 and the firmware 22a, 22b, 22c of the hard disk 12 and other hardware devices 18a, 18b communication medium between. As for the core 26, because it complies with the μC/OS-II architecture, in the disclosed embodiment of the present invention, the core 26 is a multi-tasking core. Please note that the scalable firmware interface 24 and the core 26 conforming to the μC/OS-II architecture are only preferred embodiments of the present invention, and any computer architecture that uses a multi-tasking core to perform a simplex boot system belongs to the scope of the present invention .

于开机过程中,当微处理器16执行可扩充固件接口24时,其会产生多个需要处理且优先级不同的事件(event),每一事件皆对应一特定优先级。于本实施例中,共定义有四种等级的优先级,其分别为:TPL_HIGH_LEVEL、TPL_NOTIFY、TPL_CALLBACK与TPL_APPLICATION,且其优先级由TPL_HIGH_LEVEL向TPL_APPLICATION递减。During the booting process, when the microprocessor 16 executes the XFI 24, it will generate a plurality of events that need to be processed and have different priorities, and each event corresponds to a specific priority. In this embodiment, four levels of priority are defined, which are: TPL_HIGH_LEVEL, TPL_NOTIFY, TPL_CALLBACK, and TPL_APPLICATION, and the priority levels decrease from TPL_HIGH_LEVEL to TPL_APPLICATION.

请参阅图2,图2为图1所示的存储器14中多个队列40、41、42、43的示意图。如前所述,核心26具有多任务处理的功能,且符合μC/OS-II架构,而依据μC/OS-II架构,微处理器16在执行核心26后会于存储器14内产生六十四个任务(task)T1~T64,而且会分别对应六十四个不同优先级(priority level)。其中,任务T30、T31、T32、T33,分别指向四个队列(queue)40、41、42、43,队列40用来存放对应最高优先级TPL_HIGH_LEVEL的事件50;队列41系用来存放对应次高优先级TPL_NOTIFY的事件51、52;队列42用来存放对应次低优先级TPL_CALLBACK的事件,不过在图2中,队列42目前没有存放任何事件;队列43用来存放对应最低优先级TPL_APPLICATION的事件53、54、55。Please refer to FIG. 2 , which is a schematic diagram of multiple queues 40 , 41 , 42 , 43 in the memory 14 shown in FIG. 1 . As mentioned above, the core 26 has the function of multitasking, and conforms to the μC/OS-II architecture, and according to the μC/OS-II architecture, the microprocessor 16 will generate sixty-four in the memory 14 after executing the core 26. There are tasks T 1 -T 64 , which correspond to sixty-four different priority levels. Among them, tasks T 30 , T 31 , T 32 , and T 33 point to four queues (queues) 40, 41, 42, and 43 respectively, and queue 40 is used to store events 50 corresponding to the highest priority TPL_HIGH_LEVEL; queue 41 is used to Store the events 51 and 52 corresponding to the second highest priority TPL_NOTIFY; the queue 42 is used to store the events corresponding to the second lowest priority TPL_CALLBACK, but in Figure 2, the queue 42 currently does not store any events; the queue 43 is used to store the corresponding lowest priority Events 53, 54, 55 of TPL_APPLICATION.

相较于直接利用该六十四个任务来存放事件,本实施例仅利用任务T30、T31、T32、T33所分别指向的四个队列40、41、42、43来存放事件,如此的设计可让暂存的事件个数变多,空间的利用也变得更具有弹性。此外,队列42因为目前没有存放任何事件,因此会被暂停(suspend),直到微处理器16接收到一无法立即执行且对应优先级为次低优先级TPL_CALLBACK的事件,则队列42便会被重新启用(resume),而该事件则被存放进队列42内。请注意,标示一队列被暂停的方式有很多种,其中之一为微处理器16针对每一队列40、41、42、43分别设定一相对应的标签S,如此一来,微处理器16即可自队列40、41、42、43各别的卷标S所记录的数值来判断其是否被暂停。举例来说,微处理器16先将队列40、41、42、43各自的标签S的值预设为0,而当队列42因无存放任何事件而被暂停时,微处理器16便将队列42的卷标S的值设定为1,后续微处理器16在执行队列内所存放的事件时,即可藉由队列42的卷标S所纪录的数值1得知队列42目前未存放任何事件,处于暂停的状态。Compared with directly using the sixty-four tasks to store events, this embodiment only uses the four queues 40, 41, 42, and 43 respectively pointed to by tasks T 30 , T 31 , T 32 , and T 33 to store events. Such a design can increase the number of temporarily stored events and make the use of space more flexible. In addition, because the queue 42 does not store any events at present, it will be suspended (suspend), until the microprocessor 16 receives an event that cannot be executed immediately and the corresponding priority is the second lowest priority TPL_CALLBACK, then the queue 42 will be restarted. Enable (resume), and this event is then stored in the queue 42. Please note that there are many ways to indicate that a queue is suspended, one of which is that the microprocessor 16 sets a corresponding label S for each queue 40, 41, 42, 43, so that the microprocessor 16, it can be judged whether the queues 40, 41, 42, 43 are suspended or not from the values recorded in the respective volume labels S of the queues 40, 41, 42, 43. For example, the microprocessor 16 first presets the values of the respective labels S of the queues 40, 41, 42, and 43 to 0, and when the queue 42 is suspended due to not storing any events, the microprocessor 16 resets the queues to The value of the tag S of 42 is set to 1, and when the follow-up microprocessor 16 executes the events stored in the queue, the value 1 recorded by the tag S of the queue 42 can be used to know that the queue 42 does not store any events at present. Event, in a paused state.

由于队列40、41、42、43利用先进先出(First In First Out)的机制,因此对于同一队列,例如队列43而言,当微处理器16在执行队列43内所依序存放的事件53、54、55(对应相同的优先级)时,若没有接收到相对更高的优先级的事件,则微处理器16执行事件53、54、55的先后顺序会与事件53、54、55进入队列43的先后顺序相同,也就是先执行完事件53,再执行事件54,最后执行事件55。至于不同优先级的事件的执行顺序,微处理器16则依据优先级由高而低依序执行四个队列40、41、42、43中的事件,换句话说,当对应较高优先级的队列内的事件均执行完毕后,微处理器16便接着执行下一优先级的队列内的事件。因此,对于图2所示的事件50、51、52、53、54、55来说,在正常操作下,微处理器16执行上述事件的顺序由先而后依序为:事件50、事件51、事件52、事件53、事件54、事件55。Because queues 40, 41, 42, and 43 utilize the mechanism of First In First Out (First In First Out), so for the same queue, such as queue 43, when microprocessor 16 stores events 53 sequentially in execution queue 43 . The sequence of the queue 43 is the same, that is, the event 53 is executed first, then the event 54 is executed, and finally the event 55 is executed. As for the execution order of events of different priorities, the microprocessor 16 executes the events in the four queues 40, 41, 42, and 43 in order according to the priority from high to low. After the events in the queue are executed, the microprocessor 16 proceeds to execute the events in the queue with the next priority. Therefore, for events 50, 51, 52, 53, 54, 55 shown in FIG. Event 52, Event 53, Event 54, Event 55.

接下来配合图2至图6说明微处理器16正在执行一事件的过程中接收到插入事件时的处理程序。其中,图3至图6为图2所示的存储器14的不同操作状态的示意图。于微处理器16执行完事件50并使队列40处于被暂停(suspend)状态之后,微处理器16会接着读取并执行对应优先级为次高优先级TPL_NOTIFY的事件51。当微处理器16执行事件51的过程中接收到插入事件例如60时,若事件60相较于事件51是一相对较低的优先级(例如TPL_APPLICATION),则事件60会被存放进相对较低优先级TPL_APPLICATION的队列43中,且执行顺序会在之前已存放的事件55之后,此时,存储器14的操作状态将如图3所示。若事件60相较于事件51同样是相对一较低的优先级(例如TPL_CALLBACK),但因为原本的队列42因未存放任何事件而处于暂停状态,此时,队列42便会被重新启用,而事件60便被存放进队列42内,存储器14的操作状态则如图4所示。若事件60所对应的优先级为次高优先级TPL_NOTIFY,与事件51的相对优先级相同,则事件60会被存放进队列41内,且执行顺序会在先前已存放的事件52之后,此时,存储器14的操作状态如图5所示。若事件60所对应的优先级为其最高优先级TPL_HIGH_LEVEL,其相对优先级高于事件51所对应的次高优先级TPL_NOTIFY,则微处理器16中断执行中的事件51而立刻执行事件60,上述被中断的事件51与其断点BP被暂存在存储器14内的一储存位置TL中,存储器14此时的操作状态如图6所示。后续等微处理器16执行完事件60后,会从存储器14的位置TL中读取事件51与其断点BP的数据,并继续从断点BP开始执行事件51,此即为前述提到的多任务处理。Next, with reference to FIG. 2 to FIG. 6 , the processing procedure when the microprocessor 16 receives an insertion event while executing an event will be described. 3 to 6 are schematic diagrams of different operating states of the memory 14 shown in FIG. 2 . After the microprocessor 16 executes the event 50 and puts the queue 40 in a suspended state, the microprocessor 16 then reads and executes the event 51 corresponding to the next highest priority TPL_NOTIFY. When the microprocessor 16 receives an insertion event such as 60 during the execution of the event 51, if the event 60 is a relatively low priority (such as TPL_APPLICATION) compared to the event 51, the event 60 will be stored in a relatively low priority. In the queue 43 of priority TPL_APPLICATION, and the execution order will be after the previously stored event 55 , at this time, the operation state of the memory 14 will be as shown in FIG. 3 . If event 60 is relatively a lower priority (such as TPL_CALLBACK) than event 51, but because the original queue 42 is in a suspended state because no event is stored, at this moment, queue 42 will be re-enabled, and The event 60 is stored in the queue 42, and the operation state of the memory 14 is shown in FIG. 4 . If the priority corresponding to the event 60 is the second highest priority TPL_NOTIFY, which is the same as the relative priority of the event 51, then the event 60 will be stored in the queue 41, and the execution sequence will be after the previously stored event 52, at this time , the operating state of the memory 14 is shown in FIG. 5 . If the priority corresponding to the event 60 is its highest priority TPL_HIGH_LEVEL, and its relative priority is higher than the second highest priority TPL_NOTIFY corresponding to the event 51, then the microprocessor 16 interrupts the event 51 in execution and executes the event 60 immediately, the above-mentioned The interrupted event 51 and its breakpoint BP are temporarily stored in a storage location TL in the memory 14 , and the operation state of the memory 14 at this time is shown in FIG. 6 . Subsequently, after the microprocessor 16 finishes executing the event 60, it will read the data of the event 51 and its breakpoint BP from the location TL of the memory 14, and continue to execute the event 51 from the breakpoint BP. task processing.

当微处理器16持续接收与执行相对较高优先级的多个事件,或是持续执行存放于相对较高优先级的队列内的事件时,可能会有一段时间不会执行到相对较低优先级的事件,为解决上述问题,本发明还披露一种遮蔽(mask)机制,用以提供一种形同暂时提高较低优先级事件的优先级的运作,可让微处理器16根据需要调整事件的执行顺序,也就是说,当微处理器16在遮蔽机制启动时,于执行完目前正在执行的事件后,接下来会跳过第二优先级的事件,而先执行第三优先级的事件(于此,第二优先级高于第三优先级。)。接下来将举例说明该遮蔽机制的详细运作。When the microprocessor 16 continues to receive and execute multiple events of relatively higher priority, or continues to execute events stored in relatively higher priority queues, it may not be executed for a period of time to relatively lower priority events. level events, in order to solve the above problems, the present invention also discloses a mask mechanism, which is used to provide an operation that is equivalent to temporarily increasing the priority of lower priority events, allowing the microprocessor 16 to adjust The execution order of the events, that is to say, when the microprocessor 16 starts the masking mechanism, after executing the currently executing events, it will skip the events of the second priority and execute the events of the third priority first. Event (Herein, the second priority is higher than the third priority.). Next, an example will be given to illustrate the detailed operation of the masking mechanism.

请同时参阅图2与图7,图7为图2所示的存储器14于微处理器16启用一遮蔽机制下的操作状态的示意图。如图2所示,当微处理器16从队列40中读取并执行事件50时,如果队列40内无任何事件,且未接收与执行新的事件的情况下,微处理器16会依序执行事件51、事件52、事件53、事件54、事件55。然而现在希望微处理器16于执行完目前的事件50之后立刻执行事件53,因此,即需要启动遮蔽机制以遮蔽(mask)比事件53所对应的最低优先级TPL_APPLICATION还高的所有其它待处理的事件,也就是遮蔽队列41所存放的事件51、52,存储器14此时的操作状态如图7所示。而至于队列40、42,因为其皆已无存放任何事件而被暂停,因此本实施例中,微处理器16便不用遮蔽队列40、42。请注意,遮蔽一队列的方式有很多种,其中之一为微处理器16针对每一队列40、41、42、43分别设定一相对应的卷标M,微处理器16可从卷标M的值判断其是否被遮蔽。举例来说,微处理器16先将队列40、41、42、43各自的标签M的值预设为0,而当队列41被遮蔽时,微处理器16会将队列41的卷标M的值设定为1,如此一来,在微处理器16执行完事件50之后,即可藉由队列41的卷标M的值为1得知队列41被遮蔽,则微处理器16会直接跳过存放于队列41的事件51、52而直接执行事件53。再进一步举例说明,当队列40的卷标S的值为1、队列41的卷标M的值为1以及队列42的卷标S的值为1时,微处理器16即可因此得知其不需读取队列40、41、42,可直接到队列43中读取事件53来执行。Please refer to FIG. 2 and FIG. 7 at the same time. FIG. 7 is a schematic diagram of the operation state of the memory 14 shown in FIG. 2 when the microprocessor 16 activates a masking mechanism. As shown in Figure 2, when the microprocessor 16 reads and executes the event 50 from the queue 40, if there is no event in the queue 40, and under the situation of not receiving and executing a new event, the microprocessor 16 will sequentially Execute event51, event52, event53, event54, event55. However, it is now desired that the microprocessor 16 executes the event 53 immediately after the current event 50 is executed. Therefore, it is necessary to start the masking mechanism to mask (mask) all other pending events that are higher than the lowest priority TPL_APPLICATION corresponding to the event 53. Events, that is, the events 51 and 52 stored in the shadow queue 41 , the operation state of the memory 14 at this time is shown in FIG. 7 . As for the queues 40, 42, they are suspended because they have not stored any events, so in this embodiment, the microprocessor 16 does not need to cover the queues 40, 42. Please note that there are many ways to mask a queue, one of which is that the microprocessor 16 sets a corresponding tag M for each queue 40, 41, 42, 43, and the microprocessor 16 can read from the tag The value of M determines whether it is shaded. For example, the microprocessor 16 first presets the values of the labels M of the queues 40, 41, 42, and 43 to 0, and when the queue 41 is blocked, the microprocessor 16 will set the value of the label M of the queue 41 to 0. The value is set to 1. In this way, after the microprocessor 16 executes the event 50, the value of the tag M of the queue 41 is 1 to know that the queue 41 is blocked, and the microprocessor 16 will jump directly. The event 53 is executed directly through the events 51 and 52 stored in the queue 41 . For further illustration, when the value of the tag S of the queue 40 is 1, the value of the tag M of the queue 41 is 1, and the value of the tag S of the queue 42 is 1, the microprocessor 16 can thus know its There is no need to read the queues 40, 41, 42, and the event 53 can be read directly from the queue 43 for execution.

请参阅同时图8与图9,图8为图2所示的存储器14中多个队列40、41、42、43的另一示意图,而图9是说明图8所示的存储器14于微处理器16启用一遮蔽机制下的操作状态的示意图。于图8中,队列40因无存放任何事件而被暂停,队列41存放有事件71、72,队列42存放有事件73、74,以及队列43存储器放有事件75、76、77。微处理器16从队列41内读取并执行事件71,接着,在微处理器16未接收与执行新事件的情况下,微处理器16原本会依序执行事件72、73、74、75、76、77,然而,现在希望微处理器16于执行完目前的事件71之后立刻执行事件75,因此,即需要遮蔽比事件75所对应的最低优先级TPL_APPLICATION还高的所有其它待处理事件,也就是遮蔽队列41、42存储器放的事件72、73、74,存储器14此时的操作状态将如图9所示。Please refer to FIG. 8 and FIG. 9 at the same time. FIG. 8 is another schematic diagram of a plurality of queues 40, 41, 42, 43 in the memory 14 shown in FIG. A schematic diagram of the operating state of the device 16 when a masking mechanism is enabled. In FIG. 8 , queue 40 is suspended because no events are stored, queue 41 stores events 71 , 72 , queue 42 stores events 73 , 74 , and queue 43 stores events 75 , 76 , 77 . The microprocessor 16 reads and executes the event 71 from the queue 41. Then, if the microprocessor 16 does not receive and execute a new event, the microprocessor 16 would originally execute the events 72, 73, 74, 75, 76,77, yet, now hope that microprocessor 16 executes event 75 immediately after carrying out current event 71, therefore, promptly need cover all other pending events higher than the lowest priority level TPL_APPLICATION corresponding to event 75, also It is the events 72, 73, 74 stored in the shadow queues 41, 42, and the operating state of the memory 14 at this time will be as shown in FIG. 9 .

如前所述,本发明计算机系统及其开机方法可以于开机程序执行时,启用多任务处理的机制来处理多个不同优先级的事件,亦即,当该计算机系统的微处理器接收到一相对较高优先级的事件时,可以立即中断执行中的一相对较低优先级的事件以进行相对较高优先级的事件。相较于现有技术,本发明计算机系统与开机方法因为使用队列的关系,所以可处理较多事件;此外,本发明计算机系统与开机方法亦提供一遮蔽(mask)机制,其可暂时提高原本对应较低优先级的事件的优先级,使该事件可提早被执行。As mentioned above, the computer system and its booting method of the present invention can enable a multi-tasking mechanism to handle multiple events with different priorities when the booting program is executed, that is, when the microprocessor of the computer system receives a When a relatively higher priority event is executed, a relatively lower priority event in execution may be interrupted immediately to proceed with a relatively higher priority event. Compared with the prior art, the computer system and the boot method of the present invention can handle more events because of the use of queues; in addition, the computer system and the boot method of the present invention also provide a mask mechanism, which can temporarily improve the original Corresponds to the priority of lower priority events, so that the event can be executed earlier.

以上所述仅为本发明的较佳实施例,凡依本发明的权利要求所做的均等变化与修饰,皆应属本发明的涵盖范围。The above descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made according to the claims of the present invention shall fall within the scope of the present invention.

Claims (18)

1.一种计算机系统,其包含有:1. A computer system comprising: 一储存装置,用来储存一开机系统与一多任务核心;以及a storage device for storing a boot system and a multitasking kernel; and 一微处理器,耦接于该储存装置,用来加载该多任务核心以执行该开机系统。A microprocessor, coupled to the storage device, is used to load the multitasking core to execute the boot system. 2.如权利要求1所述的计算机系统,其中该微处理器于该储存装置中分别产生对应不同优先级的多个队列,用来储存多个事件。2. The computer system as claimed in claim 1, wherein the microprocessor generates a plurality of queues corresponding to different priorities in the storage device for storing a plurality of events. 3.如权利要求2所述的计算机系统,其中该微处理器将已被执行的对应一优先级的一事件自存放该事件的队列中移除。3. The computer system of claim 2, wherein the microprocessor removes an executed event corresponding to a priority from a queue storing the event. 4.如权利要求2所述的计算机系统,其中该微处理器暂停该多个队列中没有存放任何事件的一队列。4. The computer system of claim 2, wherein the microprocessor suspends a queue that does not store any event among the plurality of queues. 5.如权利要求2所述的计算机系统,其中若该微处理器正在执行一事件时接收到一插入事件,且该插入事件所对应的优先级高于该事件所对应的优先级,则该微处理器中断执行该事件以立刻执行该插入事件。5. The computer system as claimed in claim 2, wherein if an interrupt event is received while the microprocessor is executing an event, and the priority corresponding to the interrupt event is higher than the priority corresponding to the event, the The microprocessor interrupts execution of the event to execute the insertion event immediately. 6.如权利要求2所述的计算机系统,其中该微处理器启动一遮蔽机制,以遮蔽一相对优先级较高的事件,并执行一相对优先级较低的事件。6. The computer system of claim 2, wherein the microprocessor activates a masking mechanism to mask an event with a relatively high priority and execute an event with a relatively low priority. 7.如权利要求6所述的计算机系统,其中若该微处理器正在执行一执行中事件,当该执行中事件完成后,该微处理器再执行该相对优先级较低的事件。7. The computer system of claim 6, wherein if the microprocessor is executing an event in progress, the microprocessor executes the event with a relatively lower priority after the event in progress is completed. 8.如权利要求2所述的计算机系统,其中该多任务核心符合μC/OS-II的核心架构,以及该多个队列对应该核心架构中多个事件,该多个事件分别对应不同的优先级。8. The computer system as claimed in claim 2, wherein the multitasking core conforms to the core architecture of μC/OS-II, and the multiple queues correspond to a plurality of events in the core architecture, and the multiple events correspond to different priorities respectively. class. 9.如权利要求1所述的计算机系统,其中该开机系统为一可扩充固件接口。9. The computer system as claimed in claim 1, wherein the boot system is an extensible firmware interface. 10.一种计算机系统的开机方法,该计算机系统包含有一开机系统,该开机方法包含下列步骤:10. A booting method for a computer system, the computer system comprising a booting system, the booting method comprising the following steps: 提供一多任务核心;以及providing a multitasking core; and 加载该多任务核心以执行该开机系统。The multitasking kernel is loaded to execute the boot system. 11.如权利要求10所述的开机方法,还包括下列步骤:11. The starting method according to claim 10, further comprising the steps of: 分别产生对应不同优先级的多个队列,用来储存多个事件。Generate multiple queues corresponding to different priorities to store multiple events. 12.如权利要求11所述的开机方法,还包括下列步骤:12. The starting method according to claim 11, further comprising the following steps: 将已被执行的对应一优先级的一事件自存放该事件的队列中移除。An executed event corresponding to a priority is removed from a queue storing the event. 13.如权利要求11所述的开机方法,还包括下列步骤:13. The starting method according to claim 11, further comprising the steps of: 暂停该多个队列中没有存放任何事件的一队列。Suspend a queue that does not hold any event among the plurality of queues. 14.如权利要求11所述的开机方法,还包括下列步骤:14. The starting method according to claim 11, further comprising the following steps: 若正在执行一事件时接收到一插入事件,且该插入事件所对应的优先级高于该事件所对应的优先级,则中断执行该事件以立刻执行该插入事件。If an insertion event is received while an event is being executed, and the priority corresponding to the insertion event is higher than the priority corresponding to the event, the execution of the event is interrupted to execute the insertion event immediately. 15.如权利要求11所述的开机方法,还包括下列步骤:15. The starting method according to claim 11, further comprising the steps of: 启动一遮蔽机制,以使一相对优先级较高的事件被遮蔽,并使一相对优先级较低的事件被执行。A masking mechanism is activated so that an event with a relatively high priority is masked and an event with a relatively low priority is executed. 16.如权利要求15所述的开机方法,还包括下列步骤:16. The starting method according to claim 15, further comprising the steps of: 若正在执行一执行中事件,则当该执行中事件完成后再执行该相对优先级较低的事件。If an executing event is being executed, the event with a relatively lower priority is executed after the executing event is completed. 17.如权利要求11所述的开机方法,其中该多任务核心符合μC/OS-II的核心架构,以及该多个队列对应该核心架构中多个事件,该多个事件分别对应不同的优先级。17. The booting method according to claim 11, wherein the multitasking core conforms to the core architecture of μC/OS-II, and the multiple queues correspond to a plurality of events in the core architecture, and the multiple events correspond to different priorities respectively. class. 18.如权利要求10所述的开机方法,其中该开机系统为一可扩充固件接口。18. The booting method as claimed in claim 10, wherein the booting system is an extensible firmware interface.
CNB2005100965157A 2005-08-22 2005-08-22 Computer system and booting method thereof Expired - Lifetime CN100371896C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100965157A CN100371896C (en) 2005-08-22 2005-08-22 Computer system and booting method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100965157A CN100371896C (en) 2005-08-22 2005-08-22 Computer system and booting method thereof

Publications (2)

Publication Number Publication Date
CN1731357A true CN1731357A (en) 2006-02-08
CN100371896C CN100371896C (en) 2008-02-27

Family

ID=35963718

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100965157A Expired - Lifetime CN100371896C (en) 2005-08-22 2005-08-22 Computer system and booting method thereof

Country Status (1)

Country Link
CN (1) CN100371896C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273201A (en) * 2017-07-03 2017-10-20 深圳市沃特沃德股份有限公司 Vehicle control syetem and its data processing method
CN112817705A (en) * 2021-01-22 2021-05-18 京东方科技集团股份有限公司 Information release method, terminal equipment and information release system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4858108A (en) * 1985-03-20 1989-08-15 Hitachi, Ltd. Priority control architecture for input/output operation
FR2639734A1 (en) * 1988-11-30 1990-06-01 Europ Rech Electr Lab COMPUTER AND METHOD FOR STARTING A COMPUTER
US5640563A (en) * 1992-01-31 1997-06-17 International Business Machines Corporation Multi-media computer operating system and method
JP2000207165A (en) * 1999-01-13 2000-07-28 Nec Corp Display system for personal computer
US6842812B1 (en) * 2000-11-02 2005-01-11 Intel Corporation Event handling
US6901534B2 (en) * 2002-01-15 2005-05-31 Intel Corporation Configuration proxy service for the extended firmware interface environment
US7194660B2 (en) * 2003-06-23 2007-03-20 Newisys, Inc. Multi-processing in a BIOS environment
US7310724B2 (en) * 2003-06-30 2007-12-18 Intel Corporation Parallel execution of enhanced EFI based BIOS drivers on a multi-processor or hyper-threading enabled platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273201A (en) * 2017-07-03 2017-10-20 深圳市沃特沃德股份有限公司 Vehicle control syetem and its data processing method
CN112817705A (en) * 2021-01-22 2021-05-18 京东方科技集团股份有限公司 Information release method, terminal equipment and information release system

Also Published As

Publication number Publication date
CN100371896C (en) 2008-02-27

Similar Documents

Publication Publication Date Title
US9128736B1 (en) Common scheduling and synchronization primitives
US20190087212A1 (en) Android simulator and method for implementing android simulator
US6434696B1 (en) Method for quickly booting a computer system
US6021425A (en) System and method for optimizing dispatch latency of tasks in a data processing system
US5799188A (en) System and method for managing variable weight thread contexts in a multithreaded computer system
EP2189901B1 (en) Method and system to enable fast platform restart
CN104838359B (en) The software interrupt and thread scheduling of latency-sensitive
JP5385347B2 (en) Method and computer for enlarging free memory in main memory
JP5026494B2 (en) Computer that starts at high speed
US20100079472A1 (en) Method and systems to display platform graphics during operating system initialization
JP5200085B2 (en) Method and computer for starting computer in a short time
WO2018028055A1 (en) Method and apparatus for running android application program on windows system
US8108880B2 (en) Method and system for enabling state save and debug operations for co-routines in an event-driven environment
KR100745888B1 (en) Method and apparatus for handling threads in a data processing system
US8312256B2 (en) Display of a basic input/output system (BIOS) productivity display
US8539214B1 (en) Execution of a program module within both a PEI phase and a DXE phase of an EFI firmware
US20040098722A1 (en) System, method, and computer program product for operating-system task management
US20020178208A1 (en) Priority inversion in computer system supporting multiple processes
CN1362667A (en) Embedded structure with software capable of being updated fast and its software updating method
US8578368B2 (en) Injecting a file from the bios into an operating system
CN111831432B (en) IO request scheduling method, device, storage medium and electronic equipment
US7412597B2 (en) Computer system and booting method thereof
CN100371896C (en) Computer system and booting method thereof
US20110225408A1 (en) Cache boot mechanism
US7213241B2 (en) Methods and apparatus for dispatching Java™ software as an application managed by an operating system control manager

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20081219

Address after: Chinese Beijing Haidian District city Zhongguancun Road No. 1 Building No. 7 hospital via Chinese core building

Patentee after: VIA TECHNOLOGIES(CHINA)CO., Ltd.

Address before: Taipei County of Taiwan

Patentee before: VIA TECHNOLOGIES, Inc.

ASS Succession or assignment of patent right

Owner name: VIA ELECTRONIC ( CHINA) CO., LTD.

Free format text: FORMER OWNER: WEISHENG ELECTRONICS CO., LTD.

Effective date: 20081219

CX01 Expiry of patent term
CX01 Expiry of patent term

Granted publication date: 20080227