AMD SB600 Specifications Page 59

  • Download
  • Add to my manuals
  • Print
  • Page
    / 98
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 58
©
2008 Advanced Micro Devices Inc.
Sample Programs
AMD SB600 BIOS Developer’s Guide (Public Version) Proprietary
Page 59
2. Write to the same SATA device registers (9h, 0Ah, 0Bh) with the class ID.
3. Disable header write: Clear the SATA device register 40h, bit 0 to 0.
Sample Program:
This sample program will set SATA-1, Bus 0, Device 12h, Function 0 to class code for IDE class
01018Fh.
SataClassIdSampleProgram proc near
push eax ; Save registers used by this routine
push dx
; Enable header write. Set register 40h, bit 0 to 1
mov dx,0CF8h ; To access PCI configuration space
mov eax, 80009040h ; SATA-1, Bus 0, Device 12h, Function 0, reg 40h
out dx,eax
mov dx,CFCh ; To access register 40h
in al,dx ; Current register 40h value
or al,01h
out dx,al
; Write class code. Register 08 is read only and will not be modified
mov dx,0CF8h ; To access PCI configuration space
mov eax,80009008h ; Bus 0, Device 12h, Function 0 , register 08h
out dx,eax
mov dx,0CFCh ; To access dword at starting at register 08h
mov eax,01018F00h ; Reg 08 is read only. Reg 9-0b will be written
out dx,eax
; Disable header write. Clear register 40h, bit 0 to 0
mov dx,0CF8h ; To access PCI configuration space
mov eax, 80009040h ; SATA-1, Bus 0, Device 12h, Function 0, reg 40h
out dx,eax
mov dx,0CFCh ; To access register 40h
in al,dx ; Current register 40h value
and al,0FEh
out dx,al
pop dx ; Restore registers used by this routine
Page view 58
1 2 ... 54 55 56 57 58 59 60 61 62 63 64 ... 97 98

Comments to this Manuals

No comments