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

📄 pamd.inc

📁 <BIOS研发技术剖析>书的源代码,包括完整的BIOS汇编语言源程序.
💻 INC
字号:
;-----------------------------------------------------------------------------;
;
; AMD POST routines
;
;-----------------------------------------------------------------------------;
; AMD P-Rating
;-----------------------------------------------------------------------------;
; Input:
;	DX	0
; Output:
;	DL	bit 0 = 1 Clock is PRxxx
;		bit 1 = 1 Append Clock to CPU string
;		bit 2 = 1 Don't display clock at checkpoint AA
;	DS:SI	offset of prating table if DL.3=0
;		bit 3 = 1 Get prating value directly from DS:SI
;	DH	ASCII charactor to be append
;		0 = nothing appended
;	CY	no prating
;-----------------------------------------------------------------------------;
if (CPU_586)
;-----------------------------------------------;
amd_m0_pr_tbl:
		dw	4

		vPRATINGSTRUC	{ 66,	75  }
		vPRATINGSTRUC	{ 75,	75  }
;		vPRATINGSTRUC	{ 83,	90  }
		vPRATINGSTRUC	{ 90,	90  }
		vPRATINGSTRUC	{ 200,	100 }	; 100Mhz, <=200
;-----------------------------------------------;
amd_m1_pr_tbl:
		dw	6

		vPRATINGSTRUC	{ 75, 	100 }
;		vPRATINGSTRUC	{ 83, 	100 }
		vPRATINGSTRUC	{ 90, 	120 }
		vPRATINGSTRUC	{ 100,	133 }
		vPRATINGSTRUC	{ 105,	150 }	; 60*1.75 model 2
		vPRATINGSTRUC	{ 117,	166 }	; 66*1.75 model 2
		vPRATINGSTRUC	{ 200,	200 }	; model 3: 133Mhz, <=200
endif;	if (CPU_586)

;-----------------------------------------------;
if (CPU_486)
amd_x5_pr_tbl:
		dw	3

		vPRATINGSTRUC	{ 133,	75 }
		vPRATINGSTRUC	{ 150,	75 }	; '75+'
		vPRATINGSTRUC	{ 160,	90 }
;amd_x5_def_pr:
;		db	'90  '
endif;	if (CPU_486)

;-----------------------------------------------;
amd_prating	proc
if (CPU_586)
	mov	al,byte ptr cpu_resetid
	and	al,0f0h			; skip stepping info
	mov	dl,2			; CPU string with xxx
					; (CPU0020)>>
;	mov	si,offset amd_k6_pr_tbl
	cmp	al,60h			; K6 ?
;					; (CPU0010)>
;;	jz	put_prating		; no PR for K6 cpu
;	jae	put_prating		; no PR for K6 cpu
;					; <(CPU0010)
	jb	not_k6
	push	cs			; DS = CS
	pop	ds
	mov	si,offset cgroup:word ptr cpu_freq; DS:SI = pointed to detected CPU frequency
	or	dl,08h			; bit3=1, get prating value directly from DS:SI
	jmp	short ap_exit
not_k6:
					; <<(CPU0020)
					; (CPU0008)>
if (MKF_CUSTOMER eq 1223)
	mov	dl,2			; CPU string with xxx
else
	mov	dl,1			; Clock = PRxxx
endif
					; <(CPU0008)
	mov	si,offset amd_m0_pr_tbl
	or	al,al			; Model# = 0 ?
	jz	put_prating
	mov	si,offset amd_m1_pr_tbl

put_prating:
	clc
endif;	if (CPU_586)
;---------------------------------------;
if (CPU_486)
	cmp	cgroup:word ptr cpu_freq,150; 150 MHz ?
	jne	not_75_plus
	mov	dh,'+'			; PR75+
not_75_plus:
	mov	dl,2			; CPU string with xxx
	mov	si,offset amd_x5_pr_tbl
	clc
endif;	if (CPU_486)
;---------------------------------------;
ap_exit:
	ret
amd_prating	endp


;

⌨️ 快捷键说明

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