1 /* 915resolution - Utility to change vbemodes on the intel
2 * integrated video chipset */
5 * Based on Nathan Coulson's http://nathancoulson.com/proj/eee/grub-1.96-915resolution-0.5.2-3.patch
6 * Oct 10, 2008, Released as 915
7 * Oct 10, 2008, Updated to include support for 945GM thanks to Scot Doyle
10 /* Copied from 915 resolution created by steve tomjenovic
11 * 915 resolution was in the public domain.
13 * All I have done, was make the above program run within
14 * the grub2 environment.
16 * Some of the checks are still commented, as I did not find
17 * easy replacement for memmem.
19 * Slightly edited by Nathan Coulson (conathan@gmail.com)
23 * GRUB -- GRand Unified Bootloader
24 * Copyright (C) 2003,2007 Free Software Foundation, Inc.
25 * Copyright (C) 2003 NIIBE Yutaka <gniibe@m17n.org>
27 * GRUB is free software: you can redistribute it and/or modify
28 * it under the terms of the GNU General Public License as published by
29 * the Free Software Foundation, either version 3 of the License, or
30 * (at your option) any later version.
32 * GRUB is distributed in the hope that it will be useful,
33 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 * GNU General Public License for more details.
37 * You should have received a copy of the GNU General Public License
38 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
42 /* 915 resolution by steve tomljenovic
44 * This was tested only on Sony VGN-FS550. Use at your own risk
46 * This code is based on the techniques used in :
48 * - 855patch. Many thanks to Christian Zietz (czietz gmx net)
49 * for demonstrating how to shadow the VBIOS into system RAM
52 * - 1280patch by Andrew Tipton (andrewtipton null li).
54 * - 855resolution by Alain Poirier
56 * This source code is into the public domain.
59 #include <grub/types.h>
60 #include <grub/misc.h>
64 #include <grub/normal.h>
65 #include <grub/i386/io.h>
67 GRUB_MOD_LICENSE ("GPLv3+");
69 #define printf grub_printf
70 #define malloc grub_malloc
71 #define free grub_free
72 #define strcmp grub_strcmp
73 #define fprintf(stream, ...) grub_printf(__VA_ARGS__)
74 #define strtol(x,y,z) grub_strtoul(x,y,z)
75 #define atoi(x) grub_strtoul(x,NULL,10)
77 #define memset grub_memset
78 #define outl grub_outl
79 #define outb grub_outb
83 #define NEW(a) ((a *)(malloc(sizeof(a))))
84 #define FREE(a) (free(a))
86 #define VBIOS_START 0xc0000
87 #define VBIOS_SIZE 0x10000
89 #define VBIOS_FILE "/dev/mem"
94 #define MODE_TABLE_OFFSET_845G 617
96 #define RES915_VERSION "0.5.3"
98 #define ATI_SIGNATURE1 "ATI MOBILITY RADEON"
99 #define ATI_SIGNATURE2 "ATI Technologies Inc"
100 #define NVIDIA_SIGNATURE "NVIDIA Corp"
101 #define INTEL_SIGNATURE "Intel Corp"
105 typedef unsigned char * address
;
106 typedef unsigned char byte
;
107 typedef unsigned short word
;
108 typedef unsigned char boolean
;
109 typedef unsigned int cardinal
;
112 CT_UNKWN
, CT_830
, CT_845G
, CT_855GM
, CT_865G
, CT_915G
, CT_915GM
, CT_945G
, CT_945GM
, CT_945GME
,
113 CT_946GZ
, CT_G965
, CT_Q965
, CT_965GM
, CT_G33
, CT_Q33
, CT_Q35
, CT_500GMA
,
114 CT_GM45
, CT_GMA3150
, CT_HD3000
117 const char *const chipset_type_names
[] = {
118 "UNKNOWN", "830", "845G", "855GM", "865G", "915G", "915GM", "945G", "945GM", "945GME",
119 "946GZ", "G965", "Q965", "965GM", "G33", "Q33", "Q35", "500GMA",
120 "GM45", "GMA3150", "HD3000"
124 BT_UNKWN
, BT_1
, BT_2
, BT_3
127 const char *const bios_type_names
[] = {"UNKNOWN", "TYPE 1", "TYPE 2", "TYPE 3"};
129 int freqs
[] = { 60, 75, 85 };
136 } __attribute__((packed
)) vbios_mode
;
146 } __attribute__((packed
)) vbios_resolution_type1
;
164 } __attribute__((packed
)) vbios_modeline_type2
;
171 vbios_modeline_type2 modelines
[];
172 } __attribute__((packed
)) vbios_resolution_type2
;
195 } __attribute__((packed
)) vbios_modeline_type3
;
198 unsigned char unknown
[6];
200 vbios_modeline_type3 modelines
[];
201 } __attribute__((packed
)) vbios_resolution_type3
;
206 chipset_type chipset
;
212 vbios_mode
* mode_table
;
213 cardinal mode_table_size
;
221 static cardinal
get_chipset_id(void) {
222 outl(0x80000000, 0xcf8);
226 static chipset_type
get_chipset(cardinal id
) {
331 static vbios_resolution_type1
* map_type1_resolution(vbios_map
* map
, word res
) {
332 vbios_resolution_type1
* ptr
= ((vbios_resolution_type1
*)(map
->bios_ptr
+ res
));
336 static vbios_resolution_type2
* map_type2_resolution(vbios_map
* map
, word res
) {
337 vbios_resolution_type2
* ptr
= ((vbios_resolution_type2
*)(map
->bios_ptr
+ res
));
341 static vbios_resolution_type3
* map_type3_resolution(vbios_map
* map
, word res
) {
342 vbios_resolution_type3
* ptr
= ((vbios_resolution_type3
*)(map
->bios_ptr
+ res
));
347 static boolean
detect_bios_type(vbios_map
* map
, int entry_size
) {
353 for (i
=0; i
< map
->mode_table_size
; i
++) {
354 if (map
->mode_table
[i
].resolution
<= r1
) {
355 r1
= map
->mode_table
[i
].resolution
;
358 if (map
->mode_table
[i
].resolution
<= r2
) {
359 r2
= map
->mode_table
[i
].resolution
;
363 /*printf("r1 = %d r2 = %d\n", r1, r2);*/
366 return (r2
-r1
-6) % entry_size
== 0;
370 static void close_vbios(vbios_map
* map
);
373 static vbios_map
* open_vbios(chipset_type forced_chipset
) {
374 vbios_map
* map
= NEW(vbios_map
);
375 memset (map
, 0, sizeof(vbios_map
));
381 if (forced_chipset
== CT_UNKWN
) {
382 map
->chipset_id
= get_chipset_id();
384 map
->chipset
= get_chipset(map
->chipset_id
);
386 else if (forced_chipset
!= CT_UNKWN
) {
387 map
->chipset
= forced_chipset
;
390 map
->chipset
= CT_915GM
;
394 * Map the video bios to memory
397 map
->bios_ptr
= (unsigned char *) VBIOS_START
;
401 * check if we have ATI Radeon
404 if (memmem(map
->bios_ptr
, VBIOS_SIZE
, ATI_SIGNATURE1
, strlen(ATI_SIGNATURE1
)) ||
405 memmem(map
->bios_ptr
, VBIOS_SIZE
, ATI_SIGNATURE2
, strlen(ATI_SIGNATURE2
)) ) {
406 fprintf(stderr
, "ATI chipset detected. 915resolution only works with Intel 800/900 series graphic chipsets.\n");
412 * check if we have NVIDIA
415 if (memmem(map
->bios_ptr
, VBIOS_SIZE
, NVIDIA_SIGNATURE
, strlen(NVIDIA_SIGNATURE
))) {
416 fprintf(stderr
, "NVIDIA chipset detected. 915resolution only works with Intel 800/900 series graphic chipsets.\n");
422 * check if we have Intel
425 if (map
->chipset
== CT_UNKWN
&& memmem(map
->bios_ptr
, VBIOS_SIZE
, INTEL_SIGNATURE
, strlen(INTEL_SIGNATURE
))) {
426 fprintf(stderr
, "Intel chipset detected. However, 915resolution was unable to determine the chipset type.\n");
428 fprintf(stderr
, "Chipset Id: %x\n", map
->chipset_id
);
430 fprintf(stderr
, "Please report this problem to stomljen@yahoo.com\n");
441 if (map
->chipset
== CT_UNKWN
) {
442 fprintf(stderr
, "Unknown chipset type and unrecognized bios.\n");
443 fprintf(stderr
, "915resolution only works with Intel 800/900 series graphic chipsets.\n");
445 fprintf(stderr
, "Chipset Id: %x\n", map
->chipset_id
);
451 * Figure out where the mode table is
455 address p
= map
->bios_ptr
+ 16;
456 address limit
= map
->bios_ptr
+ VBIOS_SIZE
- (3 * sizeof(vbios_mode
));
458 while (p
< limit
&& map
->mode_table
== 0) {
459 vbios_mode
* mode_ptr
= (vbios_mode
*) p
;
461 if (((mode_ptr
[0].mode
& 0xf0) == 0x30) && ((mode_ptr
[1].mode
& 0xf0) == 0x30) &&
462 ((mode_ptr
[2].mode
& 0xf0) == 0x30) && ((mode_ptr
[3].mode
& 0xf0) == 0x30)) {
464 map
->mode_table
= mode_ptr
;
470 if (map
->mode_table
== 0) {
471 fprintf(stderr
, "Unable to locate the mode table.\n");
472 fprintf(stderr
, "Please run the program 'dump_bios' as root and\n");
473 fprintf(stderr
, "email the file 'vbios.dmp' to stomljen@yahoo.com.\n");
475 fprintf(stderr
, "Chipset: %s\n", chipset_type_names
[map
->chipset
]);
482 * Determine size of mode table
486 vbios_mode
* mode_ptr
= map
->mode_table
;
488 while (mode_ptr
->mode
!= 0xff) {
489 map
->mode_table_size
++;
495 * Figure out what type of bios we have
496 * order of detection is important
499 if (detect_bios_type(map
, sizeof(vbios_modeline_type3
))) {
502 else if (detect_bios_type(map
, sizeof(vbios_modeline_type2
))) {
505 else if (detect_bios_type(map
, sizeof(vbios_resolution_type1
))) {
509 fprintf(stderr
, "Unable to determine bios type.\n");
510 fprintf(stderr
, "Please run the program 'dump_bios' as root and\n");
511 fprintf(stderr
, "email the file 'vbios.dmp' to stomljen@yahoo.com.\n");
513 fprintf(stderr
, "Chipset: %s\n", chipset_type_names
[map
->chipset
]);
514 fprintf(stderr
, "Mode Table Offset: $C0000 + $%x\n", ((cardinal
)map
->mode_table
) - ((cardinal
)map
->bios_ptr
));
515 fprintf(stderr
, "Mode Table Entries: %u\n", map
->mode_table_size
);
522 static void close_vbios(vbios_map
* map
) {
523 assert(!map
->unlocked
);
528 static void unlock_vbios(vbios_map
* map
) {
530 assert(!map
->unlocked
);
532 map
->unlocked
= TRUE
;
534 switch (map
->chipset
) {
539 outl(0x8000005a, 0xcf8);
540 map
->b1
= inb(0xcfe);
542 outl(0x8000005a, 0xcf8);
563 outl(0x80000090, 0xcf8);
564 map
->b1
= inb(0xcfd);
565 map
->b2
= inb(0xcfe);
567 outl(0x80000090, 0xcf8);
575 cardinal t
= inl(0xcfc);
576 printf("unlock PAM: (0x%08x)\n", t
);
581 static void relock_vbios(vbios_map
* map
) {
583 assert(map
->unlocked
);
584 map
->unlocked
= FALSE
;
586 switch (map
->chipset
) {
591 outl(0x8000005a, 0xcf8);
592 outb(map
->b1
, 0xcfe);
612 outl(0x80000090, 0xcf8);
613 outb(map
->b1
, 0xcfd);
614 outb(map
->b2
, 0xcfe);
620 cardinal t
= inl(0xcfc);
621 printf("relock PAM: (0x%08x)\n", t
);
627 static void list_modes(vbios_map
*map
, cardinal raw
) {
630 for (i
=0; i
< map
->mode_table_size
; i
++) {
634 vbios_resolution_type1
* res
= map_type1_resolution(map
, map
->mode_table
[i
].resolution
);
636 x
= ((((cardinal
) res
->x2
) & 0xf0) << 4) | res
->x1
;
637 y
= ((((cardinal
) res
->y2
) & 0xf0) << 4) | res
->y1
;
639 if (x
!= 0 && y
!= 0) {
640 printf("Mode %02x : %dx%d, %d bits/pixel\n", map
->mode_table
[i
].mode
, x
, y
, map
->mode_table
[i
].bits_per_pixel
);
645 printf("Mode %02x (raw) :\n\t%02x %02x\n\t%02x\n\t%02x\n\t%02x\n\t%02x\n\t%02x\n\t%02x\n", map
->mode_table
[i
].mode
, res
->unknow1
[0],res
->unknow1
[1], res
->x1
,res
->x_total
,res
->x2
,res
->y1
,res
->y_total
,res
->y2
);
652 vbios_resolution_type2
* res
= map_type2_resolution(map
, map
->mode_table
[i
].resolution
);
654 x
= res
->modelines
[0].x1
+1;
655 y
= res
->modelines
[0].y1
+1;
657 if (x
!= 0 && y
!= 0) {
658 printf("Mode %02x : %dx%d, %d bits/pixel\n", map
->mode_table
[i
].mode
, x
, y
, map
->mode_table
[i
].bits_per_pixel
);
664 vbios_resolution_type3
* res
= map_type3_resolution(map
, map
->mode_table
[i
].resolution
);
666 x
= res
->modelines
[0].x1
+1;
667 y
= res
->modelines
[0].y1
+1;
669 if (x
!= 0 && y
!= 0) {
670 printf("Mode %02x : %dx%d, %d bits/pixel\n", map
->mode_table
[i
].mode
, x
, y
, map
->mode_table
[i
].bits_per_pixel
);
680 static void gtf_timings(int x
, int y
, int freq
,
681 unsigned long *clock
,
682 word
*hsyncstart
, word
*hsyncend
, word
*hblank
,
683 word
*vsyncstart
, word
*vsyncend
, word
*vblank
)
688 (y+1)/(20000.0/(11*freq) - 1) + 0.5
689 = ((y+1) * (11*freq))/(20000.0 - (11*freq)) + 0.5
690 = ((y+1) * (11*freq) + 10000.0 - (11*freq) / 2)/(20000.0 - (11*freq))
691 = ((y+1) * (11*freq) + 10000.0 - 5 * freq - (freq + 1) / 2)/(20000.0 - (11*freq))
694 grub_divmod64 (((y
+1) * (11*(long long)freq
) + 10000 - 5 * (long long)freq
696 (20000 - (11*(long long)freq
)), 0);
699 (x * (30.0 - 300000.0 / vfreq) /
700 (70.0 + 300000.0 / vfreq) / 16.0 + 0.5)
701 = ((x * (30.0 - 300000.0 / vfreq) /
702 (70.0 + 300000.0 / vfreq) + 8) / 16)
703 = ((x * (30.0 * vfreq - 300000.0) /
704 (70.0 * vfreq + 300000.0) + 8) / 16)
705 = (((x * (30 * vfreq - 300000)) /
706 (70 * vfreq + 300000) + 8) / 16)
708 hbl
= 16 * (int)((grub_divmod64((x
* (30 * (long long)vfreq
- 300000)),
709 (70 * (long long)vfreq
+ 300000), 0)
715 *hsyncstart
= x
+ hbl
/ 2 - (x
+ hbl
+ 50) / 100 * 8 - 1;
716 *hsyncend
= x
+ hbl
/ 2 - 1;
717 *hblank
= x
+ hbl
- 1;
718 *clock
= (x
+ hbl
) * vfreq
/ 1000;
721 static void set_mode(vbios_map
* map
, cardinal mode
, cardinal x
, cardinal y
, cardinal bp
, cardinal htotal
, cardinal vtotal
) {
725 for (i
=0; i
< map
->mode_table_size
; i
++) {
726 if (map
->mode_table
[i
].mode
== mode
) {
730 vbios_resolution_type1
* res
= map_type1_resolution(map
, map
->mode_table
[i
].resolution
);
733 map
->mode_table
[i
].bits_per_pixel
= bp
;
736 res
->x2
= (htotal
?(((htotal
-x
) >> 8) & 0x0f) : (res
->x2
& 0x0f)) | ((x
>> 4) & 0xf0);
737 res
->x1
= (x
& 0xff);
739 res
->y2
= (vtotal
?(((vtotal
-y
) >> 8) & 0x0f) : (res
->y2
& 0x0f)) | ((y
>> 4) & 0xf0);
740 res
->y1
= (y
& 0xff);
742 res
->x_total
= ((htotal
-x
) & 0xff);
745 res
->y_total
= ((vtotal
-y
) & 0xff);
750 vbios_resolution_type2
* res
= map_type2_resolution(map
, map
->mode_table
[i
].resolution
);
753 res
->ychars
= y
/ 16 - 1;
754 xprev
= res
->modelines
[0].x1
;
755 yprev
= res
->modelines
[0].y1
;
757 for(j
=0; j
< 3; j
++) {
758 vbios_modeline_type2
* modeline
= &res
->modelines
[j
];
760 if (modeline
->x1
== xprev
&& modeline
->y1
== yprev
) {
761 modeline
->x1
= modeline
->x2
= x
-1;
762 modeline
->y1
= modeline
->y2
= y
-1;
764 gtf_timings(x
, y
, freqs
[j
], &modeline
->clock
,
765 &modeline
->hsyncstart
, &modeline
->hsyncend
,
766 &modeline
->hblank
, &modeline
->vsyncstart
,
767 &modeline
->vsyncend
, &modeline
->vblank
);
770 modeline
->htotal
= htotal
;
772 modeline
->htotal
= modeline
->hblank
;
775 modeline
->vtotal
= vtotal
;
777 modeline
->vtotal
= modeline
->vblank
;
784 vbios_resolution_type3
* res
= map_type3_resolution(map
, map
->mode_table
[i
].resolution
);
786 xprev
= res
->modelines
[0].x1
;
787 yprev
= res
->modelines
[0].y1
;
789 for (j
=0; j
< 3; j
++) {
790 vbios_modeline_type3
* modeline
= &res
->modelines
[j
];
792 if (modeline
->x1
== xprev
&& modeline
->y1
== yprev
) {
793 modeline
->x1
= modeline
->x2
= x
-1;
794 modeline
->y1
= modeline
->y2
= y
-1;
796 gtf_timings(x
, y
, freqs
[j
], &modeline
->clock
,
797 &modeline
->hsyncstart
, &modeline
->hsyncend
,
798 &modeline
->hblank
, &modeline
->vsyncstart
,
799 &modeline
->vsyncend
, &modeline
->vblank
);
801 modeline
->htotal
= htotal
;
803 modeline
->htotal
= modeline
->hblank
;
805 modeline
->vtotal
= vtotal
;
807 modeline
->vtotal
= modeline
->vblank
;
809 modeline
->timing_h
= y
-1;
810 modeline
->timing_v
= x
-1;
822 static void display_map_info(vbios_map
* map
) {
823 printf("Chipset: %s\n", chipset_type_names
[map
->chipset
]);
824 printf("BIOS: %s\n", bios_type_names
[map
->bios
]);
826 printf("Mode Table Offset: $C0000 + $%x\n", ((cardinal
)map
->mode_table
) - ((cardinal
)map
->bios_ptr
));
827 printf("Mode Table Entries: %u\n", map
->mode_table_size
);
831 static int parse_args(cardinal argc
, char *argv
[], chipset_type
*forced_chipset
,
832 cardinal
*list
, cardinal
*mode
, cardinal
*x
, cardinal
*y
,
833 cardinal
*bp
, cardinal
*raw
, cardinal
*htotal
,
834 cardinal
*vtotal
, cardinal
*quiet
) {
837 *list
= *mode
= *x
= *y
= *raw
= *htotal
= *vtotal
= 0;
841 *forced_chipset
= CT_UNKWN
;
843 if ((argc
> index
) && !strcmp(argv
[index
], "-q")) {
852 if ((argc
> index
) && !strcmp(argv
[index
], "-c")) {
859 if (!strcmp(argv
[index
], "845")) {
860 *forced_chipset
= CT_845G
;
862 else if (!strcmp(argv
[index
], "855")) {
863 *forced_chipset
= CT_855GM
;
865 else if (!strcmp(argv
[index
], "865")) {
866 *forced_chipset
= CT_865G
;
868 else if (!strcmp(argv
[index
], "915G")) {
869 *forced_chipset
= CT_915G
;
871 else if (!strcmp(argv
[index
], "915GM")) {
872 *forced_chipset
= CT_915GM
;
874 else if (!strcmp(argv
[index
], "945G")) {
875 *forced_chipset
= CT_945G
;
877 else if (!strcmp(argv
[index
], "945GM")) {
878 *forced_chipset
= CT_945GM
;
880 else if (!strcmp(argv
[index
], "945GME")) {
881 *forced_chipset
= CT_945GME
;
883 else if (!strcmp(argv
[index
], "946GZ")) {
884 *forced_chipset
= CT_946GZ
;
886 else if (!strcmp(argv
[index
], "G965")) {
887 *forced_chipset
= CT_G965
;
889 else if (!strcmp(argv
[index
], "Q965")) {
890 *forced_chipset
= CT_Q965
;
892 else if (!strcmp(argv
[index
], "965GM")) {
893 *forced_chipset
= CT_965GM
;
895 else if (!strcmp(argv
[index
], "G33")) {
896 *forced_chipset
= CT_G33
;
898 else if (!strcmp(argv
[index
], "Q35")) {
899 *forced_chipset
= CT_Q35
;
901 else if (!strcmp(argv
[index
], "Q33")) {
902 *forced_chipset
= CT_Q33
;
904 else if (!strcmp(argv
[index
], "500GMA")) {
905 *forced_chipset
= CT_500GMA
;
907 else if (!strcmp(argv
[index
], "GM45")) {
908 *forced_chipset
= CT_GM45
;
910 else if (!strcmp(argv
[index
], "GMA3150")) {
911 *forced_chipset
= CT_GMA3150
;
913 else if (!strcmp(argv
[index
], "HD3000")) {
914 *forced_chipset
= CT_HD3000
;
917 *forced_chipset
= CT_UNKWN
;
927 if ((argc
> index
) && !strcmp(argv
[index
], "-l")) {
936 if ((argc
> index
) && !strcmp(argv
[index
], "-r")) {
945 if (argc
-index
< 3 || argc
-index
> 6) {
949 *mode
= (cardinal
) strtol(argv
[index
], NULL
, 16);
950 *x
= (cardinal
)atoi(argv
[index
+1]);
951 *y
= (cardinal
)atoi(argv
[index
+2]);
954 if (argc
-index
> 3) {
955 *bp
= (cardinal
)atoi(argv
[index
+3]);
961 if (argc
-index
> 4) {
962 *htotal
= (cardinal
)atoi(argv
[index
+4]);
968 if (argc
-index
> 5) {
969 *vtotal
= (cardinal
)atoi(argv
[index
+5]);
978 static void usage(void) {
979 printf("Usage: 915resolution [-q] [-c chipset] [-l] [mode X Y] [bits/pixel] [htotal] [vtotal]\n");
980 printf(" Set the resolution to XxY for a video mode\n");
981 printf(" Bits per pixel are optional. htotal/vtotal settings are additionally optional.\n");
982 printf(" Options:\n");
983 printf(" -q don't show any normal messages\n");
984 printf(" -c force chipset type (THIS IS USED FOR DEBUG PURPOSES)\n");
985 printf(" -l display the modes found in the video BIOS\n");
986 printf(" -r display the modes found in the video BIOS in raw mode (THIS IS USED FOR DEBUG PURPOSES)\n");
989 static int main_915 (int argc
, char *argv
[])
992 cardinal list
, mode
, x
, y
, bp
, raw
, htotal
, vtotal
;
994 chipset_type forced_chipset
;
996 if (parse_args(argc
, argv
, &forced_chipset
, &list
, &mode
,
997 &x
, &y
, &bp
, &raw
, &htotal
, &vtotal
, &quiet
) == -1) {
998 printf("Intel 800/900 Series VBIOS Hack : version %s\n\n",
1005 printf("Intel 800/900 Series VBIOS Hack : version %s\n\n",
1008 map
= open_vbios(forced_chipset
);
1011 display_map_info(map
);
1016 list_modes(map
, raw
);
1019 if (mode
!=0 && x
!=0 && y
!=0) {
1022 set_mode(map
, mode
, x
, y
, bp
, htotal
, vtotal
);
1026 printf("Patch mode %02x to resolution %dx%d complete\n", mode
, x
, y
);
1029 list_modes(map
, raw
);
1043 grub_cmd_915resolution (grub_command_t cmd
__attribute__ ((unused
)),
1044 int argc
, char *argv
[])
1046 return main_915 (argc
, argv
);
1049 static grub_command_t cmd
;
1051 GRUB_MOD_INIT(915resolution
)
1053 cmd
= grub_register_command ("915resolution", grub_cmd_915resolution
,
1054 "915resolution", "Intel VBE editor");
1057 GRUB_MOD_FINI(915resolution
)
1059 grub_unregister_command (cmd
);