;	[]===========================================================[]
;
;	NOTICE: THIS PROGRAM BELONGS TO AWARD SOFTWARE INTERNATIONAL(R)
;	        INC. IT IS CONSIDERED A TRADE SECRET AND IS NOT TO BE 	
;	        DIVULGED OR USED BY PARTIES WHO HAVE NOT RECEIVED	
;	        WRITTEN AUTHORIZATION FROM THE OWNER.
;
; 	[]===========================================================[]
;

;		PAGE	60,132
;		TITLE	NETPCTBL
;----------------------------------------------------------------------------
;Rev	Date	 Name	Description
;----------------------------------------------------------------------------
;R00	10/16/97 Stv	Initial Revision for support net pc lan boot

.386P

    INCLUDE BIOS.CFG

ifdef   NET_PC_SUPPORT

DGROUP  GROUP  FCODE
FCODE   SEGMENT USE16 PARA PUBLIC 'CODE'
	ASSUME  CS:DGROUP

		align	16
		public	SYSID_BIOS_Struct_Table
SYSID_BIOS_Struct_Table:
		db	'_SYSID_'		;header/type
		db	0			;checksum of the SYSID BIOS entry point structure
		dw	SYSID_BIOS_Struct_LEN	;total length of SYSID BIOS structure table(set to 011h)
		dw	offset UUID_Struct_format ;32-bit physical address (offset)
		dw	0fh			;segment
		dw	02h			;Total number of structures in the SYSID BIOS structure table
		db	0			;Revision of the SYSID BIOS extensions
SYSID_BIOS_Struct_LEN	equ	$-offset SYSID_BIOS_Struct_Table

;---------------------------------------------------------------------------
		public	UUID_Struct_format
UUID_Struct_format:
		db	'_UUID_'		;header/type
		db	0			;checksum of the UUID BIOS structure
		dw	UUID_Struct_LEN		;total length of SYSID BIOS structure (set to 019h)
		db	01Ch  			;---- Actual UUID data(Initially set all bytes to FFH)
		db	0E6h			;length 16 bytes
		db	0Fh
		db	23h
		db	26h
		db	0Ch
		db	11h
		db	01h
		db	86h
		db	0Fh
		db	00h
		db	0A0h
		db	0C9h
		db	68h
		db	13h
		db	3dh			;------------
UUID_Struct_LEN	equ	$-offset UUID_Struct_format

;---------------------------------------------------------------------------
		public	E1394ID_Struct_format
E1394ID_Struct_format:
		db	'_1394_'		;header/type
		db	0			;checksum of the 1394 BIOS structure
		dw	E1394ID_Struct_LEN 	;total length of 1394 BIOS structure (set to 011h)
		db	8 dup(0FFH)		;Actual 1394 ID data (Initially set all bytes to FFH)
E1394ID_Struct_LEN	equ	$-offset E1394ID_Struct_format

FCODE    	ENDS

EGROUP		GROUP	ECODE
ECODE		SEGMENT USE16 PARA PUBLIC 'ECODE'
		ASSUME	CS:EGROUP

;----------------------- checksum -------------
SYSID_table_offset:
		dw	offset	SYSID_BIOS_Struct_Table
		db	SYSID_BIOS_Struct_LEN
		db	7			;checksum byte offset
		dw	offset	UUID_Struct_format
		db	UUID_Struct_LEN
		db	6			;checksum byte offset
		dw	offset E1394ID_Struct_format
		db	E1394ID_Struct_LEN
		db	6			;checksum byte offset
SYSID_table_end	label	near

		public	Store_SYSID_to_Shadow
Store_SYSID_to_Shadow proc near

		push	es				;store register to stack
		pusha
		push	dgroup
		pop	es

;------Checksum SYSID BIOS-------------

		lea	di,SYSID_table_offset		;point DI to SYSID_table_offset
ChkSum_SYSID_Loop:
		mov	bx,cs:[di]			;Get each structure offset
		movzx	cx,byte ptr cs:[di+2]		;Get struc length
		movzx	si,byte ptr cs:[di+3]		;Get struc checksum offset
		xor	al,al				;init AL for checksum
		mov	es:[bx+si],al			;clear struc checksum value
		push	bx				;store struc start offset for set checksum value
@@:
		add	al,es:[bx]			;checksum
		inc	bx				;next byte
		loop	@B
		not	al				;calculate to two's complement based checksum
		inc	al				;----
		pop	bx				;restore struc start offset
		mov	es:[bx+si],al			;set checksum value to struc

		add	di,4				;point to next struc
		cmp	di,offset SYSID_table_end
		jne	short ChkSum_SYSID_Loop

		popa
		pop	es

		ret
Store_SYSID_to_Shadow endp
;------------------------------------------------

ECODE    	ENDS
endif;   NET_PC_SUPPORT

		END
