TW476913B - System and method for securely utilizing basic input and output system (BIOS) services - Google Patents

System and method for securely utilizing basic input and output system (BIOS) services Download PDF

Info

Publication number
TW476913B
TW476913B TW089111925A TW89111925A TW476913B TW 476913 B TW476913 B TW 476913B TW 089111925 A TW089111925 A TW 089111925A TW 89111925 A TW89111925 A TW 89111925A TW 476913 B TW476913 B TW 476913B
Authority
TW
Taiwan
Prior art keywords
bios
memory
service
virtual
scope
Prior art date
Application number
TW089111925A
Other languages
English (en)
Inventor
Leonard J Galasso
Matthew E Zilmer
Quang Phan
Original Assignee
Phoenix Tech Ltd
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
Priority claimed from US09/336,889 external-priority patent/US6148387A/en
Application filed by Phoenix Tech Ltd filed Critical Phoenix Tech Ltd
Application granted granted Critical
Publication of TW476913B publication Critical patent/TW476913B/zh

Links

Description

476913 A7 --------B7 —_五、發明說明(1 ) \ 經濟部智慧財產局員工消費合作社印製 祖關申复^ 一 本案爲美國專利申請案第〇8/947,99〇號申請日1997年 月9日之部份連績案。 發明 1 · _發明領域 本發明係關於一種安全利用基本輸入及輸出系統(BI0S) 服務之系統及方法。 2.相關技術之説明 虛擬記憶體子系統中,採用「虛擬」記憶體定址其中利 用於軋體程式的記憶體位址間接映射至實體記憶體的位置 、。轉譯成實體位址典型係藉處理器完成,此種實體位址無 法由使用者模式軟體及基本輸入/輸出系統(BI〇s)存取。 此種虛擬記憶體子系統之一例係由微軟公司製造銷售的 視窗NT使用。特別視窗Ντ結合需求呼叫虛擬記憶體子系統 。提供給於視窗NT作業系統上操作的程式的記憶體位址空 間恰如其它程式般可安全防護不受其它使用者模式程式接 近。如此確们吏用者模式服務及應用#呈式不t改寫彼此的 記憶體或執行彼此的指令。核心程式模式服務及應用程式 係以類似方式保護若試圖存取程式被配置的虛擬空間以 外的記憶體,則程式結束且通知使用者。虛擬記憶體子系 統也防止使用者模式軟體直接存取f體記憶體位址以及存 取構成電腦系統一部份的輸入/輸出裝置。 使用輸入/輸出系統於電腦系統其可使用虛擬記憶體子 系統執行作業系統的趨勢漸增。此種系統中,不含存取程 (請先閱讀背面之注意事項寫本頁) 裝 .線· -4- 476913 A7 B7 五、發明說明(2 式的虛擬記憶體空間外側的記憶體的裝置,例如BI0S功能 。對此問題之一解決之道係安裝裝置驅動程式,其可讀取 含裝置指令的檔案。驅動程式讀取檔案且寫入(或下載)指 令至裝置的記憶體。但此型裝置驅動程式僅允許對記憶體 及/或輸入/輸出操作有限的定址能力。此外不允許於實體記 憶體空間執行系統的處理器指令。 如此技術界需要有由虛擬記憶體子系統存取及執行實體 記憶體内容之系統及方法,其有助於提高記憶體及輸入/輸 出掭作疋址能力,以及也允許直接由實體記憶體執行處理 器指令。 經 濟 部 財 產 局 員 工 消 費 合 作 社 印 製 此外,儲存於圮’丨思體系統或平臺的資料可被更新或配置 。某些例中資料極爲敏感。配置敏感資料的一個好例子是 電腦系統的基本輸入及輸出系統(BI0S)。典型儲存於某種 形式的非揮發性記憶體,BIOS爲機器碼,通常構成作業系 統(0S)的一邵份,其允許中央處理單元(cpu)執行下列工作 例如初始化、偵錯、載入得自大容量儲存裝置作業系統核 心程式,及常式輸入/輸出(I/O)功能。當開機時,cpu經由 提取駐在BIOS的指令碼而「啓動」。並無任何安全防護, BIOS各易經由捕捉及再現服務請求激勵BI〇s提供的功能 而受攻擊。此等攻擊可能摧毀BI0S以及去能電腦系統。 如此也需要提供一種證實服務請求可完全存取或修改 BIOS之資料以及執行遠端請求訊息的適當授權極限之系 統及方法。 -5- "+/〇νΐ3 A7
五、發明說明(3 ) 發明概述 一 本發明提供一種安全地利用基本輸入及輸出系統(BI〇s) 服務之系統及方法。 根據本發明之一特徵方面,系統包含一記憶體用以儲存 基於處理器的系統處理的指令順序,此處記憶體包括一實 體兄憶體及一虛擬記憶體。系統也包含一處理器用以執行 儲存的指令順序。儲存的指令順序包括處理作用於致使處 里心·映射複數指令順序由貫體記憶體至虛擬記憶體,對 虛擬記憶體之複數預定指令順序之一決定補償値,接收指 令而執行複數預定指令順序之一。傳送控制給複數預定指 令順序之一,以及處理得自虛擬記憶體的複數預定指令順 序之一。 根據系統之另一方面,包括一存取驅動程式產生一服務 請求利用BIOS服務,因此服務請求含有一使用成對加密鑰 中的密鑰形成的服務請求簽章。系統也包括介面使用成對 加密鑰的公鑰證實服務請求簽章而確保服務請求的完整性 (請先閱讀背面之注意事項 寫本頁) 裝 訂-· 經濟部智慧財產局員工消費合作社印製 圖式之簡單説明 圖1爲其中使用本發明之系統及方法的資訊配送系统之 一具體實施例之系統方塊圖。 圖2説明實施本發明之具體實施例之範例處理器系統戈 使用者電腦系統。 圖3説明圖2電腦系統之一具體實施例之略圖,其中使用 本發明之系統及方法。 -6- 本紙張尺度剌巾0¾¾票準(CNS)A4規格(210 X 297公爱) ' " 476913 A7 B7 五、發明說明(4 ) 圖4爲總功能方塊圖説明利用本發明之系統及方法之一 作業系統架構。 圖5爲方塊圖説明如根據本發明之原理提供的存取驅動 程式4 6之初始化過程。 圖6 A爲流程圖說明本發明之初始化過程之一具體實施 例。 圖6B爲流程圖說明圖6A之處理方塊6 1 〇之細節。 圖6C爲流程圖説明圖6A之處理方塊630之細節。 圖7 A爲流程圖說明本發明之執行過程。 圖7B爲流程圖說明圖7八之處理方塊64〇之細節。 圖8爲另一總功能方塊圖説明利用本發明之系統及方法 之一作業系統架構。 、圖9顯示根據本發明之一具體實施例介於二系統組件間 之互動順序之順序說明。 (請先閱讀背面之注意事項,填寫本頁) '!· :裝 產生 圖10摘述根據本發明之一具體實施例之階段作業請求 的 經濟部智慧財產局員工消費合作社印製 圖11顯示根據本發明之一具體實施例之授權核可。 圖12顯示根據本發明之一具體實施例之階段作業請求 圖13顯7F根據本發明之一具體實施例之服務請求。 圖14摘述根據本發明之一具體實施例建立工作階段 需要的動作。 圖15摘述根據本發明之-具體實施例之服務請求 業 生 的產 圖1 6顯不根據本發明之一具體實施例處理服務請求所哈
A7 五 發明說明(5 ) 〜--- 動作。 圖17顯示根據本發 _ — ^ 階段作業的動作。 一具體貫施例涉及結束目前工作 圖18顯示根據本發 —、、 理過程。 一具體實施例產生授權核可之處 之詳細説明 如此處討論,「電腦 ^ 敗衾仏 ^ 甸系統」爲一種包括可處理資料的電 ,陝卜别 ^ 仁非限於通用電腦系統(例如伺服器 (PC =上型’掌上型,個人電子裝置等”個人電腦 體拷貝設備(例如列印機,利機,傳眞機等),銀 ^又備輸自動櫃員機)等。資訊日糾nfomediary)爲網站 /、代表貝和服4生產商提供資訊,给相關資訊給企業告 知有關由供應商和其它企業提供的產品及/或服務。内容係 指應用程式、驅動程式程式、公㈣式程式、訊息載入等 Ί ’以及圖形、資訊材料(物件、存貨報價等)等 (單-内容或其任一種組合。此外,「通訊連接鏈」表示 通訊媒體或頻道。通訊連接鏈包括但非限於電話線、數據 機連結、網際網路連結、集成服務數位網路(ISDN)連結、. 異步傳輸模式(ATM)連結、幀延遲連結、乙太網路連結、 同軸連結、光纖連結、衛星連結(例如數位衛星服務等)、 無線連結、射頻(RF)連接鏈、電磁連接鏈、二向呼叫連結 等,及其組合。開機自行測試(P0ST)表示於載入作業系統 前執行以配置與測試系統硬體的指令。 ^/0913 五、發明說明(6 ) 差統综論 後文説明結合本發明之具體實施例之範例系統之説明。 圖im分配“ 1G之—具时施例 使綱明之裝置和方法。資訊分配系統_ = 二及組構與維持網際網路使用者和系統側面勾勒 網二Γί予犀,主要收集來自保證服務登錄'網際 〜 系統側面勾勒、和使用者的偏好。最初本 頁Λ用以么錄使用者至所購買的軟硬體產生的製造商 及登錄至線上服務或其它服務提供業者。隨著的 二使用者資料用以形成一使用者側面勾勒,且通知使; =關軟體的更新與昇級,鼓勵線上購買相關產品,以及從 事一對一的量身訂製的行銷與其它服務。 -具體實施例中,二軟體模组用於實施本發明之多個具 體實施例。-軟體模組係駐在使用者的系統,且用以存取 =網站。舉例言之,於一具體實施例中,作業系統和基 不=出入系統(BI0S)係預先安裝於電腦系統,以及隨後當 «系統首先啓動日寺,一應隸式(爲討論用稱作第一軟體 模組)、[於一具體實施例中,第一軟體模組爲初始啓動應 用私式(ISUA),將於下節討論]於前置啓動環境下,將允 ^1表或夕個可執行程式。一具體實施例中,第一軟體 才吴組万;、作業系統載入、啓動、執行及/或操作前,有助於發 表或夕個可執行程式。一具體實施例中,鼓勵使用者選 =使用此種私式(亦即使用第一軟體模組);以及於替代具 月a只犯例中,程式係自動發表。含於第一軟體模組讓工具 9- 閱 訂 線
本紙張尺度適奸百x 297公iT 476913 A7
和公用程式於適當時間執行,伴以適當使用者授權,也允 許使用者下載第二軟體模組,包括驅動程式、應用程式以 及額外訊息載入通過個人電腦(pc)的網際網路連結。若作 業系統無法成功地發表,則程式也提供遠端管理。 一旦第二軟體模組已經傳送,變成駐在記憶體,即可去 能第一軟體模組被傳輸的拷貝。仍然駐在系統的非揮發性 屺憶體的第一軟體模組的原先拷貝保持閒置,直至第二軟 骨豆模組典法生效,變成癱瘓或被刪除爲止,此時原先第一 軟體模組的拷貝再度如前述被傳輸。第二軟體模組包括應 用程式其連結使用者至網際網路的一特定伺服器,且導^ 使用者至-預定網站而尋求授權下載進—步註記材料。第 二軟體模組也包括相同或類似第一軟體模組内容的内容。 -具體實施例中,系統也包括_初步載人訊息,並係儲 存於唯讀記憶體BI0S (R0M BI〇s)。一具體實施例中,初 步載入訊息爲第一軟體模組(例如ISUA)的一部分。替代具 骨豊貫施例中’初步載入訊息儲存於以⑽BI〇s作爲模組,與 第-軟體模組分開。一具體實施例中,初步載入訊息係: ROM BIOS發表’且於開機自行測試(p〇ST)之後、但於作 業系統啓動、載人及/或執行之前,顯示於榮幕上。可發生 於預定時間,例如當系統被製造、組裝與測試時,^故 端使用者初次激勵該系統時。替代具體實施例中,初^ 入訊息於預定時間,例如當系統被製造、組裝與測試日二, 或當終端使用者初次激勵該系統時,被拷貝至一預定位置 例如系統的硬碟)。一旦被拷貝,載入訊息係於p〇s丁之^ ______ -10- 本紙張尺度適用中_家標準(CNS)A4規格ϋ挪公备
丨:---T------·!>裝·! (請先閱讀背面之注意事項寫本頁) 157
經濟部智慧財產局員工消費合作社印製 476913 五、發明說明(8 ) 但於作業系統操作之前執行一 、萨人;^ a &、 且可顯不圖形、廣告、動畫 =H料(則G)/動畫專家群(mpeg)格式化材料於 當額外程式及/或載入訊息被傳送(通過網際網路 ::匕::在ΐ結)時’顯示晝面用以於作業系統啓動之前或 ^ 疋供I身製的畫面呈訊息或圖形形式。此外,於 第一軟體模組傳送的可勃钚Ρ』 、 執仃的私式,〃及由網站下載的隨 ’(例如第一权模組)可用以調查研究個人電腦(PC) 而決定安裝的各類型裝置、驅動程式、和應用程式。於一 具體實施例中,如述於同在審查中之美國專利中請案第— 唬’名矛冉「自動安裝與配置軟體於電腦之方法及裝置」, 1999年Μ 18日由鳳凰工業股份有限公司中請,其揭示内容 併述於此以供參考,第一軟體模組用以識別與自動爲使用 者形成捷徑及/或書籤。由網站下載的程式包括軟體,其基 於使用者的偏好而收集與維持使用者側面勾勒。此種訊自 提供給資訊日誌’其隨後發送部分資訊及/或基於資訊編; 的資料給供應商和其它企業,俾獲得由供應商和其它企業 提供的資訊更新或修訂。 參照圖1,資訊分配系統10包含一服務中心20,其係透過 一或多個通訊連接鏈30^3(^連結至一或多個使用者電腦 系統40^4(^ (M0”)。服務中心20包括一或多部伺服器22, 一或多個資料庫24,以及一或多部電腦26i_26m。一或多部 電腦26i-26M可由複數使用者電腦系統4〇i-4〇n同時存取。若 使用多部電腦,則電腦26l-26M可藉區域網路(LAN)或任何 其它類似的連結技術連結。但也可能服務中心2〇具有其它 --;---1------裝--- (請先閱讀背面之注意事項再填寫本頁) · · 經濟部智慧財產局員工消費合作社印製 11 - 五、發明說明(9 ) ::。舉例言之,少數較大型電腦(亦即少 、電腦等)附有大量内部程式或處理可於大型電腦上執行 ’可與使用者電腦建立通訊連接鏈。 山月艮務中心20也可連結至遠端網路5〇 (例如網際網路)或遠 星’ «示於間。遠端網物或遠端站 版務中心2G提供更寬廣多變的電腦軟體、内容等,立可儲 存於服務中WO。連結至電腦例如電腦2μ$_或多個資料 :24,用以儲存由電腦26可利用的電腦軟體组成的資料庫 載入。於一具體實施例中,各使用者電腦系統40,為有並 :身的安全資料庫(圖中未顯示)’該資料庫係無法由任何 八它電腦存取者。通訊連接鏈3〇1_3〇ν允許—或多部使用者 電腦系統40, -40N同時連結至電腦26 i 。連結係由哭 22管理。 口口 於使用者電腦系統40與資訊服務電腦26建立雙向通訊後 ’内容係以後述方式發送給使用者電腦系統4〇。下載的内 容包括-應用程式,其調查研究使用者及/或使用者電腦系 統的軟硬體而開發出一使用者側面勾勒,以及一使用者的 系統的側面勾勒。由使用者及/或使用者的電腦系統收集得 的貧訊隨後提供給服務中心20,服務中心2〇基於使用者和 系統側面勾勒,提供額外内容給使用者電腦系統。得自 連結至服務電腦26的資料庫的資料庫載入含有有關使用者 :利用的電腦軟體、硬體、以及第三方服務和產品的相關 資訊。基於使用者及/或系統側面勾勒,内容進一步送至使 用者電腦供顯示。内交Ai 卜J备也包括貝Λ摘要’例如既有電腦軟 476913 A7 B7 五、發明說明(1〇) 濟 部 智 慧 局 員 工 消 費 合 和=利用性,既有電腦軟體的新版本,全新 %月自專人體,新輔助說明檔案等。内容 吓 者感興趣的有關硬體以及第三方產 匕括有關使用 息。然後使用者可由可资利用的產:二務可供利用的訊 多個㈣^…服務摘要做出-或 夕^擇,且叫求產品由服務電腦26傳送 腦。另外,使用者可由可資利用的I p $ 使州嘗屯 預定產品或服務。以用的產4服務摘要中採用 圖2::m明實施本發明之具體實施例之電腦系統⑽之 例。電腦系統1 0 0説明使用去兩脱玄 史用者私恥系統40卜40N&/或電腦 γ6Μ(圖例,但也可方便使用其它具體實 參照圖2,電腦系統⑽包含一處理器或中央 (CPU) 1G4°CPU⑽包括-執行運算的算術邏輯單元 (ALU),-暫時儲存貧料和指令的暫存器集合,以及一护 制電腦系統100的作業的控制單元。_具體實施例中,咖 HM包括英代爾公司出品的χ86、奔騰TM、奔騰πΤΜ和奔騰 Μ.微處理器,AMD公司出品的κ_6微處理器,或西律 (Cyrix)公司出品的6χ86Μχ微處理器中之任一者。進一步實 例包括迪吉多設備公司出品的阿爾發處理器,摩托羅拉公 司出品的680X0處理器;或聰公司出品的威力pc微處理器 。此外,多種不同處理器之任一者包括得自昇陽微系統、 MIPS' IBM、摩托羅拉、NEC'西律、AMD、奈金d㈣) 及其它公司之任一者可用於實施CPU 104。CPU 104不僅限 於微^里器三而可呈其它形式,例如微控制器,數位信號 處理备’ #簡指令集電腦(RISC),特定應用積體電路等。 注 意 事 t 訂
S I___ -13- 張尺度適用中國國家標準石—4規格⑽χ撕公全_ 476913 A7 B7 五、發明說明(11 ) 雖然圖中顯示帶有一 CPU 104,但電腦系統100另外可包括 多部處理單元。 經濟部智慧財產局員工消費合作社印製 CPU 104經由CPU匯流排108耦合至匯流排控制器1 12。匯 流排控制器1 1 2包括記憶體控制器1丨6整合於其中,但記憶 體控制器11 6可位在匯流排控制器1丨2外側。記憶體控制器 1 16提供由CPU 104或其它裝置通過記憶體匯流排120存取 至系統記憶體1 24的介面。一具體實施例中,系統記憶體124 包括同步動態隨機存取記憶體(SDRAM)。系統記憶體124 可選擇性地包括任何額外或其它高速記憶體裝置或記憶體 電路。匯流排控制器1 1 2耦合至系統匯流排1 28,其可爲周 邊組件互連體(PCI)匯流排,產業標準架構㈤八)匯流排等。 耦合至系統匯流排128者爲圖形控制器,圖形引擎或視訊控 制器132’大谷里儲存媒體152,通訊介面裝置156,一或多 個輸出入(I /〇)裝置1 6 8! -1 6 8 n,以及擴大匯流排控制器1 7 2 。視Λ私制為1 3 2係搞合至視訊記憶體1 3 8 (例如8百萬位元 組)及視iKi BIOS 140,全部皆可整合至單-卡片或裝置上, 如編號144標示。視訊記憶體i 3 6用以含有顯示資料用以顯 示資訊於顯示螢幕148上,以及視訊BIOS 140包括碼和視訊 服務用以控制視訊控制器132。另一具體實施例中,視訊控 制器132係經由一先進圖形埠(AGp)匯流排耦合至CPu 1〇4。 大容f儲存媒體1 5 2包括(但非僅限於)硬碟、軟碟、 CD-ROM、DVD-ROM、磁帶、高密度軟碟、高容量活動式 媒體、低容量活動式媒體、固態記憶體裝置等及其組合。 大容量儲存媒體1 5 2包括任何其它大容量儲存媒體。通訊介 -14- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公爱) 476913 A7 五、發明說明(12 拳 面裝置1 56包括網路卡、數據機介面等用以透過通訊連接鏈 160存取網路164。1/〇裝置168i_168n包括鍵盤、滑鼠、音效 卡、印表機等。1/〇裝置168i-168n,可爲磁碟機,例如光碟 機,數位磁碟機,磁帶機,zip驅動器,jazz驅動器,數位 視訊碟(DVD)驅動器,固態記憶體裝置,磁光碟驅動器, 南密度軟碟機,高容量活動式媒體驅動器,低容量活動式 媒ta驅動态,及/或其任一種組合。擴大匯流排控制器1 72 係耦合至非揮發性記憶體175,其包括系統韌體丨76。系統 早刃體176包括系統BI0S 82,其係用於控制電腦系統1〇〇的硬 體裝置。系統韌體丨76包括rom 1 80和快閃記憶體(或 EEPROM) 184。擴大匯流排控制器172也耦合至帶有ram 訂 ROM及/或快閃記憶體(圖中未顯示)的擴大記憶體1 88。 電腦系統100額外包括一記憶體模組19〇耦合至匯流排控制 器112。一具體實施例中,記憶體模組19〇包括r〇m 192和 快閃記憶體(或EEPROM) 194。 ‘線 經 濟 部 智 慧 財 產 局 員 工 消 費 合 作 社 印 製 如業界人士所熟知,電腦系統100進一步包括一作業系統 (OS)和至少一應用程式,其於一具體實施例中,係載於來 自大容量儲存媒體1 52的系統記憶體124且於p〇s丁後發表 。作業系統包括任一型作業系統,包括但非限於D〇s、視 窗 TM (例如視窗 95TM,視窗 98τΜ,視窗 NTtm),υηίχ,Unux ,OS/2,OS/9,Xenix等。作業系統是一組一或多個程式, 其控制電腦系統的作業與資源的部署。應用程式是一組一 或多個軟體程式,其執行使用者預定的任務。 根據電腦程式業界人士的實務,除非另行指示,否則本 -15- 本紙張尺度適用中關家標準(CNS)A4規格⑽x297公爱· A7
476913 A7
五、發明說明(14 ) 述系統韌體176的模組和部分可含於r〇m丨9〇及/或快閃記 憶體194。於最初使用電腦系統100前,RAPI 84、ISUA % 、和初步載入訊息88a各自可分開發展且儲存於系統韌體 176。一具體實施例中,RAPI 84、ISUA 86、和初步載入= 息8 8 a各自包括鳳凰城技術公司開發的專屬軟體。 RAPI 84通常提供ROM應用程式與系統BI〇s 82間的安 全介面。RAPI 84之具體實施例説明如下於圖8至1 8及附圖 説明。IS U A 8 6之一具體實施例述於同在審查中之美國專利 申請案第——-號,名稱「自動安裝及配置軟體與電腦之方法 及裝置」,申請日1999年6月18日,讓與鳳凰城技術公司, 併述於此以供參考。 經濟部智慧財產局員工消費合作社印製 由虛擬記.._憶_1|在取及執行實體記憶體内容 本發明之一特徵方面係參照安裝於處理系統1〇〇之作業 系統説明,示於圖2。圖4爲一種功能方塊圖説明利用本發 明之系統及方法之處理系統架構。處理系統1 〇〇包含一作業 系統2230,其支援應用程式232及服務程式2234,基本輸入 /輸出系統(BIOS) 236及系統硬體238。BIOS 236爲驅動程式 或硬體裝置的軟體介面的集合,硬體裝置例如控制台(鍵盤 及顯示器),印表機,輔助裝置(串聯埠)、電腦時脈及啓動 磁碟裝置。BIOS 236典型係嵌置於可程式唯讀記憶體 (ROM)。經常BIOS本身的功能實際上係由r〇m拷貝至實體 記憶體’利用實體記憶體的存取時間較爲快速。如此稱做 「遮掩」BIOS 236,原因在於獲得二bios 236拷貝:一者 於ROM (不再被使用)而另一者於實體記憶體。實體記憶體 -17- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7
五、發明說明() 儲存BIOS 236的部份稱做BIOS陰影空間。於作業系統已經 啓動且執行後’作業系統如視窗NT不再使用bios 236。視 窗NT作業系統的核心程式層面驅動程式直接與系統硬體 务面。本發明有助於使用B10 S 2 3 6作爲系統硬體2 3 8與作業 系統2 3 2間的介面。 作業系統230包含類別驅動程式240,其與應用程式232 及服務程式2234介面,以及I/O管理程式242。I/O管理程式 242將來自應用程式232及服務234(透過類別驅動程式24〇 做出)的I/O請求轉成適當排序的呼叫而呼叫位於核心程式 244的各種驅動常式。特別當ι/〇管理程式242接收到1/〇請 求時’其使用請求的功能碼呼叫於位在核心程式244的驅動 程式中若干調度常式之一。核心程式244提供與硬體無關的 功能,稱做系統功能,系統功能係利用軟體間斷手段存取 。核心私式2 4 4提供的功能包括擋案及目錄管理,記憶體管 理’特欲裝置輸入/輸出以及時間及日期支援等。一且體實 施例中,作業系統爲視窗NT作業系統。另一具體實施例中 ’作業系統230包括梭樂利(Solaris)或AIX作業系統或其它 基於需求傳呼的虛擬記憶體子系統之作業系統。 本發明提供存取驅動程式246,位在核心程式244内部,· 負責存取位在BIOS 236的BIOS功能或透過Bi〇s 236存取 系統硬體238資料。存取驅動程式246也負責存取BI0S功能 位址的所在位置,以及執行關聯的BIOS功能。較佳具體實 施例中,存取驅動程式24包含以C語言寫的原始碼。須了解 其它組合語言也可用於實施存取驅動程式244的功能。 丨·---^-------!!-裝— (請先閱讀背面之注意事寫本頁) 經濟部智慧財產局員工消費合作社印製 -18-
476913 A7 B7 五、發明說明(16) 1·—,-------·!裳—— (請先閱讀背面之注意事項再填寫本頁) BIOS資料及位置典型係位於實體記憶體250,且保由存取 驅動程式246透過BIOS介面248存取。一具體實施例中,存 取驅動程式2 4 6於BIΟ S陰影區執行碼,典型於實體位址 OxOOOEOOOO至OxOOOFFFFF ° 舉例T之’若存取驅動程式2 4 6需要存取位於實體記憶體 位址0x00000000的BIOS功能,則呼叫I/O管理程式242,請 求其映射實體位址0x00000000至0x0〇〇〇〇FFF的記憶體空間 至虛擬記憶體空間。然後I/O管理程式242送返指標器至存 取驅動程式246的虛擬存取空間例如〇xfd268000。存取驅動 程式現在基於或參照其具有Oxfd268000的虛擬位址而參照 於實體位址0x0〇〇〇〇000的位址空間。如此爲了存取位於實 體位址0x2400的功能,使用的虛擬位址將爲0xfd26824〇〇。 較佳具體實施例中,載入點或功能呼叫集合可用於應用 程式230 ’服務232或類別驅動程式240其利用存取驅動程式 246。存取驅動程式246可被打開、關閉且可通過此等載入 點接收輸入/輸出(I/O)控制碼(IOCTLs)。表1説明存取驅動 程式246之結構、載入點及應用程式。 經濟部智慧財產局員工消費合作社印製 圖5爲方塊圖説明根據本發明之原理提供的存取驅動程 式246初始化過程。通常當存取驅動程式246首先被載入時 其驅動程式載入功能(參考表1)被執行。雖然本功能出現多 種其它初始化(例如配置多種資源或物件用於存取驅動程 式246的正常作業),但有兩項特別重要的初始化:(a)位於 實體記憶體250的BIOS陰影區260(包括Bl〇S服務目錄62) 以及(b)BIOS資料區264也位於實體記憶體250,二區皆映射 -19- 本紙張尺度週用中國國豕標準(CNS)A4規格(210 X 297公爱) 476913 A7 _ B7___ 五、發明說明(17 ) 至存取驅動程式246的虛擬記憶體(顯示於圖5作爲Bl〇s降 影區270,包括BIOS服務目綠272及BIOS資料區74)。結果 應用程式232或服務2234經由類別驅動程式240可使用虛擬 定址存取或執行BIOS功能。須注意BIOS功能的執行須來自 存取驅動程式246,原因在於BIOS 236的實體位址空間僅映 射至存取驅動程式246。此外,存取驅動程式246可經由32 位元BIOS功率管理服務介面的執行利用,細節述於附錄a 。業界人士顯然易知BIOS功率管理服務介面也可對64位元 、128位元及256位元配置執行。存取驅動程式246也可於64 位元、1 2 8位元及2 5 6位元配置操作。 特別,於初始化期間,存取驅動程式246定位位於膏體記 憶體25 0的BIOS陰影區260及BIOS資料區264。BI〇S @影區 260及BIOS資料區264映射於存取驅動程式246的虛擬位址 空間。其次存取驅動程式246執行搜尋BIOS服務目綠272標 頭。當找到BIOS服務目錄272且證實有效後,存取驅動程 式246獲得BIOS服務目錄272標頭的虛擬位址,虛擬位址提 供BIOS服務目錄272標頭虛擬位址與BIOS陰影區27〇的基 本虛擬位址的補償値。
另一具體實施例中,存取驅動程式於初始化期間定位 BIOS陰影區260、BIOS資料區264及BIOS ROM區位於實體 記憶體250。BIOS陰影區260、BIOS資料區264及BIOS ROM 區映射至存取驅動程式246的虛擬位址空間。其次存取驅動 程式246進行搜尋BIOS服務目錄272標頭。當找到且證實 BIOS服務目綠272時,存取驅動程式246獲得BIOS服務目錄 -20- 本紙張尺度刺+國國家標準(CNS)A4規格(21〇 X 297公爱) {請先閱讀背面之注意事項巧填寫本頁} 裝 -·線」 經濟部智慧財產局員工消費合作社印製 476913 A7 五、發明說明(18 ) 2 7 2標頭的虛擬位址。本替代且,余 曰代具組貝犯例中,BI〇s尺〇1^區 於存取-驅動程式2 4 6的虛擬記憶ff空間的利用性讓存取驅 動私式246碩及/或冩貧料於快閃記憶體r〇m。結果bi〇s ROM可被重新快閃記憶或改寫。此外與硬體介面料側應 用程式可經由軟體機構(例如述於附綠B提供的鳳凰城福來 喜(Ph〇eniXPhlaSh))NT規格存取⑴⑽r〇m區。 稍後呼叫存取驅動程式246執行功能將利用BI〇s陰影區 270的基本虛擬位址及補償値而激勵BI〇s本身被請求的載 入點。須注意應用程式232或服務234可致使Bi〇s功能於 BIOS的虛擬位址空間任何位置執行,而不僅經由BI〇s服務 目錄272執行。 經濟部智慧財產局員工消費合作社印製 一具體實施例中,被呼叫激勵B1〇s的被請求載入點的執 行功能爲IOCTL—BIOS—EXEC功能,其述於表!。 IOCTL—BIOS—EXEC功能於位在主記憶體或dram的緩衝 益(由呼叫應用程式232或服務234規定)形成暫存器堆疊。 暫存器堆疊的内容爲BIOS功能被激勵時預定的暫存器値 。存取驅動程式246通過來自呼叫應用程式232或服務234 的暫存器堆疊。呼叫程序的本身係使用BIOS服務目綠272 規定的功能的指標器進行。一具體實施例中,· I〇CTL_BI〇S—EXEC呼叫的BIOS功能接收4位元組簽章作 爲增益且定位簽章關聯的BIOS功能。送回呼叫應用程式 232或服務234之値包括BIOS功能的基本虛擬位址,以及得 自服務的載入點之基本位址的補償値。 現在提供存取驅動程式246之結構、載入功能及應用程式 _ -21 - 本紙張尺度適用中國國家標準(CNS)A4規格(21〇 X 297公釐) 476913 A7 B7 五、發明說明(19) 的一般討論。 表1.存取„驅、動程式2 4 6功能 經 部 智 慧 財 產 局 員 工 消 費 合 作 社 印 製 功能名稱 ------------ 説明 1--- " ' T, 丨丨·· 備註 DriverEntry 核心程式於載入時間呼叫此功能使驅 動程式本身初始化。 Access Driver CreateClose 核心程式呼叫此功能而形成或關閉驅 動程式的功能。 Access Driver Unload 核心程式對服務控制管理程式呼叫而 卸載驅動程式。本功能解除載入時間建 立的全部資源。 IOCTL_Locate 使用字串搜尋定位BIOS 232位元載入 點。載入點声擬位址、BIOS基本虛擬位 址及BIOS貧料區虛擬位址被送返呼叫 IOCTL_BIOS_Read 由BIOS ROM、陰影或m〇s資料區讀取資料 且將其送返使用者的緩衝器。 —--------- I〇CTL_BIOS_Write 將貧料由使用者緩衝器寫至m〇s R〇M、陰 影區或BIOS資料區。 --- -22- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297 476913 A7 B7 五 經濟部智慧財產局員工消費合作社印製 、發明說明(2〇) 轰1存取驅動程式246功能(績) 功能名稱 -------- — — 一 説明 備註 IOCTL—BIOS—Exec 透過232位元載入點將執行送至BI0S載入 點0 IOCTL—RTC 一 Read 讀取即時時脈曰期即時間且將其送返呼 功能。 送返資料的 格式須匹配 SYSTEMITME 圖板。 IOCTL_Version -----一 將驅動程式版本編號送返呼叫者。 包括目前執 行功能的位 元映射圖。 ------ 暫存裝置的 明細將用於 復原及暫停: --- 裝置必須已 經暫存。、 ^. ----_ Access Driver DriverReg ------ 以物件名稱及正統名稱暫存呼叫裝置。 Access Driver DriverReg ~^ 改變暫存呼叫裝置。 IOCTL—PM_Suspend 功能將Suspend IRP送至全部暫存裝冒 IOCTL_PM_Resume 功能將Resume送至全部暫存裝置。 -23- 丨裝--- (請先閱讀背面之注意事項I填寫本頁) 訂! 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 Α7 Β7 五、發明說明(21 ) Α· 程式246功能之詳細説明 一 1. -Γ Df i^erEntrv」功能 本載入點讓驅動程式初始化其變數,映射於BIOS陰影及 資料區’以及定位其正常作業資源。當各資源或物件被配 置時列表成爲表中變數「phResAndFlags」;如此讓單一功 能(「freeResources」)釋放由驅動程式使用的資源,而無論 驅動程式被卸載的理由爲何。被配置或連結的資源如下: a•形成裝置物件-以系統建立裝置及名稱。 b.初始化錯誤登入-形成事件登入服務的連接鏈。 c·建互主功能載入點。 d·形成符號連接鏈-由服務層或應用程式層使用。 e.映射於BIOS陰影-使本記憶體空間可於驅動程式的虛 擬記憶體存取。 f·映射於BIOS ROM-使ROM區可於虛擬記憶體的位址 空間存取。 g·映射於BIOS資料-使本記憶體空間可於驅動程式的虛 擬記憶體存取。 h.定位本驅動程式使用的Bi〇S 232位元載入點。 一具體實施例中,裝置物件名稱爲「Lapt〇p」,其要长 服務微軟OEM配接套件組(OAK)要求的聯繫功能。對應μ 號連接鏈名稱有Γ Phoenix AD」。 2· Δρcessj)riverCreateClose 本功能係當應用程式232或服務234請求系統的裝置#, 或關閉已經獲得的操縱時用來通知驅動程式246。 。 伃取驅動 (請先閱讀背面之注意事填寫本頁) . 經濟部智慧財產局員工消費合作社印製 -24-
476913 A7 ____B7__ 五、發明說明(22) 程式246經由成功地完成請求響應但調度載入點,但未改變 驅動程式246的其它狀態變數。 3 . AccessDriverUnload 本调度載入點係於需要由系統(由S C Μ關閉裝置)去除驅 動程式時,由核心程式代表服務控制管理程式(SCM)或其 它應用程式呼叫。此種功能呼叫結果爲「phResAndFlags 」表列的全部資源釋放給系統而請求被成功地完成。 4· AccessDriverReg 存取驅動程式246驅動程式具有提供功率管理模式進行 「連續處理」作爲OEM配接套件組(OAK)的一部份的功能 。此項功能整合至OEM以及了解其要求使用oak控制方法 的標準裝置的功率管理。AccessDriverReg功能暫存裝置成 爲鏈接明細。也於請求時選擇「解除暫存」裝置。典型〇Ακ 順從裝置驅動程式於其DriverEntry功能執行時(首先被載 入時)做暫存呼叫。作爲DriverUnload功能的一部份,各被 暫存裝置必須呼叫而由存取驅動程式246的需要功率管理 服務裝置的鏈接明細中去除本身。 5· K)CTL功能 服務或應用程式層與BIOS間的每個介面係由存取驅動 程式246驅動程式的i〇CTL功能操縱。各個IOCTL傳輸係藉 緩衝模式執行,故驅動程式之輸入資料及輸出資料經由一 共用系統緩衝器傳輸。此緩衝器空間的指標器示於輸入/輸 出(I/O)請求封包爲 Irp>AssociatedIrp.SystemBuffer。當被提 供控制時,IOCTL(驅動程式内部)獲得系統緩衝器位址且使 -25- 本紙張尺度過用中國國家標準(CNS)A4規格(21〇 x 297公釐) (請先閱讀背面之注意事項再填寫本頁) §· · 經濟部智慧財產局員工消費合作社印製 476913 A7 Β7 五、發明說明(23 ) 用其内4進行請求。IOCTL功能的執行結果將置於用於輸 入的相同系統緩衝器。 各個於存取驅動程式246之驅動程式執行的i〇ctl具有 對IOCTL輸入資料及其輸出資料的獨特資料格式。當於後 文説明功能時’提供其資料緩衝器格式及各攔位説明。緩 衝器補償値係以位元組表示。對各功能提供的最小緩衝器 大小推薦爲用於應用程式的使用者緩衝器之mall〇c()大小 。系統緩衝器大小將由使用者緩衝器自動導出。 6· IOCTL Locate IOCTL—Locate功能是驅動程式246初始化之後第一個被 調度的由應用程式232或服務234呼叫的載入點。該功能送 返BIOS232服務介面位址、BIOS陰影區基本位址及BI〇S資 料區基本位址呈平坦模式虛擬位址格式(232位元位址)。注 意B10S232服務介面爲全部由驅動程式層面或核心程式線 索(參考附錄A)執行的BIOS功能的單一載入點。注意 BIOS232服務介面爲全部由驅動程式層面或核心程式線索( 參考附綠A)執行的BIOS功能的單一載入點。此等位址空間 於存取驅動程式246驅動程式被載入其中保證可存取本驅 動程式(唯一)。 輸入資料:無,不仰賴緩衝器内容 輸出資料:補償値0 ·· PUCHAR-載入陰影的BI〇s服務目 錄補償値。 補償値4: PUCHAR- BIOS陰影區基本虛擬位 址。 — 1·---.------W 裝·! (請先閱讀背面之注音P事寫本頁) 訂· 經濟部智慧財產局員工消費合作社印製 N V 卞 不 一 一 * - II U 规 ¾ 公 97 476913 經濟部智慧財產局員工消費合作社印製 A7 _B7_五、發明說明(24 ) 補償値8: PUCHAR- BIOS資料區基本虛擬位 址0 補償値12: PUCHAR- BIOS ROM區基本虛擬 位址。 最小緩衝器大小:16位元組 7. IOCTL BIOS Read IOCTL BIOS —Read功能爲BIOS ROM、陰影區或資料區的 通用讀取程式。 :ULONG- 模式旗標 1= 陰影區,0=資料區。 1= ROM區(載於位元0之上) ·· PUCHAR- BIOS區開始讀取補償値 :ULONG- 1買取長度’以位元組表不0 :ULONG-實際讀取長度 :UCHAR陣列-實際資料讀取 1 6位元組 註:若應BIOS區補償値規定與映射的BIOS記憶體末端重 疊則發生「短讀取」,未送返錯誤。替代「實際資料讀取 」欄位準確指示系統緩衝器有多少資料有效。 8. IOCTL BIOS Write IOCTL—BI〇S_Write功能爲BIOS ROM、陰影或資料區的 通用寫入程式。 輸入資料:補償値〇 : ULONG-模式旗標 位元0 : 1= 陰影區,〇二資料區。 輸入資料 補償値〇 位元0 : 位元2 : 補償値4 補償値8 補償値〇 補償値4 最小緩衝器大小: 輸出資料 27 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) (請先閱讀背面之注意事項翔填寫本頁) 476913 A7 ___B7_ 五、發明說明(25) 位元2 ·· 1=R0M區(載於位元0之上)一 補償值4: PUCHAR-BIOS區開始寫入補償值 補償值8: ULONG-寫入長度,以位元組表示。 輸出資料:補償值0 : ULONG-實際寫入長度(零或要求 的位元) 補償值4: UCHAR陣列-實際資料讀取 最小緩衝器大小:16位元組 註:由於資料可能破壞故不允許短寫入。 9. IOCTL BIOS Exec IOCTL_BI〇S_Exec功能用於通過BIOS232月艮務介面執行 BIOS功能。激勵記錄係以數值送至系統緩衝器。當BIOS載 入點被激勵時,AR決定基本架構暫存器内容。當成功地完 成時,AR含有正常必須送返BIOS呼叫程式的基本架構内 容。 (請先閱讀背面之注意事項寫本頁) 經濟部智慧財產局員工消費合作社印製 輸入資料:補償值0 : ULONG- 功能載入點虛擬位址。 補償值4 : ULONG- 旗標暫存器 補償值8 : ULONG- 保留 補償值12 : ULONG- 保留 補償值1 6 : ULONG- 保留 補償值20 : ULONG- 保留 補償值24 : ULONG- 保留 補償值28 : ULONG- 保留 補償值232 : ULONG- 保留 補償值236 : ULONG- 保留 -28- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 _B7 五、發明說明(26 ) 補償値240 : ULONG- 保留 補償値244 ·· ULONG- EBP暫存器 補償値48 ·· ULONG- EDI暫存器 補償値52 : ULONG- ESI暫存器 補償値56 ·· ULONG- EDX暫存器 補償値260 : ULONG- ECX暫存器 補償値64 : ULONG- EBX暫存器 補償値68 : ULONG- EAX暫存器 (請先閱讀背面之注意事項再填寫本頁) 輸出資料:系統緩衝器内容結構相同。暫存器内容受請求 的BIOS功能影響。 最小緩衝器大小:80位元組。 10. IOCTL RTC Read IOCTL_RTC_Read功能用於讀取於CMOS RAM的RTC暫存 器内容。由此原子讀取所得資料係以類似SYSTEMTIME結構 格式化且送返系統緩衝器的使用者。 輸入資料:無,不仰賴緩衝器内容 輸出資料: <使用下示SYSTEMTIME圖板〉 經濟部智慧財產局員工消費合作社印製 補償値〇 : WORD 本年 補償値2 : WORD 本月(一月=1) 補償値4 : WORD 本週第幾日(週日=〇) 補償値6 : WORD 本月第幾曰(曰曆) 補償値8 : WORD 本小時 補償値1 〇 : WORD 本分鐘 補償値1 2 : WORD 本秒 -29- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 B7 五、發明說明(27) 補償值14 : WORD 本毫秒 一 最小緩衝器大小:32位元組。 注意RTC的年欄位寬8位元。RTC的年攔位内容重新計算 為SYSTEMTIME.Yeai* 16位元欄位含有本年AD的全部數值 。例如:RTC = 00,年=1980 ; RTC = 23,年=2003。也發現 Legacy RTC裝置於暫存器集合不提供毫秒欄位。因此之故 ,本功能的輸出資料之目前毫秒欄位經常設定為〇。
11. IOCTL VERSION I〇CTL_Version功能將存取驅動程式246驅動程式的次要 版本送返主要呼叫程式。此外由此驅動程式版本執行的功 能列舉於位元映射圖。位元映射圖的目的係用於服務或更 高階驅動程式評估本驅動程式版本是否可用於其目的(典 型於安裝時)。 輸入資料:無,不仰賴緩衝器内容 輸出資料:補償值〇 : WORD主要版本(X.) 請 先 閱 讀 背 之 注 意 事 項 再t 填_· 本衣 頁 訂 經濟部智慧財產局員工消費合作社印製 補償值2 : WORD次要版本(·χ) 補償值4 : ULONG執行功能映射圖(參見下文) 位元31 : 若執行I〇CTL_Locate則為1 位元230 : 若執行IOCTL_BIOS_Read貝丨J為1 位元29 : 若執行IOCTL_BIOS_Write則為 1 位元28 : 若執行I〇CTL_BIOS_Exec則為1 位元27 : 保留 位元26 : 保留 位元25 : 保留 -30- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 經濟部智慧財產局員工消費合作社印製 476913 A7 B7_ 五、發明說明(28) 位元24 : 若執行IOCTL—RTC_Read則。爲1 位元23 : 保留 位元22 : 保留用於Phi ash互鎖 位元2 1 : 保留用於線上設定(NVRAM寫入) 位元20-0:保留用於未來擴充 位元230 : 若執行IOCTL_BI〇S_Read則爲1 最小緩衝器大小·· 16位元組 12. IOCTL PM Suspend IOCTL—PM_Suspend功能致使欲送至各裝置的 IRP_MJ_PNP_P〇WER及 IRP_MN_LT_SUSPEND IRP使用存 取驅動程式DriverReg載入點登綠其本身。 輸入資料:無,不仰賴緩衝器内容 輸出資料:無,不仰賴緩衝器内容 13. IOCTL PM Resume IOCTL_PM_Resume功能致使欲送至各裝置的 IRP_MJ_PNP_POWER及 IRP_MN_LT_Resume IRP使用存取 驅動程式DriverReg載入點登綠其本身。 輸入資料:無,不仰賴緩衝器内容 輸出資料:無,不仰賴緩衝器内容 B.存取驅動程式246送返的錯誤碼 下表定義當IRP無法成功或僅部份完成時送返的錯誤狀 態。也列舉功能結束條件。由於作業系統已知NTSTATUS 値與存取驅動程式246之裝置驅動程式已知的NTSTATUS 値間不一定存在有一對一對應關係故本表爲必要。爲了將 -31 - 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公爱) I.----------裝--- (請先閱讀背面之注意事項再填寫本頁) _ 476913 A7D7 五、發明說明(29) 碼反向傳譯成爲應用程式寫入程式或終端使用者可使用的 字串,僅使用NTSTATUS錯誤碼。 表2.由存取驅動程式的USTATUS崎· NTSTATUS ------- 功能 " 結束條件 STATUS_SUCCESS 一 全部 請求成功 STATUS_S〇ME_N〇T_MAPPED 驅動程式載入 一或多記憶體或I/O區無法 映射。驅動程式載入失敗 STATUS 一NOT—IMPLEMENTED 全部 所需功能未於本驅動程式 執行 STATUS_ACCESS一DENIED 全部IOCTL功能 裝置無法由呼叫程式使用 ,原因在於另一服務有排它 的存取,或因BIOS服務目錄 簽章不存在。 STATUS—MEDIA—CHECK 全部IOCTL功能 •未執行 BIOS ROM内容已經改變。 需要重新呼叫 IOCTLJLocate 〇 爲了讓IOCTL_Locate找到BIOS的載入點,使用BIOS 232 位元服務目錄。BIOS 232位元服務目錄的説明述於附綠c 。存取驅動程式246當定位執行BIOS功能時使用的簽章爲 ,,一32」,。 若WinntEntry(BIOS232服務目綠)結構未接受前述條件 ,則存取驅動程式246驅動程式將於載入時間失敗, C. BIOS 232位元載入點規格 (請先閱讀背面之注意事項再填寫本頁) 裝 訂· 經濟部智慧財產局員工消費合作社印製 -32- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 五、發明說明(3〇 )
DnverEntry指示無法遵照表2初始化。 D. 硬體存取 一 ^ 了執行mCTL—RTC_Read功能,需要定義RTC的暫存器 及子取万法。RTC暫存器係位於CM〇s RA_i/〇位址 。僅RTC暫存器顯示於表3。暫存器係經由輸出⑽作二 记體位址至埠0x70然後於埠〇χ7丨讀取主題8位元暫存器 而存取。C Μ 0 S實體記憶體位址於全部R τ c暫存器已經被: 取後設定指標〇x〇D。 ^ 暫存器 暫存器名稱 CMOS位址,備註 年 ~~ 9 -自1980年起的年數 月 8 -1= 一 月 曰期 星期 6-0=星期日 小時 4 分 2 秒 0 訂 •f 經濟部智慧財產局員工消費合作社印製 圖6 A爲流程圖説明本發明之初始化過程的具體實施例 。始於開始狀態,處理600前進至方塊610,呼叫程式(亦即 I/O管理程式242)的變數被初始化。本初始化處理6 1 〇細節 示於圖6B及伴隨的説明文字。然後處理600前進至方塊62〇 ,於此處載入存取驅動程式246。然後出現存取驅動程式變 -33- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7
五、發明說明(31 ) 數的初始化。初始化過程中出現兩種特別重要的初始化: (a)位於實體記憶體250之BIOS陰影區260(包括BIOS服務目 錄62)及(b)BIOS資料區264,也位於實體記憶體250,二者 皆映射至存取驅動程式246的存取驅動程式246虛擬記憶體 [於圖4顯示為BIOS陰影區270(包括BIOS服務目錄272)及 BIOS資料區274]。 然後處理600前進至方塊630,於此處發生指標器的初始 化。方塊630細節提供於圖6C及伴隨的說明文字。然後處 理6 0 0别進至方塊6 4 0,於此處結束初始化。然後處理6 〇 〇 結束。 經濟部智慧財產局員工消費合作社印製 圖6 B為流程圖說明方塊6 1 0細節。始於開始狀態,處理6 1 〇 前進至方塊6 12,於此處得自I/O管理程式242的呼叫程式調 度記憶體用於系統緩衝器的規定記憶體結構。然後處理6! 〇 前進至處理方塊6 14,於此處得自I/O管理程式242的呼叫程 式決定多個I/O功能所在位置、其對應載入點、長度及補償 值。一具體實施例中,係經由將對應BI〇s功能的規定記憶 體結構之位址櫚位載入BIOS功能的虛擬位址以及經由提 供4位元ASCII字串可識別各種BIOS功能完成。然後結束呼 叫程式的初始化。 圖6 C為流程圖說明圖6 A之處理方塊6 3 0之細節。始於開 始狀態,呼叫應用程式232或服務234經由類別驅動程式呼 叫IOCTL-Locate,如方塊632所示。響應於此,存取驅動 程式246進行BIOS服務目錄272標頭的搜尋,如處理方塊 634所述。當找到且證實BIOS服務目錄272時,存取驅動程 -34- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) ~ --- 476913 A7 B7 五、發明說明(32 ) 式246獲得BIOS服務目綠272標頭的虛擬位址, -具彳疋供 BIOS服務目錄272標頭虛擬位址與BI〇S陰影區27〇的芙 (請先閱讀背面之注意事項再填寫本頁) 虛擬位址的補償値。然後處理630返回呼叫應用程气咬 服務234。 一 圖7 A爲流程圖説明本發明之呼叫執行過程。始於開始狀 態,處理700前進至處理方塊710,此處呼叫程式呼叫Bj〇s 功能,呼叫方式係對存取驅動程式246提供其想要執行的 BIOS功能位址。然後處理前進至處理方塊72〇,於此處存 取驅動程式246透過來自I/O管理程式242(參見圖4)的 IΟCTL指令接收凋度呼叫BIΟ S功能。然後處理7qq前進至處 理方塊73 0,於此處存取驅動程式246進行載入點位址的一 定範圍查核。特別存取驅動程式246決定載入點位址是否位 在位址映射至BIOS陰影區範圍内(服務目綠標頭除外)。若 否,則存取驅動程式246指示開始虛擬位址不再由實體記憶 體映射至虛擬1己憶體的位址範圍内。可經由使用旗標指示 。若該範圍查核成功,則處理700前進至處理方塊74〇,於 此處存取驅動程式2 4 6執行呼叫的BIΟ S功能。然後結束處 理 700 〇 經濟部智慧財產局員工消費合作社印製 圖7B爲流程圖説明圖7A之處理方塊740之細節。始於開 始狀態,處理740前進至處理方塊742,此處存取驅動程式 246於先前由得自I/O管理程式242的程式規定的系統緩衝 器形成暫存器堆疊。然後處理7 3 0前進至處理方塊7 4 4,於 此處存取驅動程式246提供一指標器指向暫存器堆疊,該暫 存器堆疊保有欲執行的BIOS功能位址。然後處理740前進 -35- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 B7 五、發明說明(33 ) (請先閱讀背面之注意事項再填寫本頁) 至處理方塊746,於此處得自I/O管理程式242的呼叫程式呼 叫且執行功能,起點位址由指標器指示,使用其映射於虛 擬記憶體的實體位址。然後結束處理740。 現在提供利用I〇CTL_BIOS_EXEC功能於存取驅動程式 246之例。最初,應用程式232或服務234使用指令 IOCTL—Locate呼叫存取驅動程式246。存取驅動程式246送 返的資料包括BIOS陰影區基本虛擬位址、BIOS服務目綠與 BIOS陰影區基本虛擬位址的補償値及BI0S資料區基本虛 擬位址。 然後利用下列動作決定BIOS服務的存在,其載入點、長 度及位址補償値。來自I/O管理程式242的呼叫程式首先調 度記憶體的暫存器結構例如I〇C_EXEC1然後以 IOCTL一Locate功能提供的虛擬位址填補結構的bios功能 襴位。其它暫存器値填補如下:識別BI〇s服務的4位元組 ASCII字串載入eax暫存器及〇載入ebx暫存器。 經濟部智慧財產局員工消費合作社印製 其次,呼叫器激勵存取驅動程式246的I〇CTL_BI〇SJExec 功能’ IOC一EXEC 1結構内容拷貝如系統緩衝器用於j〇c丁[ 呼叫。然後執行BIOS功能。存取驅動程式246的 IOCTL_BIOS—Exec功能送返,eax、ebx、ecx及 edx之暫存 器値各自含有得自服務目錄的響應。然後1/〇管理程式242 的呼叫程式取服務目錄送返資訊,形成bi〇sFuncti〇n載入點 及系統缓衝器的結構。然後使用於存取驅動程式246的 IOCTL_BI〇S一Exec功能呼叫BIOS功能。送返的資料送至同 一 I0C_EXEC1結構。 -36- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 -------- B7 ____ 五、發明說明(34 ) 圖6A,6B,7A及7B顯示的處理實例説明於附錄D1_D3。 特別附錄D1説明用於經由類別驅動程式246呼叫B][〇s功能 的應用私式232、服務234或類別驅動程式24〇之原始碼之例 。附綠D2及D3説明存取驅動程式246的原始碼之例。附綠 D2説明於陰影區執行BI〇s功能的範例原始碼,附綠〇3説明 形成暫存器堆疊及呼叫執行BI〇s功能的載入點之範例原 始碼。 經由使用本發明,提供由虛擬記憶體子系統存取及執行 實體記憶體内容之系統及方法。系統及方法有助於增加記 f思脱及柄入/輸出操作的定址能力,同時也允許於實體記憶 體空間執行處理器指令。 安全利用BIOS服務 本發明之另一特徵方面包括一種安全利用基本輸入及輸 出系統(B10 S)服務之系統及方法。後文詳細説明中,下列 術語用於説明本發明: • 「鑰」爲根據習知加密演算法的编碼及/或解碼參數,加 密演算法例如資料加密標準(DES)規定的Rivest,Shamir及 Adleman (RSA),資料加密演算法(DEA)等。 • 「鑰對」包括一「密」鑰及一「公」鑰。「密鑰」係由 鑰對擁有者持有且用來產生數位簽章。「公」鑰廣泛公開 用來驗證數位簽章。公鑰通常係以數位「認證」形式公 開。 • 「數位簽章」爲使用數位訊息及密鑰產生的數位量。數 位簽章無法未知密鑰算出。數位簽章可使用數位訊息及對 -37- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) —·—^-------裝— (請先閱讀背面之注意事項再填寫本頁) ir· 經濟部智慧財產局員工消費合作社印製 476913 A7
請. 先 閱 讀 背 之 注 意 事
訂 %
476913 A7 B7 五、發明說明(36 ) 本發明提供位在核心程式1 540内部的存取驅動程式丨545 其負貝與ROM應用柱式介面(RAP I) 1550介面而透過bi〇s 存取或更新位在BIOS 1520的資料或存取系統硬體資料。
Rapi 1 550通常提供安全利用BI0S服務或功能的介面。 RAPI之細節説明如後。 較佳具體實施例中,存取驅動程式丨545包含以c語言寫的 原始碼。須了解其它組合語言也可用於執行存取驅動程式 1 5 4 5功旎。較佳具體實施例中,一組載入點或功能呼叫可 用於利用存取驅動程式1 545的應用程式151〇、服務1515或 類別驅動程式1 530。存取驅動程式1545可開啓、關閉可經 由載入點接收輸入/輸出(1/〇)控制碼(1〇Ctl)。 圖9顯示根據本發明之一具體實施例之存取驅動程式 1 545與RAPI 1 5 50間的互動順序之説明順序。本系統中,於 存取驅動程式1 545發送一或多服務請求&RApi 155〇利用 BIOS服務前,必須於存取驅動程式155〇間建 互工作階段作業。爲了於RAPI 1 550建立工作階段作業,存 取驅動秋式1 545產生存取請求(方塊ι6〇5)且發送請求至 RAPI 1550 (方塊 1610)。 階段作業請求之具體實施例格式顯示於圖丨2。各階段作 業叫求900包括階段作業碼9〇5,參數明細9丨〇及階段作業簽 早9 1 5。階段作業碼905爲表示一類型階段作業的數値。一 具體實施例之階段作業説明例包括開始及建立階段作業的 操作以及結束或終止階段作業的操作。各類型階段作業需 要一或多個參數9 1 0明細。一具體實施例中,參數9丨〇之明 I_____ -39- 本紙張尺度適用帽國家標準(CNS)A4規格( χ 297公义
A7 A7
五、發明說明(37 ) 細可爲指標器指向參數駐在的記憶體位置。各階段作業請 求900也包括一階段作業請求簽章9丨5以防外來碼節段例如 電腦病毒捕捉而再現請求且破壞BIOS。 圖10摘述階段作業請求的產生。於方塊1705及1710,代 表一預定階段作業及該預定階段作業所需參數明細的階段 作業碼插入階段作業請求。方塊1715,1 720及1 725顯示階 段作業請求簽章的形成。於加密技術,對一訊息形成數位 簽早的動作稱做Γ簽章」該訊息。須了解簽章一訊息或對 訊息形成數位簽章的演算法爲業界已知。進一步須注意現 有形成數位簽章的演算法通常包括計算欲簽章訊息的雜湊 値其使用一密輪加密該雜湊値,如方塊1715,1720及1725 所示。 預計可使用國家標準之技術協會提供的數位簽章演算法 (DSA)。也預計可使用 Rivest,Shamir及 Adleman (RSA)演算 法。但其它產生數位簽章的演算法也可用於本發明。 經濟部智慧財產局員工消費合作社印製 如圖10方塊1 7 1 5所示,形成階段作業訊息,故含有階段 作業碼及參數明細。於方塊1 720,運算階段作業訊息的雜 湊値。須注意運算雜湊値演算法爲業界眾所周知。業界人 士 了解適用於本發明的雜湊功能爲可計算單向且無衝突的 雜湊値。於方塊1 7 2 5,經由使用儲存於目前授權認證的密 鑰加密階段作業訊息經過算出的雜湊値而產生階段作業請 求簽章。 授權認證通常含有足夠資訊而使系統組件例如存取驅動 私式1545及RAPI 1550 (示於圖9)產生安全階段作業或服務 -40 - 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 五、發明說明(38 ) 請求以及證實該等請求的完整性。圖n顯示根據本發明之 -具體實施例之授權認證800之格式。範例授權認證包括下 列至少一種領域:公鑰805,密鑰81〇及認證簽章815。如後 述,儲存於授權認證的資訊用於執行階段作業及服務請求 的安全極限。 回頭參照圖9方塊1615, RAPI 155〇建立如於方塊⑹怕 存取驅動程式1 545送出的階段作業請求規定的階段作業。 要求建立階段作業的動作摘述於圖14。於方塊11〇5,由階 段作業碼以及由存取驅動程式接收的階段作業請求取得的 參數明細組成一訊息。算出組成訊息的雜湊値(方塊1110) 。階段作業請求簽章係由階段作業請求中提取且使用涵括 於目前授權認證的11八1^拷貝的公鑰解密(方塊1115)。如後 7F ’ RAPI負責產生及供給授權認證給存取驅動程式。但 RAPI也維持最新授權認證的拷貝供其本身使用。於方塊 1 120 ’解铪後的階段作業簽章比較對組成訊息算出的雜湊 値。若算出的雜湊値等於解密後的階段作業請求簽章,則 RAPI前進而開始階段作業(方塊1125)。 ’、 回頭參考圖9,於建立階段作業後,RApi 155〇產生新的 授權認證(方塊1620)。如前述,RAPI 155〇維持新授權認塔 的-套拷貝供本身使用。RAPI 155〇以新認證替換原有^ 認證。替換後,新認證變成最新認證。 圖18顯示產生授權認證的過程。爲了產生授權認證,由 加密引擎獲得成對的新鑰(方塊25〇5)。如前述,成對新鑰 包括一公鑰及一密鑰。新鑰插入新授權認證(方塊Μ 1 〇及 -41 本紙張尺度適财@國家標準(CNS)A4規格(210 X 297公爱 事 i 訂 476913 五、發明說明(39 (請先閱讀背面之注意事項再填寫本頁) 25 1 5)。形成認證訊息故包括新的公鑰及新的密鑰(方塊 252〇)。算出認證訊息的雜湊値(方塊2525)。使用認證訊息 的雖凑値及新密鑰產生認證簽章(方塊2530)。然後認證簽 章插入新授權認證(方塊2535)。 回頭參照圖9,RAPI 1 550將新授權認證送返存取驅動程 式1 545 (方塊1625)。當接收到新的授權認證時,存取驅動 程式1 545以新認證的資訊更新目前授權認證(方塊丨63〇)。 如此新授權認證的資訊將用於產生隨後的服務請求。於方 塊1 635,存取驅動程式1 545產生服務請求而激勵*RApi 1 5 5 0提供的功能。 圖13顯示根據本發明之一具體實施例之服務請求…⑼之 格式。各服務請求1000包括服務作業碼1〇〇5、參數明細1〇1〇 及服務請求簽章1〇15。服務作業碼1〇〇5爲表示一類型服務 作業的數値。一具體實施例之服務操作說明例包含讀或寫 資料儲存於非揮發性記憶體的作業。各類型服務作業要求 一或多個參數涵括於參數明細。一具體實施例中,參數明 細可爲記憶體中一束參數駐在位置的指標器。各服務請求 1〇〇〇進一步包括一服務請求簽章1015以防外來碼節段=如 經濟部智慧財產局員工消費合作社印製 電腦病毒捕捉及再現服務請求而去能系統或造成系統癉瘓 0 圖1 5摘述根據本發明之一具體實施例之服務請求的產生 。於方塊1 205及1 2 1 〇,表示欲執行的預定服務作業的服務 作業模以及該預定作業要求的參數明細插入服務請求。^ 塊1215,1220及1225顯示一服務請求簽章的形成。一曰形 -42- 本紙張尺度適用中國國家標準(CNS)A4規格(21〇 X 297公爱) A7
五、發明說明(40) 成’則服務凊求簽章被插入服務請求(方塊1 2 3 〇)。 回頭參照圖9,存取驅動程式1 545發送方塊1 63 5產生的 服務請求至RAPI 1 550 (方塊164〇)。當接收到服務請求時 ,RAPI 1 550處理請求(方塊1645)。圖16顯示根據本發明之 一具體實施例處理服務請求所需動作。於方塊13〇5,由服 務作業碼以及接收自存取驅動程式的服務請求可利用的 參數明細建構一訊息。算出建構訊息的雜湊値(方塊131〇) 。服務請求簽章由階段作業請求提取出,且使用涵括於目 前授權認證的RAPI拷貝的公鑰解密(方塊1315)。於方塊 1320,解密後的階段作業簽章比較建構訊息算出的雜湊値 。若算出的雜湊値等於解密後的階段作業請求簽章,則 RAPI進行服務請求規定的服務(方塊丨325)。否則未進行規 定的服務。 回頭參照圖9,於處理服務請求後,raPI 1 550產生新的 授權認證(方塊1 650)。如前述,圖丨5顯示產生授權認證的 處理。RAPI 1 550維持一套新授權認證拷貝供本身使用。 RAPI 1 550也送返新授權認證拷貝給存取驅動程式1 545。 當接收到新的授權認證時,存取驅動程式丨545以新認證 經濟部智慧財產局員工消費合作社印製 的資訊更新目前授權認證(方塊163〇)。如此新授權認證的 資訊將用來產生隨後的服務請求。於方塊1 635,存取驅動 程式1 545產生一階段作業請求而請求raPI 1 550結束目前 階段作業。如前述,圖丨〇摘述涉及產生階段作業請求的動 作。於產生階段作業請求後,存取驅動程式丨545發送請求 給 RAPI 1 550 〇 -43- 本紙張尺度過用1F國國豕ί示準(CNS)A4規格(210 X 297公爱) 經濟部智慧財產局員工消費合作社印製 476913 五、發明說明(41) 當接收到階段作業請求結束階段作業時,RApl丨55〇結束 ㉟奴作業(方塊1 680)。圖1 7顯示涉及結束目前階段作業的 動作。於万塊1405,由階段作業碼及由存取驅動程式接收 的階段作業請求中可取得的參數明細建構一訊息。對建構 的訊息算出雜湊値(方塊丨4丨〇)。階段作業請求簽章由階段 作業請求中提取出,且使用涵括於&紹的目前授權認證的 2鑰解密(方塊丨415)。於方塊142〇,解密後的階段作業簽 章比較建構訊息算出的雜湊値。若算出的雜湊値等於解密 後的階段作業請求簽章,則RApi前進而結束目前階段作業 (方塊 1425)。 回頭參照圖9,於結束一階段作業後,RApi 155〇產生新 授權認證(方塊1 685)。如前述,圖15顯示產生授權認證的 過程。然後RAPI 1 550將新授權認證送返存取驅動程式1545 (万塊1690)。當接收到新授權認證時,存取驅動程式“Μ 以新認證資訊更新目前授權認證(方塊1695)。如此新授權 認證的資訊將用於隨後階段作業產生請求。 圖9顯示存取驅動程式於一次工作階段作業僅產生一個 服務請求。實際上,可產生多個服務請求且於各工作階段 作業間送至RAPI 1 550。 、要言之,本發明要求涵括數位簽章於階段作業及服務請 求作爲安全措施以防系統外來组件如病毒侵襲Βι〇§功能 或服務。此外,各連續階段作業或服務請求包括數位簽章 ,其係使用新密鑰產生以防外來組件捕捉且再現該階段作 業及/或服務請求因而對系統造成不良影響。如此本發明採 · * ^--------訂--------- (請先閱讀背面之注意事項再填寫本頁)
476913 A7
五、發明說明(42 ) 用的安全措施可確保安全牢靠地利用BI〇s功能。^ 雖然已經就某些較佳具體實施例説明本發明,彳曰業界人 士顯然易知其它具體實施例也屬料發明之範i如此本 發明之乾圍意圖僅受隨附之申請專利範園所界定 ^—ϋ ^^1 - n ϋ ϋ ϋ ^1 ϋ ϋ I ϋ I I ϋ n 一-口、I I n ϋ I ϋ n ϋ I 先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 -45- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 B7 五、發明說明(43 )
(請先閱讀背面之注意事Z
Appendix A ,•裝—— f填寫本頁) ·. -丨線· 經濟部智慧財產局員工消費合作社印製 -46 本紙張尺度適用中國國家標準(CNS)A4規格(210 χ 297公釐) 476913 A7 B7 五、發明說明(44 ) (請先閱讀背面之注意事填寫本頁) 丨裝 BIOS Power Management Service for Windows Nt 4 〇 0 線! 經濟部智慧財產局員工消費合作社印製 -47 ~ 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297 ^¾ ) 476913 A7
476913 A7 ____B7五、發明說明(46 )
Introduction This documcm provides the inlcrfacc for the 32-Bit BIOS Power Management Service Interface (BPMSI). This interface is used by ihc Windows NT Power Management Kernel driver for providing power managemeni services to ΛΡΜ-awarc applications.Terms APM BIOS _ System BIOS which provides power managemeru functions adhering to the ΛΡΜ spccificaiion (cunrcntly at revision level 1.2)Kernel Mode A privileged processor mode in which the hTT system code runs. A bmd mode thread has access to all I/O and system memoryPower Management Kernel Driver (PM Driver) Provides access to the BIOS ROM, BIOS Daia Area and the 32-Bit Services for Scr/iccs.Power Management Service (PM Service) Provides power managemeni services for applications and oihcr drivers. Translates their requests inio queries【〇 ihc B】〇S Power Managemcm Service Imcrface using the imcrfacc provided by ihc Power Management Kernel Driver (PM Driver).PowerPAL Phoenix's APM BIOS extensions which provide application IcycI access lo system and device power management fcruurcsSystem Idle Siaic where PM service dciccicd minimum processing at ihc application level. In ihis stale, only threads run on idle priority arc cxccuicd and they will be prccmpicd by any ihrcad running in a higher prioriiy class.User Mode A non*privilcgcd processor mcxic in which applicaiion code runs. An i.:cr-mcxic ihrcad docs noi have access ίο I/O and system memory. (請先閱讀背面之注意事Ί -丨裝---P寫本頁) .. •f 經濟部智慧財產局員工消費合作社印製 ___-49-本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7___ 五、發明說明(47 )
Architecture Overview .
The cxicnsions ιο the BIOS for support of V/indows NT power managemeni consist of iwo pans: (a) Modifications 10【he B10S32 Service Direciory. An eniry was added which allows the PM Driver 10 find the cniry point for the BIOS Power Management Service Inicrfacc. (b) New 32·Β·ιΐ BIOS Power Management Service, which mimics the APM 32-bi【irucrface with some differences, which arc noted below. The new interface provides a 0:32 calling method which is more secure and more Windows NT friendly.
When ihe PM Kernel wishes to use the BIOS services, inmist perform the follqy/ing sicps: 1. Find the BIOS32 Service Directory header 2. Call ihc B10S32 Service Directory calling interface, specifying the 32-Bit BIOS Power Management Service Inicrfacc entry point. 3. Call ihe BIOS 32-Bit BIOS Power Management Scp/icc Inicrfacc cnlry point, asking for APM Connect. BIOS32 Service Directory Modifications
The 32-bii BIOS Service Directory is an existing siructurt wiihin the Phoenix BIOS which allows a 32-bii proiccicd mode application or operating system to find ihc entry point for a panicular 32-bii service. This spccificaiion defines a new standard 32-bit BIOS Service.
The BIOS32 Service Directory consists of a fixed structure which can be dciccicd by ihc PM driver and a single funciion which returns the address for a panicular service.
The 巳 10S32 Service Directory Header A BIOS which implemcnis ihc B10S32 Service Directory must embed a specific, coniiguous 16-byic pauern somewhere in the physical address range OEOOOOh · OFFFFFh. The paucm must be paragraph aligned (i.c., it must si^n on a 16-byte boundary). This paitcm is krjown as the BIOS32 Scp/icc Directory Header.
The Header is comprised of six distinct fields. The following table describes each field. :0 4 byics ! The ASCII signature 0x5F33325F ·: :4 ,4 byics J The entry poini for the B10S32 Scr/icc Directory calling interface. This is a 32-bit ! linear (i.c.. noi scgmcnt:offsc〇 physical address ;8 ;l byic ! The revision level of the BIOS32 Service Directory header and calling inicrfacc. The . ;current revision is 0. •9 1 byic The length of ihc B10S32 Service Directory header. Measured in paragmphs (16 ; • bytes). The current length is 1. :10 .1 byte j The BIOS32 Service Directory header byic-widc, byic-sum checksum. When totaled,. ! all of the bytes in ihc header should ad up lo 0. :11 5 byics !· Reserved. Should be 0. .
Clicnis of ihc BIOS32 Scn/icc Directory should f\rsl dcicmninc iis existence by locating the Header. This is done by scanning OEOOOOh ιο OFFFFOh in paragraph incrcmcnis and looking for a signature maich in the firsi 4 byics of each paragraph. When、and if,ihc signature is dciccicd the cliem should perform a checksum of all bytes in ihc Header. (The Header length, in paragraphs, is found at offset 9h.) All bytes in ihc Header should ADD together with a result of Oh. If ihc checksum is valid ihcn the 32-bii cnu7 point ____-50- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) (請先閱讀背面之注意事填寫本頁) 丨裝 訂· -丨線· 經濟部智慧財產局員工消費合作社印製 476913 A7 B7 '五、發明說明(48 ) field can be used as lhc address for the B】OS32 Service Directory Calling Interface. If lhc Header is ηοι found ihcn lhc BIOS32 Scr/icc Dircclory docs not exist on lhc platform. The B10S32 Scr/icc Directory cnU7 poinu and its associated code and data, maybe located anywhere within the 4Gb physical address space. However, it is guaranteed to be physically conliguous it will be cJdivercd in ROM or FLASH space) and to fit within two pages (i.c·,k will not span ihrce pages). 經濟部智慧財產局員工消費合作社印製
The BIOS Service Directory To get the entry point to Lhc BIOS 32-Bit Power Managcmcnl Service Interface, the PM Driver must call the BIOS Scn/icc Directory with the following parameters: IN: EAX t4NTPM" or 0x4E54504D EBX 0x00000000 OUT: AL Error ccxic: 0x00 = None, 0x81 = Service docs not exist EBX Base address of the 32-Bit Power Management Service code ECX Length of lhc 32-bit Power Management Service code (from EBX) EDX Offset (from EBX) of the 32-bit Power Management Service ccxjc entry point. The entry point of lhc 32-bii Power Management Service code entry point is FAR (that is、 requiring boih segment and offset lo be pushed on the stack.) CS: The base address musi be less than or equal to the (4KB) page address of lhc page that contains the enuy point. For example, if lhc cniry poini is 0FFF81234h, then lhc base address must be less ihan or equal lo 0FFFS1 OOOh. The limil must be such that the base address plus the limit generate an address that is greater than or equal to lhc last address on lhc (4KB) page which follows lhc page containing the entry point. For example, if lhc cnoy point is 0FFFS1234h then the base address plus the limit musi be grcaicr ihan or equal to 0FFF82FFFh. Simply staled, lhc base address and the limit must "encompass" both lhc page that contains the entry point and lhc following page. The segmeni type must be 100b (ccxic, execute only) or 101b (code, cxccutc/rcad). However, the implcmcntcrs of lhc Service Directory cannoi assume read access to the CS code segmenL The system bit must be 1 (non-system segment). It is recommended that lhc Descriptor Privilege Level (DPL) be 0. (The CS descriptor DPL becomes lhc Current Privilege Level, or CPL). If lhc CPL is no【0.【hen the 〇S must provide trapping and vimializaiion services for ring 0 privileged instructions (such as those that access CRx). Note also the dependency of this fkld on ihdOPL field in EFLAGS (see ScctionO). The Dcfauli Size bil musi bt \ (32 bits). DS: The base address musi bo equal to the CS base address. The limil must be greater than or equal to lhc CS limit. The segment typ>c must be 000b (data, read only) or 001 (daia, rcnd/wTiic). However, the . implcmcnicrs of lhc Scp/icc Directory cannoi assume wriic access lo lhc DS daia segmeni. The system bil musi be l (non*sys\cm segmeni). The Descriptor Privilege Level (DPL) must be gTcaic than or equal lo CPL (see lhc DPL field in Section 0). -51 - ^"張尺度巾關家標準(CNS)A4規格⑽x 297公釐)
(請先閱讀背面之注意事寫本頁) 裝 • .1 ϋ .1 · --線- 476913
SS: The segment type must be 01 lb (daia, rtid/wnic, cxpandniown) or COlb data, read/wrile, expand- up). The system bit must be 1 (non-system segment). The Descriptor Privilege Lcvxl (DPL) must be equal lo the CPL (see ihc DPL field in Section 0): The Default Size bit must be 1 (32 bits). The Granularity bil must be 1 (4Kb).
Note that the above settings ensure a suck size of ai least 4kb. It is ihc caller's responsibility to ensure thai there is at itasi lkb of unused slack available. *
Paging: Paging may or may not be enabled. If paging is enabled, then the address space that is described by the CS and DS sekaors must be linearly contiguous. Tha【is, the original physical contiguity of the Calling Interface zs found in ROM or FLASH must be preserved. (The Calling Interface code and dau is wriuen to be p>osition-indcpcndcni and EIP-relative). IOPL: In order for the Calling Interface to execute I/O instnictions, ihc UO Privilege Level (10PL) Held in EFLAGS must be greater than or equal to the CPL (see the DPL field in Section 0).
Other: The BIOS Data Arc^ Extended BIOS Data Area and fixed-location ROM data tables cannot be assumed to be available for use by the exteuling code because of paging. The BDA may be accessed using ihc jx>intcr provided by the caller. 32-Bit BIOS Power Management Service Interface
In general, the 32-Bil BIOS Power Management Interface provides ihc same functionality as ihc 32-bit APM entry point. There art two areas of difference: the way in which calling parameters arc passed and the way in which certain APM conncci funciions arc supponed.
(請先閱讀背面之注意事寫本頁) 裝
Calling Parameters The A?M 32-Bii Interface passes all parameters in CPU registers. The BIOS Power Management Scp/icc Interface passes the paxameters on the suck. The equivalent C-stylc declaration would be: 經濟部智慧財產局員工消費合作社印製
///*/*/*/*/*/*/*/*/*/*/"/*/*/*/*/* 000408OC1014181C2024282C3034383C404448 •f
本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、發明說明(5〇 )
The actual APM funciion and its behavior will be determined by the value wriuen in the corresponding register fields. Tnc pBDA field is a pointer to the Yirrual address where ihc kernel driver has mapped ihc BIOS Data Area so that it can be accessed by ihc service entrance. * Lf an error occurs, bit 0 of rrgFiags will be 1 and ihc error code will be in bits 8-15 of regEAX, oihcnvisc it will be 0 and bits 8-15 of ixgEAX will be 0. The error codes arc idcniical to ihosc found in ihc APM 1.2 sp>ccification. (請先閱讀背面之注咅心事 寫· 本頁) 裝 -丨線· 經濟部智慧財產局員工消費合作社印製 -53- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 3 Ίχ 9 6 7 A7 B7 五、發明說明(51 )
Software Requirements
Development Software Requirements
The following software development tools arc required lo build the PM service: • MASM 6.1 lc assembler from Microsoft • Phoenix PhDebug for debugging the code
Software Requirements PM service requires to run on the following environment: • Windows NT 4.0
• System with Phoenix NoicBIOS supporting ihc NT BIOS Interface lo the PowerPAL • PM driver installed in ihc sysicm
Porting Changes
The following section describes the files which have been modified in ihc Core, Miser and the chipsci ccxic It also describes ihc changes which need lo be made in order to pon a normal BIOS to include the NT suppon. (請先閱讀背面之注意事z 裝--- 『填寫本頁) •f- 經濟部智慧財產局員工消費合作社印製 -54- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 B7 五、發明說明(52 )
i d r e
裝--- (請先閱讀背面之注意事^^填寫本頁) 經濟部智慧財產局員工消費合作社印製 55 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 B7 五、發明說明(53 )
PhoenixPhlash NT
Flash ROM Programming Utility for
Windows NT ----·------------ (請先閱讀背面之注意事寫本頁) 線· 經濟部智慧財產局員工消費合作社印製 -56- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 5 V - J 11 9 6 7 A7 B7 五、發明說明(54 driver referred to in Appendix B is the Access
(請先閱讀背面之注意事S --裝--- P寫本頁) 訂-- Ϊ線- 經濟部智慧財產局員工消費合作社印製 -57- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913
3,0 PLATFORM.DLL DETAIL 3.1 FU« Format
3.2 File Hwidcr Form&L 33 Block 丁abk Format 3.3 J Multiple Fliuh Blocks 3.3.4 Processing Boert Blocki tnd ESCD storage 3.3.5 Block 丁able Examplts 3.4 PL人丁FORM.DLL F口Detiona 3.4.1 Function EniblcFlishO 3.4^ Function Dis&blcFia5h〇 3.4.3 Function BciinFl2^h(DW〇RD Block Judex) 3.4.4 Function EodHiih(DW〇RD Block__Lndex) 3.4.5 Function GclBlock(DWORT) iDdcxTDWORD BufTo^人ddreu) 3.4.6 Funcuon CmdLint(ch»r fax ^izOpiioru)
3.4.7 Function AutoSens^O 3.4.8 Function hFlBshablc(chw, fir ♦jxErrorMsg^ 3.4.9 Funciion Rcboot〇
3.4.10 Function ChcckSumO 3.4.11 Function GdB10SFilc$i2«〇
3.4.12 Function GctMinufactIDO 3.4.13 FuDction GtiP»rtID〇 3.4.14 Function GdFlag5〇 3.4.15 Function Gci]rot^cBuf〇 .3.4.16 Funedon GclMfglDAcklr〇 3.(17 Function GclPknJD人ddr〇 3.4.)S Function GetRetryCountO 3.4.19 FunclioD GctblockT^bltSixcO 3.4J20 Function G<tp>nTypc»Sizc〇 _-58- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐)
(請先閱讀背面之注意事填寫本頁) i裳----
經濟部智慧財產局員工消費合作社印製 476913 Α7 Β7 五、發明說明(56 ) 3.-4^1 FudciJod GotBJockT>blc〇 3.4.22 Fimctioo GctptrtTypwO 3.423 Function GctDLLVcnionO 2.A24 Funaion GctROMFilcN&mc〇 3A25 Function GciDLLFui^cDcfincO 25 :·一 26 26 . 26 26 4.0 BIOS.ROM DETAIL 27 5.0 GENERAL IMPLEMENTATION GUIDELINES 28 APPENDIX B1 - FUTURE ENHANCEMENTS 29 Coraplttion Codtj with Keyboard LEDi 29 (請先閱讀背面之注意事β APPENDIX B2 - PHLASHNT.H COMPLETION AND ERROR CODES 30
APPENDIX B3 - PLATFORM.DLL SAMPLE SOURCE CODE PLATFORM.CPP 31 31 --裝--- I填寫本頁) · 線丨· 經濟部智慧財產局員工消費合作社印製 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、發明說明(57 ) 1.0 Overview
The PhocnixPhlash flash utility will be used to progjHm BIOS images into flush ROMs in AT compatible systems. The utility will consist of \ht following files:
PHLASHNTJEXE - used to program the flash ROM PLATFORM.DLL - used to perform platform dependent functions BIOS.ROM · actual BIOS image to be programincd into flash ROM
This specification provides a detailed description of th^ functionality for the PHLASHNT.EXE program. Because PLATFORM.DLL and BIOS.ROM arc platform specific, only the general format of these two ίΙ1« is covered in this docuxncnL
PhocnixPhlash will be executed as a Win32 console application.
High priority is being placed on flexibility, adaptability and supportability for this design project. As much customization capability as possible will be placed into the PLATFORM.DLL file so that many different plalforms and configurations can be supported without modifying PHLASHNT.EXE. rhoctdxPhlash will support platforms with a single flash ROM part, as well as platforms with muJtiplc flash ROMs. Flash ROMs from 1Mbit to 4Mbits or greater will be accommodated, including boot block devices and devices with any configiiration of multiple flashable regions.
For each supported part, all code specific to the particular flash ROM part (c.g. Intel 28Fxxxx) will be part of the PHLASHNT.EXE moauJe. All code and parameters specific to a plaifonn (c.g. fla^h enable code and flash ROM address range) will be part of the PLATFORM.DLL module. PHLASHNT.EXE, the main module of tht PhocnixPhlash utility> will contain all code which is platform lDcicpcndcnL It will contain user interface code» code to load and verify the PLATFORMX)LL file and the platform independent portions of code to program a flash device. PHLASHNT.EXE will be a Win32 executable file, generated using Microsoft C++ V4^ or later.
Using CDrivor to access hardware PHLASHNT.EXE uses the CDriver C++ class which works m conjunction wth the PhoenixAD driver to enable Windows NT uscr-mode applications to access I/O ports; to access BIOS data and code area; and to execute BIOS32 scp/iccs. The CDriver class provides & simple and flexible interface between the applicalian program and the PhoenixAD driver. CDriver works in conjunction with the PhoenixAD driver to provide the foilowing ftinctions to user-mode application programs.
Access to I/O pons Execute J310S32 services 60- ^氏張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) I---· 1 I (請先閱讀背面之注意事寫本頁) 訂· 線-
476913 A7 B7 五、發明說明(58 )
Access the BIOS image
Access BIOS άΆΐΆ areas '
Read the system Real Time Clock
The CDriver class serves as a thin wrapper interface between Windows NT applications and the 尸ώήνσ. It encapjulales the interface to the driver and provides flexibility to both applications and the kerne] driver designs.
To assure future compatibility, PHLASHNT.EXE docs not call the PhoenixAD driver directly; instead, it c^ils the methods in the CDriver class. - I.---·-------^裝--------訂· (請先閱讀背面之注意事寫本頁) ,線! Φ 經濟部智慧財產局員工消費合作社印製 -61 - 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 經濟部智慧財產局員工消費合作社印製 476913 A7 B7 五、發明說明(59 2-0 Modes of Operation 2.1 Win32 Console PHLASHNT.EXE will be started in a Windows NT window, followed by optional command ]inc flags (if any).
Command Iidc flags will include.(both lower and upp«r case characters arc acceplablc): /A 一 AUTODETECT OFF - Do not read ID from the part. By default, program verifies that the manufacrarcr ID aod part ID read from Ihc parL, matches the ID specified in the PLATFORM.DLL file and v/hen the two IDs differ, the ID rtad from the part is used This allows one to use the same PLATFOrdvl.DLL and BIOS.ROM for several difTcrcnt pans without the need to modify either of the two files. When this flag is not set, then it is assumed th^t the ID is “readable” from the part When tiiis flag is set, the ID from the part is not used, instead the values specified in the PLATFORM.DLL arc used. fB^lename BINARY FELE - Overrides the defauJt platform specific binary file. This option is required when & full path specification is Deeded and/or ihc binary file has a name other than PLATFORMJDLL. ίΒΌ-filename BACKUP * Save the previous version of the BIOS linage into file filename before erasing. Filename is optional; if not specified, the previous image is stored in B10S.BA1C Because many versions of BIOS use platform dependent features such as shadow memory and de-comprrssion, it is often necessary to use platform dependent code in PLATFORM.DLL to retrieve the BIOS image before it can written to a file.
/C CMOS UPDATE - Clears the CMOS checksum after Flash is updated. If the AUTO_UPDATE feature is installed in the new BIOS .image, the BIOS automatically sets all CMOS fields to their default values on the next booL If the AUTO_UPDATE feature is not loaded, the BIOS displays the CMOS . checksum error message on the next boot amd prompts the user to press the F2 key to execute Setup and manually rcconGgure the machine.
/CS CHECKSUM BIOS ROM · Computes checksum on BIOS ROM image. If the checksum is not zero, or if the optional PLATFORM.DLL function ChcckSum fails, the program tcrmliiatts with an error message.
/H USAGE - EHsplay program name, venioa, copyright and help screen. Π can also be used for this option. -62- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐)
476913 A7 五 、發明說明( /1 IMAGE SIZE VERIFICATOM - Proceed only if the ROM .image file siz^ is the same ti the size of the flash part. /MODE^ti ΟΡΕΙΙΑΉΟΝ · Selects the operating mode for PHLASHNT. The following operating mod« arc currently supported: 0 Update only the BIOS image (the normal operating mode). In this mode, PHLASHNT replaces, the OJircnt BIOS image with the new image. The DMI Information in the rystem BIOS is madnuined. This is the default mode and is selected if the /MODE commAnd lihe flag isn’t present or if an operating mode isn't specified. 1 Update only the DMI informatiorL In this mode, PHLASHNT v^ites the strings specified via the DMI command line flags to the Flash. The DMI information in the system BIOS is mBintained urdcss new DMI strings arc specified on the command line. 2 Update both the BIOS and DMI information (save system DMI strings). In this mode, PHLASHNT both replaces the current BIOS image and writes the strings specified via the DMI command line flags to Flwh. The DMI information in the system BIOS is maintained unless new DMI stxings arc specified on the command line. 3 Update both the BIOS and DMI information (reset system DM] strings). In this mode, PHLASHNT both replaces the current BIOS image and writes the strings specified via the DmI command line flags to Flash. The DMI informaiicm m the system BIOS is replaced with the DMI strings from the new BIOS ROM image and/or new DMI strings specified on the command line. These option arc not displayed by the help (/H) option for security reasons. 意
/N NEW (different) - Proceed only for different version of BIOS ROM. If the data stractiirc at BCPSYS, which includes BIOS version and build date Sc lime, is same as the corresponding structure in the BIOS.ROM* file then the prograinis terminatts without flashing. /0 OVERRIDE PLATFORM.DLL OPTIONS - Disable all flags set in PLATPORM.DLL. Without this switch, options set in the PLAT70RM.DLL are combined with options specified on the command line. When this switch is used, only command line options jux used. Γ? r^uuuL.iiuiN - Maximize spccc oi iiasnmg. au mci is rcaucca to a minimuin (no sound, or screen update), This is incd to reduce the time needed to flash a pari in a production environment. Only the final succcss/faUurc is reported. 63 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 __B7五、發明說明(61 ) /PN . BIOS PART NUMBER CHECK - Proceed only if the BIOS part rrnmbcr in BIOS.ROM is the szmc as \ht pari number in the current BIOS. /PF="list of options” Command line options to be passed to the platform dependent module PLATFORM.DLL. On some platforms it may bi d«irabl0 to pass eommanci line opiions to the platform dependent procedure. Tliis is done via the CmdLmc〇 function. When both the CmaLineO address is nonzero and this command line option is present, then the string immediately following the equal sisn will be passed to PLATFORM.DLL (enclose the string in double quotes it the string includes spaces). _ /Rn RETRY - If flashing a block faib, rctiy n times instead of aborting. The /Rn option can be used in crisis mode by setting psIRetryCount with tlic desired r^ti7 count ixi PLATFORM.CPP. /S , SILENT - Silent operation without audio feedback. N VERIFY - Ailcr each block is programmed, data in the Afiish part address space will be compared to the data in the BIOSJIOM file. Any cUscrepancics axe reponed and the program will either re-try programming of the same block or the system will halt (deperiding on the response to a prompt). Because the check is made aflcr the flash memory was erased, the system will be very unstable and it may not be possible lo properly notify the user and recover.IZ ZERO BLOCKS · Zero flash blocks before erasing. (請先閱讀背面之注咅?事^ -麵裝i I P寫本頁) 訂· 經濟部智慧財產局員工消費合作社印製 filename BIOS ROM image file name. Any conunand line option without the leading back-slash will be interpreted as the file name for the BIOS ROM image file. A filename is only required when necessary to specify a full path for the ROM BIOS image and/or the ROM BIOS image file is difFtrtnt than BIOS JR.OM. @filename Response file. Any of the command line optioas described above may be placed in a response file. PHLASHNT will read the file and process the opiions as though they were entered on the command line. The options may be placed on a single line or on separate lines. Each line may be up to 1024 characters in length. The following command line fla^s are used lo write information to Flash for later retrieval through the Phoenix Desktop Management Interface (DMI). DM1 command line flags arc ignored if the target BIOS image do« not support the DMI interface (doesn't have a DML BCP structure LasialltiJ) or the PHLASHNT operation mode is BIOS only - (set above). -64- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 經濟部智慧財產局員工消費合作社印製 A7 __B7___五、發明說明(62 ) All flags have the format fDxx'Strin^ where xr is one or two characters identifying the specific DMI rjing (s« below). DMI conunAcd line flags art optional; i.e.^ if a given DMI command line flag isn't specified, the previous contents of the corresponding DMI iiring buffer aren't modified, unless ft default string is specified in PLATFORM.DLL. In this ciisc, PHLASHNT always writes the default string to the corresponding DMI string buffer. If a DMI command flag is specified without the String field, the corresponding DMI string buffer is cleared (set to a null string). Siring can only contain printable — … ' ~ic maximum if the passed tnr^ct buffer. The following DMI fields arc currently supported. These options arc not displayed by tbc help (/H) option for security reasons. /DSSSiring Specifies the system serial number string. Specifics the lyitera manufacturer's name string. /DPSSpecifics the system product (mcxicl) identification string. fDVS'String Specifies the jystem version string. /DSM'Siring Specifics the motherboard serial number string. fDMMSirLng Specifics the motherboard raaDufacturcr's name string. /DPM:*Sfrin^ Specifics the motherboard product (model) identification suing. /OWJA:String Specifics the motherboard version string. fDSOString Specifics the chanii serial number string. iDbiC^Siring Specifics the chsjfiii manufacturer's name string. fO?CString Specifics the chassis product (model) identificaiion string. fOVC'String Specifics the ch&ssb version string. fDOl firing Specifics OEM string 1. /DOnSirbig Specifies OEM string n. The system and chassis switches arc available only with DMI version 2.0. The older forms of the command line switches, given beJow, w^crc originally for DMI and are kept for compatibility. These arc equivdent to /DSM, /DMM, /DPM and /DVM respectively. uivii smug ouncr is cjcsiea、scx ίο a mm firing can oruy coniai ASCII characters. String must be enclosed m ouot^s if it contains spaces. The length of each DMI string is platforro specific; PHLASHNT rctams an error ii sirrng is longer th^n the corresponding target buffer. The following DM] fDS'String iDM'Strifig !O?'Siring
Specifics the motherboard serial number string. Specifics the motherboard manufacturer's name string. Specifics the motherboard product (model) identification suing. -65- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) (請先閱讀背面之注意事填寫本頁) 裝 . -丨線. 476913 A7 B7 經濟部智慧財產局員工消費合作社印制衣 五、發明說明(63 ) fDV-Siring Specifics the motherboard version siring.
Next, the flash program will load the PLATFORM.DLL file and call the platform dependent function EnailcFlashQ in PLATFORM.DLL to prepare the platform for flashing. PLATFORM.DLL will indicait memory region where the BIOS ROM image is to be loaded in memory and will indicate what memory regioas to use for the llash device. Memory regions may be in convcodonal memory or In extended memory. After the ROM image is joaded in memory device programming begins.
For each block of the flash ROM to be programmed: 1) BcgiaFlashO is called in PLATFORM.DLL 一 2) The propeT fla^h algorithm in PHLASHKT.EXE is executed. 3) EndFlashO is caUcd in PLATFORMJ5LL.
This process is repeated for each flfLsh block specified in PLATFORM.DLL. This allows for multiple devices on a single platform, multiple blocks within a device and block dependent iiiilializauonyicTminalion code for each block. This also allows for automatic saving and restoring of memory regions such as boot blocks.
During flashing, progress informatioa is presented to the user. 1) If production mode is not selected, an appropriate message window will be displayed on the screen, which v/ill include time of day, gas gauge style progress indicator and status line message. 2) Approximately once every second a short beep is sounded.
3) At the start End completion of each step an appropriau: code is sent to the debug porL
Video will be updated at least once every second. The sound will be generated approximately every second. Note that in production environment progress update can be disabled. 人fler flashing is complete,DisableFlash〇 is executed from the PLATFORM.DLL file. One of two distinct sounds will be generated to indicate success or failure of the flash process. If video is available, an appropriate message window will be displayed. After a. short pause system is re-booted. 2.3 Completion Codes
Although the program will proceed through many steps and will be capable of reporting to the user status at each step, only three major stages are identified by sound and keyboard LED codes. The three major stages axe: 1) Read and verify PLATFORM.DLL file 2) Perforra platform specific initialization 3) Program the part -66- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) (請先閱讀背面之注意事填寫本頁) -裝 --線- 476913 A7 ____B7五、發明說明(64 )
If the program fails to coraplctc any of the three major itages of the flashing process, program will U3c distinct sound sequence and keyboard LEDs to inform user u which stage the program failed. At the st^rt of the program CAPS^LOCK, NUM_LOCK and SCROLL_LOCK LEDs on the keyboard will be turned on. The failure at each of the three stages is mdicatcd follows:
Sound Keyboard LEDs ON Description low buzz + 3 short tones CAPS, NUM, SCROLL 1. Before reading platform.dll low buzz 4- 2 shon tones CAPS,NUM NUM 2. Before plaiform init 3. After platfonn init Successful completion low buzz + 1 abort tone 1 long tone none
Stage 1 - Failure occuncd before locating PLAI70RM.DLL. Most likely due to errors In PLATFORM.DLL file format System is in stable mode, no changes have been made to the BIOS, do re-bcK>t is needed.
Stage 2 - Failure during pletfonn dependent initiaU2atiorL System is unstable and re-boot is needed. No changes have been made to the BIOS. Stage 3 - Failure during prograraining of the flash memory. System is unstable and the BIOS flash memory Is corrupted. System must be restarted with Crisis Diskette. The program will also perform error detection at each of the steps. Unless explicitly disabled by the PRODUCTION option, as the program progresses it will report on the screen and debug port either the step number of the step currently in progress, or one of the error codes. Code numbers for errors and program steps 2ure further defined in Appendix B2: When 2lh error is detected before any changes are made to the flash memory part, then program will aticuipt to notify the user and then will exit PHLASHNT with proper error messages. Once the flash mcmoiy has been modified, errors will cause the program to halt.
(請先閱讀背面之注意事X 丨裝—— I填寫本頁) •線! 經濟部智慧財產局員工消費合作社印製 2.4 Device Dependant Modules For each type of flash memory supported, there will be a part specific module to perform the following*. 1) Identify the part and return the manufacturer ID and the p^rt ID 2) Zero a range of flash memory (set all bits to 0) 3) Erase a range of flash roemory (set all bits to 1) . 4) Program a range of Qdsh memory ___-67- ^紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 經濟部智慧財產局員工消費合作社印製 476913 A7 B7 五、發明說明(65 2.4.1 AutodataetJon
In this mexiuje will be the code necessary to read the MaDufacturcr DD and part LD from the memory part If IDs cannot be deUnnined, zero Is returned. The built-in auto^ defect module wiU not be xistd when the AutoScnsc〇 function b provided in the PLATFORMJDLL file; the provided AutoStnse〇 function will be used instead. 2.4.2 Zsro
There arc several pari types which require thai the flash memory is set lo zero before it can be programmed. In this module will be the code necessary to set memory range to zeros. 2,4.3 Erase
Most flash memory pans require that the flash memory is set to all ones before the part can be programmccL These parts often allow erasure of & full block of flash memory with a single write operation. In this module will be the code necessary to set memory range to ones.
When block descriptors arc defined in the PLATFORMDLL file, descriptors must be jet up so that there is at least one descriptor for e^ch l<cmablct, block in the flash memory. For example in Intel 28F004 flash memory there is one 16kBylc BOOT block, two 8kJBytc PARAMETER blcx:kst one 96kJByte MAIN block and three 128kByic EXTENDED blocks. Each of the seven blocks can be erased with a single write and there must be at least one descriptor for each of the seven blocks. 2AA Program hi this module will be the code necessary lo rc^d the data bytc3 form the BIOS ROM Image and program these into the flash part. 2.5 Supported Devices
Initial set of flash memory devices supported by PHLASHNTiXE will include the parts listed in the table below. For each part type a manufacturer and pan ID and part description is listed. As new parts become available it may be necessary to add additional modules lo PHLASHNT^XE so that a new tvpc of flashing a! gorithm is provided ( new AutoDetcclO, ZeroQ, Ehlsc〇 and ?rogrzm〇 lunctions). If it is powible for the new part to use one of the existing algorithms and only thic Manufacturer or Part ID changes, tJhen this can be indicated in the PLATFORM.DLL file and no modificalion of PHLASHNT.EXE is needed (see section on PartTypes for more detail).
Type MfgID Part ID Description 2 0x01 OxAl AMD28F256 2 0x01 0x25 AMD28F512 1 0x01 0xA7 AMD 28F010 1 0x01 0xA2 AMD 28F010A 2 0x01 、 0x2A AMD 28F020 -68- 本紙張尺度適用中國國家標準(CNS)A4規格(210 χ 297公釐)
•t 476913 A7 B7 明 2 說 22221〇1〇1〇1〇3003!4444444444515617 明 發
0x01 0x29 0x01 0x20 0x01 0xA4 0x01 0x51 0x01 OxBO 0x01 0x34 0x01 OxDC 0x01 OxSD OxlF 0xD5 OxlF OxDA OxlF Qx35 OxlC OxDO 0x89 OxB9 0x89 0xB8 0x89 0xB4 0xS9 * OxBD 0x89 0x94 0xS9 0x95 0x89 0x7C 0x89 Ox7D OxS9 0x74 0x89 0x75 0xS9 0x78 0x89 0x79 0x89 0x70 0x89 0x71 OxBF 0x07 OxBF 0x10 OxBF 0x5D OxBF 0x04 0x20 0x07 0xC2 Oxll 0xC2 0x2A AMD 28F020A AMD29F010 ... AMD 29F040 AMD 29F200T AMD 29F002T * AMD 29F002B AMD 29F002BXT AMD 29F002BXB ATMEL 29C010 ATMEL 29C020 ATMEL 29LV010 Mitsubishi 28F101 Intel 28F256 Intel 28F512 Intel 2EF010 Intel 28F020 Intel 28F001 BX-T Intel 28F001 BX-B Intel 28F002 BX-T Intel 28F002BX-B Intel 28F200 BX-T Intel 28F200 BX-B Intd 28F004 BX·丁 Intel 28F004 BX-B Intel 28F400BX-T Intel· 28F400 BX-B SST 29EE010/29LE010 SST29EE020 SST29EE512 SST2SSFM0 ST M28F101 MX28F1000 MX 28F2000 (請先閱讀背面之注意事項¾填寫本頁) 裝 .- 經濟部智慧財產局員工消費合作社印製 ___- RQ - 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7B7 五、發明說明(67 ) 3.0 PLATFORM.DLL Detail
This module containi all platform dependent code &nd parameters needed to program a flash device on a particular pliLtfonn. 3.1 File Format PLATFORM.DLL is a Windows DLL that is produced by compiling PLATFORM.CPP (using Microsoft Visual C-h- A2 or later). It contaias specific platform datii and executable code. A sample source code of the PLATFORM.CPP file is included Ld Appendix B3.
File version for PLATFORM.DLL will start with version UNT 1.00n. Versions are specified in the szVersion variable comained in PLATFORMJDLL. 3.2 File Header Format
The PLATTORM.DLL file will have the format described below: (請先閱讀背面之注意事項寫本頁) » / / / / / /
Global Variable Declarations DWORD dwFileSize // BYTE bHanufactID // BYTE bPartID // DWORD dwFlags // DWORD dwlmageBui // DWORD dwHfgIDAddr // DWORD dwp^rtlDAadr // BYTE bHetryCount // char szVersionU // char azROMFileNaLmeU // DWORD dwDLLFuncDefine // BYTE bblock丁ableSize // ROM image file size Manufacturer of flash device Part ID oi flash device Option flags Linear address of image buffer Linear eddress of ιπίς ID Linear address of part ID Count for /Rn option (default « 0) PLATFORH.DLL version Name of BIOS image file Indicates what functions are defined number oi blocks in biockTable BLOCK一DESCRIPTOR bloc)cTable[) BYTE bpart Types Size // number of flash parts to add DEVICETABLE partTypesf] . .線- 經濟部智慧財產局員工消費合作社印製 dTrFileSize Number of b>lc5 in the BIOS.ROM file.
bHanuf ttctJCD
Manufacturer ID
bPaxtlD Part ID dwFUgs
Option flags. Must be corabinaiioD of the following values:
FLAG_AUT〇SENSE〇FF FLAG:BACKUP FLAG^NEWBIOSONLY FLAG^PRODUCmON
Don t read ID from the part Backup system BIOS ROM Don't flash if 64k at F000:0 same Max speed (sound Sc video off)
7TL 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、潑^明說明(68 )
FLAG 一 SILENT FLAG 二 VERIFY FLAG 二 PLATFORMCMD FLAG^BIOSPARTNUM FLAG 二 CHECKSUM FLAGlCMOS FLAG~EMAGESIZE
Do not generate any sounds Verify each block after flash PLATFORM option srr present Flwh only same BIOS part number Checksum BIOS .ROM Clear CMOS checksum Verify image 3izc matches flash pan dwImagcBuf
Address for BIOS.ROM image buffer in extended memory. This field determines the linear address of a buffer where the image will be read into. - This area is also used when the SAVE option is specified. Any blocks to be saved will be using the address range starting at ihe address dwlmagcBuffer + dv/FileSizc. dwMfgIDAddr dwParilDAddr bRetryCount izVcrsion sxROMFileName dvDLLFun cDof i na
These two optional ficlcb contain the linear addresses for the flash memory ID bytes. When these fields are zero, the default addresses of EOOOOh and EOOOlh will be used. NuiTibcr of tixnes to retry if flashing fails. Version ofPLATFORM.DLL Reserved must be the string uBIOS.ROM'\ This field is used to ideniify and veriiy format of the PLATFORM.DLL file. Indicates what platform-specific functions arc defined in PLATFORM.DLL (請先閱讀背面之注意事項今填寫本頁) 5· rl裝 訂: bbloc^TzLbloBixQ dwBlockTablc bpartTyp^iSixa dwPariTypes 經濟部智慧財產局員JL消費合作社印製 number 〇£ blocks described in blockTable Flash parts arc programmed one contiguous block at a time. Each block td^· be programmed must have a corresponding block descriptor. number of flash parts to add Optional table of supported flash pans. Each entry in the tsblc has the following foramt: typedef struct { BYTE cHiglD; BYTE cPartlD; WORD wFlashType; char a rPartNiime: [28 ); )DEVICETABLE; // Hanufacturcr ID // Part ID // Flash algorithm type // Optional description
The device table is terminated by a descriptor with cMfgll)» cPanlD and wFkshTypc $ct to 2xro. -71 - 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913
(請先閱讀背面之注意事項再填寫本頁) 3·3 Block Table Format Block table consists of a list of block dtscriptors. Each block descriptor in the block table is defined by the following structure: typedef struct DWORD dwBlockSixe; DWORD dwFilftOfiset; DWORD dwLinearAddress; BYTE cMfgID; BYTE cPartID; WORD wBlocJ^Attr/ } BLOCK DESCRIPTOR; // Number of in the block // Offset within BIOS.ROM file // Linear 32-bit address of flash ROM // Manufacturer ID or zero // Part ID or zero // Block Attributes
The block tabic is terminated by a descriptor with all entries set to zero. 經濟部智慧財產局員工消費合作社印製 dwBlockSize dwFilcOflsct dwLincarAddress cMfgID cPartID wBlockAttr
Block Size in bytes. Blocks must be contiguous. Offset of this block within the BIOS.ROM file. Starting address of this block in 32-bit address space Manufacturer ID or zero to auto-sense. Part ID or zero to auto-sense. DeterrniDcs actions to be taken for this block. combijDation of the following flags: ATTR一ZERO ATTR^ERASE ATTR 一 SAVE ATTRlPROG 人 URfR£ST〇R£
Block must be zzrotd before programming Block must be erased before programming Save content of this block before prog. Program ihis block Restore content of this block after prog. 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐)
Must be a
-n n I n ϋ · 訂· -n n i · 476913 A7 B7 五、發明說明(70 )
Only one of ATTR^SAVE, ATTRJPROG, ATTR_RESTOR£ czi\ be used at ft time. If noattribute ii specified, then PHLASHNT.EXE leaves the block UDchangcd. However, even if ail of these ist omitted, procedures BcginFUsh〇 and EndFlashO arc still called. BeeinFlashQ and EndFlash〇 can be used when two blocks arc in dlffcrfint flaush devices, or when a boot block requires additional functions to enable the block for write and to disable it before next block iz programmed. BcginFlash〇 can also be used for conditional block processing. If BcginFlash〇 returns nonzero, the current block L· not processed.
Each ATTR SAVE block must be followed by ATTR REST(5kE block before another ATTR SAVE block an
Note that for a given flash memory range there may be several block descriptors. For example to preserve a 16V flash memory Boot Block in 64k erasable flash memory block, three block descriptors would be used. First descriptor to ^ave the 16k boot block, second to erase and program 64k and third to restore the boot bloclc To reduce the time required for flashing, it is rtconuncndcd that the ATTR_ZERO flac is not used, because this will avoid the zeroing step and cut the flashing time in half. Only few of the older flash memory types suggested that part is zeroed before it is rfr-programmed Most pans do not require this operation. 請 先 閱 讀 背 面 之 注 意 事 再I 填1必 I裝 頁 訂 經濟部智慧財產局員工消費合作社印製 3.3.3 Multiple Flash Blocks The block table will be used to support multiple device flashing and multiple blocks within each device. For such platforms the ROM image file must contain the images for all flash parts to be programmed and the Block Table must contain proper ofifscU and lengths for each block of data to be flashed. To properly configure the platform before aod after each flash block, PHLASHNT.EXE will call function BcginFlash(BlockJndcx) to allow PLATFORM.DLL to perform any such set-up. It is the responsibility of BcginFlashQ & EndFlash〇 functions to perform any iniliaJizBiion or termination between blocks as needed. 3.3.4 Processing Boot Blocks and ESCD storage « To program a memory range in the flash memory* there may have to be several different block descriptors, for the same memory range. This may be needed to preserve boot block or ESCD storage witiiin a single KcnLSc' iLcmory range. .. .Many flash parts are erased by a small number of write operations, one for each memory blcxk. For example Intel 28F400 flash memory has seven blocks (one 16k boot block, two 8k parameter blocks, one 64k main block and three 128k extended blocks). This pari can be trzstd with only sevtn write operations. - 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、發明說明(71 )
For other parts, trsst function may trsst 64k of flaj-h memory at a lime, -regardless of division oi this range into boot and p^Lrameto blocks. In such eases it is important that there atc three block dcscripxtors for such a 64k range of memory. The first block descriptor in the t^ble is usc^i to save boot blocks second block descriptor to era^c ind program the parameter blocks and the third descriptor to restore the toot block in this range. ·
Some pans require that a additional platform dependem actions need to be taken before a boot block can bt programmed. For example Intel parts require that VHH voltage, in addition to VPP voltage, is properly set. Id such cases block descriptor must also have such a functions in BcginFlasn〇 and EndFlit3h〇 procedures (called before and after tach block). 一 3.3.5 Block Table Examples
The code in the following examples would be placed in the ub]〇ckTablcM section of PLATFORM.CPP. (請先閱讀背面之注意事項^填寫本頁) rl裝
Erase a 4KB block at FC000. DD 4 1024 ;4U DD 0 ;nit of£*«t DD ODOrCOOOh / Lint^r Address oi thi» block DB 0 ;Mfg ID (0 - dafAult) DB 0 ;P*rt ZP (0 dAlcuXt) DW XTTR LBASI ;Xction fl^gs then program a 128KB block at E0000 on the specified pan. 12a 1024 j 12m 0 ; nit ofisst OOOEOOOOh ; Lio«屋r of thi靂 bloc夂 Olh ; «19 ID {0 - dei^ult) 20h / Pirt ID (0 « dai^ult) λΤΤΚ_ΖΕΚΟ OR ATTP^PROO ; Action fi撬gt Zero, DD DO DD D3 05 DW . 經濟部智慧財產局員工消費合作社印製 3.4 PLATFORM.DLL Functions
Currently supported functions arc:
The followingfimetions contained in PLATFORM.DLL are accessed by PHLaSHNT.EXE i〇 implementplaiform-dependerU functionality; EnablcFlash DisableFlash BcginFlash EndFlash GctBlock CmdLine AutoSense IsFIashablc Reboot CheckSum -74- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 B7 五、發明說明(72 )
The following functions allow PHLASHNT.EXE to access global variables and data strucrures contained in PLATFORM.DLL:::: “
GctBI0SFilcSi2£
GctManufaciID
GetPanID
GctFlags
GctlmagcBuf
GctMfgIDAddi
GctPautlDAddr
GetRetryCount -
GetblockTableSize
GctpartTypcsSizc
GctBlockTablc
GetpartTypes
GetDLLVersion
GctROMFilcNamc
GctDLLF uncDcfinc 3.4.1 Function Enab!eF!aeh()
Entry: None
Returns: Error code (or zero)
This function must be present in the PLATPORM.DLL. It is called before any attempt to access the flash memory. Actions typically performed by this function include:
Map flash device into memory
Disable Cache, Shadowing and Power management
Flush Cache
Disable PCI bridge
Enable ROM for write (VPP on)
Most platforms require that a jumper is changed before the pan can be enabled for flashing. EnablcFlash〇 procedure musi verify that this jumper has been removed and return an error code if it was determined that jumper settings arc inco^ect. See Appendix . B for error codes.
3.4.2 Function DisableFlashQ
Entry: None
Returns: Error code (or zero)
This optional function is called after the last block has been programmed (or error was detected). It will be called immediately before PHLASHNT.EXE exits (typically as a last call before re-boot). It should perform all funclions neccssiir/ to be able lo clcanlv rt- -75- 本紙張尺度適用中國國家標準(CNS)A4規格(210x297 ^31)
(請先閱讀背面之注意事Z --裝--- f填寫本頁) 訂, 經濟部智慧財產局員工消費合作社印製 476913 A7 B7 五、發明說明(73.) 經濟部智慧財產局員工消費合作社印製
Action typically performed by Xhis function include: Disable ROM Write (VPP 〇g)3,4.3 Function BeginFlash(DWORD Blockjndox) Index of the block about to be programmed (or zero if table not used) None Error code (or zero) This optional function is called by PHLASHNT.EXE immediately before the flash block is processed. U will be called for wch block (found in the block table). Actions typically performed by this function include: Save BOOT block before it is erased Switch from one device to another (on platforms with multiple devices) Enable VHH for boot block re-program DelerinLDc if the current block should be processed If BcginFla^hO returns nonzero, the current block will not be processed.3.4.4 Function EndFIash(DWORD Blockjndex) Entry: Index of the blcx:k just programmed (or zero of table not used) Returns: Error code (or zero) This optional function is called by PHLASHNT.EXE immediately after the flash block was processed. It will be called for each block (found in the block table). Actions typically performed by this function include: Restore BOOT block saved by BegmFla5h〇 function Clean-up between programming tv/〇 different devices Disable VHH if boot block was just programmed3.4.5 Function GetBlock(bWORD Index, DWORD BufTer^Address) Entry: Index of the b)cx:k to be copied and linear address of a 64k buffer Exit: Buffer is filled with the next block of existing BIOS ROM image Returns: Negative error code, zero, or positive block index
Entry: Exit: Returns: (請先閱讀背面之注意事z 裝—— 『填寫本頁) 訂: -76- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913
This optional function is oadled by PHLASHNT£XE whenever the /BACKUP flag is specified. GetBlock〇 is used to assist when saving the existing conlent of the flash mcmoiy before the fla^h memory x& changed. Because many BIOS images arc decompressed bto shadow RAM, it is not always possible for PHLASHNT,EXiB to access all of the BIOS ROM image without platform dcpeDd«u system s^tup. Function GctBlack〇 is necessary to allow for platform dependent accessing of the existing BIOS ROM image. BIOS ROM image is saved by PHLASHHT.EXE using the following steps: 】)Call GctBlockCIndcx, Buffer) with Index set to 0 and the 641c buffer, pointed to by the parameter Buffer, filled with a pre-defined pattern. If the pattcra in the buffer is not changed, program exits with error. If the pattern is changed, then the buffer is saved as the Ant 64k: block in the B】〇S.B人K file, then program proceed to next step. 2) Call GdBlock(Indcx, Buffer) with Index set to the value returned by the previous call to GctBlock〇, save the 64k buffer into BIOS.BAK and repeal this until the value relumed by GetBlock〇 is a non-positive number. 3) If the last vtlut rcturBcd by GetBlock〇 is zero, then proceed with flashing of the memory. If the last value returned is negative error code, report the error, delete BIOS3AK and exit. It is the responsibility of the GctBlock〇 implementation to ensure that the platform is in a proper state to allow the GclBlock〇 to copy BIOS ROM image into the buffer and that the platfonn is restored xo the original mode before GctBlock〇 rcU3ms oonirol to PHLASHNT.EXE. In particular, GctBlockQ is called before & call is m^dc to EnableFlash〇. The buffer pointer passed to GctBlock〇 is always in the real memory range below 640k, to allow direct transfer to disk. 經濟部智慧財產局員工消費合作社印製 3.4.6 Function CmdLIne(chsr far ^szOptions) Entry: Pointer to a string with the platform specific command line options Returns: Error code (or zero) This optional function is called by PHLASHNT.EXE immediately after the PLATFORM.DLL was read in. It is passed the address of the string containing all the platform specific command line parameters (specified after the equal sign with /PIJVTFORM^44...^ commaDd line option). The string includes the leading and trailing double quotes, if any. 3.4.7 Function AutoSense〇 Entry: Manufacturer find device IDs retrieved from PLATFORM.INI header Returns: New ED retrieved from the flash part (or zero) -77-
• n n I n · (請先閱讀背面之注意事填寫本頁) i裝 . 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 ___B7五、發明說明(75 )
This fuoction is called by PHLASHNT.EXE immcdialtly afltr En*blcFlash〇 function in the PLATFORM.DLL was called. The AutoStnse〇 function enables auto detcciion of memory flash parts when “non-standard” memory organization is used for the flash memory. For example when two separate parts art used for even and odd BIOS aLddresses (in which ease the coDvcntional auto delect mechanism wiU £ail), this funcucn can be used to obtain and verify ID for each of the parts. IDs arc one byte long and arc packed into a DWORD, with manufacturer ID in BYTE 0 and device ID In BYTE 1. 3.4>8 Function lsFIashable(char far *^ζΕγγογΜ39) En^ry: Pointer to string to conuun returned error message. Exit: azErrorMsg conlaming error message string. Returns: Error code (or μγο) This optional function is called before EnableFlashQ to detmninc if it is ok to proceed. If the function returns a nonzero error code, the 5tnng szErrorMsg is displayed and 让ic program terminates. Up to 254 bytw plus a terminating NULL may t>e returned in szErrorMsg. An exanipie of how this might be used is: for the same platform, an OEM sells a system with and without Plug and Play capabililits. The IsFlft5hable〇 fiinction can determine if the system currently has Plug znd Play and will not flash a Plug and Play BIOS on a platform that doesn't already have it J-----------裝 訂· (請先閱讀背面之注音?事填寫本頁) 3.4.9 Function Reboot()
Entry: Returns:
None. None. 經濟部智慧財產局員工消費合作社印製
This opUonal function is called after programming i$ complete to reset the system. If provided, this is called instead of PHLASffi^TTs own reboot code. 3.4.10 Function CheckSumQ Entry: None. Returns: Error code (or zero) This opb*orml function is called before programming to determine if the checksum of the BIOS KOM image is correct. Normally, Ibe BIOS ROM image checksum for a NuBIOS image is zero. This routine may be used to provide an alternative checksum verification method when it is known that the ROM image checksum will not be zero. If this function returns non-zero, PHLASHNT will terminate. 3.4.11 Function GQtBIOSFlleSize〇 Entry: None. Returns: Size of BIOS image 78- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 經濟部智慧財產局員工消費合作社印製 A7 ___B7___五、發明說明(76 ) This function rctums the contents of the global variable .ilwFilcSizc from PLATFORM.DLL. 3.4.12 Function GetManufactID() Entry: None. Reruns: Manufacturer ID This function renrms the contents of the global variable bManufactID from PLATFORM.DLL. 3.4.13 Function GetPartlDO Entry: None. Returns: Part ID This function returns the contents of the global variable bPanlD firom PLATFORM.DLL. 3.4.14 Function GetFIagsQ Entry: None. Rjeiums: option flags This function returns the contents of the global variable dwFlags from PLATFORM-DLL. 3.4.15 Function G©tJmageBuf() Entry; None. Returns: Location of Image Bufffer This function returns the contents of the global variable dwImageBuf from PLATFORM.DLL. $ 3.4.16 Function GetMfglDAddr〇 ' JEntry: None. 一 -Returns: Address v/hcrc Manufactuier ID is located This function rtuims the contents of the global variable dwMfgIDAddr from PLATFORM.DLL._-79-___ 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公
(請先閱讀背面之注意事S _裝i I f 填寫本頁) . •f· 476913 A7 B7_______ 五、發明說明(77 ) 3.4.17 Function GetPartlDAddr〇
Entry: None.
Returns: Address where Part ID iz loc&tcd
This function returns the contents of the global variable dwPartlDAddr from PLATFORM.DLL. 3.4.18 Function G9tRetryCount()
Entry: None.
Rcturas: Number of tinier to retry flashing if failure occrurs
This function returns the contents of the global variable bRetryCount &om PLATFORM.DLL. 3.4.19 Function GelblockTablaSlze()
Entry: None.
Returns; Number of blocks in blockTablc
This function returns the contents of the global variable bblockTablcSizc &om PLATFORM JDLL. 3.4.20 Function GetpartTypesSl»〇
Entry: None.
Returns: Number of additional flash pans that PLATFORM.DLL will describe
This function returns the contents of the global variable bpanTypesSize from 經濟部智慧財產局員工消費合作社印制衣 ι·---Γ---------裝--- (請先閱讀背面之注意事填寫本頁) -線_ 3.4.21 Function GetBlockTablG〇
Entry: None.
Returns: address of blockTable
This function returns the addicss of the global structure blockTablc from *-PLATFORM.DLL. -80 - 本紙張尺度適用中關家標準(CNS)A4規格⑵“挪公髮) 476913 A7 ___B7 五、發明說明(78 )
3.4.22 Function QetpartTyposQ
Entry: None. -·
Returns: address of partTyp^s
This function returns the address of the global structure pariTypcs from PLATFORM.DLU 3.4.23 Function GstDLLVersionf) -
Entry: None.
Returns: Version of PLATFORM.DLL
This function returns the contents of the global variable szVersion from PLATFORM.DLL.
3·4·24 Function GetROMFIIeNamoQ
Entry: N〇De.
Rraims: Name of BIOS ROM file
This function returns the contents of the global variable szROMFilcNamc from PLATFORM.DLL.
3.4.25 Function GetDLLFuncDoflnoQ
Entry: None.
Returns: Indicates wiiat platform-dqxrndcnt functions arc defined
in PLATFORMD乙L
This function rctxims the contents of the global variable dwDLLFuncDefinc from PLATFORM.DLL. 1·-------------裝--- (請先閱讀背面之注意事¥^^寫本頁) 經濟部智慧財產局員工消費合作社印製 ______-81 - 本紙張尺度適用中國國家標準(CNS)A4規格(210 χ 297公釐) 476913 A7 B7 五、發明說明(79 ) 4.0 BIOS.ROM Detail
The ROM image file size must be large enough to contain all blocks in the flash devicc(s) to be programmed Any required p>ost-proc^ssLng of the BIOS imagt, such sls boot block swapping or diu compression, must be already incorporaicd into the ROM image fLlc. (請先閱讀背面之注意事填寫本頁) -裝 . 經濟部智慧財產局員工消費合作社印製 -82- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、發明說明(8〇 ) β.Ο Genera! Implementation Guidelines
Program5 will be developed using Microsoft Visual C-H-, W42 or lat«7
Because it is expected that this program wiD rvolvc as new devices become available and because code size is not critical, the style of coding should be such that code readability and clarity should have higher priority than cxecutaBlc code compactness. possible, 1 language.
However, because the program may aJso be used in production environments, It should bt structured as to allow shortest posable time for pari flashing. In particulair, it should hzve a mode where Don-critical user interface notifications can b^_disAblcd; tnd whenever time corisuming flashing fimetioni should be written in optimized assembly
-83- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 五、發明說明(81 )
AppendlxBI-Future enhancements
CompletJon Codes with Keyboard LEDs If the program fails to complete any of the three major stages of the flashing process, program will use keyboard LEDs lo inform user at which stAge the program failcci. At the 5tart of the program CAPS^LOCK, NUM_LOCK and SCROLL_LOCK LEDs on the keyboard will be turned on. The failure at cAch of the three stages is indicated as follows:
KeyboardLEDs ON CAPS, NUM, SCROLL CAPS, NUM NUM none
Description
Before reading platfonn.dll Before platform init After platform init Successful completion (請先閱讀背面之注意事^^填寫本頁) 經濟部智慧財產局員工消費合作社印製 -84- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、發明說明(82 )
Appendix B2-PHLASHNT.H Completion and error qpdes 經濟部智慧財產局員工消費合作社印製 FEh FDh FCh FBh FAh F9h F8h F7b F6h F5h F2h Flh FOh EFh ECh EBh EAh E9h H8h E6h E4h E3h E2h Elh EOh DFh DEh DDh DCh DBh DAh D9h D8h D7h D6h D5h D3h D2h Dlh
Memory Alloc for BIOS.BAK buffer fiulcd BIOS.BAK already exists (rename or delete it) File Create failed on BIOS.BAK File Wriic foiled on BIOS.BAK File a〇sc failed on B10S3AK BIOS backup not supported in PLATFORM.DLL File Open failed on fl^TPORM.DLL File Rc^d failed on PLATFORMXiLL FUe Close foiled on PLATFORM.DLL Failed to locale signature bytes in PLATFORMDLL ^ORM^DLL
Unsupported PLA^ORM^DLL file version Device tiiblc in PLATFORM.DLL has too many entries Device table in PLATFORM.DLL has unsup]X)ncd flt^h vypt Combined SAVE or RESTORE attributes in PLATFORM.DLL S人VE block without matching RESTORE block in PLATFORM.DLL Part ID not foiled in table of mpponed parts PLATFORM.DLL found errors m command ]inc parameters Alloc for BIOS ROM image failed Open failed on BIOS ROM image file Read failed on BIOS ROM image file. File Close failed on BIOS JIOM Attemm to read flash memory ID failed PLATFORM.DLL failed to return flash memory ID Could not find BCPSYS block in BIOS ROM file imngc File dots not contain the same BIOS part number File does not contain different version of BIOS ROM image Data written to flajh docs not match BIOS ROM image Write io flash memory failed Erase flash memory block failed VPP is not a: ex产ctcd 】cvd Erase scxmtncc tailed New DMI string is too large The BIOS ROM file may not be used with this system Alloc for DMI OEM struig tailed No space for the specified DMI OEM string in the BIOS ROM DMI OEM strings not supported (BCPDMI 0.1+ required) Could not find BCPDM3 block in BIOS ROM file image BIOS ROM file may be corrupt (checksum not zero) BIOS ROM file size doesn't match flash pan size DMI system and chassis snings require BCPDMI 2.1 + -85 $張尺度適用中國國家標準(CNS)A4規格(210 χ 297公釐) --裝--- (請先閱讀背面之注意事填寫本頁) 476913 A7 B7 五、發明說明(83 )
AppendlxB3-PLATF0RM.DLL Sample source code
PLATFORM.CPP
TITLE PLATFOWi.CPP to PH: U DL LXSK1
r.EXE
Copyright (c) 1997 by Pho«nix T«chnol〇9i· Fhoanlx T*chnologi·· Ltd. COWriDIOTIAL.
Ltd., XII RiQbtv >-e»*rved. rilenaa»: rr〇5 tct: runctionAl Elock Comentd :
MJvtroTM.crr rHLXSHKT.ECI
The VArliblt dvDLLruncD^fId· 1j used Ln fHLXSKKT to detcnB±n# wh*t pl»tiora specific furtctlooi 1λ ΠΛΤIOWi.DLL havt b«en defintd. Llettd b«l〇v &r_ thft po慕篡ibi· yaIu·# of dvDLLruncD«fine *nd what functions they lndic4to 4r_ defined in thi» 鼸 »odult: DLL DLL"
CKXBLinA5R 二 DisxBLrriAiK DLL^BtGIWriASH DLL~tNDITJL5K DLL*"CETI DLL^CMC DLL~XUTOSDiSt DLL二 ISF1A5>IUU: DLL~K£BOOT DLL"CH£CJC3UM
[TTiLOCX -iDLIKt
Btyinriaeh XndTltL»h GetBlock Ca<lLin· A\jto3«n“ tihtibl·
Kftboot ChtctSv: (請先閱讀背面之注意事項為填寫本頁) !· -裝 ·
Contents : version Control Iniorm4Lion: Slog : K: /nb/archiT%/nutooli/pbl4 3h.nt/*t*9*2/driv«r*/pl»tfor». R«v 1.0 Initial rovieion. -線· 經濟部智慧財產局員工消費合作社印製 备include ••tdAfx.h· ♦includ· <iixdllx,h> iinclud* <*tdi〇.h> lincludc *D; \KUTOOL5\?H1ASH . KT\STACr2\pbliihnt. h" ♦define FLATro?^ C?? // // Clab*l VirlAblt D«cl惠r暴tlom H、 DWORD dvTileSlx· 0x00040000; BYTE bH^nufact ID -Ox”; irrt bPirtlD • 0x>D; DWORD dwriAijs _ rLAC^ BI05PXRTXUW \ DWORD dwIttA9t»ui 、0x00200000/ VnuOKD dwti^l DAdCr -frxrrnoooo;
// %OH Jje^ge til會臞ii« // Kanufaccurvr of ll»sh d^vico // IP of dtrict // Option fltgt riAC^CRrCKSW I n-XC^XMAGtSItE; //"Lift·暴r ^ddrtft» oi iAijc tmlf*r // Linear *ddreji of afy ID -86- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 B7 五、發明說明(84 word dwpirtIDXddr · IVTt bMtryCount cb*r 亀 char ιχΛΟ«ηΐ·Η·Α·|3 ΟχΓΤΓΤΟΟΟΙ/ It Lldfttr Addrt»» of pArt ID 0; Π Count ior /Xn option (default · p)_ nrr l.oo*; // ruiTronx.ou, •二· -*»205 // Ηλλλ of IIOS lJugt £11«
DWORD // Irvdicit♦惠 dwDLLruncD« f1d« _ %rhAt functlc-ai DLL tKXBLrriASK DLL*DIlXBLinJLSK DLL’似 ΙΚΠΛ5Η DLL^DiDllASH DLiTcrmocx Wi~OOLIKt DLL^XOTOSEHSX DLL ΜΛΟΟΤ • DLL*OL£Ct50M j
dtiintd in ?lATrow<.DLL I
BYTE bbiock 丁 JibUSiie BLOCK DESCRIPTOR //////
(請先閱讀背面之注意事X d*fiD· block?4bl· // I maM> fc _ _ _喔 nuab«r of blocks In bloc^TJiblt 128 ♦ 1024^ 〇, o 乂 rrmoooo, 〇, 〇, ΛΤΤΚ^ΙΧ^Ο // 12IJ3 (Low) // rile // Lin«4r ftddrtss of flash I// KiyID (e&iM 龜3// FArtID (au&fi *3 dtiault) 1 · I I1填寫本頁) 128 · 1024, 0x00020000, oxrrrxoooo, 〇r 0/ λττ, ζγλο // 12tw (High) // Γ11« off»«t // Line4r «iddr··翥 of fI*eh // Kf^ID (ft4&« default) // P*rtID (蜃A^ve ai dclJult)
( 128 · l02At 〇» oxrrrxoooo, 〇, 〇, ATTR TKXSL // 121KB (Low) // rile oftaat // Lintur *ddx»ts οΓ flutb KOM // MfgID (sjji· &s dafAUlt) // PArtID (saubA i.a cUi^uIt) 經濟部智慧財產局員工消費合作社印製
12» « 1024, 〇, oxmroooo, o, 〇# χττ» r^〇Q
( 128 · 1024, 0x00020000,oxFrrtoooo, 〇, o, λΙΤΚ PROG 〇, 〇, 〇, 〇· 〇, // 128KB (Low) // Γ11· // Lin»»r «ddr«t« oi ilaih J // HfgID («ΑΑ* »a default) // P^rtlD (瘳氣孤蘑 default) // 12BKA (lUgh) // Γ11· offiitt "ISnttz *ddx»s> of fl*ah ΛΟΗ // HigID (sahl« &i d«fault) // >*rtID (*αλ« A3 difaalt) // H%*d to// 轟 block with -87 - 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、發明說明(85 ) // dtfin· p^rcTy?·· // BYTE bpirtType*Siie _ 1; DCVICITAJILt partT/p·* Π - // Duab«r 〇ί fltth pirtt on plttfor» ' // s«t to 〇 if p^rtTypcft i暴 not uitdl
OxBS, OxSD,1,0, -Inttl 2ΒΓ020· // hUnulicturer ID of iltth d«vic« U D«vlc· ID 〇i dtvic· // rieshJlng typt // ickokx w?trtsixt // WAAe oi flAfh dtric· (oooo_ // Vetd to pArtTypt* with // 暴 block eet to 〇· (請先閱讀背面之注意事項却填寫本頁) 「裝
HIKSTXNCE h7;^rn*132 · 0; // SOTE: £>〇 HOI chuiye this line of code. · runcciom runccion Hjj&e: D1JLM孤in Description : ?4rAjnetera : Rtturnt:
Hotel: p〇 ncrr Kooinr this njMCTiow • xtern **Cy int XPIEKTRr DllWftin (HINSTAHCr hlnatancc. CWOW) dwBe^aorw LPVOID ipKt5err»d) if (0wRca»on DU-^PJl〇CtSS_XTTAC}J) 經濟部智慧財產局員工消費合作社印製 TFACEO rrXATFORM.DLL MyinlVn-); tXernel32 · LoadLibraryl "KerDtl32.Dll" )/ // Get Htndlt to Ktrntl32.Dll »1·· if (dwR«a.s〇n ^PKocxas Drrxoj) T7UCE0 {-PLXTrOKM.DLL T·min4ting I \n**); if (hKtrncl32) rrctLibrary { hx«m®132 ) / return 1; // 0llmJLn() // ok runctioo tD^blcriAJh Description: P暴γαα«t饞i:· t -88- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 B7 五、發明說明(86 ) • Ktturnj: 會 * Wot··: DLL r〇>4C TY?E V^oid tnabltritihi) ( _ printf CLjiAbl*rl&3h\n·) / // (ftub) ) • runctiou Hajne: DlsubltriAab 费 ψ D«tcription\ • ?^ΓΛΛ«ί·ΓΙ; • Mcurn*: 翟 % Kot蓽纛·· ] i清先閱璜背面之庄意事π DLL^rUNC^TYPE void Di»4bl*nA3h〇 prinni (-Dl^aUiulAn·), // (,tub) 裝---「填寫本頁) * ruuccion Vucvt: E*9inriAah ft ♦ D龜i % Parttrs: • K#turni: Φ • : DLL_fTJWC_TYPE short B#9inri*>h( DSHORT blockHuab^r ) i return 0; // (irub) ) 訂: * roiictJLon : rndri▲暴h 會 • Description: 曹 P4rUMt«]:| 2 • Returns : « * H〇t*l: -·線- 經濟部智慧財產局員工消費合作社印製 DLI._rtJNC TT?E *horr tadTl毳雇h{ DSHORT bloclHun±>er ) i - return 0/ // (i^b) * runctioo Hajm : C^tZlcycl 曹 • D·tcription: » FAr*〇i»ttrj ·· :ψ Xeturn-i:
KoctA: DLX^TTJNC TYPE SHOXT C-erll〇ck( ULOKG dwliidtx, TULOVC dvt>ft -89- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7B7 五、發明說明(87 ) print! COetllock: dvlDdtx, dwDjt passed ld\n*# dvlndtx, dw〇>t ); // (»tub) return 0; Γunction : CsidLine Description: 7 巍 raim 省 ΐ lltturn·: Xot": DLL^nniC^TYfl ϋ3ΗΟΛΤ Cart List ( chAr *Pl»ti〇raStriag printf(*CmdLine\ne); // (ftub) r«turn{ 0 )/ // (stub)
(請先閱讀背面之注意事S runctiofl K«a«: AutoSenst D^icriprion: P*ru&attri i Rttum*: Mot%»:
Tht sanuiiccurer ID ii in ITTT 0 tDd citric· ID in BTTt DLX rvruc TYPt DWO^D XutoSftnB· ( DMORP T^ZtHlglD { - return ( 0x0000 )/ // (stub) runction K&nt: 3BridahAbli D« ·〇Γ·1ρ“οη: 嫌χ» ·. Returns : M〇t«3: dll rroc type ojhort iiriAahAbit 〇 { ~ - printf{"I*ri*shAblt\ne ); // (stub) rtturn 0; 裝--- f填寫本頁) 訂: -線· 經濟部智慧財產局員工消費合作社印製 runctioo Haiz>«: kMboot D«5cripcion: Piriunccer* : KeLuma : Wot·*: DLL_r〇NC_TYPE void Reb&ot () (..一 ~ print! CRAbootXn·) ; // (»tub^ > -90 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 B7 五、發明說明(88 ) runcticxn Maaa t ChockSun Description : PArAj&tt 參 r龜: Return*: ttOtftJ: DLL TT7WC TYPE void CH»ctSuBi () ("* printf("Ch»cklua\n*); // (arub) // // // DLL一r\mC TYPE DLL~rUKC~TTPC DLL"*)TUNC~TYPE tux~rjNC*TrPE DLL^rUMC^TYPE duTfuvjc 一 TYPE ^TY?r 二 TYPE DLL~rUNC*TYPE DLL~n3Nc~irrEdll 二 ruNC~*nr?E DiiTruwc 一 rr,E DLL^nJKC^TYPE DlX~rUNC~TYPE DLL~rcrWC^TY?t worn DO MOT HODirt THI rONCTICWl EXITED »t 賴 mJi tLCW.
r>ix 一 ruwd DLL*rUNC~T C«tEIOsrUeSii% (void) C«tKiJauf ActXD ivoid) 廉rtlD(void) G«tri龜9售 tvcdcH C4t2z&A7«^ut (void) C^tKlglDXddr (T〇id)
DWORD氤nr inx DWORD DWORD WORD D*r〇RO Brrt BYT£ ΒΠ£ BLCCJC DESCRIPTOR DtVICETA^LE chAr chAr DWORD
(r#cum (dvrjLietii*);) (return (bH^LnutactlD);){ rttuxn(bP*rtID);) < rttum idwnjig·) i ) (rtturD (dvlBd»7^Buf);) { return (cMiiglDXildr);) { r着turn (dwpjirxrPXddr} j }(rtcum (bMtryCount) / ) 2it· (roid) ( rttum(bblockT^bltSizt); J GttpircTyptiSix· (roid) ( return (bp*rtTyp«t31xe);) RIPTOR (void) { rtturn (tblockT^bl· [ 0)) / ) ♦CttpArtTypt* {void) { return (fcp*^tTyp*j l〇)) / ) •GetDLLVeraion(void) ( return(axV«riion);) *C«tJUD«riltH4at (roid) { rtt.umUiJ^C3Hril«H«x·);) CetDLLruiicDtfinc (void) ( r»tum (dwDLLr〇ncD«fin#); J (請先閱讀背面之注意事項為填寫本頁) -裝 c«tf ^rtlDAddr (void) G^tRitryCount (void) G«tbl〇ckTAbl*iitt (r< 經濟部智慧財產局員工消費合作社印製 9 釐一公 197 12 X 10 2 /V 格 規 A4 s) N (c 準 標 家 國 國 中 用 適 度 尺 張 紙 本 476913 A7 B7 五、發明說明(89 )
(請先閱讀背面之注意事S
Appendix C e2bs txsa I --- ^^寫本頁) .. •線! 經濟部智慧財產局員工消費合作社印製 92- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 476913 A7 B7 五、發明說明(9〇 )
Abstract:
This paper presents a proposal for a new BIOS service, which will be knerra as the BIOS32 Service Dia^ctory. The new service will provide information about those services in die BIOS that are designed for callers running in a 32-bit code segment (The B10S32 Service Directory will itself be a 32-bit BIOS service.) The expected clients of this service are 32-bit operating systems and 32-bit device drivers. The expected providers of this service arc BIOS vendors thai implement one or more 32-bit BIOS services. (請先閱讀背面之注意事項^填寫本頁)
I 裝 訂: 經濟部智慧財產局員工消費合作社印製 93- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 經濟部智慧財產局員工消費合作社印製 476913 A7 B7 五、發明說明(91 )
Introduction
The BIOS32 Service Directory proposal came into being durir^ the attempts to establish a 32-bit code interface for the Peripheral Component Interconnect (PCI) standard A major problem diat needed solving was: How does & 32*bh caDcr dctarniine the cxisiencc of a 32-bit BIOS service? The drawbacks of a functional intcrface*(i.c., an entiy point tihat control is transferred to) are clear in the ease where the flmctioiul interface is non-extant. A recoverable method would seem to entail a search for a signature as proof that a functional interface docs exis^ In one of the first BIOS 32iit services, EISA» use*s an existence signature at a fixed location in the OFOOOh segment However, as more 32-bit BIOS services arc required and come into existence, it is obvioxis that providing a signature (and any associated infonnation, such as entry points, segment requircrDcnts, etc.) for each is a costly usage of a scarce memory resource. Hence, the idea behind the
The BIOS32 Service Directory uses a single signature to indicate the existence of a generic 32-bit service that returns information on all specific 32-bit services
人 fUrthcr justification for implementing a general solution versus continuing to solve the problem on a case-by-case basis is seen in the obvious benefits a standard provides to the industry. Code reusability, modular implementation of new 32-bit BIOS interfaces, thorough specificaticm of calling environment requirements, etc., arc a few benefits which come to mind.
The BIOS32 Scivice Directory has two components: the Header and the Calling Interface. The Header is a static data structure that includes the signature and which is located in a well-known memory range. The existence of a valid Header irc^lies the existence of the Calling Interface and, in fcLCt, describes its entry point. The Calling Interface is a body of code and data which exists in a separate memory space apart from the Header and any particular 32-bit BIOS services, β provides a functional intaface through which a caller receives informaiion about a particular 32-bit BIOS scrvic*, (Section 0 describes a hypothetical memory map of the Heajdex, Calling Interface, and the ffXYZ,' 32-bit BIOS service.)
The design of the Calling Interface is extensible in two dimensions. First, it is a function-based interface - future revisions of the service can incorporate new features, as they become necessary. Second, specific 32-bit BIOS services will be represented by a 4-byte Component ID. This will enable both OS callers and BIOS32 Service Directory implementors alike to easily add new 32-bit BIOS services as they become available. -94- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公爱)
476913 經濟部智慧財產局員工消費合作社印製 五、發明說明(92 )
Interface to the BIOS32 Savice Directory aod a with 2 The BIOS32 Service Directory Header A BIOS which implements the BIOS32 Service Directory must embed a specific, contiguous 16-byte paucm somewhere in the physical address rsnge 0ECX)00h - OFFFFFIl The pattern must be paragnph aligned (i.eM it must st2H on a 16-byte boundary). This pattern is known as the B10S32 Service Directory Header. The Header is comprised of six distinct fields. The foDowmg table describes each field. -95- ^紙張尺中國國家標準(CNS)A4規格(210 χ 297公釐) (請先閱讀背面之注意事ΐ^填寫本頁) —裝 訂· -丨線· 476913 A7 B7 發明說明(93 )
Offisct
Sire
Description
The ASCII signature This string is packed left to rigbL* oSsei 0 \s (xmdcrscore), offiset 1 is *3\ ofEset 2 is T, offset 3 is another * *,
The entry point for the BIOS32 Service Directory Calling Interface. This is a 32-bit linear not Segmentoffset) physical address. 1 byte :Directory it revision i
The revision level of the B10S32 Service! Header and Calling Interface. The current revision is Oh. 1 byte
The length of the BIOS32 Service Directory Header. Tliis is measiircd in units of paragraphs (16 bytes). The currml Header has a length of Ik (請先閱讀背面之注意事填寫本頁) byte
The B10S32 Service Directory Header checksunL This is a value which makes 1ht cumulative ADD value of all bytes in the Header equal to Oh. -ϋ n ϋ ι 羞 · 11
Tins field is reserved and should be set to Oh. 經濟部智慧財產局員工消費合作社印製 TABLE 1: The BIOS32 Service Directory Header
Clients of the BIOS32 Service Directory should first detenninc its existence by locating the Header· This is done by scanning OEOOOOh to OFPFFOh in paragraph increments and looking for a signature match C1 一32」) in the first 4 bytes of paragraph. When, and if, the signature is detected the client should perform a checksum of ώ bytes in the Header. (The Header length, in paragraphs, is found at ofEset 9h.) All bytes m the Header should ADD together with a result of Oh. If the checksum is valid then the 32-bit entry point field can be used as the address for the BIOS32 Service Directory Calling Interface.
If the Header is not found then the B10S32 Service Directory docs not exist on the platform. 長尺度適用中國國家標準(CNS)A4規格(21Q x 297公爱) ^/6913
3 The BIOS32 Service Directory Calling Interface
If the BIOS32 Service Directory existence has been determined (via the Header lest, above) then the 32-bit physical address found in the Header can be used as the entry point to the Calling Interface. Client should CALL FAR to this address. The clients calling environment has the following requiramciits. 3 J Code Segment
The CS code segment selector : following values:
The base address must be less than or equal to the (4kb) page address of the page that contains tho entry poinL For example, if the entry point is 0FFF81234h then the base address must be less than or equal to OFFF81000h. 1 The limit must be such that the base address plus the limit generate an address that is greater than or equal to the last address on the (4kb) page which follows the page containing the .entry point For example, if the entry point is 0FFF81234h then Λθ base address plus the limit must be greater tiian or equ^l to 0FFF82FF1Fh. • Simply stated, the base address and the limit must *,CDC〇mpassn both the page that contains 1hc entry point and tbe following page. • The segment type must be 100b (code, execute only) or 101b (code, execuie/rcad). Hov/cver, the implementors of the Semcc Directory cannot assume read access to The CS code segment • The system bit must be 1 (nonsystem segment). • It is recommended that the Descriptor Privilege Level (DPL) be 0. (Tbe CS descriptor DPL becomes the Cunrent Privilege Level, or CPL). If the CPL is not 0, ύιαι ihe OS must provide trapping and virtualization services for ring 0 privileged instructions (such as those that access Glx). Note also dependency of this field on the IOPL field in EFLAGS (see Section 0)· • The Default Size bit must be 1 (32 bits).
The E10S32 Service Directory entry poinl^ and it3 associated code and data^ may be located anywhere wrtilin the 4Gb physical address space. However, it is guaranteed to be physically exmtiguous (i.c,, it will be delivered in ROM or FLASH space) and to fit within two pages (i.c., it wiD not span three pages). -97- ^紙張尺度_ +關家鮮(CNS)A4祕⑽x 297公釐)
(請先閱讀背面之注意事 • n H ϋ < 訂· 本頁)
be set up with a segment descriptor with the 經濟部智慧財產局員工消費合作社印製 476913 A7 B7 五、發明說明(95
Data Sepnenti - The DS data segment selector must be set up with a segment descriptor with the following values: • The base address must be equal to the CS base address. • The limit must be greater than or equal to the CS limit • The segment type must be 000b (data, read only) or 001 (data, rcadAvritc). However* the implementors of the Service Directory cannot assume write access to the DS data segment • The system bit must be 1 (nonsystem segment). • The Descriptor Privilege Level (DPL) must be greater than or equal to CPL (see the DPL field in Section 0).
There are no requircmcnii concerning the ES, FS, and GS data segment selectors. 3.3 Stack Segment The SS stack segment selector must be set up with a segment descriptor with the following vahies: • The segment typ>e must be 011b (data, read/writc, expand-down) or 001b data, read/write, expand-up). • The system bit must be 1 (nonsystein segment). • The Descriptor Privilege Level (DPL) must be equal to the CPL (see the DPL field in Section 0). • The Defiiult Size bit must bt 1 (32 bits). • The Granularity bit must be 1 (4Kb). Note that the above settings ensure a stack size of at least 4icb. It is the caller's responsibility to ensure that there is ai least lkb of unused stack available. J--*-------丨裝--- (請先閱讀背面之注意事填寫本頁) 訂· · 經濟部智慧財產局員工消費合作社印製 -98- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、發明說明(96 ) 3*4 Paging Paging may or may not be enabled. If paging is enabled, then the address space that is described by the CS and DS selccton must be linearly contiguous. That is, the original physical contiguity of the Calling Interface as found in ROM or FLASH must be preserved. (The Calling Interface code and data is written to be position-independent and EIP-relative). 3.5 IOPL In order for the Calling Interface to execute I/O instructioiis, the I/O Privilege Level (IOPL) field in EFLAGS must be greater than or equal to the CPL (see ώε DPL field in Section 0).
(請先閱讀背面之注意事S 裝--- f填寫本頁)
The BIOS32 Service Directory Calling Intcrfiice is fimeiion-based and all parameters arc passed in registers. If a register is not specified as an output parameter for a function, then it will be preserved. All flags are preserved. Function values are passed as input parameters in register BL. Retum status is passed back m register AL. A return status of OOh indicales that the function was sux^cessfuL A return status of 80h indicates tiiat the reque^sted function (in BL) is not supported. CXhcr AL return values arc defined by the individual fanctions. There is currently one BIOS32 Service Directory function defeed It is specified below. 3.6 The Component Existence Function (BL » Oh) The Component Existence function returns information about whether a specific 32-bit BIOS service exists and, if it does, wbat memory space it ocojpies. 訂· 經濟部智慧財產局員工消費合作社印製 BL, Oh EAX, Component ID The Component ID is a 4-byte ASCII string which uniquely identifies the 32-bit BIOS service. The specifications for particular BIOS services define their own Component IDs. (It is imporunt that those specifications define whether the Component ID string is packed left to right, or right to left.) EBX, Reserved, set to Oh 適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、發明說明(97 )
Output:
If requested 32-bit service does not exist AL = 81h If requested 32-bit service do« exist AL - Oh EBX base address of 32-bit BIOS service ECX = length of 32-bit BIOS service EDX = oSet (firom EBX) of 32-bit BIOS service entry point The meaning of the EBX, BCX, and EDX registers is dependent on the particular 32-bit BIOS service spedficatiorL That is, they may represent exact values far siting up segment selectors, minimal "cncompas5ingn values, etc. 3.7 Future Functions Future BIOS32 Service Directory fimetions may be defined in subsequent revisions of this document· The function parameter interface is not constrain&d to register passing and may employ input/output parameter on the stack. This is feasible due to the static definition of the stack (see Section 0). · (請先閱讀背面之注意事項§寫本頁)
—.1 I 装 4
Summary This paper describes the BIOS32 Service Directory. It identifies two distinct memory components: the Header and the Calling Intcrfecc, The Header is a paragmph of signanire data located in the memory range OEOOOOh - OFFFFFL The Calling Interface is a body of code that oco^ics a physically contiguous section of memory anywhere in the 4Gb address space and b less than two pages (8kb) in length-The Header contains a pointer into the Calling Interface memory area. The BIOS 32 Service Directory Calling Interface functions describe adciitioiial racTDory areas that contain code and data for specific 32-bit BIOS services. A memory map for a hypothetical Header, Calling Interface and 0ie HXYZn 32-bit BIOS service follows. -丨線- 經濟部智慧財產局員工消費合作社印製 100- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、發明說明(98 ) OAAAAAAXAWAAUJUUUUUtt. ζ______________________ 3 BIDS32 Service Directory 3 Calling Interface 3 Coot/D^ti 3
d XctfiiU ^mmmxmjuuuuuuuuuuuLumjuuumwmm: iMb (請先閱讀背面之注意事填寫本頁) 裝 3. 3 3 3 BIQS32 S^rvic® Directory leader •XYZ· 32-bit IIOS Service Code/Data
· 經濟部智慧財產局員工消費合作社印製 λλλλλλλΧλλλίΑλλλλΰΜλλλλλλλλλλλλλλΰϋϋϋϋϋϋϋϋώίι
This paper provides for a standard method of accessing 32-bit BIOS services. The extensibility of the B10S32 Service Directory Calling Interface may be used easily to advance a standard method as new 32*bit BIOS services arc recognized and implemented. 101 - 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913 A7 B7 五、發明說明(") iifaef TESTEXEC - // test bios execute function. printf Cphadtest: - test bios execution breakpoint^*); ioExec = (PI0C_EXEC1) systemBuffer; ioExec->biosFunction = biosShadowAreaBaseVA + biosServiceDirectoryVA ; stmcpy ( (PUCHAR) (£cioExec->regEAX) , BIOS_PM_SIGNATURE, .4); ioExec->regEBX = OL; if (DeviceloControl (hDriver, IOCTL 一 BIOS—EXEC, bufferPtr, 256, bufferPtr# 256, &accualXfr, NULL) ) { princf ("ICXTTL 2052 -BIOS Execute (%s) - success\n', BIOS一PM一SIGNATURE); princf (•轉 byces returned: %Ld\ne # actualXfr); printf ("Register contents:\n·); printf CAL = %X\n· , (ioExec->regEAX ) k Oxff); princf (*EBX = %LX\ne, ioExec->regE3X ); princf (eECX = %LX\n", ioExec->regECX ); princf CEDX = %LX\nB , ioExec->regEDX ); }else{ ioCoae = Gee Las c Error (); princf ( ICXZTL 2050 failed on %LX\ne, icCode); tendif -—裝--- (請先閱讀背面之注意事填寫本頁) --線- 經濟部智慧財產局員工消費合作社印製
Appendix D1 -102- 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297公釐) 476913A7B7 五、發明說明() DEBUGM2 HxIoXdPrint ⑷; II Function 4 篇 Code 20S2 is #BI0S Execute * . // The function executes code in the shadow axe&. ioExecBios * (PIOC..EXEC1) (Irp->A-Bsociate<iIrp.SysteanBuffcr); if (£oundBios32 籯霣 FALSE) · ( // if bioa32 not: found in. ioExecBios->mnStat 霣 FALSE; // didn't run. re cum (IoCtlFinish (Xrp, STATUS 一 SUCCESS, sizeof (I0C_EXEC1)) // check the range of the requested function. actualXfrd * rrmgeCheck (ioExecBioa->bioaFunction. IL. HODE-SHXDOW, lenBio丨Rom // function address> // only look at «.p. // read/txec mode. BIOS. // length of rom space. // failed range check. if (actualXfrd *霣 0)( return (IoCtlFinish (工rp, STATUS.XCCZSS^DENIHD, sizeof {IOC-EXECl))): // now execute Lhe function. if { li〇Exec3ios->bioaFunccion) ** ( (UX-ONG) bios 32 Servic eEntry Points (ULONG) romMacPc: conneccBios (ioExecBios, ioExfcc3ios->biosFunction); else execBios { ioEaecBios . io£xecBioa->biosFuncT:ion); ioExccBios->runStac return ( IoCtlFinish (Irp, STATUS.SOCCZSS. sizeof tIOC.EXECin ); "don* t forget lo re cum exec strict. . ·
(請先閱讀背面之注意事X 裝---5填寫本頁) . 經濟部智慧財產局員工消費合作社印製
Appendix D2 -103- 本紙張尺度適用中國國家標準(CNS)A4規格(210 χ 297公釐) 476913 A7
五、發明說明(101 ) // this'function creates & register contaxr ajid calls the // mnzry point.
void cxck^BIos ( PIOC^EXECl ULONG systesabuf f er, en^rypoinc ♦ ifdef BIOSJAR—CXLL void (fax *addreas32) (PIOC^EXECl); telse void (·&€ΐάΓ€ί53 32)(Σα〇α_ΗΧ£ζ:1); ♦endif (請先閱讀背面之注意事項寫本頁) r«裝 ,[systembufferJ // per to the syscenvbuffer // ca // make it a FAR call C&ddreas32) // call to the Serive Directory 經濟部智慧財產局員工消費合作社印製 *address32 * (void (* ) IPIOC^DCECl) ) entrypoLnt ; { mov eaa push push call // (*&ddress32) (systembuffer) ; // this is service interface.
Appendix D3 -104- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐)

Claims (1)

  1. / 經濟部智慧財產局員工消費合作社印製 申凊專利範圍 1 · 種從一基於處理哭玄枝rfr、行指令順序於一實;吃情:中:一虛擬記憶體年取及執-記憶體,用::: = =該系統包含: 記憶體包括-實p计〜…/處理的指令順序,該 貫E胆及一虛擬記憶體,·以及 &理咨’ Μ以執行所儲存的指令順序;以及 =儲存的指令順序包括處理㈣以致使處理器:⑷ =記憶體映射複數預定指令順序至虛擬記憶體;⑻ …疋°“思體的複數預定指令順序之-決定補償値;⑷ 接收-指令而執行複數預定指令順序之⑷移轉控制 給複數預定指令順序之一;以及⑷處理得自虛擬記憶體 的複數預定指令順序之一。 2·如申請專利範圍第丨項之系統 由應用程式做出。 3_如申請專利範圍第1項之系統 由類別驅動程式做出。 4.如申請專利範圍第1項之系統 驟: (^)由實體記憶體映射複數BIOS指令順序至虛擬記 憶體,BIOS指令順序包括BIOS服務目錄;以及 (a.2)由實體記憶體映射BIOS資料至虛擬記憶體。 5·如申請專利範圍第4項之系統,其中步驟(b)包含下列步 驟: (b.l)決定BIOS服務目錄的起點虛擬位址;以及 (b.2)經由參照BIOS服務目綠決定複數BIOS指令順序 其中於步驟(c),指令係 其中於步驟(c),指令係 其中步驟(a)包含下列步 -105- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公爱) 476913 A8 B8 C8 D8 之 申清專利範圍 的起點虛擬位址 6·如申請專利範圍第5項之系統,其中步驟(d)包含下列步 驟: (丄1)於一記憶體位置形成一暫存器堆疊; (d.2)識別複數bi〇s指令順序之一的起點虛擬位址所 在位置;以及 (d.3)移轉控制給複數BIOS指令順序之一。 7·如申請專利範圍第6項之系統,其中於步驟(d.丨),記憶體 位置爲位於動態隨機存取記憶體(Dram)的緩衝器。 8·如申請專利範圍第6項之系統,其中於步驟(cL 1 ),記憶體 位置爲位於主記憶體的緩衝器。 9·如申凊專利範圍第6項之系統’其中步驟(e)包含下列步 驟: (e.l)決定起點虛擬位址是否位於由實體記憶體映射至 虛擬記憶體的位址範圍内;以及 (e.2)若是,則執行得自虛擬記憶體的複數BI〇s指令順 序之一,否則指示起點虛擬位址係非於由實體記憶體映 射至虛擬記憶體的位址範圍内。 10· —種從一基於處理器的系統中之虛擬記憶體存取及執行 指令順序於一實體1己憶體之方法,包含下列步骤: (a) 由實體記憶體映射複數預定指令順序至虛擬記憶 體; (b) 對虛擬記憶體的複數預定指令順序之一決定補償 値; -106- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) (請先閱讀背面之注意事項再填寫本頁) 裝--------訂---------線I 、經 ▽ 濟 部 智 慧 財 產 局 員 工 消 費 合 作 社 印 製 經濟部智慧財產局員工消費合作社印製 A8 B8 C8 D8 、申請專利範圍 (C)接收一指令而執行複數預定指令順序之一·, (d) 和心技制給複數預定指令順序之一;以及 (e) 處理得自虛擬記憶體的複數預定指令順序之一。 11. 如申w專利範圍第丨〇項之方法,其中於步驟(c),指令係 由應用程式做出。 12. 如申巧專利範圍第丨〇項之方法,其中於步驟〇),指令係 由類別驅動程式做出。 13. 如申μ專利範圍第丨〇項之方法,其中步驟(&)包含下列步 驟: (a_l)由實體記憶體映射複數BI〇s指令順序至虛擬記 憶體,BIOS指令順序包括BI0S服務目錄;以及 0.2)由實體記憶體映射bios資料至虛擬記憶體。 14. 如申凊專利範圍第丨3項之方法,其中步驟(b)包含下列步 驟: (b.l)決定BIOS服務目錄的起點虛擬位址;以及 (b.2)經由參照BI〇s服務目錄決定複數81〇8指令順序 之 的起點虛擬位址。 15. 如申請專利範圍第14項之方法,其中步驟(d)包含下列步 驟: (d.l)於一記憶體位置形成一暫存器堆疊; (d.2)識別複數b I 〇 s指令順序之一的起點虚擬位址所 在位置;以及 (d.3)移轉控制給複數BIOS指令順序之一。 16. 如申請專利範圍第1 5項之方法,其中於步驟(d. 1 ),記憶 107- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) i:---'-------·裝--------訂 ---- (請先閱讀背面之注意事項再填寫本頁) 線 476913 A8 B8 C8 D8 、申請專利範圍 體位置為位於動態隨機存取記憶體(DRAM)的緩衝器。 17.如申請專利範圍第i 5項之方法,其中於步驟(d. i),記憶 體位置為位於主記憶體的緩衝器。 18·如申請專利範圍第1 5項之方法,其中步驟(e)包含下列步 驟: (d)決足起點虛擬位址是否位於由實體記憶體映射至 虛擬記憶體的位址範圍内;以及 (e·2)若是,則執行得自虛擬記憶體的複數BIOS指令順 序之,否則心示起點虛擬位址係非於由實體記憶體映 射至虛擬記憶體的位址範圍内。 19. 一種可由電腦執行的處理步驟,用於自一基於處理器的 訂 系統中之虛擬記憶體存取及執行指令順序於一實體記憶 體,該等處理步驟包括: (a)由實體記憶體映射複數預定指令順序至虛擬記憶 體; 線 值(b)對虛擬記憶體的複數預定指令順序之一決定補償 (C)接收一指令而執行複數預定指令順序之一; (d) 移轉控制給複數預定指令順序之_,•以及 (e) 處理得自虛擬記憶體的複數預定指令順序之 其 20. 如申請專利範圍第19項之可由電腦執行的處理步驟 中於步驟(c),指令係由應用程式做出。 其 21. 如申請專利範圍第1 9項之可由電腦勃〆 包物執仃的處理步驟 中步驟(a)包含下列步驟·· -108- 本紙狀度適用中國國家標準(CNS)A4規1 各⑵〇 x 297公爱- 476913 經濟部智慧財產局員工消費合作社印製 A8 B8 C8 D8 、申請專利範圍 (a· 1)由實體記憶體映射複數BIOS指令順序至虛擬—己 憶體,BIOS指令順序包括BIOS服務目錄;以及 (a.2)由實體記憶體映射BIOS資料至虛擬記憶體。 22. 如申請專利範圍第21項之可由電腦執行的處理步驟,其 中步驟(b)包含下列步驟: (b.l)決定BIOS服務目錄的起點虛擬位址;以及 (b.2)經由參照BIOS服務目錄決定複數則〇以旨令順序 之一的起點虛擬位址。 23. 如申請專利範圍第22項之可由電腦執行的處理步驟,其 中步驟(d)包含下列步驟: ’、 (d.l)於一記憶體位置形成一暫存器堆最· (d.2)識別複數BI0S指令順序之—的=點虛擬位址所 在位置;以及 (d.3)移轉控制給複數BIOS指令順序之―。 24·如申請專利範圍第2 3項之可由電脫热/ %牺執仃的處理步驟,其 中於步驟(d · 1),記憶體位置爲位於番 ^ 1趴動怨隨機存取記憶體 (DRAM)的緩衝器。 25·如申請專利範圍第23項之可由雷脫也/ 知執行的處理步驟,JL 中於步驟(d.l),記憶體位置爲位於 约於王記憶體的緩衝器。 26.如申請專利範圍第2 3項之可由雷脫4 叫%知執行的處理步驟,並 中步驟(e)包含下列步驟: ’、 (e.l)決走起點虛擬位址是否位认 1於由實體記憶體映射至 虛擬記憶體的位址範圍内;以及 κ ^ π i (e.2) μ,則執行得自虛擬記憶 一 -109- 本紙張尺度適用中國國家標準(CNS)A4規 1(210 χ_297公f ---------—--------訂------ (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 476913 A8 B8 C8 -------^ 六、申請專利範圍 U序$則指不起點虛擬位址係非於由實體記憶體 映射至虛擬記憶體的位址範圍内。 27’種自-基於處理器的系統中之—虛擬記憶體存取指令 順序於一實體記憶體之系統,該系統包含: 一記憶體,用以儲存基於處理器處理的指令順序,該 記憶體包括一實體記憶體及一虛擬記憶體;以及 一處理器,用以執行所儲存的指令順序;以及 其中儲存的指令順序包括處理步驟以致使處理器:(a) 由貫體屺憶體映射複數預定指令順序至虛擬記憶體;(b) 對虛擬記憶體的複數預定指令順序之一決定補償値;(c) 接收一指令而執行複數預定指令順序之一 ;(d)移轉控制 給複數預定指令順序之一;以及(e)處理得自虛擬記憶體 的複數預定指令順序之一。 28.如申請專利範圍第27項之系統,其中步驟(a)包含下列步 驟: (a.l)由實體記憶體映射複數BIOS指令順序至虛擬記 憶體,該BIOS指令順序包括複數BIOS唯讀記憶體(ROM) 指令順序及一 BIOS服務目錄;以及 2)由實體記憶體映射Bi〇S資料至虛擬記憶體。 29·如申請專利範圍第28項之系統,其中步驟(b)包含下列步 驟: (b.l)決定BIOS服務目錄的起點虛擬位址;以及 (b.2)經由參照BIOS服務目錄決定複數BIOS指令順序 之一的起點虛擬位址。 -110- _ 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) 裝--------訂---------線 (請先閱讀背面之注意事項再填寫本頁) 476913 經濟部智慧財產局員工消費合作社印製 A8 B8 C8 D8六、申請專利範圍 30.如申請專利範圍第29項之系統,其中步·驟(d)包含。下列步 驟: (d.l)於一記憶體位置形成一暫存器堆疊;以及 (d.2)識別複數BIOS ROM指令順序之一的起點虛擬 位址所在位置。 31·如申請專利範圍第30項之系統,其中步驟(e)包含下列步 驟: (e.l)決定起點虛擬位址是否位於由實體記憶體映射至 虛擬記憶體的位址範圍内;以及 (e.2)若是,則執行得自虛擬記憶體的複數BI〇s ROM 指令順序之一,否則指示起點虛擬位址係非於由實體記 思體映射至虛擬記憶體的位址範圍内。 32· —種自一基於處理器的系統中之虛擬記憶體存取指令順 序於一實體記憶體之方法,包含下列步驟: U)由實體記憶體映射複數預定指令順序至虚擬記憶 體; * (b) 對虛擬記憶體的複數預定指令順序之一決定補償 値; (c) 接收一指令而執行複數預定指令順序之一; (d) 移轉控制給複數預定指令順序之一;以及 (e) 處理得自虛擬記憶體的複數預定指令順序之一。 33.如申請專利範圍第32項之方法,其中步驟(a)包含下列步 驟: (a.l)由實體記憶體映射複數BI〇s指令順序至虛擬記 -----------111 - 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公爱) (請先閱讀背面之注意事項再填寫本頁) ▼裝 訂--- ΜΦΙ 476913 經 濟 ,慧 財 產 局 員 工 消 費 合 作 社 印 製 A8 B8 C8 D8 、申請專利範圍 憶體,該BIOS指令順序包括複數BIOS唯讀記憶體(ROM) 指令順序及一 BIOS服務目錄;以及 〇·2)由實體記憶體映射BIOS資料至虛擬記憶體。 34·如申請專利範圍第3 3項之方法,其中步驟(b)包含下列步 驟: (b.l)決定BIOS服務目錄的起點虛擬位址;以及 (b.2)經由參照BIOS服務目綠決定複數BIOS指令順序 之一的起點虛擬位址。 35.如申請專利範圍第34項之方法,其中步驟(d)包含下列步 驟: (d.l)於一記憶體位置形成一暫存器堆疊;以及 (d · 2)識別複數B10 S指令順序之一的起點虛擬位址所 在位置。 36·如申請專利範圍第3 5項之方法,其中步驟(e)包含下列步 驟: (匕1)決定起點虛擬位址是否位於由實體記憶體映射至 虛擬i己憶體的位址範圍内;以及 (e.2)若是,則執行得自虛擬記憶體的複數BI〇s指令 順序之一,否則指示起點虛擬位址係非於由實體記憶體 映射至虛擬記憶體的位址範圍内。 37· —種安全利用基本輸入及輸出系統(BI〇S)服務之系統, 包含: 一存取驅動程式,產生一服務請求以利用BI〇S服務, 服務請求包括使用於一成對加密鑰中的密鑰形成的服務 112- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公爱) (請先閱讀背面之注意事項再填寫本頁) >衣--------訂---------線私 476913 A8 R8 C8 D8
    六、申請專利範圍 請求簽章;以及 一介面,使用成對加密鑰中的公 而確保服務請求的完整性。 38·如申請專利範圍第37項之系統,其中. 存取驅動程式產生一階段作業請求而與介面建— 段作業;以及 丄 該階段作業請求包括一使用成對加这 輪驗證服務請求簽章 階 密鑰的密鑰形成的 階段作業請求簽章。 取的 39·如申請專利範圍第37項之系統,其中·· 存取驅動程式產生一階段作業社 十又if果明求而結束與介面的 段作業;以及 階 經濟部智慧財產局員工消費合作社印製 該階段作業請求包括-使用成對加密输的密输形成的 階段作業請求簽章。 40.如申請專利範圍第37項之系統,其中: 該介面於接收到一階段作業請求後產生一授權認證且 發送授權認證給存取驅動程式;以及 存取驅動程式使用涵括於授權認證的資訊而產生隨後 的階段作業請求。 41·如申請專利範圍第40項之系統,其中授權認證包括一新 的公瑜。 42.如申請專利範圍第40項之系統,其中授權認證包括一新 的密输。 43·如申請專利範圍第40項之系統,其中授權認證包括—認 證簽章。 ^ 113- 本紙張尺度適用中國國家標準(CN.S)A4規格(210 X 297公釐) ------------·壯衣--------訂---------.^9— (請先閱讀背面之注意事項再填寫本頁} 476913 A8 B8 C8 D8 六、申請專利範圍 44. 如申請專利範圍第37項之系統,其中: 一 $亥介面於接收到一服務請求後產生一授權認證且發送 授權認證給存取驅動程式;以及 存取驅動程式使用涵括於授權認證的資訊而產生隨後 的服務請求。 、 45. —種安全召唤基本輸入及輸出系統(BI〇S)服務之方法, 包含: 形成一服務請求而召唤耵〇8服務; 使用於成對加密鑰之密鑰產生的服務請求簽章而簽章 該服務請求;以及 以使用成對加密鑰中的公鑰驗證服務請求簽章俾確保 服務請求的完整性。 46. 如申請專利範圍第45項之方法,進一步包含: 於處理服務請纟後形《一授權認證包括—新的密瑜及 一新的公鍮; 以使用新密鑰產生的服務請求簽章而簽章隨後的服務 請求;以及 使用新公鑰證實隨後服務請求的服務請求簽章。 47·如申請專利範圍第45項之方法,進_步包本早 進行由涵括於服務請求的服務作f j服私作菜碼指示的BIOS服 務。 48.如申請專利範圍第45項之方法,進一步包本· 形成一階段作業請求而與應用稆二 i式介面(RAPI)形 成一階段作業; (請先閱讀背面之注意事項再填寫本頁) ▼裝--------訂---------線1 經濟部智慧財產局員工消費合作社印製 -114 476913 A8 R8 C8 D8 經濟部智慧財產局員工消費合作社印製 申請專利範圍 以便州成對加密输的密输產生的階段作業 簽章該階段作業請求;以及 簽早而 使用於成對加密鑰的公鑰證實階段作業請求而 保階段作業請求的完整性。 早而1 49·如申請專利範圍第48項之方法,進一步包含: 於處理階段作業請求後形成—授權認證包 鑰及一新的公鑰; π α Λ 以使用新密鑰產生的階段作業請求簽章而簽章隨後^ 階段作業請求;以及 1 ’ 使用新公鑰證實隨後階段作業請求的階段作業請求簽 章。 50·如申請專利範圍第45項之方法,進一步包含·· 形成-段作業請求而與RqM應用程式介面(r只 束一階段作業; 以使用成對加密鑰的密瑜產生的階段作業請求簽章而 僉章该階段作業請求;以及 使用於成對力口密输的公瑜證實階段作業請求簽章而確 保階段作業請求的完整性。 51.-種實施於-電腦可讀取媒體而安全利用基本輸入及輸 出系統(BIOS)服務的電腦程式,包含: 、存取驅動私式,產生一服務請求以利用服務, d服m求包括一使用成對加密鑰中的密鑰產生的服務 請求簽章;以及 d面使用成對加密鑰的公鑰證實服務請求簽章而 -------------裝--------訂---------線 (請先閱讀背面之注意事項再填寫本頁) -115 476913 A8 B8 C8 — ____ D8 六、申請專利範圍 確保服務請求的完整性。 52· —種實施於資料流中之電腦資料信號,包含: 一存取驅動私式,可產生—服務請求以利用BI〇s服務 ,該服務請求包括一使用成對加密鑰中的密鑰產生的服 務請求簽章;以及 一介面,使用成對加密鑰的公鑰證實服務請求簽章而 確保服務請求的冗整性。 (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 116- 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐)
TW089111925A 1999-06-18 2000-11-21 System and method for securely utilizing basic input and output system (BIOS) services TW476913B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US09/336,889 US6148387A (en) 1997-10-09 1999-06-18 System and method for securely utilizing basic input and output system (BIOS) services

Publications (1)

Publication Number Publication Date
TW476913B true TW476913B (en) 2002-02-21

Family

ID=23318127

Family Applications (1)

Application Number Title Priority Date Filing Date
TW089111925A TW476913B (en) 1999-06-18 2000-11-21 System and method for securely utilizing basic input and output system (BIOS) services

Country Status (3)

Country Link
JP (1) JP2001051858A (zh)
CN (2) CN1282920A (zh)
TW (1) TW476913B (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9361121B2 (en) 2002-03-29 2016-06-07 Intel Corporation System and method for execution of a secured environment initialization instruction

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6486883B1 (en) * 1999-06-18 2002-11-26 Phoenix Technologies, Ltd. Apparatus and method for updating images stored in non-volatile memory
US7149508B2 (en) * 2003-02-05 2006-12-12 Samsung Electronics Co., Ltd. System and method for delta-based over-the-air software upgrades for a wireless mobile station
US7350079B2 (en) 2003-11-20 2008-03-25 International Business Machines Corporation Apparatus and method for inter-program authentication using dynamically-generated public/private key pairs
US8065509B2 (en) * 2006-09-26 2011-11-22 Hewlett-Packard Development Company, L.P. Persistent security system and method
CN101681253B (zh) * 2007-05-09 2013-10-16 金士顿科技股份有限公司 安全且可扩充的固态磁盘系统
CN102375787A (zh) * 2010-08-12 2012-03-14 鸿富锦精密工业(深圳)有限公司 利用内存窗口实现接口的系统及方法
US10013387B2 (en) 2015-06-11 2018-07-03 Cisco Technology, Inc. Method or apparatus for flexible firmware image management in microserver
US10719446B2 (en) * 2017-08-31 2020-07-21 Oracle International Corporation Directly mapped buffer cache on non-volatile memory
CN113392044A (zh) * 2021-05-06 2021-09-14 深圳市广和通无线股份有限公司 基于Windows10的定位数据传输方法、装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9361121B2 (en) 2002-03-29 2016-06-07 Intel Corporation System and method for execution of a secured environment initialization instruction
US9990208B2 (en) 2002-03-29 2018-06-05 Intel Corporation System and method for execution of a secured environment initialization instruction
US10031759B2 (en) 2002-03-29 2018-07-24 Intel Corporation System and method for execution of a secured environment initialization instruction
US10042649B2 (en) 2002-03-29 2018-08-07 Intel Corporation System and method for execution of a secured environment initialization instruction
US10175994B2 (en) 2002-03-29 2019-01-08 Intel Corporation System and method for execution of a secured environment initialization instruction

Also Published As

Publication number Publication date
JP2001051858A (ja) 2001-02-23
CN1282920A (zh) 2001-02-07
CN1690911A (zh) 2005-11-02

Similar Documents

Publication Publication Date Title
US6148387A (en) System and method for securely utilizing basic input and output system (BIOS) services
JP4433401B2 (ja) 情報処理システム、プログラム、及び情報処理方法
US6223284B1 (en) Method and apparatus for remote ROM flashing and security management for a computer system
US7797527B2 (en) Computing device deployment using mass storage device
US6272636B1 (en) Digital product execution control and security
RU2388051C2 (ru) Случайный пароль, автоматически формируемый базовой системой ввода-вывода (bios) для защиты устройства хранения данных
CN110084043B (zh) 用于提供可信平台模块服务的设备和方法
TW476913B (en) System and method for securely utilizing basic input and output system (BIOS) services
US6542981B1 (en) Microcode upgrade and special function support by executing RISC instruction to invoke resident microcode
JP2010073193A (ja) モバイルインターネットデバイス(mid)でuefiファームウェア及びuefiアウェアなオペレーティングシステムのセキュアなブートのためのシステム及び方法
WO2008004525A1 (fr) Dispositif de traitement d'informations, dispositif d'enregistrement d'informations, système de traitement d'informations, procédé de mise à jour de programme, programme, et circuit intégré
US20080077420A1 (en) System and Method for Securely Updating Remaining Time or Subscription Data for a Rental Computer
TW200820076A (en) Portable mass storage with virtual machine activation
US20020169976A1 (en) Enabling optional system features
Cisco Release Notes for Cisco IOS 11.2(5) Feature Packs Cisco 1000
Cisco Rel Note--Cisco IOS Rel 11.2(5)P SW Feature Packs--Cisco 1000
Cisco Release Notes for Cisco IOS 11.2(3) Feature Packs Cisco 1000
Cisco Release Notes for Cisco IOS 11.1---Cisco CPA2500 Series Routers
Cisco Release Notes for Cisco IOS 11.1---Cisco CPA2500 Series Routers
Cisco Release Notes for Cisco IOS Release 11.2 Software Feature Packs---Cisco 1600 Series Routers
Cisco Release Notes for Cisco IOS Release 11.2 Software Feature Packs---Cisco 1600 Series Routers
Cisco Release Notes for Cisco IOS Release 11.2 Software Feature Packs---Cisco 1600 Series Routers
Cisco Release Notes for Cisco IOS Release 11.2 Software Feature Packs---Cisco 1600 Series Routers
Cisco Release Notes for Cisco IOS 11.1(5)---Cisco CPA2500 Series Routers
Cisco Release Notes for Cisco IOS 11.1(5)---Cisco CPA2500 Series Routers

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent
MM4A Annulment or lapse of patent due to non-payment of fees