From owner-freebsd-hackers@freebsd.org Sun Oct 9 11:42:20 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E657FC079E1 for ; Sun, 9 Oct 2016 11:42:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 42AE3F6F for ; Sun, 9 Oct 2016 11:42:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA15925 for ; Sun, 09 Oct 2016 14:42:17 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1btCUj-000DuQ-J1 for freebsd-hackers@FreeBSD.org; Sun, 09 Oct 2016 14:42:17 +0300 To: FreeBSD Hackers From: Andriy Gapon Subject: I/O-APIC redirection table on AMD chipsets Message-ID: <95ddd0c4-b001-e15e-75cc-79d69dca0518@FreeBSD.org> Date: Sun, 9 Oct 2016 14:41:21 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Oct 2016 11:42:21 -0000 I just want to share a small discovery. For AMD SB7x0 and SB8x0 southbridges (and maybe the newer chipsets too) the Delivery Mode bits in the IO-APIC redirection table MUST be programmed according to the HyperTransport specification, NOT the APIC specification and chipset documentations. For example, for NMIs the delivery mode has to be set to 3 (011b). BTW, the HyperTransport specification says that the destination ID should be 0xff (broadcast) for the NMI type, but in my tests it can be an individual APIC ID as well. Fixed, Lowest Priority and SMI modes have the same encoding in both specification. That explains why this peculiarity is not well known. Refer to Appendix F.1 of the HyperTransport 3.0 Specification for x86 interrupt delivery modes. -- Andriy Gapon