On 02.04.2024 11:38, Jan Beulich wrote: > On 28.03.2024 16:35, Roger Pau Monne wrote: >> Currently the offsets into the boot_video_info struct are manually encoded in >> video.S, which is fragile. Generate them in asm-offsets.c and switch the >> current code to use those instead. > > Just to mention it (without asking for immediate action): Defining > boot_vid_info > in assembly code then is as fragile. Moving to C would likely be problematic > because it needs to be in the trampoline range. But at least its size should > (at > some point) perhaps better be tied to the C struct's sizeof().
Actually I overlooked that you partly do this. The use of BVI_capabilities there looks odd to me, though. Why not .space BVI_size - (. - boot_vid_info) ? I realize it becomes just BVI_size in patch 2, but I have some question there, too. Jan > The fields, with > some effort, could also be converted using the new BVI_* constants. That would > still leave the field sizes; maybe those could at least be cross-checked by > some > BUILD_BUG_ONs. > > Jan