Fuloong video init support.
* include/grub/vga.h (grub_vga_write_arx): inb monochrome address as well. (grub_vga_read_arx): New function. * grub-core/video/sis315pro.c (GRUB_SIS315PRO_MMIO_SPACE): New definition. (framebuffer): New members io, mmioptr and mmiobase. (read_sis_cmd): New function. (write_sis_cmd): Likewise. (grub_video_sis315pro_setup): Do the initialisation. Use 640x480 rather than 640x400. * grub-core/video/sis315_init.c: New file.
This commit is contained in:
parent
c3fc520c0d
commit
736e0ade54
3 changed files with 377 additions and 4 deletions
|
@ -84,8 +84,8 @@ enum
|
|||
{
|
||||
GRUB_VGA_IO_MISC_COLOR = 0x01,
|
||||
GRUB_VGA_IO_MISC_ENABLE_VRAM_ACCESS = 0x02,
|
||||
GRUB_VGA_IO_MISC_EXTERNAL_CLOCK_0 = 0x08,
|
||||
GRUB_VGA_IO_MISC_28MHZ = 0x04,
|
||||
GRUB_VGA_IO_MISC_EXTERNAL_CLOCK_0 = 0x08,
|
||||
GRUB_VGA_IO_MISC_UPPER_64K = 0x20,
|
||||
GRUB_VGA_IO_MISC_NEGATIVE_HORIZ_POLARITY = 0x40,
|
||||
GRUB_VGA_IO_MISC_NEGATIVE_VERT_POLARITY = 0x80,
|
||||
|
@ -290,11 +290,24 @@ static inline void
|
|||
grub_vga_write_arx (grub_uint8_t val, grub_uint8_t addr)
|
||||
{
|
||||
grub_inb (GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_INPUT_STATUS1_REGISTER);
|
||||
grub_inb (GRUB_MACHINE_PCI_IO_BASE + 0x3ba);
|
||||
|
||||
grub_outb (addr, GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_ARX);
|
||||
grub_inb (GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_ARX_READ);
|
||||
grub_outb (val, GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_ARX);
|
||||
}
|
||||
|
||||
static inline grub_uint8_t
|
||||
grub_vga_read_arx (grub_uint8_t addr)
|
||||
{
|
||||
grub_uint8_t val;
|
||||
grub_inb (GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_INPUT_STATUS1_REGISTER);
|
||||
grub_outb (addr, GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_ARX);
|
||||
val = grub_inb (GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_ARX_READ);
|
||||
grub_outb (val, GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_ARX);
|
||||
return val;
|
||||
}
|
||||
|
||||
struct grub_video_hw_config
|
||||
{
|
||||
unsigned vertical_total;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue