grub/video/sm712_init.c
Vladimir 'phcoder' Serbinenko f947ab49b0 Remove the dump of sm712 initialisation sequence.
* include/grub/pci.h (GRUB_PCI_CLASS_SUBCLASS_VGA): New const.
	* include/grub/vga.h (GRUB_VGA_IO_ARX_READ): New register.
	(GRUB_VGA_IO_MISC_WRITE): Likewise.
	(GRUB_VGA_CR_*): Added many registers.
	(GRUB_VGA_SR_*): Likewise.
	(GRUB_VGA_GR_*): Likewise.
	(grub_vga_write_arx): New function.
	(grub_video_hw_config): New struct.
	(grub_vga_set_geometry): New function.
	* kern/i386/qemu/init.c (load_palette): Use grub_vga_write_arx and
	GRUB_PCI_CLASS_SUBCLASS_VGA.
	* video/cirrus.c (grub_video_cirrus_setup): Use grub_vga_set_geometry.
	* video/sm712.c (grub_sm712_write_reg): New function
	(grub_sm712_read_reg): Likewise.
	(grub_sm712_sr_write): Likewise.
	(grub_sm712_gr_write): Likewise.
	(grub_sm712_cr_write): Likewise.
	(grub_sm712_write_arx): Likewise.
	(grub_sm712_cr_shadow_write): Likewise.
	(grub_sm712_write_dda_lookup): Likewise.
	(grub_video_sm712_setup): Initialise the video rather then
	blindly replay the dump.
	(main) [TEST]: Add a routine to be able to compile as standalone for
	tests.
	* video/sm712_init.c (sm712_init): Removed.
	(sm712_sr_seq1): New array.
	(sm712_sr_seq2): Likewise.
2010-08-11 04:18:07 +02:00

14 lines
613 B
C

/* Following sequence is a capture of sm712 initialisation sequence. */
static grub_uint8_t sm712_sr_seq1[] =
{ 0xc8, 0x40, 0x14, 0x60, 0x0, 0xa, 0x92, 0x0,
0x51, 0x00, 0x01, 0x00, 0x0, 0x0, 0x00, 0x0,
0xc4, 0x30, 0x02, 0x00, 0x1 };
static grub_uint8_t sm712_sr_seq2[] =
{ 0x28, 0x03, 0x24, 0x09, 0xc0, 0x3a, 0x3a, 0x3a,
0x3a, 0x3a, 0x3a, 0x3a, 0x00, 0x00, 0x03, 0xff,
0x00, 0xfc, 0x00, 0x00, 0x20, 0x18, 0x00, 0xfc,
0x20, 0x0c, 0x44, 0x20, 0x00, 0x00, 0x00, 0x3a,
0x06, 0x68, 0xa7, 0x7f, 0x83, 0x24, 0xff, 0x03,
0x00, 0x60, 0x59, 0x3a, 0x3a, 0x00, 0x00, 0x3a,
0x01, 0x80 };