From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from BYAPR05CU005.outbound.protection.outlook.com (mail-westusazon11010069.outbound.protection.outlook.com [52.101.85.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA1AD14BFA2; Sat, 25 Oct 2025 00:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.85.69 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761351313; cv=fail; b=JSN52/Ka9yPclHoJGHrEYqvE3RrzleYsCv6Qe0ITybnr6iuQ7yx67DAp9mesH0ca4MdpZmmlFZgPJfobl0BxHCtpTNl1q78T9zZ/gAmwxA9X/BxR9tRLjuYbciWklc5WZKE3dQ8zDJ38lUbmjvUlZ9hL1XbRw9aQU5TUIALFKrM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761351313; c=relaxed/simple; bh=eKGQCenx2eI+k9Ht2ILEG7z/uXsk7BsvgJDuaVL0k6A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=qDQo7z/gH0sAN5sRacZV3yGH+6PgzQ2mO4DEtCt96SSe4kg+mBcLhXDoSNmgUn7ONXMPaa/Ri15KDBPzi6k785C7lPLORK6Loxq/Liry1X0PDinaEbhRKhKi7OhcfDY9Mx/lp7YDsBPRvJcP9kzXolgxrbNlzzauF2bcP/2iXls= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=PBg9mEiy; arc=fail smtp.client-ip=52.101.85.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="PBg9mEiy" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IyqRqI7AsjOXeR0kU8WiuBS0QnPZ6wHlx5LEBY0hkxIhFIYDYZsCtdLodT1W0YwO2VjPUCsgWbD4sS2uZYsDTIW1bg2+crkywAkhoaxVhIvBLxWyhPllXwgdtnP9K0n+fLBtTbPbJiV9rRRE+gytjhfYylThPA4lWaiuC++0jCJe2YT8zFweKyWAjzKyqK7rhae7WYlNnpaOWMhodKr3eK2nLXQsI7q9f+9fobFDW1NArq3+YvB7zYlXcjzpEBfdWVbqqKyAx5zAYQh3PLJn8mEfqT8OTbAbHsrL8g1C1iBAmj/dopq5qvtctkfDAMrJCng8bsMTJK0F0gN9nOORaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=v6Cc9RbDbucBeGnG4e6vYh5qGuZU17+zuIK1xhT6pJI=; b=mdMjHdV4BdqalWOudGChiH0JHAr8fBfRVj5vU6DlYfbf0z/3jQbdGfJjuotTFCyANCFsEQgPtInuDSicja6blMOpiO2QY+c5NaGaRSjsHqfLYPD3BZW7FEUn5M2y94Q3Pqpc8Chh/hh/zKhU+2m8SYkfmo6mvysaVyPa8pISs4GPoVr35yqhWmLkVe25yDqlEJZFTY4sYA6w0sKQUMtsVqtQ2+owBN3Y4xxZUFS7NG+w69rVdlSjE8jVXQ1v3niRzrOTn+nvLiwWpIdMiPLINoNGOvceP/uIAzjIum9GdnXDYKZbM9k4o8XgboBLWWzuoI9fz4azaNmV6Yt41AxmHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v6Cc9RbDbucBeGnG4e6vYh5qGuZU17+zuIK1xhT6pJI=; b=PBg9mEiym77b2O4rgMNy5pW/WgC10GkC/SiahGwIpUeXlGZ489TW43jKZZyihtFnakqjuxCQ8Cba+df2mUK96fpS1L53ArkBE5ayQQRcaxAdJhR5Io2FiFCiNLo/210X7d/9yiSqD3oAzvSgxJXbbaLLE70tJDiL6JeRs1UP4FzDEMw2gImyE3wZfb2/93TY/wf2GF1+WRcPCUmjfeyVBxmjasG6DGyGAlvtJx7IgaylJKNGzOoQnkKYMyAETUJACcUNP7DV4fohrDbIN9Gc4hFDfWdbj6ahM5aBI8ij+MW8xKmB7lipSJbPwRQ7xZyS9z5iKD6aWqzobvhUIe6tUQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4116.namprd12.prod.outlook.com (2603:10b6:a03:210::13) by CH3PR12MB9313.namprd12.prod.outlook.com (2603:10b6:610:1ca::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9253.13; Sat, 25 Oct 2025 00:15:03 +0000 Received: from BY5PR12MB4116.namprd12.prod.outlook.com ([fe80::81b6:1af8:921b:3fb4]) by BY5PR12MB4116.namprd12.prod.outlook.com ([fe80::81b6:1af8:921b:3fb4%4]) with mapi id 15.20.9253.011; Sat, 25 Oct 2025 00:15:03 +0000 From: John Hubbard To: Danilo Krummrich Cc: Alexandre Courbot , Joel Fernandes , Timur Tabi , Alistair Popple , Edwin Peer , Zhi Wang , David Airlie , Simona Vetter , Bjorn Helgaas , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , nouveau@lists.freedesktop.org, rust-for-linux@vger.kernel.org, LKML , John Hubbard Subject: [PATCH 2/2] gpu: nova: add boot42 support for next-gen GPUs Date: Fri, 24 Oct 2025 17:14:59 -0700 Message-ID: <20251025001459.491983-3-jhubbard@nvidia.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251025001459.491983-1-jhubbard@nvidia.com> References: <20251025001459.491983-1-jhubbard@nvidia.com> X-NVConfidentiality: public Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0048.namprd13.prod.outlook.com (2603:10b6:a03:2c2::23) To BY5PR12MB4116.namprd12.prod.outlook.com (2603:10b6:a03:210::13) Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4116:EE_|CH3PR12MB9313:EE_ X-MS-Office365-Filtering-Correlation-Id: fc5896a8-504d-4f1c-bc39-08de135b8b80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?/WQe+fm3DHFPhDmrLjPqrq3lG+yBRAF3YMU7cv/uhzYPeOHDKjTkbAK1YwDp?= =?us-ascii?Q?lbA8bNI7x3Rdan24VJsYXB1afSOSw3IXG3vu1R8jIU6GfoKmF1EAmddRtklq?= =?us-ascii?Q?DRIkGwAFQ26GKElvqa1jzmb/O2rvh/bu17/0YxqxyR4zIvPi4+WPoOy9qfAw?= =?us-ascii?Q?lPQYC/kLFgkYohk0DgoPREhJGqvioMT1dzjL8G1bB+X5bhYvDYuJ4tJo31dr?= =?us-ascii?Q?UCe5BuL8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?= =?us-ascii?Q?UHPikmVtM01mz6aPjj7ylSVlHqw5ji/tcmB4qDztAlQMRCKooUTfsuZ6c1gW?= =?us-ascii?Q?4Ax/mAtTnHIgecmAgK19yPCmGZBa8qz/7VkP3q6BNtCKNX7v0WX7NTOBX2pK?= =?us-ascii?Q?PNemWz+k8wENkhZYpMlqteE1mTAWA9t41Wyr6eIMPCdHBJMuR9azfTFYMjlx?= =?us-ascii?Q?oOQELg2n0wqWTK4inV5bxUjvaRElXYcnKiabmLgaZkszyFAC1mS66ttlY1sj?= =?us-ascii?Q?2KIALaKApM5m2TSUPAcpmRr6f1rNs7Ur5uroaBaGIAB45A/sVjgr9Eg1WAMj?= =?us-ascii?Q?3H43qTdl1Hmrh0Do+8I05uSfKAOMsQ/U?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB4116.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?TPLghsGNxr5JsHmSDvoQu32p2DXgId9kKEvldm7krdjtSdKcAAV5GjyeYT/g?= =?us-ascii?Q?Hb5mLeoJ2GRse1H1u/olaYRZJsp4vpmn3pWM0SWQIk2S+R+kgitFLg1LJtcl?= =?us-ascii?Q?R7lR7C8Mp+NvjvxFE32mvxkoJ5kbxew5/FkDOi6R8e8omhnLgWrFFX2zOfM3?= =?us-ascii?Q?d/rFu9YmpxJr34hkS1uQvVRmY8qZ9r241dvUbUlfE5vTfeznpT43RswgBuIg?= =?us-ascii?Q?HSOitW11AbWg2ZzoeoOpSz9LBNsHqq+jKGKykZ0uoZxUqPq7E6RXPFviLfl+?= =?us-ascii?Q?PX0MiRJMTf0Rk0kWiWG8rkfXLjYkhpNujpMw2FGKT1ORJp7PWKCZ2U6rkd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rL/DsyhJT6aL8XdD0BpIAjlX?= =?us-ascii?Q?4XO6W9oHJ3XLYewuuR4jsn/Qvx6u1HHRd6XnYepw3v5kwaOa5nAhe3CgywQg?= =?us-ascii?Q?a2h2CmFZXVt7JektGH8QwdEoOjLVOAsyPpTcEXVS5T9E8llOn/Nzl9JTeL6h?= =?us-ascii?Q?8yID7mfQ2PwNIsA39NYoFclUDE042GKl0ImvmYkONv2N3FNzBlExOrU6tx2C?= =?us-ascii?Q?MCvvvOd/2L4XYFw+KSNvL6nO1ObSGwHnMKS1czuJKAOBtvgv9JNWFBqYbc3M?= =?us-ascii?Q?U22hYuqp2upsT6s+bBLHnTwIydxJIYf/BFsEXvh8XRnFk/Fz0TySttVgocEB?= =?us-ascii?Q?Yed2La7y6tQp/yXBuKFSoRnbQy4iIj3WgZAdB8s3?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc5896a8-504d-4f1c-bc39-08de135b8b80 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4116.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2025 00:15:03.8078 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 60/Zfn/m6F1m2kQSfnVB1tqB5US/XW0+BaF/2cCs2wvSVE8r+XRr4JnHxu8Ea+TUXg3UVg5px3LTNvSWp/jskg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9313 NVIDIA GPUs are moving away from using NV_PMC_BOOT_0 to contain architecture and revision details, and will instead use NV_PMC_BOOT_42 in the future. NV_PMC_BOOT_0 will be zeroed out. Change the selection logic in Nova so that it will claim Turing and later GPUs. This will work for the foreseeable future, without any further code changes here, because all NVIDIA GPUs are considered, from the oldest supported on Linux (NV04), through the future GPUs. Add some comment documentation to explain, chronologically, how boot0 and boot42 change with the GPU eras, and how that affects the selection logic. Signed-off-by: John Hubbard --- drivers/gpu/nova-core/gpu.rs | 69 +++++++++++++++++++++++++++++++---- drivers/gpu/nova-core/regs.rs | 28 ++++++++++++++ 2 files changed, 89 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs index a8a993424771..a00036721247 100644 --- a/drivers/gpu/nova-core/gpu.rs +++ b/drivers/gpu/nova-core/gpu.rs @@ -155,16 +155,67 @@ pub(crate) fn new<'a>( ) -> impl PinInit + 'a { let boot0 = regs::NV_PMC_BOOT_0::read(bar); + // "next-gen" GPUs (some time after Blackwell) will zero out boot0, and put the architecture + // details in boot42 instead. Avoid reading boot42 unless we are in that case. + let boot42 = if boot0.is_next_gen() { + Some(regs::NV_PMC_BOOT_42::read(bar)) + } else { + None + }; + try_pin_init!(Self { chipset: { - let chipset = boot0.chipset()?; + // Some brief notes about boot0 and boot42, in chronological order: + // + // NV04 through Volta: + // + // Not supported by Nova. boot0 is necessary and sufficient to identify these + // GPUs. boot42 may not even exist on some of these GPUs. + // + // Turing through Blackwell: + // + // Supported by both Nouveau and Nova. boot0 is still necessary and sufficient + // to identify these GPUs. boot42 exists on these GPUs but we don't need to use + // it. + // + // Future "next-gen" GPUs: + // + // Only supported by Nova. Boot42 has the architecture details, boot0 is zeroed + // out. + + // NV04, the very first NVIDIA GPU to be supported on Linux, is identified by a + // specific bit pattern in boot0. Although Nova does not support NV04 (see above), + // it is possible to confuse NV04 with a "next-gen" GPU. Therefore, return early if + // we specifically detect NV04, thus simplifying the remaining selection logic. + if boot0.is_nv04() { + Err(ENODEV)? + } + + // Now that we know it is something more recent than NV04, use boot42 if we + // previously determined that boot42 was both valid and relevant, and boot0 + // otherwise. + let (chipset, major_rev, minor_rev) = if let Some(boot42) = boot42 { + ( + boot42.chipset()?, + boot42.major_revision(), + boot42.minor_revision(), + ) + } else { + // Current/older GPU: use BOOT0 + ( + boot0.chipset()?, + boot0.major_revision(), + boot0.minor_revision(), + ) + }; + dev_info!( pdev.as_ref(), "NVIDIA (Chipset: {}, Architecture: {:?}, Revision: {:x}.{:x})\n", chipset, chipset.arch(), - boot0.major_revision(), - boot0.minor_revision() + major_rev, + minor_rev ); chipset }, @@ -175,21 +226,23 @@ pub(crate) fn new<'a>( .inspect_err(|_| dev_err!(pdev.as_ref(), "GFW boot did not complete"))?; }, - sysmem_flush: SysmemFlush::register(pdev.as_ref(), bar, boot0.chipset()?)?, + sysmem_flush: SysmemFlush::register(pdev.as_ref(), bar, *chipset)?, gsp_falcon: Falcon::new( pdev.as_ref(), - boot0.chipset()?, + *chipset, bar, - boot0.chipset()? > Chipset::GA100, + *chipset > Chipset::GA100, ) .inspect(|falcon| falcon.clear_swgen0_intr(bar))?, - sec2_falcon: Falcon::new(pdev.as_ref(), boot0.chipset()?, bar, true)?, + sec2_falcon: Falcon::new(pdev.as_ref(), *chipset, bar, true)?, gsp <- Gsp::new(), - _: { gsp.boot(pdev, bar, boot0.chipset()?, gsp_falcon, sec2_falcon)? }, + _: { + gsp.boot(pdev, bar, *chipset, gsp_falcon, sec2_falcon)? + }, bar: devres_bar, }) diff --git a/drivers/gpu/nova-core/regs.rs b/drivers/gpu/nova-core/regs.rs index 206dab2e1335..bcd0834c500b 100644 --- a/drivers/gpu/nova-core/regs.rs +++ b/drivers/gpu/nova-core/regs.rs @@ -25,6 +25,19 @@ }); impl NV_PMC_BOOT_0 { + pub(crate) fn is_nv04(self) -> bool { + // The very first supported GPU was NV04, and it is identified by a specific bit pattern in + // boot0. This provides a way to check for that, which in turn is required in order to avoid + // confusing future "next-gen" GPUs with NV04. + self.architecture_0() == 0 && (self.0 & 0xff00fff0) == 0x20004000 + } + + pub(crate) fn is_next_gen(self) -> bool { + // "next-gen" GPUs (some time after Blackwell) will set `architecture_0` to 0, and put the + // architecture details in boot42 instead. + self.architecture_0() == 0 && !self.is_nv04() + } + /// Combines `architecture_0` and `architecture_1` to obtain the architecture of the chip. pub(crate) fn architecture(self) -> Result { Architecture::try_from( @@ -43,6 +56,21 @@ pub(crate) fn chipset(self) -> Result { } } +register!(NV_PMC_BOOT_42 @ 0x00000108, "Extended architecture information" { + 7:0 implementation as u8, "Implementation version of the architecture"; + 15:8 architecture as u8, "Architecture value"; + 19:16 minor_revision as u8, "Minor revision of the chip"; + 23:20 major_revision as u8, "Major revision of the chip"; +}); + +impl NV_PMC_BOOT_42 { + pub(crate) fn chipset(self) -> Result { + let arch = Architecture::try_from(self.architecture())?; + let chipset_value = ((arch as u32) << 8) | u32::from(self.implementation()); + Chipset::try_from(chipset_value) + } +} + // PBUS register!(NV_PBUS_SW_SCRATCH @ 0x00001400[64] {}); -- 2.51.1