⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 npost.asm

📁 AMI 主板的BIOS源码
💻 ASM
📖 第 1 页 / 共 4 页
字号:
;        call    set_cursor_posn
        ret
;-----------------------------------------------------------------------;
;                               THREE84K_DISPLAY                        ;
;-----------------------------------------------------------------------;
; check_point           : 50                                            ;
; This routine returns the information whether extra 384K memory in the ;
; region A0000-FFFFF will be displayed in memory count during memory    ;
; testing.                                                              ;
; input :                                                               ;
;       BP      current count of 64k segments                           ;
;       DS      0040h                                                   ;
;       ES      0000h with 4GB limit                                    ;
;       stack   available                                               ;
; output:                                                               ;
;       BP      updated count of 64k segment                            ;
; register usage : DO NOT destroy any register                          ;
; NOTE :                                                                ;
; 1. Decide how many extra 64k need to be displayed and add that count  ;
;    to BP.                                                             ;
;    For example, if extra 128K to be displayed, ADD BP,2 and ret.      ;
;    For example, if extra 256K to be displayed, ADD BP,4 and ret.      ;
;    For example, if extra 384K to be displayed, ADD BP,6 and ret.      ;
; 2. Default code is                                                    ;
;               ADD BP,6        ; display extra 384k                    ;
;               RET                                                     ;
;-----------------------------------------------------------------------;
        public  three84k_display
three84k_display:
        add     bp,6                    ; display extra 384K
        ret
;-----------------------------------------------------------------------;
;                       PS2MOUSE_EDGE_LEVEL                             ;
;-----------------------------------------------------------------------;
; check point   : 80                                                    ;
; this routine is called during mouse initialisation of PS/2 mouse to   ;
; program the irq level to edge triggered or level triggered.           ;
; input :                                                               ;
;       SS      0030H                                                   ;
;       DS      0040H                                                   ;
;       ES      0000H                                                   ;
;       stack   available                                               ;
; register usage : can destroy any register except EP, SS, DS, ES       ;
;-----------------------------------------------------------------------;
        public  ps2mouse_edge_level
ps2mouse_edge_level     proc    near
        ret
;  if the programming is needed then remove the above RET and activate the
;  following code..
;;      cli                             ; disable interrupts
;;      mov     dx,4d1h                 ;
;;      in      al,dx                   ; (al) = read current status
;;      jcxz    short $+2               ; i/o delay
;;      jcxz    short $+2               ; i/o delay
;;      or      al,00010000b            ; set as level triggered
;;      out     dx,al                   ;
;;      sti                             ; enable interrupts
;;      ret
ps2mouse_edge_level     endp
;-----------------------------------------------------------------------;
;                       CHECK_KB_RESET                                  ;
;-----------------------------------------------------------------------;
; check point   : 80                                                    ;
; this routine is called before kb initialization to check whether to   ;
; issue KB reset or not.                                                ;
; input :                                                               ;
;       SS      0030H                                                   ;
;       DS      0040H                                                   ;
;       ES      0000H                                                   ;
;       stack   available                                               ;
; output:                                                               ;
;       nc      do not give kb reset                                    ;
;       cy      give kb reset                                           ;
; register usage : can destroy any register except EP, SS, DS, ES       ;
;-----------------------------------------------------------------------;
        public  check_kb_reset
check_kb_reset:
        clc                     ; do not give kb reset
        ret
;-----------------------------------------------------------------------;
;               BEFORE_SETUP            ; Moved to OEMPOST.ASM
;-----------------------------------------------------------------------;
;                               AFTER_SETUP                             ;
;-----------------------------------------------------------------------;
; check_point           : 88                                            ;
; This routine can be used for any programming after cmos setup.        ;
; input :                                                               ;
;       SS      0030H                                                   ;
;       DS      0040H                                                   ;
;       ES      0000H                                                   ;
;       stack   available                                               ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS      ;
;-----------------------------------------------------------------------;
        public  after_setup
after_setup:
        ret
;-----------------------------------------------------------------------;
;                               ADJUST_SETUP                            ;
;-----------------------------------------------------------------------;
; check_point           : 8C                                            ;
; This routine can be used to do any programming even if cmos setup is  ;
; not executed.                                                         ;
; input :                                                               ;
;       SS      0030H                                                   ;
;       DS      0040H                                                   ;
;       ES      0000H                                                   ;
;       stack   available                                               ;
; register usage : can destroy any register except EBP,DS,ES,FS,GS      ;
; 1. program setup selected parameters including non-cacheable regions. ;
; 2. use check_cmos_data routine to get the value of any selected       ;
; parameters. DO NOT ACCESS ABSOLUTE CMOS REGISTERS.                    ;
;-----------------------------------------------------------------------;
        extrn   enable_l1_cache:near
        extrn   disable_l1_cache:near
        extrn   enable_l2_cache:near
        extrn   _led_on_8042:byte
        extrn   read_8042_input_port:near
        extrn   kbc_lock:near
        extrn   program_parameters_after_setup:near
        extern  program_peripheral_setup_parameters(dummy_ret):near
        extrn   dummy_ret:near
        extrn   init_gpc_apm:near
        public  adjust_setup
adjust_setup:
        mov     al,q_acpi_os
        call    check_cmos_data
        jz      short as_00             ; not ACPI OS
        or      cgroup:bios_scratch,acpi_aware_os_bit; Bit-5 = 1 -> ACPI OS
as_00:
;  form INT-15 func E820 table information..
        call    form_e820_table         ; form E820 information
;  program setup selected chipset parameters..
        call    program_parameters_after_setup; program chipset setup parameters
;  program setup selected I/O chipset parameters, if any..
        call    program_peripheral_setup_parameters; program I/O setup parameters
;---------------------------------------;
if      MKF_ACPI_SUPPORT
        extrn   rsd_ptr_header:byte
;  build ACPI table
        xor     eax,eax
        mov     si,offset cgroup:rsd_ptr_header
        mov     cs:dword ptr [si],eax   ; clear 'RSD PTR ' signature
        mov     cs:dword ptr [si+4],eax
        test    cgroup:bios_scratch,acpi_aware_os_bit; ACPI OS
        jz      short as_01                     ; not ACPI OS
        push    es
        push    ds
        push    cs
        pop     ds
        xor     si,si
        push    0f000h
        pop     es
        xor     di,di
        xor     cx,cx
        extrn   copy_to_shadow:near
        call    copy_to_shadow
        pop     ds
        pop     es
        extrn   build_acpi_table:near
        call    build_acpi_table        ; ACPI table building
as_01:
endif
;---------------------------------------;
;  program bootup speed..
IF      MKF_TURBO_SWITCH
        and     ds:byte ptr [16h],11011111b; bit-5 = 0..currently high speed
        mov     ah,cgroup:_led_on_8042
        or      ah,ah
        jz      flohi_1                 ; no turbo switch selected
        mov     al,q_turbo_switch
        push    ax
        call    check_cmos_data         ; check setup option
        pop     ax
        jz      flohi_1                 ; setup option says disabled
        or      ds:byte ptr [16h],40h   ; bit-6 = turbo function enabled
        call    kbc_lock                ; lock KBC
        call    read_8042_input_port
        push    ax
        and     ds:byte ptr [16h],7fh   ; bit-7 = current pin status = 0
        and     al,ah
        and     al,01111111b
        jz      flohi_x
        or      ds:byte ptr [16h],80h   ; bit-7 = current pin status = 1
flohi_x:
        pop     ax
        or      ah,ah                   ; in bit-7 = 1 then if pin-x = 1
        js      flohi_0                 ;               then high speed
        not     al                      ; if bit-7 = 0 then if pin-x = 1
flohi_0:                                ;               then low speed
        and     al,ah
        and     al,01111111b
        jz      flohi_2                 ; goto low speed
flohi_1:
ENDIF
;---------------------------------------;
        mov     al,q_bootup_speed
        call    check_cmos_data
        jz      flohi_2
        call    frequency_high
        jmp     short flohi_3
flohi_2:
        call    frequency_low
flohi_3:
        ret
;-----------------------------------------------------------------------;
;               FORCE_NO_OF_SECTORS             ; Moved to NRUNTIME.ASM
;-----------------------------------------------------------------------;
;               GET_HD_STANDBY_VALUE_PM         ; Moved to OEMRUN.ASM
;-----------------------------------------------------------------------;
;               GET_HD_STANDBY_VALUE_PS         ; Moved to OEMRUN.ASM
;-----------------------------------------------------------------------;
;               GET_HD_STANDBY_VALUE_SM         ; Moved to OEMRUN.ASM
;-----------------------------------------------------------------------;
;               GET_HD_STANDBY_VALUE_SS         ; Moved to OEMRUN.ASM
;-----------------------------------------------------------------------;
;               C800_CONTROL_BEFORE             ; Moved to OEMPOST.ASM
;-----------------------------------------------------------------------;
;               C800_CONTROL_AFTER              ; Moved to OEMPOST.ASM
;-----------------------------------------------------------------------;
;                       GET_AUTO_KEY_LOCK_TIME_OUT                      ;
;-----------------------------------------------------------------------;
; check point           : 9B                                            ;
; this routine is called from keyboard controller timer programming. this
; routine will be called if it is not a Green PC. in case of Green PC   ;
; corresponding functionality will be implemented by different timers   ;
; in keyboard controller. if it is not a Green PC, then user can make use
; of this feature to lock the keyboard.                                 ;
; input :                                                               ;
;       SS      0030H                                                   ;
;       DS      0040H                                                   ;
;       ES      0000H                                                   ;
;       stack   available                                               ;
; output:                                                               ;
;       ZR      auto key lock disabled                                  ;
;               AL = 00                                                 ;
;       NZ      auto key lock enabled                                   ;
;               AL = time out value in Minutes                          ;
; register usage : can not destroy any register except AX               ;
;-----------------------------------------------------------------------;
        public  get_auto_key_lock_time_out
get_auto_key_lock_time_out:
        xor     al,al                   ; disabled..AL = 00..ZR
        ret
;  by default auto key lock time out is disabled..
;  if auto key lock time out to be enabled..calculate the time out value from
;  user selection in which case, some setup option must be implemented..if
;  no cmos option is available, some default timing value (5min) must be
;  returned..
;;      mov     al,05h                  ; 5 min
;;      or      al,al                   ; NZ
;;      ret
;-----------------------------------------------------------------------;
;                               INIT_BEFORE_FINIT                       ;
;-----------------------------------------------------------------------;
; check point           : 9B                                            ;
; before co-processor check, if any initialization is required.         ;
; input :                                                               ;
;       SS      0030H                                                   ;
;       DS      0040H                                                   ;
;       ES      0000H                                                   ;
;       stack   available                                               ;
; output:                                                               ;
;       (ZF)    0, check co-proc                                        ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -