Re: [PATCH] riscv: mpfs: Read and store FPGA design information on MPFS hardware.
Nathan Whitehorn <[email protected]>
| Newsgroups | gmane.comp.boot-loaders.u-boot |
|---|---|
| Message-ID | <d2b8767d-068d-476d-ab8c-3a8290ab35c0__39935.6989002385$1786990656$gmane$org@pa.msu.edu> |
On 8/17/26 12:22, [email protected] wrote: > On 17/08/2026 15:32, Nathan Whitehorn wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >> >> On 8/16/26 06:25, Tim Ouyang wrote: >>> On Fri, Jul 24, 2026 at 01:33:50PM -0400, Nathan Whitehorn wrote: >>>> + designid[32] = 0; >>>> + for (idx = 0; idx < 16; idx++) >>>> + sprintf(&serialstring[2*idx], "%02x", device_serial_number[idx]); >>> The variable serialstring may not be properly null‑terminated. >>> >>>> + if (env_get("pf_design_ver") != NULL) >>>> + fdt_setprop(blob, node, "fpga-design-version", env_get("pf_design_ver"), strlen(env_get("pf_design_id")) + 1); >>> I think it should be strlen(env_get("pf_design_ver")) here. >>> Please ensure any long lines are wrapped properly also. >> Thank you for the review and for spotting those frankly embarassing >> bugs. I will send a v2 shortly, including the style changes. >> >> One question I wanted to ask before sending v2: I somewhat arbitrarily >> named the created environment variables "pf_*" for "Polarfire_". Would >> you prefer they be "mpfs_*" instead? > Please. > > FWIW, I missed this series originally and will hopefully get a chance > to take a look at it tomorrow. Thanks! The patches need to be rebased anyway, so I'll wait until your comments before sending a v2. Should I also rename the device-tree properties (currently fpga-*) to mpfs-* as well as renaming the U-Boot environment variables? -Nathan > > Cheers, > Conor. > > -- Nathan Whitehorn (he/him) Associate Professor Department of Physics and Astronomy Michigan State University Biomedical and Physical Sciences 3225 East Lansing, MI 48824 (517) 884-5563