"H. Peter Anvin" <hpa@xxxxxxxxx> writes: > Eric W. Biederman wrote: >> >> I expect I can find a few more examples where we specify >> video_cols and video_lines but we use video_mode == 0. >> >> Going farther mode 0x00 is a BIOS 40x25 mode. So the patch below is >> not always safe even if we boot the bzImage. It is just highly >> unlikely anyone would start the kernel in 40x25 text mode. >> > > Mode 0x00 is, at least theoretically, BIOS 40x25 *grayscale*; this mode > (and mode 0x02 which is the same thing in 80x25) were as far as I know > only ever used with composite monitors off CGA cards, i.e. functionally > never. Actual monochrome monitors used mode 0x07. I agree. We are not at all likely to see it in practice. Even if my memory is correct and vga cards and non-monochrome cga cards supported that mode. That doesn't mean checking for 0x00 is sufficient to detect an initialized struct screen_info, or a lack of a video screen. We have in kernel historical precedent for using 0x00 as just meaning a text mode. I'm fairly certain that I looked I more closely I could find this convention of using 0x00 to mean a text mode on ia64, mips, and ppc, in addition to the instances I found on alpha, arm, Since the whole point is to detect the case where we don't have a screen at all it makes sense to check several additional variables and make certain that they are all 0. Agreed? Eric _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization