Re: [RFC PATCH 0/1] Add driver for bootstage stash
Francesco Valla <[email protected]> Fri, 23 May 2025 22:11:35 +0200
| Newsgroups | org.kernel.vger.linux-embedded |
|---|---|
| Message-ID | <[email protected]> |
Hi Federico, On Friday, 23 May 2025 at 09:34:09 Federico Giovanardi <[email protected]> wrote: > Hello, > > The note about the data format also was my initial thought, by just > copying a C structure we might have issues as soon one party changes it, > and they might not be perfectly aligned. > Definitely - before a proper implementation, a formal specification with a versioning should probably be defined. > To avoid inventing yet-another-data-format I've used msgpack in the past > for that (the format > https://github.com/msgpack/msgpack/blob/master/spec.md, not the library > ); because the specs are so simple they can be implemented in a few > lines, and it's something with a reference. But I don't have a lot of > experience in upstreaming stuff on the kernel, so I don't know if it > might cause someone to don't be happy. Anyway, I can contribute the > implementation if needed. > I'd avoid a serialization technology here, as it would be another (somewhat costly) step before booting, while re-using the memory area that the bootloader itself uses as stash is basically free. Regards, Francesco