Draw simple graphics such as straight lines using frame caching on rtems

The bsp I adopt is i386/pc386. I use a universal VGA graphics card as the RTEMS frame buffer. When writing code to draw a straight line, the three parameters fbxres, fbyres, and fbbpp obtained are all 0. Could you please give me some suggestions for drawing graphics using frame buffers?