Hi,
piranha wrote:Edit: I defined the variables as unsigned, and now the values are xr=61440, yr=65363, and bpp=255
It's very unlikely those are sane values for any video mode...
piranha wrote:only prints "Mapping...", but not "1 page", so v->phys_base_ptr + (yr*v->bytes_per_scan_line) must be less than v->phys_base_ptr...
Are you sure "bytes_per_scan_line" is sane? Given that none of the other variables are sane, I'd assume "bytes_per_scan_line" is also wrong.
Also note that for C, multiplying 2 large numbers together can easily give you the wrong answer due to undetected overflow. If "v->phys_base_ptr + (yr*v->bytes_per_scan_line)" is less than or equal to "v->phys_base_ptr"; then "(yr*v->bytes_per_scan_line)" must be less than or equal to zero, which definitely isn't right. Further, if "yr=65363" then "bytes_per_scan_line" must be either negative, zero, or larger than "INT_MAX / 65363".
I'm guessing you've got code somewhere that gets details for the selected video mode from a VESA/VBE "mode info" structure. I'd assume this code is entirely borked, and that there's possibly nothing wrong with the code to map video display memory into the virtual address space...
Cheers,
Brendan