By Angel07 , 7 November 2005
Здравствуйте!

У меня относительно общий вопрос насчет материнок socket7 с AMI BIOS-ами. Читал статью по поводу "ручной" правки проблемы >32Gb в Award BIOS. А есть ли какая-нибудь аналогичная информация по AMI BIOSам? А также общая инфа по их структуре, модулям и т.д.

Насколько я понимаю, баг существует в каком-то из модулей AMI BIOS или в нескольких. Насколько я помню (хотя не уверен!) - это модуль int13? А можно ли исправить BIOS, "вытащив" этот модуль из BIOS аналогичной версии другой MB, в которой такой баг отсутствует, и заменив его в проблемном? Или он зависит от платы-чипсета?
The content of this field is kept private and will not be shown publicly.

BBCode

  • No HTML tags allowed.
  • You may use the following BBCode tags:
    • [align]
    • [b]
    • [code]
    • [color]
    • [font]
    • [hr]
    • [i]
    • [img]
    • [list]
    • [quote]
    • [s]
    • [size]
    • [spoiler]
    • [sub]
    • [sup]
    • [table]
    • [u]
    • [url]
  • Web page addresses and email addresses turn into links automatically.
[code:1];search for 32g-bug in orig

BK
vyvod msg_3
assume ds, [cs:orig_0]

mov si, 0
mov bp, 0
.next_32g_orig:
cmp si, 0fff0h
jb @F

.not_32g:
jmp .skip_32g_orig
@@:
inc si

cmp dword [ds:si], 066207453h ;'push bx'/'je xxxx'
jne .next_32g_orig ;'push eax'
;...
cmp dword [ds:si+36], 0024f8b26h ;'mov cx,es:[bx][00002]'
jne .next_32g_orig

;store 32g-orig
mov bp, si
.skip_32g_orig:

push bp

;open "0d_i13h.tmp" to [cs:orig_1]
open_file name_0d_i13h_tmp, [cs:id_0d_i13h_tmp], msg_open_1_bin
size_file name_0d_i13h_tmp ;result in EAX
mov [cs:length_0d_i13h_tmp], ax
read_file [cs:id_0d_i13h_tmp], [cs:orig_1], 0, [cs:length_0d_i13h_tmp]

pop bp

;search for 32g-bug
assume ds, [cs:orig_1]
mov si, 0
mov di, 0
.next_32g:
cmp si, [cs:length_0d_i13h_tmp] ;0fff0h
jb @F

jmp .skip_32g
@@:
inc si

cmp dword [ds:si], 066207453h ;'push bx'/'je xxxx'
jne .next_32g ;'push eax'
;...
cmp dword [ds:si+36], 0024f8b26h ;'mov cx,es:[bx][00002]'
jne .next_32g

cmp bp, 0
je @F

mov di, si

.skip_32g:

;;poka - SKIP!!!! - neskolko vyzovov bl=0d.... ->???
; mov di, 0

;check - found 32g-problem in any area? (orig or i13h)
mov ax, 0
or ax, bp
or ax, di
cmp ax, 0
je .not32g_bug ;0 = not found

;store 32g-sub
mov_bottom_data _AMI32G, length__AMI32G

;current [cs:bottom_data_codes] = enter point for 'jmp'
mov si, _call__AMI32G
assume [cs:si+1], [cs:bottom_data_codes]


cmp bp, 0 ;found in orig?
je .not_32g_in_orig

off_tbl 50h, bp, _call__AMI32G, length__call__AMI32G
.not_32g_in_orig:

cmp di, 0 ;found in int13h?
je .not_32g_in_int13h

mov bp, di
off_tbl_6000_ami 0dh, bp, _call__AMI32G, length__call__AMI32G
.not_32g_in_int13h:

vyvod msg_fixed
jmp .kon_32g

.not32g_bug:

vyvod msg_not_found
.kon_32g:
[/code:1]
[code:1]_AMI32G:
;put on place "push bx" - in new i13h BX not changed -> havn`t to do "push"
;old 13h-bug = 40bytes

;Word (50:49): Capabilities

;Word (61:60): Total number of user addressable sectors

;Words (84:82): Features/command sets supported
;Words (84:82) shall indicate features/command sets supported. If a defined bit is cleared to zero, the indicated
;features/command set is not supported. If bit 14 of word 83 is set to one and bit 15 of word 83 is cleared to
;zero, the contents of words (83:82) contain valid support information. If not, support information is not valid in
;these words. If bit 14 of word 84 is set to one and bit 15 of word 84 is cleared to zero, the contents of word 84
;contains valid support information. If not, support information is not valid in this word.

;If bit 10 of word 83 is set to one, the 48-bit Address feature set is supported.

;Words (87:85): Features/command sets enabled
;If bit 10 of word 86 is set to one, the 48-bit Address feature set is supported.

;Words (103:100): Maximum user LBA for 48-bit Address feature set
jz .skip

push eax
cmp eax, 66059280 ;32Gb = 03EFFC10h
jbe .small

mov byte [es:bx+0Ch], 0FFh ;Heads

cmp eax, 267382800 ;128Gb = 0FEFF010h
jbe .small

mov byte [es:bx+6], 16 ;FFh ;Sectors
mov cx, 65535 ;Cylinders
pop eax
jmp .exit

.small:
mov al, [es:bx+0Ch] ;Heads
mul byte [es:bx+6] ;Sectors
mov cx, ax ;CX=H*S

pop ax ;low count sectors
pop dx ;high count sectors
div cx ;/(H*S)

shr cx, 1 ;(H*S)/2
cmp dx, cx
jb @F
inc ax
@@:
mov cx, ax ;=Cylinders
jmp .exit

.skip:
mov cx, [es:bx+2] ;=Cylinders
.exit:
retf

length__AMI32G = $ - _AMI32G


_call__AMI32G:
call 0F000h:3232h
jmp $+35
length__call__AMI32G = $ - _call__AMI32G[/code:1]
apple_rom
Огромнейшее Вам спасибо !! :-)
Буду пробовать.
apple_rom
Можно вопрос - а что за модуль orig, в котором наряду с int13 у Вас ищется ошибка 32G?

Добавлено спустя 51 минуту 53 секунды:

И еще вопрос (если не секрет, конечно) - что конкретно делают макросы mov_bottom_data и off_tbl?

Извините, если замучал... :-)
Еще раз спасибо, вроде разобрался что к чему.
В своем BIOS для TX-100 (которая пропатченная почему-то виснет) я нашел ошибочный код в двух модулях - int13 и runtime (02). Попробовал их изменить следующим образом: дописал Ваш исправленный код _AMI32G в конец каждого из этих модулей и сделал так, чтобы этот код исполнялся вместо "калеченых" 40-байт оригинала. Правда, не дальним вызовом ПП, как у Вас, а ближним (соответственно, в ПП заменил retf на retn).

Все поставил в BIOS на место, прописал "адрес загрузки" для модуля runtime.

На выходных попробую. Очень надеюсь, что никакого ляпсуса не допустил (благо ассемблером в последний раз занимался лет 5 назад).