From nobody Tue Sep 12 03:42:44 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rl8YM18pJz4tT7w; Tue, 12 Sep 2023 03:42:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rl8YM0l00z4TNL; Tue, 12 Sep 2023 03:42:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694490167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TmvO0nic+5xmz9yxFJwkjE3cOXKg2iuq/p8ebifezCU=; b=LvpBSUMOQSN9FIJH2nQ8qU1QvtrrvsGzVgz4Kkwap2cRpT8IfdqnH7+EB4xRofU8PWiKeb PILiCXKAJhoI6O+SLaOkvX7Aoem56Idtyg4rj25MI/mK9Mj+EValcbXiz+ZGXd8HlrPPU2 mAS2uOm+KDWOLwMsSWJeEAOAvbWxFuWP0+WcO+ZUl/IkpVbwjjJs9uOI5gqDy6ZgULTbve 3E5FZ/imppOrCGqyKnPEG+Ynf3vo98xNSbft0qsOg3NlFFkHV39tS7EhXfFY+fXmIyu8pr KwydNEyBs/EfeKlUedHSs4lrf9nq4bJBiwK0lYG64KVmYFmVFrxEieEBcaO6hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694490167; a=rsa-sha256; cv=none; b=fD2fdHzvJW2thQm5DsAH6FKRInIzfrhDmgiB9JNvh8WaOBseSZ+XjwzTL8bGddCTyWHQyN JHPMFykPylIV8YE/00xdfLNRrafSx/3RLnvZIt6pGwQAXXvQSYF/Jp4mnfLeOkbNrBgk4j rCeDMVNIVoNz0uctHFWbZHFX5Mbx2SQNmfh1eec4UhcKwA9H4cMDRP5Skfa7n7onFHrK0t O3w9/4hEGOelly1vlTSi2rM5SfQAgCPJLCqG1XrPd+ifrWxeaXBxQRtBHhLEKLMEIOcAtl zqDW90OXhjlfk0l7R9b3+F2QK4csiCbsJgKieeRFCAtjVZDK5J1tJp0gC/Dung== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694490167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TmvO0nic+5xmz9yxFJwkjE3cOXKg2iuq/p8ebifezCU=; b=eAh+BIPlyqA2h2kclsa8p3ygC+mW0FghS6gdMW0FyYUc74xOF6m+ljrQEE/qMSKoO3bX59 yr/oHm+L/720UU1XKdrwUFPaVSsEeKAmAa6owAmRiaC5SZSZI+2+/0+wpKI+0NEVsMU3OE pM4fZ0oaEjEGrmhckkuCrUXR4Sg7QVQ25gD6x/QGKqOSvu4n1xJbFHxE6w6+SkASPvNdGv csMvEpOzt/msnnpMOSK0CTNhycHh5fTzlhDlKmX6NP+9sEfQ7gI2+cFh8hcIJptb0TYqVO IAZgFuaIi18hX3s0dS8KhZhhGPWsJa9I/oK5fbGOVgejA43Pi+j0IZwximjujg== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Rl8YL59Qfz1Jtv; Tue, 12 Sep 2023 03:42:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <0250e15b-6703-ecaf-0f54-4e48317af5b0@FreeBSD.org> Date: Mon, 11 Sep 2023 22:42:44 -0500 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: "freebsd-arm@FreeBSD.org" Cc: freebsd-riscv@FreeBSD.org From: Kyle Evans Subject: [RFC] INTRNG support for FIQs Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, As part of the efforts for supporting Apple Silicon hardware, we need to be able to route FIQs to our root interrupt controller. The initial patch we had for this just added an `intr_pic_claim_fiq` that was specific to aarch64, and effectively mirrored intr_pic_claim_root() except recording the root filter/arg off separately. It also enforced that the device handling FIQs is the same that claimed root status. The second iteration patch can again be found here: https://reviews.freebsd.org/D40161 -- there's a small set of unrelated changes specific to aarch64 that will get split out, but I'd like to solicit feedback on the larger INTRNG part of this. This second version instead adds a uint32_t mask of types that can be handled by the root controller. It adds an additional KPI to break that out, and makes the existing `intr_pic_claim_root` call the new KPI with the one reserved (highest) bit that indicates a normal IRQ to preserve source-level compatibility to some extent. `intr_irq_handler` received identical treatment. The high bit was chosen for the reserved type global to all platforms so that platform-specific additions have a harder time getting it wrong -- they just start at the low bit and work their way up. The main problem I think it causes is that `intr_irq_filter_t` is no longer compatible with `driver_filter_t` and they can't be used interchangeably anymore, but I don't really see a way to avoid that. I'm also not sure how much we care. Any feedback would be appreciated; I'd really like to be able to push Apple support further in-tree over the coming months. Thanks, Kyle Evans