1227443 玖、發明說明 【發明所屬之技術領域】 本發明係關於一種資源相容系統,特別是關於一種在可 延伸式韌體介面與基本輸出入系統之資源相容系統。 【先前技術】 在電腦系統中是具有一較低階的韌體,一般熟知爲基本 輸出入系統(BIOS,Basic Input/Output System)其是伴隨電 腦主機而來的,並且是放於唯讀記憶體(ROM,Read Only Memory)上面的一段程式,上面包含了許多電腦輸出入的 基本副程式,以及電腦電源開啓之後,會先執行基本輸出 入系統以進行初値設定及開機自我測試(即 POST, Power-on Self Test),並且,讀取互補式金屬氧化物半導 體(CMOS,Complementary Metal-Oxide Semiconductor)中 的資料(硬碟大小、是否有光碟機、系統時間、是否使用映 射隨機存取記憶體(Shadow RAM)等資訊)。 由於電腦科技進步相當快速,隨著電腦系統發展之傳統 的基本輸出入系統(LegacyBIOS)也發展到達極限。因此, 爲了克服傳統的基本輸出入系統在發展上的瓶頸,英特爾 公司(Intel Corporation)已發展出一種可延伸式I刃體介面 (即 EFI,Extensible Firmware Interface)之規格,可免 除基本輸出入系統的先天限制。而且,此種可延伸式韌體 介面容許使用標準的程式語言工具加入新元件,具有更佳 的擴充性,並且其係以C語言編寫,程式容易維護、閱讀 5 326\專利說明書(補件)\92-04\TF924506 1227443 等優點。 據估計,此種可延伸式韌體介面未來將可能會完全取代 基本輸出入系統。然而,可延伸式韌體介面之系統並無法 應用於現行使用傳統的基本輸出入系統之電腦系統’在可 延伸式韌體介面的環境下,以往在傳統之基本輸出入系統 下工作的傳統作業系統,例如Dos、Windows XP或更早版 本的Windows,都無法工作,因爲可延伸式韌體介面是以 3 2位元資料工作的環境,而傳統之基本輸出入系統是以1 6 位元資料工作的環境,而且可延伸式韌體介面並未提供傳 統之基本輸出入系統的服務程式(Service Routine),例如 中斷服務程式(Interrupt Service Routine)。因此,儘管可 延伸式韌體介面之系統具有上述之優點,但仍無法短時間 地可讓使用舊有之電腦系統的使用者廣泛地應用可延伸式 韌體介面之系統。 【發明內容】 本發明之目的在於提供一種可延伸式韌體介面與基本 輸出入系統之資源相容系統,其使得可延伸式韌體介面可 以使用一般的作業系統,而仍然保有向下相容的彈性,並 且,對於新增之傳統的基本輸出入系統於可延伸式韌體介 面之系統中,並不影響可延伸式韌體介面的工作環境,而 可應用於舊有的電腦系統。 本發明在於提供一種可延伸式韌體介面與基本輸出入系 統之資源相容系統,其係用於同時具有可延伸式韌體介面 與基本輸出入系統之電腦系統中,該電腦系統在開機後先 6 326\專利說明書(補件)\92-04\TF924506 1227443 執行可延伸式韌體介面之系統,欲切換至基本輸出入系統 時,該資源相容系統執行之步驟,首先,由可延伸式韌體 介面之一傳統操作系統支援驅動程式啓用一映射隨機存取 記憶體;接著,由傳統操作系統支援驅動程式找出一唯讀 記憶體中之一傳統基本輸出入系統;其此,由傳統操作系 統支援驅動程式讀出傳統基本輸出入系統中一壓縮唯讀記 憶體程式檔;然後,由傳統操作系統支援驅動程式解壓縮 該壓縮唯讀記憶體程式檔,並且存放於該映射隨機存取記 憶體中;再者,由傳統操作系統支援驅動程式在映射隨機 存取記憶體中設定一暖開機重置向量;以及,由傳統操作 系統支援驅動程式執行暖開機的重置動作.,使電腦系統進 行暖開機的程序。 【實施方式】 以下參照附圖說明本發明之一較佳具體例。 本發明之可延伸式韌體介面與基本輸出入系統之資源 相容系統是爲了因應目前的電腦系統大多數仍使用傳統的 基本輸出入系統,而在新一代使用可延伸式韌體介面的電 腦系統尙未普及前,以使用同時具有可延伸式韌體介面與 基本輸出入系統之電腦系統中,藉此,在過渡時期而產生 的可延伸式韌體介面與基本輸出入系統以供使用者選擇使 用之電腦系統。 請參照圖1,其爲本發明之流程圖,爲了方便說明本發 明之流程,可參考圖2爲本發明之可延伸式韌體介面之系 統示意圖。在圖2中,唯讀記憶體1 〇所存放之可延伸式韌 7 3之6\專利說明書(補件)\92-04\TF924506 1227443 體介面之所以冠以「可延伸(Extensible )」之名,是因爲 其具有一種可藉由加入驅動程式(Driver )模組及應用程 式(A p p 1 i c a t i ο η )模組(未繪示)而達到功能延伸之機制。 這些驅動程式模組及應用程式模組可由程式開發者根據英 特爾公司制訂之可延伸式韌體介面規格而自行依需要編 寫,以用來執行特殊工作。而以下所述之驅動模組和選擇 模組即係以此種方式做成。爲了使本發明可應用於傳統之 基本輸出入系統的電腦系統,故於可延伸式韌體介面之系 統中存放一傳統的基本輸出入系統1 2,以供使用者選擇使 用何種系統。 在圖1中,當具有可延伸式韌體介面與基本輸出入系統 之電腦系統被開啓電源時(步驟S 3 0 ),首先會執行可延伸 式韋刃體介面之開機管理程式(EFI boot manager),進行系 統初始値的設定,並相繼載入可延伸式韌體介面驅動程式 及應用程式(步驟S32)。作爲可延伸式韌體介面之一選擇 模組的一開機元件選擇程式可以選擇操作在可延伸式韌體 介面之操作環境或傳統的基本輸出入系統之操作環境,當 選擇傳統的基本輸出入系統之操作環境時,即由可延伸式 韌體介面切換至基本輸出入系統,首先,由存放於唯讀記 憶體1 〇中之可延伸式韌體介面而可作爲一驅動模組之一 傳統操作系統支援驅動程式(Legacy OS Support Driver)對 電腦系統中之一北橋(North Bridge)(未繪示)進行設定 後’以啓用具有高速存取記憶體之一映射隨機存取記憶體 (未繪示)(步驟S34),在本實施例中是起用映射隨機存取記 8 326\專利說明書(補件)\92-04\TF924506 1227443 憶體中的E區段與F區段(E0000〜FOOOO)。 接著,由傳統操作系統支援驅動程式找出置放於唯讀記 憶體10中之傳統的基本輸出入系統12(步驟S3 6),並且讀 出傳統的基本輸出入系統中每一個經壓縮的唯讀記憶體程 式檔(R Ο M F i 1 e)(步驟S 3 8 ),而由傳統操作系統支援驅動程 式解壓縮這些經壓縮的唯讀記憶體程式檔以存放於映射記 憶體中(步驟S40),使電腦系統可以快速讀取到基本輸出 入系統中所要讀取的唯讀記憶體程式檔。 其次,由傳統操作系統支援驅動程式在映射記憶體中設 定一暖開機重置向量(Warm Reset Vector)(步驟S 42),並 且執行暖開機的重置動作,使電腦系統進行暖開機的程序 (步驟S 44)。此時,電腦系統跳到(jump)暖開機重置向量所 指定的位址(步驟S 46),並且執行傳統之基本輸出入系統 的執行碼(步驟S 4 8 ),以進行如系統、周邊裝置、中斷服 務程式等設定或測試的工作,之後,電腦系統會啓動傳統 的操作系統(OS,Operation System)(步驟 S50),如 Dos、 Windows XP或更早版本的Windows,再依使用者的需求以 使用不同的應用軟體。 電腦系統開機在進行初始化(Initialize)動作時,同時具 有可延伸式韌體介面與基本輸出入系統之電腦系統,會發 生部分的初始化動作在可延伸式韌體介面與基本輸出入系 統重覆,因此,要將其重覆的動作儘量放在可延伸式韌體 介面來執行,以減少基本輸出入系統佔用唯讀記憶體的空 間1〇(如圖2所示)。 9 326\專利說明書(補件)\92-04\TF924506 1227443 在具有可延伸式韌體介面之電腦系統中加上一安裝公 用程式(Setup Utility),可以讓使用者自由地設定系統,而 且容許使用標準的程式語言工具進行設定,使得可延伸式 韌體介面具有極佳的系統開發之優點。 本發明的優點係於可延伸式韌體介面之系統可以使用 一般的作業系統,而仍然保有向下相容的彈性,並且對於 新增之傳統的基本輸出入系統於可延伸式韌體介面之系統 中,並不影響可延伸式韌體介面的工作環境,而可應用在 舊有的電腦系統。 雖然本發明已參照較佳具體例及舉例性附圖敘述如 上,惟其應不被視爲係限制性者。熟悉本技藝者對其形態 及具體例之內容做各種修改、省略及變化,均不離開本發 明之範圍。 【圖式簡單說明】 圖1係爲本發明之流程圖;及 圖2係爲本發明之可延伸式韌體介面之系統示意圖。 【元件符號說明】 10................唯讀記憶體 12................傳統的基本輸出入系統 14................唯讀記憶體程式檔 S30〜S50.......步驟 10 326\專利說明書(補件)\92-04\TF9245061227443 发明 Description of the invention [Technical field to which the invention belongs] The present invention relates to a resource compatible system, in particular to a resource compatible system with an extensible firmware interface and a basic input / output system. [Previous technology] In computer systems, there is a lower-level firmware, generally known as the Basic Input / Output System (BIOS), which comes with the host computer and is placed in read-only memory A program on the ROM (Read Only Memory) contains many basic subroutines for computer input and output, and after the computer power is turned on, the basic input and output system will be executed first to perform initial settings and boot self-test (ie, POST, Power-on Self Test), and read data from Complementary Metal-Oxide Semiconductor (CMOS) (hard disk size, drive availability, system time, whether to use mapped random access memory (Shadow RAM). Due to the rapid progress of computer technology, the traditional basic input / output system (LegacyBIOS) has also reached the limit with the development of computer systems. Therefore, in order to overcome the development bottleneck of the traditional basic input / output system, Intel Corporation has developed a specification of an extensible I blade interface (ie, EFI, Extensible Firmware Interface), which can eliminate the basic input / output system. Innate limitation. In addition, this extensible firmware interface allows the use of standard programming language tools to add new components, has better expandability, and it is written in C language, the program is easy to maintain and read 5 326 \ Patent Specification (Supplement) \ 92-04 \ TF924506 1227443 and other advantages. It is estimated that such an extensible firmware interface may completely replace the basic I / O system in the future. However, the system of the extensible firmware interface cannot be applied to the current computer system using the traditional basic input / output system. In the environment of the extensible firmware interface, the traditional operation of the traditional basic input / output system was used in the past. Systems, such as Dos, Windows XP or earlier versions of Windows, will not work, because the extensible firmware interface works with 32-bit data, while traditional basic I / O systems use 16-bit data Working environment, and the extensible firmware interface does not provide the traditional service input (Service Routine) of the basic input / output system, such as the Interrupt Service Routine. Therefore, although the system of the extensible firmware interface has the above-mentioned advantages, it is still not possible for the users of the old computer system to widely use the system of the extensible firmware interface in a short time. SUMMARY OF THE INVENTION The object of the present invention is to provide a resource compatible system of an extensible firmware interface and a basic input / output system, which enables the extensible firmware interface to use a general operating system while still maintaining backward compatibility. In addition, the newly added traditional basic input / output system in the extensible firmware interface system does not affect the working environment of the extensible firmware interface, but can be applied to the old computer system. The present invention is to provide a resource compatible system of an extensible firmware interface and a basic input / output system, which is used in a computer system having both an extensible firmware interface and a basic input / output system. First 6 326 \ Patent Specification (Supplement) \ 92-04 \ TF924506 1227443 A system that implements an extensible firmware interface. When switching to a basic input / output system, the steps performed by the resource-compatible system are first performed by the extensible Traditional operating system support driver to enable a mapped random access memory; then, the traditional operating system support driver finds a traditional basic input / output system in a read-only memory; The traditional operating system support driver reads out a compressed read-only memory program file in the traditional basic input / output system; then, the traditional operating system support driver decompresses the compressed read-only memory program file and stores it in the mapping random storage. Memory; further, a warm boot is set in the mapped random access memory by a traditional operating system support driver Vector set; and a traditional operating system reset operation performed warm boot drivers support the computer system to carry out warm boot procedure. [Embodiment] A preferred embodiment of the present invention will be described below with reference to the drawings. The resource compatible system of the extensible firmware interface and the basic input / output system of the present invention is to respond to the majority of current computer systems that still use the traditional basic input / output system, and in the new generation of computers using the extensible firmware interface Before the system was popularized, the computer system with both the extensible firmware interface and the basic input / output system was used, so that the extensible firmware interface and the basic input / output system generated during the transition period were provided for users. Choose the computer system to use. Please refer to FIG. 1, which is a flowchart of the present invention. In order to facilitate the description of the process of the present invention, FIG. 2 is a schematic diagram of the system of the extensible firmware interface of the present invention. In Figure 2, the read-only memory 10 stores the extensible tough 7 6 of 6 \ Patent Specification (Supplement) \ 92-04 \ TF924506 1227443. The reason why the interface is "Extensible" The name is because it has a mechanism that can be extended by adding a driver (Driver) module and an application (A pp 1 icati ο η) module (not shown). These driver modules and application modules can be written by program developers according to the specifications of the extensible firmware interface developed by Intel to perform special tasks. The drive module and selection module described below are made in this way. In order to make the present invention applicable to the computer system of the traditional basic input / output system, a traditional basic input / output system 12 is stored in the system of the extensible firmware interface for users to choose which system to use. In Figure 1, when a computer system with an extensible firmware interface and a basic input / output system is powered on (step S30), the EFI boot manager (EFI boot manager) is first executed. ), Set the initial system settings, and load the extensible firmware interface driver and application program one after another (step S32). A boot component selection program, which is one of the selectable modules of the extensible firmware interface, can select an operating environment of the extensible firmware interface or an operating environment of a traditional basic input / output system. When the traditional basic input / output system is selected, In the operating environment, it is switched from the extensible firmware interface to the basic input / output system. First, the extensible firmware interface stored in the read-only memory 10 can be used as a traditional operation of a drive module. The system support driver (Legacy OS Support Driver) after setting one of the North Bridge (not shown) in the computer system 'to enable one of the high-speed memory mapping random access memory (not shown) ) (Step S34), in this embodiment, the mapping random access memory 8 326 \ Patent Specification (Supplement) \ 92-04 \ TF924506 1227443 Memory E and F (E0000 ~ FOOOO) . Next, the traditional operating system support driver finds the traditional basic input / output system 12 placed in the read-only memory 10 (step S36), and reads out each compressed unique input / output system in the traditional basic input / output system. Read the memory program file (R Ο MF i 1 e) (step S 3 8), and the compressed operating system support driver decompresses these compressed read-only memory program files to store in the mapped memory (step S40 ), So that the computer system can quickly read the read-only memory program file to be read in the basic input / output system. Secondly, the driver supported by the traditional operating system sets a Warm Reset Vector in the mapped memory (step S 42), and performs a warm reset operation to make the computer system perform a warm boot process ( Step S 44). At this time, the computer system jumps to the address specified by the warm boot reset vector (step S 46), and executes the execution code of the traditional basic input / output system (step S 4 8) to perform operations such as system and peripheral Device, interrupt service program and other settings or tests, after that, the computer system will start the traditional operating system (OS, Operation System) (step S50), such as Dos, Windows XP or earlier versions of Windows, and then according to the user ’s Need to use different applications. When the computer system is powered on, the computer system with the extensible firmware interface and the basic I / O system is in the Initialize operation. Part of the initialization operation will be repeated in the extensible firmware interface and the basic I / O system. Therefore, the repeated actions should be performed as much as possible on the extensible firmware interface to reduce the basic input / output system's occupation of the read-only memory space 10 (as shown in Figure 2). 9 326 \ Patent Specification (Supplement) \ 92-04 \ TF924506 1227443 Adding a Setup Utility to a computer system with an extensible firmware interface allows users to set the system freely and allows Using standard programming language tools to make settings, the extensible firmware interface has the advantages of excellent system development. The advantage of the present invention is that the system of the extensible firmware interface can use a general operating system, while still maintaining backward compatibility flexibility, and for the newly added traditional basic input / output system in the extensible firmware interface, The system does not affect the working environment of the extensible firmware interface, but can be applied to old computer systems. Although the present invention has been described above with reference to preferred specific examples and exemplary drawings, it should not be construed as limiting. Those skilled in the art can make various modifications, omissions, and changes to their forms and specific examples without departing from the scope of the present invention. [Brief description of the drawings] FIG. 1 is a flowchart of the present invention; and FIG. 2 is a schematic diagram of a system of the extensible firmware interface of the present invention. [Description of component symbols] 10 ... Read-only memory 12 ... Traditional basic input / output system 14 ... Read-only memory program files S30 ~ S50 ......... Step 10 326 \ Patent Specification (Supplement) \ 92-04 \ TF924506