On 7/18/25 12:26 AM, Alexandre Courbot wrote:
...
diff --git a/drivers/gpu/nova-core/falcon/gsp.rs 
b/drivers/gpu/nova-core/falcon/gsp.rs
index 
0db9f94036a6a7ced5a461aec2cff2ce246a5e0e..f17599cb49fa1e5077a554dc14b3715aa62a4ebd
 100644
--- a/drivers/gpu/nova-core/falcon/gsp.rs
+++ b/drivers/gpu/nova-core/falcon/gsp.rs
@@ -2,7 +2,7 @@
use crate::{
      driver::Bar0,
-    falcon::{Falcon, FalconEngine, PFalconBase},
+    falcon::{Falcon, FalconEngine, PFalcon2Base, PFalconBase},
      regs::{self, macros::RegisterBase},
  };
@@ -13,6 +13,10 @@ impl RegisterBase<PFalconBase> for Gsp {
      const BASE: usize = 0x00110000;

This approach means that the reference manual values such as these, end
up being scattered throughout the code base, as magic numbers.

I'm thinking that there should be no problem with using a symbol from
the manuals, listed in a common area, instead, right?

  }
+impl RegisterBase<PFalcon2Base> for Gsp {
+    const BASE: usize = 0x00111000;
+}
+
  impl FalconEngine for Gsp {
      const ID: Self = Gsp(());
  }
diff --git a/drivers/gpu/nova-core/falcon/sec2.rs 
b/drivers/gpu/nova-core/falcon/sec2.rs
index 
dbc486a712ffce30efa3a4264b0757974962302e..815786c8480db6cb74541d7ab574112baeb816fe
 100644
--- a/drivers/gpu/nova-core/falcon/sec2.rs
+++ b/drivers/gpu/nova-core/falcon/sec2.rs
@@ -1,6 +1,6 @@
  // SPDX-License-Identifier: GPL-2.0
-use crate::falcon::{FalconEngine, PFalconBase};
+use crate::falcon::{FalconEngine, PFalcon2Base, PFalconBase};
  use crate::regs::macros::RegisterBase;
/// Type specifying the `Sec2` falcon engine. Cannot be instantiated.
@@ -10,6 +10,10 @@ impl RegisterBase<PFalconBase> for Sec2 {
      const BASE: usize = 0x00840000;
  }
+impl RegisterBase<PFalcon2Base> for Sec2 {
+    const BASE: usize = 0x00841000;
+}

Here are a re more examples of that.


thanks,
--
John Hubbard

Reply via email to