关键词不能为空

当前您在: 主页 > 英语 >

BIOS源代码

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-13 11:40
tags:

-

2021年2月13日发(作者:ploy)



PAGE


,132


title . PROCESSOR_TIMER_PARITY_REFRESH_NMI TEST


;************************************************ *****************;


;******************* **********************************************;


;** **;


;** (C)Copyright 1985-1996, American Megatrends Inc. **;


;** **;


;** All Rights Reserved. **;


;** **;


;** 6145-F, Northbelt Parkway, Norcross, **;


;** **;


;** Georgia - 30071, USA. Phone-(770)-246-8600. **;


;** **;


;********************************** *******************************;


;***** ************************************************** **********;


;-------------------------- -------------;


include bios global constants


include bios coding macro definition


include


; ---------------------------------------;


extrn check_point_no_stack:near


extrn check_point_stack:near


public bios_suru


public shutdown_0


public shutdown_77


public shutdown_88


extrn shutdown_1:near shutdown after memory error


extrn shutdown_2:near v_mode exception intr error


extrn _shutdown_33:near shutdown after memory test


extrn shutdown_4:near boot loader request shutdown


extrn shutdown_5:near ; user defined shutdown routine


extrn _shutdown_66:near shutdown during memory test to display memory size


extrn shutdown_7:near unused, (chipset memory detection)


extrn shutdown_8:near unused, (soft reset)


extrn shutdown_9:near shutdown after block move


extrn shutdown_a:near user defined shutdown routine


extrn init_8259_80287:near shut 4/5, init 8259, 80287


extrn disable_video:near


extrn clear_64k_memory:near


extrn int_isr:near


extrn _power_on_delay:byte


extrn _software_delay:byte


extrn ram_segment:word


extrn flush_all_cache:near


extrn power_on_init:near


public power_on_init_end


extrn hreset_clear:near


public hreset_clear_end


extrn sreset_clear:near


public sreset_clear_end


extern StopUsbHostController(dummy_ret):near


extrn dummy_ret:near


extrn disable_all_cache:near


extrn shutdown_init:near


public shutdown_init_end


extrn decompress_post_init:near


;------------ ---------------------------;


; C O D E


S E G M E N T


;----------- ----------------------------;


cgroup group _text


_text segment word public 'CODE'


assume cs:cgroup


.486p


;--------------------- ------------------;


public _BIOS_STARTS


_BIOS_STARTS label byte marks start of module


;---------------- -----------------------;


; FLAGS TEST (SF,ZF,PF,CF)


;


;---;---;---;---;---;---;---;---;


;


; S Z x A x P ; x C


;


;---;---;---;---;---;---;---;---;


;


HARD RESET OR SHUTDOWN RESET


;------------------------------ ---------;


; SHUTDOWN PROCESSING


;---------------------------------------;


bios_suru:


cli test under CLI mode


cld ensure direction


mov ax,cs


mov ss,ax


; $$$$$$CORE0036+ >>>


extern wake_up(wake_up_end):near


public wake_up_end


jmp wake_up check for wakeup


wake_up_end: control will come here only if wake up is not needed


; $$$$$$CORE0036+ <<<


jmp power_on_init


power_on_init_end:


in al,kb_stat_port if sys_flag bit is set


test al,00000100b then soft reset else power on


jnz shut_5 not power-on


;----------------------------- ----------;


; VANILLA MEMORY PATCH < /p>


;--------------------------------------- ;


ifdef VANILLA_BIOS


;------ ---------------------------------;


;


save CPUID in cmos 35h(DL), 36h(DH)


extrn cmos_data_out:near


extrn _refresh_value:byte


mov ebp,edx


mov al,0b5h


mov ah,dl


ret_sp cmos_data_out


mov al,0b6h


mov ah,dh


ret_sp cmos_data_out


;


start memory refresh..


mov al,00h initialise DMA-PAGE reg.


out 8fh,al ; (used in MEMORY REFRESH)


io_delay


mov al,01010100b start CH_1 (REFRESH)


out 43h,al one byte count used


io_delay


mov al,cgroup:_refresh_value; low byte count



OUT


41H,AL



MOV


CX,100H


; 400h..01/11/95



XOR


DI,DI



MOV


ES,DI


wpulse1:


stosb


loop wpulse1


;------------------------- --------------;


extrn vanilla_patch_offset:near


cmp cgroup:word ptr vanilla_patch_offset,0ffffh


jz ret_off no routine


mov sp,offset cgroup:sp_ret_off


jmp vanilla_patch_offset-1


even


sp_ret_off:


dw offset cgroup:ret_off


dw 0f000h


ret_off:


endif


;- --------------------------------------;


jmp hreset_clear hard reset init (if any)


;;;;hreset_clear_end:


;;;; jmp shutdown_0x hard reset, goto regs. test


shut_5:


jmp sreset_clear GA20 disable and other....


sreset_clear_end:


mov al,8fh shutdown address


out cmos_addr_port,al mask NMI & select shut byte


jcxz short $$+2 i/o delay


jcxz short $$+2 i/o delay



IN


AL,CMOS_DATA_PORT


; read shutdown code


mov ah,00



MOV


SI,AX


; save in (SI)



MOV


AL,8FH


; shutdown address



JCXZ


SHORT $$+2


; i/o delay



OUT


CMOS_ADDR_PORT,AL


mov al,00 ; clear shutdown byte


jcxz short $$+2 ; i/o delay


jcxz short $$+2 i/o delay


out cmos_data_port,al


mov ax,cs


mov ss,ax


mov ax,si restore shutdown code


cmp al,04h for BOOT loader shutdown


jz shut_1 & for USER defined shutdown


cmp al,05h initialize 8259 (#1, #2)


jz shut_1 and (DS), (SS), (SP), STI


cmp al,0ah ; if shut code > 10


jbe shut_2 bypass intr. init


jmp short shutdown_0 ; then hard reset


;-------------------- -------------------;


; INIT 8259 for SHUTDOWN 04, 05


;-------------------- -------------------;


shut_1:


mov bx,level_2_int*256+level_1_int


ret_sp init_8259_80287 shut 4/5, init 8259, 80287


;--------------------- ------------------;


; INTERNAL CACHE IS ALWAYS ON


;-------------------------- -------------;


shut_2:


jmp shutdown_init


shutdown_init_end:


mov ax,40h global data segment (ah) = 0


mov ds,ax setup (DS)


mov al,00h global extra segment (ah) = 0


mov es,ax setup (ES)


mov al,30h global stack segment (ah) = 0


mov ss,ax setup (SS)


mov sp,0100h setup (SP)


shl si,1 prepare index


jmp [si+cgroup:shut_jmp_tbl]; brunch with intr. disabled


;----------------------------- ----------;


; SHUTDOWN JMP TABLE


;---------------------------------------;


even


shut_jmp_tbl label word


dw offset cgroup:shutdown_0; hard reset


dw offset cgroup:shutdown_1; used for block move internal shutdown


dw offset cgroup:shutdown_2; v_mode exception intr error


dw offset cgroup:_shutdown_33; shutdown after memory test


dw offset cgroup:shutdown_4; shutdown for boot loader


dw offset cgroup:shutdown_5; shutdown (with intr. init)


dw offset cgroup:_shutdown_66; shutdown during memory test to display memory size


dw offset cgroup:shutdown_7; unused, (chipset memory detection)


dw offset cgroup:shutdown_8; unused, (soft reset)


dw offset cgroup:shutdown_9; shutdown after block move


dw offset cgroup:shutdown_a; shutdown (w/o intr. init)

< p>
;---------------------------------------;


hreset_clear_end:


shutdown_0x: hard reset


mov al,8dh


out cmos_addr_port,al NMI OFF


;---------- -----------------------------;


shutdown_0: hard reset


shutdown_77: unused


shutdown_88: unused


check_point_si 03h ======== 03


mov ax,cs


mov ss,ax


xor bp,bp


mov ds,bp set (DS) = 0


mov es,bp set (ES) = 0


jmp_di disable_video


in al,kb_stat_port if sys_flag bit is set


test al,00000100b ; then soft reset else power on


jz not_cnt_alt_del power on

-


-


-


-


-


-


-


-



本文更新与2021-02-13 11:40,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/649875.html

BIOS源代码的相关文章

  • 余华爱情经典语录,余华爱情句子

    余华的经典语录——余华《第七天》40、我不怕死,一点都不怕,只怕再也不能看见你——余华《第七天》4可是我再也没遇到一个像福贵这样令我难忘的人了,对自己的经历如此清楚,

    语文
  • 心情低落的图片压抑,心情低落的图片发朋友圈

    心情压抑的图片(心太累没人理解的说说带图片)1、有时候很想找个人倾诉一下,却又不知从何说起,最终是什么也不说,只想快点睡过去,告诉自己,明天就好了。有时候,突然会觉得

    语文
  • 经典古训100句图片大全,古训名言警句

    古代经典励志名言100句译:好的药物味苦但对治病有利;忠言劝诫的话听起来不顺耳却对人的行为有利。3良言一句三冬暖,恶语伤人六月寒。喷泉的高度不会超过它的源头;一个人的事

    语文
  • 关于青春奋斗的名人名言鲁迅,关于青年奋斗的名言鲁迅

    鲁迅名言名句大全励志1、世上本没有路,走的人多了自然便成了路。下面是我整理的鲁迅先生的名言名句大全,希望对你有所帮助!当生存时,还是将遭践踏,将遭删刈,直至于死亡而

    语文
  • 三国群英单机版手游礼包码,三国群英手机单机版攻略

    三国群英传7五神兽洞有什么用那是多一个武将技能。青龙飞升召唤出东方的守护兽,神兽之一的青龙。玄武怒流召唤出北方的守护兽,神兽之一的玄武。白虎傲啸召唤出西方的守护兽,

    语文
  • 不收费的情感挽回专家电话,情感挽回免费咨询

    免费的情感挽回机构(揭秘情感挽回机构骗局)1、牛牛(化名)向上海市公安局金山分局报案,称自己为了挽回与女友的感情,被一家名为“实花教育咨询”的情感咨询机构诈骗4万余元。

    语文