Specifications

2012 Advanced Micro Devices, Inc.
Appendix A: Sample Codes for BIOS Workarounds
Page 70
A2. Sample Code for SP5100 Erratum #23: “USB Wake on
Connect/Disconnect with Low Speed Devices”.
(Refer to section 6.2USB Device Support to Wake Up System from S3/S4 State”)
The following workaround should be implemented in the platform BIOS to resolve the issue as described
in the SB7x0 Erratum #23.
This routine has to be put in the Sleep trap function.
USBConnectWorkaround PROC NEAR
; testing for EHCI wake event
;jmp $
pushad
; Enabled Support USB Wake-Up event on Resume only
mov dx, 0cd6h
mov al, 065h
out dx, al
inc dx
in al, dx
or al, BIT6
out dx, al
mov dx, 824h
in ax, dx
or ax, bit11
out dx, ax
; USB wake-up event.
; Enabled EHCI0 & BAR
mov dx, (18 shl 3) + 2 ; EHCI 0
mov ah, 0c4h
call read_pci_dword_far
; Set back to D0 state
and ebx, 0fffffff0h
call write_pci_dword_far
mov ah, 004h ;
call read_pci_dword_far
or ebx, 07h ; Enabled IO/Memory/Bus
call write_pci_dword_far
mov dx, (18 shl 3) + 2 ;
mov ah, 10h ; Get Bar address
call read_pci_dword_far ; in EBX
call USBWorkaroundForConnected
mov dx, (18 shl 3) + 2 ;