回复:[PATCH v5 net-next 03/11] net/nebula-matrix: add chip related definitions

From: Illusion Wang

Date: Mon Mar 02 2026 - 03:02:50 EST



> > +static u32 nbl_sec046_1p_data[] = {
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xa0000000,
> > + 0x00077c2b, 0x005c0000, 0x00000000, 0x00008100, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x20000000, 0x00073029, 0x00480000,
> > + 0x00000000, 0x00008100, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x20000000, 0x00073029, 0x00480000, 0x70000000, 0x00000020,
> > + 0x24140000, 0x00000020, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xa0000000,
> > + 0x00000009, 0x00000000, 0x00000000, 0x00002100, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0xb0000000, 0x00000009, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x70000000, 0x00000000, 0x20140000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x70000000, 0x00000000,
> > + 0x20140000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x38430000, 0x70000006, 0x00000020, 0x24140000, 0x00000020,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x98cb1180, 0x6e36d469, 0x9d8eb91c, 0x87e3ef47, 0xa2931288, 0x08405c5a,
> > + 0x73865086, 0x00000080, 0x30140000, 0x00000080, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0xb0000000, 0x000b3849, 0x38430000, 0x00000006, 0x0000c100,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xb0000000,
> > + 0x00133889, 0x08400000, 0x03865086, 0x4c016100, 0x00000014, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > + 0x00000000, 0x00000000, 0x00000000, 0x00000000,
> > +}

>What is all this data? How big is the object file created from this?

>Should it be const?

>Could it be marked __initdata? Or moved into firmware files?

 >     Andrew


Thank you for your feedback.
These data are used to configure P4-related registers. The driver’s functionality

depends heavily on these register settings. They will be declared as const.

But they can be marked __initdata. Because it will be called by pci_driver.probe.

They also should not be moved into firmware files, as the software functionality

is tightly coupled with these configurations. If they were moved to firmware,

users could easily end up with mismatched versions of the firmware and the kernel

driver module, leading to functional inconsistencies or system malfunctions.
illusion.wang