TW200805083A - Method of reading OpROM image from storage device - Google Patents

Method of reading OpROM image from storage device Download PDF

Info

Publication number
TW200805083A
TW200805083A TW95125417A TW95125417A TW200805083A TW 200805083 A TW200805083 A TW 200805083A TW 95125417 A TW95125417 A TW 95125417A TW 95125417 A TW95125417 A TW 95125417A TW 200805083 A TW200805083 A TW 200805083A
Authority
TW
Taiwan
Prior art keywords
code
storage device
oprom
computer device
partition
Prior art date
Application number
TW95125417A
Other languages
Chinese (zh)
Inventor
Ying-Chih Lu
Original Assignee
Inventec 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 Inventec Corp filed Critical Inventec Corp
Priority to TW95125417A priority Critical patent/TW200805083A/en
Publication of TW200805083A publication Critical patent/TW200805083A/en

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention discloses a method of reading an OpROM image from a storage device, and the method is applied to a computer device (such as a desktop computer, a notebook computer and a server) that installs at least one storage device (such as a hard disk). The method includes creating a reserved partition in the storage device for storing an OpROM image required for driving various different daughter cards on the computer device, and storing related data (such as PFA, hard disk serial number, and access channel) of the storage device to a nonvolatile random access memory (NVRAM) installed in the computer device, such that when the basic input/output system (BIOS) of the computer device executes the power on self test (POST), related data of the storage device is read from the NVRAM, and then the OpROM stored in the reserved partition is examined. If it is confirmed that there is no error, then the OpROM will be loaded into a memory of the computer device, and the initialization of the OpROM will be executed according to a BIOS boot specification (BBS), and a boot connection vector table (BCV table) will be created, and the BCV table will be stored in the NVRAM. After the standard procedure of the BIOS that follows is executed and the BBS of the OpROM is completed, the peripherals connected to different daughter cards can be initialized successfully. The invention not only lowers the hardware cost effectively without installing the memory for storing the OpROM to the computer device and each daughter card, but also simplifies the updating and debugging processes of the OpROM effectively, so as to greatly reduce the time and effort, enhance the expandability of the computer device, and prevent unauthorized disclosure of the BIOS program.

Description

200805083 九、發明說明: 【發明所屬之技術領域】 本發明係-韻取麵唯讀記憶體程式碼的方法,尤 指-電腦裝置在開機時,可自動至一儲存裝置,讀取並執 行其中所儲存用以驅_電腦裝置上各式轉接卡所需的 選擇唯讀記題(Option _,以下龍__式碼, 以順利啟動與各鋪針树接_邊裝置。 【先前技術】 按’電腦裝置(如:桌上型電腦、筆記本型電腦及祠 ,斋等···)上所安裝的選擇唯讀記憶體(〇pti〇n職,以下 簡稱_M) ’ -㈣指縣本輸人/輸出系統(如也 I_/Gutput System,町簡稱 BI_#_M(firmware) 的常駐程式,以_輕场钱_針(論伽_ or daughter card)為例,該轉接卡上所儲存的〇pR〇M係 =周邊裝置(peripheral device)透過該轉接卡與該電腦 衣置相連接日寸,用以控制該周邊裝置的開機(5〇的),使該 電腦裝置的臓得透過質問(int⑽gate) _M的方 式決定令那幾台與其相連接的周邊裝置被開機 (booted) 〇 為使市售的各式電腦裝置能與為數眾多的周邊設備 相連接,業者在該等電腦裝置出廠前,均會在其上安裝各 式轉接卡,傳統上,〇PR〇M係常駐在轉接卡上,故每一轉 2上均必需設有一用以儲存〇P_的快閃記憶體,為數 W夕的决閃§己憶體自然造成硬體成本的增力σ。為節省硬體 200805083 成本,電腦裝置的設計及製造業者乃選擇將〇pR〇M與BI〇s 一起存放至在的主機板(system b〇arci)上所設的快閃記憶 體(Flash ROM)中,常駐在電腦裝置上,使得〇pR〇M在電 腦裝置的初始化(initialization)過程中被BIOS執行 (execute)。原則上,OpROM 的存放空間(0pR〇M Shad〇w RAM) 係被限制在128 KB大小,該存放空間係被所有〇pR〇M共 同分享,其限制顯然頗為嚴格。因此,每一轉接卡的〇pR〇M 均需藉擺脫掉一些初始化過程中所使用的初始碼 (initialization code),僅保留較小空間容量的驅動碼 (runtime code) ’以縮小其自身的空間,否則,在存放空 間被限制的情形下,電腦裝置上所能安裝的轉接卡數量及 其擴充性,自然將因此而受到限制。 然而’由於OpROM程式開發者(devei〇per)在對 進行5又计及開發日守’為测試QpROM的功能,經常需對OpROM 進行除錯(debug),而更新(upciate)〇pR〇j|時,尚需BI〇s 程式内谷(image)或原始碼(source code),以進行重建 (rebuilding),此舉不僅對程式開發者造成極大的不便, 亦極易使業者所設計的BIOS程式内容或原始碼對外洩漏 (若OpROM程式為外包設計開發者)。此外,由於〇pR〇M& BIOS —般係被存放在電腦裝置主機板上的快閃記憶體 中,故經常性地對OpROM或Bios程式内容進行更新,極 易導致快閃記憶體被壞,此外,由於用以存放〇pR〇M及 BIOS程式内容的快閃記憶體的空間一般均不大,故無法將 大1的OpROM與BIOS放入同一快閃記憶體中。 8 200805083 【發明内容】 有鐘於前述問題,發明人經過長久努力研究與實驗, 終於開發設計出本發明的一種自儲存裝置上讀取選擇唯讀 記憶體程式碼的方法,期使電腦裝置及其上的轉接卡無需 安裝用以存放OpROM的記憶體,以降低硬體成本,並達成 ~ 有效簡化的更新及除錯程序、增加該電腦裝置的擴 - 充能力及確保BIOS程式不致外洩的功能。 本發明之目的,該方法係應用至安裝有至少一儲存裝 ® i的電腦裝置上,包括在該儲存裝置中建立-專用分割區 (reserved partition),用以儲存驅動該電腦裝置上各式 轉接卡所需的OpROM程式碼,並將該儲存裝置的相關資料 (如:PFA、硬碟編號及存取通道等)存放至該電腦裝置上所 設的非揮發性隨機存取記憶體(N〇n_v〇lati le Access Memory,以下簡稱NVRAM)中,該方法係在該電腦 裝置的基本輸入輸出系統(Basic input 0utput System, Φ 以下簡稱則S)執行開機自我測試(Power-On-Self Test, 以下簡稱POST)程序時,自NVRAM中讀取該儲存裝置的相 關育料,再依該相關資料,對該專用分割區所儲存的0pr0m — 進行檢查,俟確認無誤後,將OpROM載入該電腦裝置的記 憶體中’依OpROM的BI0S開機規格(m〇s B〇〇t Specification,以下簡稱BBS)的標準規格執行〇ρ_的 初始紅序’且建立一開機連接向量表(B〇at c〇nnec衍〇n200805083 IX. Description of the Invention: [Technical Field] The present invention is a method for reading a memory code, especially if the computer device is automatically turned on to a storage device, read and executed therein. The optional read-only question (Option _, the following dragon __ code) required to drive the various adapter cards on the computer device is used to smoothly start the connection with each needle tree. [Prior Art] According to the 'computer device (such as: desktop computer, notebook computer and 祠, 斋, etc.) installed on the choice of read-only memory (〇pti〇n job, hereinafter referred to as _M) '- (four) refers to the county This input/output system (such as I_/Gutput System, the abbreviation of BI_#_M (firmware) resident program, for example, _ light field money _ needle (on the gamma or daughter card) as an example, the adapter card The stored 〇pR〇M system=peripheral device is connected to the computer device through the adapter card to control the booting of the peripheral device (5〇), so that the computer device is obtained. Through the question (int(10)gate) _M, it is decided that the peripheral devices connected to them are Booted 〇In order to connect various commercially available computer devices with a large number of peripheral devices, the manufacturer will install various adapter cards on the computer devices before they leave the factory. Traditionally, 〇PR 〇M system is resident on the riser card, so each flash 2 must have a flash memory for storing 〇P_, which is the number of W 的 闪 § 己 体 自然 天然 天然 天然 天然 天然 天然σ. In order to save the cost of hardware 200805083, the design and manufacturer of the computer device chose to store the 〇pR〇M and BI〇s together on the flash memory (system flash) provided on the system board (system b〇arci). In the ROM), it is resident on the computer device, so that the 〇pR〇M is executed by the BIOS during the initialization of the computer device. In principle, the storage space of the OpROM (0pR〇M Shad〇w RAM) is Limited to 128 KB, this storage space is shared by all 〇pR〇M, and the restrictions are obviously strict. Therefore, each 转接pR〇M of the riser card needs to be used to get rid of some of the initialization process. Initialization code, leaving only a small space The amount of the runtime code 'to reduce its own space, otherwise, in the case of limited storage space, the number of adapter cards that can be installed on the computer device and its expansion will naturally be limited. However, because the OpROM program developer (devei〇per) is in the process of doing the 5 and taking into account the development of the QpROM function, it is often necessary to debug the OpROM, and update (upciate) 〇pR〇j When you need to use the BI〇s program image or source code for rebuilding, this will not only cause great inconvenience to the programmer, but also make it easy for the programmer to design the BIOS. The program content or source code is leaked externally (if the OpROM program is an outsourced design developer). In addition, since the 〇pR〇M&BIOS is normally stored in the flash memory on the motherboard of the computer device, the contents of the OpROM or Bios program are frequently updated, which may cause the flash memory to be damaged. In addition, since the space for storing the flash memory of the 〇pR〇M and the BIOS program is generally small, it is impossible to put the Big 1 OpROM and the BIOS into the same flash memory. 8 200805083 [Summary of the Invention] With the above problems, the inventor has finally worked hard to study and experiment, and finally developed a method for reading and selecting a read-only memory code on a self-storage device of the present invention, and the computer device and The riser card on the switch does not need to be installed to store the memory of the OpROM, so as to reduce the hardware cost, and achieve an effective simplified update and debug procedure, increase the expansion and charge capacity of the computer device, and ensure that the BIOS program does not leak. The function. For the purpose of the present invention, the method is applied to a computer device equipped with at least one storage device, including a dedicated partition in the storage device for storing and driving various types of devices on the computer device. The OpROM code required for the card is stored, and the relevant information of the storage device (such as PFA, hard disk number and access channel, etc.) is stored in the non-volatile random access memory (N) provided on the computer device. 〇n_v〇lati le Access Memory, hereinafter referred to as NVRAM), the method performs a Power-On-Self Test on the Basic Input and Output System (hereinafter referred to as S) of the computer device. In the following POST) program, the relevant material of the storage device is read from the NVRAM, and the 0pr0m stored in the dedicated partition is checked according to the relevant data, and after confirming the error, the OpROM is loaded into the computer. In the memory of the device, 'the initial red sequence of 〇ρ_ is executed according to the standard specification of the BIOS switching specification (hereinafter referred to as BBS) of OpROM and a boot connection vector is established. (B〇at c〇nnec derivative 〇n

Vector table,以下簡稱gey table),並將該BCV表存放 至NVRAM中,嗣,在執行BI〇s的後續標準程序時,完成 9 200805083 _M的臓開機規格程序,使得與各該轉接卡相連接的 周邊裝置得以被順利啟動。 為便貴審查委員能對本發明的目的、技術特徵及其 功效’有更進-步的認贿麵,祕舉—實施例,並配 合圖式,詳細說明如下: 【實施方式】Vector table (hereinafter referred to as gey table), and the BCV table is stored in NVRAM, 嗣, in the implementation of the subsequent standard procedures of BI〇s, complete the 9 200805083 _M 臓 boot specification program, so that with each of the adapter cards The connected peripherals are successfully started. For the sake of the purpose of the present invention, the reviewer can have a more advanced step of accepting bribes, secrets, embodiments, and drawings, which are described in detail as follows:

本發明係-種自齡裝置上讀取選神讀記憶體程式 碼的方法,妨法係翩至安裝有至少-齡裝置的電腦 裝置(如·桌上型電腦、筆記本型電腦及伺服器等···)上, 該方法提供了-使用者工具(t〇⑷,該使用者工具類似於 磁碟作㈣統(Disk Gpeming System,嶋騰)中所 提供的Fdisk· exe功能(utility),包括下列功能選項 使用者選取: (1)選擇一儲存裝置; ⑵在所麵_存裝置上建立—專时躯,該專 用分割區的空間大小係由使用者指定; (3)移除該專用分割區; (4) 割區中; 將周邊裝置所屬的OpROM程式碼儲存至該專用分 (5) 自該專用分割區除0pR0M程式碼;及 (6) 在BIOS進行post期間,選擇令哪一個儲存裝置 致能,以啟動其中所儲存的OpROM程式碼。 如此,使用者即可透過該使用者工具,選擇在該電腦 裝置的儲存裝置巾預先建· _分魏,_儲存驅^ 200805083 該電腦裝置上各式周邊裝置的轉接卡所需的OpROM程式 碼。 在本發明中,該儲存裝置可為一硬碟,該專用分割區 的類型(type)可為23,其空間大小係由使用者透過該使用 者工具所提供的功能,在硬碟上指定的空間大小,例如 4腸’該專用分割區包括一分割區表頭(Part i t i on Header ) 及複數個模組(module),參閱第1圖所示,其中該分割區 表頭係用以儲存下列資料: (1) 簽章(Signature):係存放在位元組〇〜位元組 19,如:$〇pr〇m一PARTITION一SN$ ; (2) 分割區尺寸(partiti〇n Size):係將專用分割區 所佔用的空間大小存放在位元組2〇〜位元組23,如: 00400000h(4MB); (3) OpROM專用分割區檢查碼(0pR0M Partiti〇n Checksum):係用以對0pR0M專用分割區進行檢查的檢查 碼,包括表頭,存放在位元組24 ;及 (4) 專用分割區表頭檢查碼(partit〇n hea(jer Checksum):係用以對專用分割區表頭進行檢查的檢查碼, 存放在位元組25。 各該模組可依該專用分割區是否包含OpROM的韌體 (firmware)部份,被區分成第2及3圖所示的兩種不同模 組,各該模組分別包括模組本體(m〇duleb〇dy)及模組表頭 (module header),其中模組本體係用以存放〇pR〇M程式碼 (及其勃體’若韌體存在,如第2圖所示),模組表頭則係用 11 200805083 以儲存下列資料: (1) 模組識別碼(Module ID) ··係存放在位元組〇(byte 〇)〜位元組3,包括廠商識別碼(Vendor ID)及裝置識別碼 (Device ID),如:8086h/2682h ; (2) 模組尺寸(ModuleSize):係將模組所佔用的空間 大小,包括表頭,存放在位元組4〜位元組7 ; (3) 旗標(Flag):係存放在位元組8,用以表示韌體是 否存在; (4) 韌體位移值(Firmware Offset):係存放在位元 組9〜位元組10,用以表示模組中的章刃體位於模組内之那個 位址;及 (5) 模組檢查碼(Checksum in module) ··係用以對模 組進行檢查的檢查碼,包括表頭,存放在位元組11。 本發明在實施時,需先將該硬碟的相關資料,如:硬 碟控制裔之PCI裝置位址(Peripheral Component Interconnect Function Address,以下簡稱pfa)、硬碟編 號及存取通道(經由INT 13存取硬碟的通道)等,存放至該 電腦裝置上所設的一非揮發性隨機存取記憶體 (Non-Volatile Random Access Memory,以下簡稱NVRAM) 中;在本發明的以下敘述中,亦將該儲存裝置的相關資料 稱之為擴充的PFA (Extended PFA,以下簡稱epfa),以有 別於PFA 〇 如此,當該電腦裝置被啟動後,即可依下列步驟,參 閱第4圖所示,將〇pr〇m自該專用分割區载入至該電腦裝置 12 200805083 的記憶體中,進而順利啟動與各該轉接卡相連接的周邊裝 置: (101) 在該電腦裝置執行BIOS的P0ST程序期間,即在 隨插即用(Plug and Play,簡稱以下pnp)的程序被執行後, 且在該等OpROM程式碼進行初始化程序前,自_趟中讀 取 EPFA ; (102) 依據EPFA中的PFA,將各該周邊裝置(如:設於 主機板上的SCSI或設於轉接卡上的SCSI或主機板上的 ΑΤΑ)所對應的〇pr〇m程式碼的存放位置找出來,並執行其 初始化程式碼(initial code);若OpROM程式碼包含開機 連接向量(Boot Connection Vector,以下簡稱BCV)之程 式進入點,則依EPFA中的硬碟編號,執行〇p削|程式碼中 之相對應的BCV程式,以藉該初始化程式碼完成周邊裝置 的初始化作業(initialization),且偵測周邊裝置是否已 正確被連接至該電腦裝置,並依該硬碟編號,透過存取通 道(如:在CHS摸式下為INT13h或在LM模式下為INn3h extention),至該硬碟中指定的區段(sect〇r)讀取主機開 機記錄(Master Boot Record,以下簡稱 MBR)。 在此需特別說明者,乃BCV項目係置放在PnPOpROM的 擴充表頭(Expansion Header)内,茲謹以一内含bcv的 0pR0M為例說明,其BBS之BCV表係在POST時被建立,以 硬碟的名稱字串(name string)作為指標(p〇inter),如第 5圖所示,包括下列三種類型(type): (1)BI0S處理程式(handler) ··本發明將其稱之為先 13 200805083 進科技連接(Advanced Technology Attachment,以下簡稱 ΑΤΑ)裝置(device),如:主機板上(onboard)的ΑΤΑ驅動介 面,提供主要及次要通道(Primary/secondary channel), 且由BIOS提供鉤接(Hook)上存取通道INT 13h所須之程 式碼; 。 (2)隨插即用(Plug and Play,以下簡稱PnP)轉接卡 . 上設置的BCV項目:每一 BCV項目對應於一硬碟,如:BCV#1 及BCV#2,並於執行OpROM初始化程式後由BIOS呼叫(cal 1) • 執行BCV,以鉤接上存取通道INT 13h ;及 (3)其餘不含PnP相容設定(〇311^1:丨1}16 conf i gurabi 1 i ty)及擴充表頭邙父阳1^〇11此8(161〇的標準 ISA/PCI轉接卡:本發明在此將其稱之為傳統轉接卡 (Legacy Cards),該等設有OpROM的傳統轉接卡係由其中 的初始化程式碼直接鉤接上存取通道INT 13h。 其BCV優先權(priority)的指標係存放在該電腦装置 鲁 的非揮發性記憶體(NV memory)中,如第6圖所示,用以索 引(index)出該BCV表中存放的某一特定的裝置,該BCV表中 裝置的數量’係亦存放在非揮發性記憶體中,且在每次執 行POST時,檢查是否發生改變,若數量發生改變,Bios將 自動調整BCV表中裝置的優先權。復參閱第5圖所示,當BCV 表中的裝置被安裝後,BIOS將調整BCV優先權順序,如第6 圖所示,依序為BCV #1,ATA Drives,Legacy Cards及BCV #2; 200805083 (103) 依據MBR的内容,尋找隱藏⑽㈣在該硬碟 中的該專用分割區,且在找到該專用分割區後,對該專用 分割區中簽章及分割區表頭檢查碼(Partition header Checksum)進行檢查’若簽章及檢查碼均檢查無誤,即將該 專用分割區中存放的所有〇ρ_程式碼載入(1〇ad)至記憶 體(memory)中’並對〇pR〇M專用分割區檢查碼(〇pR〇M Partition Checksuin)進行檢杳; (104) 俟完成將所有0pR0M程式碼載入至記憶體的工 作後,恢復(restore)至初始狀態(〇riginal state),即與 該存取通道脫鉤(unhook),並將BI〇s資料區(BI〇s此乜 Area,以下簡稱肋A )由4〇:70h回復(restore)成〇 ;在此 需特別說明者,乃BDA係指在隨機存取記憶體(RAM)中用以 存放BIOS資料的區域,被BI〇s用來管理電腦裝置所連接 的各式周邊衣置及資源,的區段(segj^j^)起始位置係 0040h,其中位址40:75h係用以記錄(rec〇rd)硬碟的數目^ (105) 依BBS標準規格執行〇pR〇M的初始程序,且在 建立- BCV表的過程中,建立本發明所稱之一擴充的開機 連接向量(Extended BCV)表,並將該EBCV表存放至nvram 中;在此需特別一提者,在將所有〇pR〇M程式碼载入至記 憶體的過程中,優先使用硬碟的專用分割區中存放的所有 OpROM程式碼;及 (1〇6)廟j,在執行後續BI0S標準程序時,完成 的BBS,使得與各該轉接卡相連接的周邊裝置得以被順利 啟動。 200805083 據上所述可知’本發縣⑽_存麵相分割區, 且在該電觸裝置被啟動後,將〇_载入至該_裝置的記 隐體中’明顺動各轉接卡相連接關較置的 法’具有下列諸多優點·· ⑴在對OpROM程式碼進行更新時,係對該硬碟中專用 分割區進行更新,故可確保快閃記憶體的安全性; ⑵對BIOS程式開發者而言,提供了極大的方便性, ^在對賴難式碼進行更⑽,無需重建娜的程式内 容,僅需藉由置換原專用分割區内的〇pR〇M即可,因此,勘$ 程式開發者有任何新的0pR0M,僅需利用本發明即可將新的 OpROM取代舊的〇pROM。對於〇pR〇M開發者而言,亦提供了一 極方便的具,令其可隨時職新_臟,而不用重建 BIOS的程式内容,可有效避細始碼被⑽糊發者看 到,具有確保BIOS程式内容不致外洩的功能; (3) 新的OpROM係被存放在大儲存裝置(脇沾 storage)中,如:硬碟等,故在沒有空間限制的情形下, 了存放大置的OpROM程式碼’當BIOS快閃記憶體的儲存空間 不足時’可將其餘OpROM程式碼存放於大儲存裝置中,以有 效解決BI0S快閃記憶體儲存空間不足以存放所有〇pR〇M程 式碼的問題,不僅如此,本發明亦可選擇將所有〇pR〇M程式 碼(VGA的OpROM程式碼除外)都存放於大儲存裝置,只需以 較小儲存空間的唯讀記憶體去儲存BI〇s的程式内容,如 此’將可有效降低BIOS快閃記憶體的建置成本; (4) 由於,每一個電腦裝置一般均配置有至少一硬 16 200805083 碟’且驅動該硬碟(如·· SATA硬碟)之驅動程式一般均係存 放於主機板上所設的BIOS快間記憶體中,或驅動該硬碟(如: SCSI硬碟)之〇pR〇M程式碼一般均係存放於轉接卡上所設的 快閃記憶體,故利用硬碟來作為儲存裝置完全不需增加額 外的費用,而所有OpROM程式碼所佔用的總空間相對於硬碟 空間實微不足道,故對所有OpROM程式碼而言,已無空間不 足的問題;The invention relates to a method for reading a selected memory code on a self-aged device, and is suitable for a computer device (such as a desktop computer, a notebook computer, a server, etc.) equipped with at least an age-old device. ···), the method provides a user tool (t〇(4), which is similar to the Fdisk·exe function provided in the Disk Gpeming System (Disk Gpeming System). The following functional options are selected by the user: (1) selecting a storage device; (2) establishing a dedicated time body on the storage device, the space size of the dedicated partition is specified by the user; (3) removing the dedicated (4) in the cut area; store the OpROM code to which the peripheral device belongs to the dedicated branch (5) from the dedicated partition except the 0pR0M code; and (6) during the BIOS post, select which one to make The storage device is enabled to activate the OpROM code stored therein. Thus, the user can select the storage device in the computer device through the user tool to pre-build the _, and the storage drive ^ 200805083 Turning of various peripheral devices on the device In the present invention, the storage device can be a hard disk, and the type of the dedicated partition can be 23, and the space size is provided by the user through the user tool. Function, the size of the space specified on the hard disk, for example, 4 intestines. The dedicated partition includes a Part iti on Header and a plurality of modules, as shown in Figure 1, where the segmentation The area header is used to store the following information: (1) Signature: It is stored in the byte 〇~byte 19, such as: $〇pr〇m-PARTITION-SN$; (2) Partition Partiti〇n Size: The size of the space occupied by the dedicated partition is stored in the byte 2〇~byte 23, such as: 00400000h(4MB); (3) OpROM dedicated partition check code (0pR0M Partiti 〇n Checksum): A check code used to check the 0pR0M dedicated partition, including the header, stored in byte 24; and (4) dedicated partition header check code (partit〇n hea(jer Checksum) : The check code used to check the header of the dedicated partition is stored in byte 25. The module may be divided into two different modules as shown in FIGS. 2 and 3 according to whether the dedicated partition includes the firmware portion of the OpROM, and each of the modules includes a module body (m〇duleb) 〇 dy) and module header, where the module is used to store the 〇pR〇M code (and its body 'if the firmware exists, as shown in Figure 2), the module header Use 11 200805083 to store the following information: (1) Module ID (·Module ID) ·· is stored in byte 〇 (byte 〇) ~ byte 3, including Vendor ID (Vendor ID) and device Identification ID (Device ID), such as: 8086h/2682h; (2) Module Size (ModuleSize): is the size of the space occupied by the module, including the header, stored in the byte 4 ~ byte 7; 3) Flag (Flag): stored in byte 8 to indicate whether the firmware exists; (4) Firmware Offset: stored in byte 9~byte 10, used The address indicating that the chapter blade in the module is located in the module; and (5) the checksum in module (·) is a check code for checking the module, including the table , Stored in 11 bytes. In the implementation of the present invention, the relevant information of the hard disk, such as a Peripheral Component Interconnect Function Address (hereinafter referred to as pfa), a hard disk number, and an access channel (via INT 13) a channel for accessing a hard disk or the like is stored in a non-Volatile Random Access Memory (NVRAM) provided on the computer device; in the following description of the present invention, The relevant information of the storage device is referred to as an extended PFA (Extended PFA, hereinafter referred to as epfa), which is different from the PFA. After the computer device is started, the following steps can be referred to, as shown in FIG. Loading the 分割pr〇m from the dedicated partition into the memory of the computer device 12 200805083, thereby smoothly starting the peripheral device connected to each of the riser cards: (101) executing the BIOS P0ST in the computer device During the program, that is, after the program of Plug and Play (hereinafter referred to as pnp) is executed, the EPFA is read from _趟 before the OpROM code is initialized; (102) According to E The PFA in the PFA finds the storage location of the 〇pr〇m code corresponding to each peripheral device (such as SCSI on the motherboard or SCSI on the riser card or ΑΤΑ on the motherboard). And execute its initial code; if the OpROM code contains the program entry point of the Boot Connection Vector (BCV), the file is executed according to the hard disk number in the EPFA. The corresponding BCV program uses the initialization code to complete the initialization of the peripheral device, and detects whether the peripheral device is correctly connected to the computer device, and according to the hard disk number, through the access channel (For example, INT13h in CHS mode or INn3h extention in LM mode), read the master boot record (MBR) to the specified segment (sect〇r) in the hard disk. In this case, the BCV project is placed in the Expansion Header of the PnPOpROM. For example, a 0pR0M with bcv is used as an example. The BBS BCV is established during POST. The hard disk name string (name string) is used as an index (p〇inter). As shown in Fig. 5, the following three types (type) are included: (1) BI0S processing program (handler) · The present invention It is called the first 13 200805083 Advanced Technology Attachment (hereinafter referred to as ΑΤΑ) device, such as: ΑΤΑ drive interface on the motherboard (onboard), providing primary and secondary channels (Primary / secondary channel), and The code required to access the channel INT 13h on the Hook is provided by the BIOS; (2) Plug and Play (PnP) card. The BCV items are set: each BCV item corresponds to a hard disk, such as BCV#1 and BCV#2, and executes OpROM. Called by the BIOS after initializing the program (cal 1) • Execute BCV to hook up the access channel INT 13h; and (3) Remain without PnP compatible settings (〇311^1:丨1}16 conf i gurabi 1 i Ty) and expansion headers 邙 阳 1 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此 此The traditional adapter card is directly hooked up to the access channel INT 13h by its initialization code. The BCV priority indicator is stored in the non-volatile memory (NV memory) of the computer device. As shown in FIG. 6, for indexing a particular device stored in the BCV table, the number of devices in the BCV table is also stored in non-volatile memory, and is executed each time. In POST, check if there is a change. If the quantity changes, Bios will automatically adjust the priority of the device in the BCV table. See Figure 5 for details. After the devices in the BCV table are installed, the BIOS will adjust the BCV priority order, as shown in Figure 6, in the order of BCV #1, ATA Drives, Legacy Cards and BCV #2; 200805083 (103) according to the content of the MBR, Finding the hidden partition (10) and (4) in the hard disk, and after finding the dedicated partition, checking the signature and the partition header checksum in the dedicated partition, if the signature and Check the check code is correct, that is, all the 〇ρ_ code stored in the dedicated partition is loaded (1〇ad) into the memory (memory) and the 分割pR〇M dedicated partition check code (〇pR〇 M Partition Checksuin) (104) 俟 After loading all the 0pR0M code into the memory, restore to the initial state, ie unhook the access channel And the BI〇s data area (BI〇s this area, hereinafter referred to as rib A) is restored from 4〇:70h to 〇; here, special mention is made, BDA refers to random access memory The area used to store BIOS data in (RAM) is used by BI〇s to manage computers. The starting position of the section (segj^j^) of each type of peripheral clothing and resources connected is 0040h, and the address 40:75h is used to record the number of (rec〇rd) hard disks^ (105) The initial procedure of 〇pR〇M is performed according to the BBS standard specification, and in the process of establishing the BCV table, an extended boot BCV table of the present invention is established, and the EBCV table is stored in nvram. In this case, in the process of loading all 〇pR〇M code into the memory, all OpROM code stored in the dedicated partition of the hard disk is preferred; and (1〇6) temple j. When the subsequent BI0S standard procedure is executed, the completed BBS enables the peripheral devices connected to each of the riser cards to be successfully started. 200805083 According to the above description, the 'Benfa County (10)_ storage surface division area, and after the electric contact device is activated, the 〇_ is loaded into the cryptographic body of the _ device. The method of connecting and closing has the following advantages. (1) When the OpROM code is updated, the dedicated partition in the hard disk is updated, so that the security of the flash memory is ensured; (2) BIOS For programmers, it provides great convenience. ^In the case of more difficult code (10), there is no need to rebuild the program content of Na, just by replacing 〇pR〇M in the original dedicated partition. The program developer has any new 0pR0M, and the new OpROM can be replaced with the new 〇pROM by using the present invention. For 〇pR〇M developers, it also provides a very convenient tool, so that it can be used at any time, without rebuilding the BIOS program content, which can effectively avoid the initial code being seen by (10) the sender. It has the function of ensuring that the contents of the BIOS program are not leaked out; (3) The new OpROM is stored in a large storage device (such as a hard disk), so that there is no space limitation, the storage is large. The OpROM code 'When the BIOS flash memory has insufficient storage space', the remaining OpROM code can be stored in the large storage device to effectively solve the BI0S flash memory storage space to store all the 〇pR〇M code. The problem is not only that, but the invention can also choose to store all 〇pR〇M code (except VGA OpROM code) in a large storage device, and only need to store BI in a read-only memory with a small storage space. s program content, so 'will effectively reduce the cost of BIOS flash memory; (4) because each computer device is generally equipped with at least one hard 16 200805083 disk 'and drive the hard disk (such as · · SATA hard drive) The program is generally stored in the BIOS flash memory set on the motherboard, or the hard disk (such as: SCSI hard disk) 〇pR〇M code is generally stored on the riser card. Flash memory, so the use of hard disk as a storage device does not require additional cost, and the total space occupied by all OpROM code is insignificant relative to the hard disk space, so for all OpROM code, there is no The problem of insufficient space;

(5)硬碟所提供的大量儲存空間,將可用以存放大量 的0PR0M韋刃體程式,每一轉接卡上因此無需設計或預留用以 存放0pRGM&式碼的記憶體空間,故可大幅降低記憶體的建 置成本; ⑻若欲支援(support)新的轉接卡,但削⑽快閃記 憶體空财足時,只要將其GpR_式碼存人硬碟即可,有 效增加了電腦裝置的擴充能力。 按,以上所述,僅為本發明的一最佳具體實施例,惟 本發明的特徵並不紐於此,任何熟悉該項技藝者在本發 明領域内,可輕Μ及的變化_飾,皆應涵蓋在以下本 發明的申請專利範圍中。 【圖式簡單說明】 第1圖係本發明在電腦裝置 專用分割區的架構示意圖; 的儲存裝置中預先建立的一 第2圖係本發曰月專用分割區中包含〇禪的韋刃體的模組架 構示意圖; 第3圖係本發明專用分割區中不包含如丽的動體的模組 200805083 架構不意圖, 第4圖係本發明方法的流程示意圖; 第5圖係本發明中BCV表的示意圖;及 第6圖係本發明中BCV表内之項目的優先權指標的示意 圖。 【主要元件符號說明】 無(5) The large amount of storage space provided by the hard disk will be used to store a large number of 0PR0M blade programs. Therefore, there is no need to design or reserve the memory space for the 0pRGM& code on each riser card. Significantly reduce the cost of memory construction; (8) If you want to support (support) a new adapter card, but cut (10) flash memory is empty, just save its GpR_ code to the hard disk, effectively increase The expansion capabilities of computer devices. According to the above description, it is only a preferred embodiment of the present invention, but the features of the present invention are not related thereto, and any one skilled in the art can change the decoration in the field of the invention. All of them should be covered by the following patent application scope of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a schematic view showing the structure of a partitioning area for a computer device in the present invention; a second picture which is pre-established in the storage device is a special blade in the present month. Schematic diagram of the module architecture; Figure 3 is a module that does not include the dynamic body of the invention in the dedicated partition of the present invention. 200805083 The architecture is not intended, FIG. 4 is a schematic flow diagram of the method of the present invention; FIG. 5 is a BCV table of the present invention. Schematic diagram; and Figure 6 is a schematic diagram of priority indicators of items in the BCV table of the present invention. [Main component symbol description] None

1818

Claims (1)

200805083 十、申請專利範圍: 、1厂種自齡|置上讀取選擇唯讀記紐程式碼的方 法,係應用至安襄有至少一儲存裝置的電腦裝置上,該儲 2裝置中預立有—專时舰,用以儲存驅動該電腦 裝置上各式轉接卡所需的〇ρ_,該儲存裝置的相關資料 則存放至該電腦裝置上所設的轉發性_存取記憶體 (NVRAM)中,該方法包括: 〜 在該電腦裝置的基本輸人輸出祕(腦s)執行開機自 我測試(POST)程料,自NV_巾讀取雜魏置的相關 資料; 依該相關資料,對該專时籠_存的Gp職進行 檢查,俟確認無誤後’將0PR0M載入該電腦裝置的記憶體 中; 依OpROM的BIOS開機規格⑽S)的標準規格執行_〇|{ 的初始程序’且建立—開機連接向量⑽)表,並將該bcv 表存放至NVRAM中;及 在執行BIOS的後續標準程序時,完成〇成(迦的部3程 序’順利啟動與各該轉接卡相連接的周邊裝置。 2、 如請求項1所述的方法,其中該儲存裝置的相關資 料至少包括硬碟控制器之PCj裝置位址(pfa)、硬碟編號及 存取通道。 3、 如請求項2所述的方法,其中該電腦裝置執行BI〇s 的post程序時,係指在隨插即用(PnP)的驅動程序被執行 後’且在該等OpROiy[進行初始化程序前。 200805083 『ΓΓ求項3所述的方法’尚包括依據該儲存裝置的 ’ ^ $ PFA,將各該周邊裝置所對應的帳M程式 碼的存放錢找妹,錄行細触程式碼。 5、如請求項4所述的方法’其中若〇pR〇M包含奶之 程式進人點’依該儲存裝置的蝴聽中的硬碟編號,執 10PR0M程式财之械_⑽程式,以藉該初始化程 式碼完朗輕置_触健,且侧200805083 X. Patent application scope: 1 factory self-aged | set the method of reading and selecting the read-only code, applied to the computer device with at least one storage device in Anzhen, the pre-establishment in the storage device There is a special time ship for storing the 〇ρ_ required to drive various types of riser cards on the computer device, and the relevant information of the storage device is stored in the forwarding memory (NVRAM) provided on the computer device. The method includes: ~ performing a boot self-test (POST) process material in the basic input output secret (brain s) of the computer device, and reading related information of the Wei Wei set from the NV_ towel; according to the relevant information, Check the Gp job of the special-time cage _, and then check the error to 'load the 0PR0M into the memory of the computer device; execute the initial program of _〇|{ according to the standard specifications of the OPROM BIOS boot specification (10)S) And establish a - boot connection vector (10)) table, and store the bcv table to NVRAM; and in the implementation of the BIOS's subsequent standard procedures, complete the completion of the process (the 3rd program of the Kay's smoothly started to connect with each of the riser cards) Peripheral device. 2. Request item 1 The method of the storage device includes at least a PCY device address (pfa) of the hard disk controller, a hard disk number, and an access channel. 3. The method of claim 2, wherein the computer device executes The BI〇s post program refers to the plug-and-play (PnP) driver being executed 'and before the OpROiy [pre-initialization procedure. 200805083 "The method described in Item 3" still includes the basis The storage unit ' ^ $ PFA, the storage money of the account M code corresponding to each peripheral device finds the sister, and records the touch code. 5. The method described in claim 4, wherein if 〇pR〇 M contains the milk program to enter the point 'according to the hard disk number in the memory of the storage device, execute the 10PR0M program of wealth _ (10) program, to use the initialization code to complete the light _ touch, and side 正確被連紅对置,並健㈣峨,透過存取通 道’至該硬射指定的區段讀取主機職記錄(騰)。 」、如請求項5所述的方法,其中依據職的内容,尋 找隱藏在該硬碟中的該專用分割區。 7、如請求項6所述的方法,其中對該專用分割區所儲 存的帽Μ進行檢查’係指在找到該專用分割區後,對該 專用分#m巾簽章及分籠表職查碼進行檢查,若簽章 及檢查碼均檢查無誤,㈣鱗时龍中存放的:有 OpROM程式碼載入至記憶體中。 、8、如請求項7所述的綠,射俟完翁所有_M 程式碼载人至記紐的1作後,恢復幻德狀態,與該存 取通道脫鉤’並將臟資料區⑽)由♦概回復成0。 。9、如請求項8所述的方法,其中在建立—Bcv表的過 程中’建立-擴充的開機連接向量(卿)表,並將該順 表存放至NVRAM中’在將所有〇_程式碼载入至記憶體 的過程中,優先棚硬_專时mf械崎有〇师 程式碼。 20 200805083 方“如明求項卜2、3、4、5、6、7、8或9項所述的 用I尚包括朗者王具,以提供下列魏選項,供使 用者選取: 選擇一儲存裝置; 到選擇的儲存裝置上建立—專用分娜,該專用分 口 |JS的卫間大小係由使用者指定; 移除該儲存裝置上所建立的該專用分割區; 將周邊裝置蘭的Gp_財顯存齡裝置上 所建立的該專用分割區中; 自該儲存裝置上所建立的該專用分娜中移除 程式碼;及 在BIOS進行P0ST期間,選擇令哪一個儲存裝置致能, 以啟動其中所儲存的OpROM程式碼。 ':請求項卜2、3、4、5、6、7、8或9項所述的 =’其中該專用分割區包括-分割區表頭,其中該分割 區表頭係用以儲存下列資料·· 簽章; 分割區尺寸,係專用分割區所佔用的空間大小; 專用分割區檢查碼,係用以對專用分進行檢 檢查碼;及. — —專用分躯表馳查碼,係肋對專时顏表 行檢查的檢查碼。 12、如請求項11所述的方法,其中該專用分割區尚包 括複數個模組,各賴組包括模組本體及模組表頭,其中 21 200805083 模組本體係用以存放〇成程式碼,模組表頭則係用以儲 存下列資料: 核組識別碼,係存放廠商識別碼及裝置識別碼; 板組尺寸’係存放模組所佔用的空間大小; _,係用以表示韋刃體是否存在; • 韌體位移值,係用以表示模組中的韌體位於模組内之 那個位址;及 • 模組檢查碼,係用以對模組進行檢查的檢查碼。 22Correctly connected to the red, and health (four) 峨, through the access channel 'to the hard-fired designated section to read the master record (teng). The method of claim 5, wherein the dedicated partition hidden in the hard disk is found according to the content of the job. 7. The method of claim 6, wherein the checking of the cap stored in the dedicated partition means that after the dedicated partition is found, the special branch #m towel signature and the cage table check The code is checked. If the signature and the inspection code are checked correctly, (4) The scale is stored in the dragon: the OpROM code is loaded into the memory. 8. If the green color is as described in claim 7, after all the _M code characters are loaded into the record, the phantom state is restored, and the access channel is decoupled from the dirty data area (10). From ♦ to return to 0. . 9. The method of claim 8, wherein in the process of establishing the -Bcv table, the 'establishment-expanded boot connection vector (clear) table is stored, and the read table is stored in the NVRAM. In the process of loading into the memory, the priority shed is _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 20 200805083 The “Use of I as described in Item 2, 3, 4, 5, 6, 7, 8 or 9 of the Ming Dynasty is also included in the Langshi Wangjia to provide the following Wei options for the user to choose: Select one Storage device; to the selected storage device to establish - dedicated split, the dedicated split | JS's toilet size is specified by the user; remove the dedicated partition established on the storage device; In the dedicated partition established on the Gp_Current storage device; removing the code from the dedicated split established on the storage device; and selecting which storage device is enabled during the P0ST of the BIOS, To start the OpROM code stored therein. ': Request item 2, 3, 4, 5, 6, 7, 8, or 9 = 'where the dedicated partition includes - partition header, where The partition header is used to store the following information·· signature; the size of the partition is the size of the space occupied by the dedicated partition; the special partition check code is used to check the special score; and — — — Dedicated split table, self-checking code The method of claim 11, wherein the dedicated partition further includes a plurality of modules, and the respective groups include a module body and a module header, wherein 21 200805083 is used in the module system To store the code, the module header is used to store the following information: The nuclear group identification code is the manufacturer identification code and the device identification code; the board size is the size of the space occupied by the storage module; _, It is used to indicate the presence of the Weaver blade; • The firmware displacement value is used to indicate the address of the firmware in the module located in the module; and • The module check code is used to check the module. Check code. 22
TW95125417A 2006-07-12 2006-07-12 Method of reading OpROM image from storage device TW200805083A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW95125417A TW200805083A (en) 2006-07-12 2006-07-12 Method of reading OpROM image from storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW95125417A TW200805083A (en) 2006-07-12 2006-07-12 Method of reading OpROM image from storage device

Publications (1)

Publication Number Publication Date
TW200805083A true TW200805083A (en) 2008-01-16

Family

ID=44766011

Family Applications (1)

Application Number Title Priority Date Filing Date
TW95125417A TW200805083A (en) 2006-07-12 2006-07-12 Method of reading OpROM image from storage device

Country Status (1)

Country Link
TW (1) TW200805083A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI385522B (en) * 2008-12-31 2013-02-11 Recognizing method of memory storage device
TWI482015B (en) * 2012-01-03 2015-04-21 Hewlett Packard Development Co Backing up firmware during initialization of device
CN112860193A (en) * 2021-03-15 2021-05-28 群联电子股份有限公司 Finishing instruction processing method, memory control circuit unit and storage device
TWI775341B (en) * 2021-03-05 2022-08-21 群聯電子股份有限公司 Trim commands processing method, memory control circuit unit and memory storage apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI385522B (en) * 2008-12-31 2013-02-11 Recognizing method of memory storage device
TWI482015B (en) * 2012-01-03 2015-04-21 Hewlett Packard Development Co Backing up firmware during initialization of device
TWI775341B (en) * 2021-03-05 2022-08-21 群聯電子股份有限公司 Trim commands processing method, memory control circuit unit and memory storage apparatus
CN112860193A (en) * 2021-03-15 2021-05-28 群联电子股份有限公司 Finishing instruction processing method, memory control circuit unit and storage device
CN112860193B (en) * 2021-03-15 2023-05-16 群联电子股份有限公司 Sorting instruction processing method, memory control circuit unit and memory device

Similar Documents

Publication Publication Date Title
US8028155B1 (en) Initiating an operating system boot from firmware
US9430250B2 (en) Bootability with multiple logical unit numbers
US7293166B2 (en) Method of indicating a format of accessing an operating system contained on a USB memory device
JP6124994B2 (en) Method and system for restoring from legacy OS environment to Unified Extensible Firmware Interface (UEFI) pre-boot environment, and computer program
US5694600A (en) Methods and apparatus for booting a computer having a removable media disk drive
TWI335534B (en) Mass storage device with boot code
US9672112B2 (en) Backing up firmware during initialization of device
US9239725B2 (en) System and method for installing an OS via a network card supporting PXE
US8161322B2 (en) Methods and apparatus to initiate a BIOS recovery
US7925875B2 (en) Systems and methods for identifying and booting a computer architecture
EP1274009A2 (en) System and method to enable a legacy BIOS system to boot from a disk that includes EFI GPT partitions
CN109240748B (en) Mirror image starting and adapting method and system applied to embedded system
US20080162916A1 (en) Portable Multi-Platform Booting
US9672047B1 (en) Systems and methods for accessing a bootable partition on a serial peripheral interface device
US10871970B1 (en) Memory channel storage device detection
US10558468B2 (en) Memory channel storage device initialization
US10491736B2 (en) Computer system and method thereof for bluetooth data sharing between UEFI firmware and OS
TW200805083A (en) Method of reading OpROM image from storage device
US20180059982A1 (en) Data Storage Systems and Methods Thereof to Access Raid Volumes in Pre-Boot Environments
US6910113B2 (en) Executing large device firmware programs
US11221842B2 (en) Systems and methods for executing and verifying system firmware update before committing firmware update to motherboard
CN100498710C (en) Method for reading and electing read only memory program code on self-storing mechanism
US9778936B1 (en) Booting a computing system into a manufacturing mode
US10838737B1 (en) Restoration of memory content to restore machine state
JP4735765B2 (en) Linux program startup system