2008-09-01 Colin D Bennett <colin@gibibit.com>
* commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant values with defines. * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added. (GRUB_VBE_MODEATTR_RESERVED_1): Likewise. (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise. (GRUB_VBE_MODEATTR_COLOR): Likewise. (GRUB_VBE_MODEATTR_GRAPHICS): Likewise. (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise. (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise. (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise. (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise. (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise. (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise. (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise. (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise. (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise. (GRUB_VBE_MEMORY_MODEL_CGA): Likewise. (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise. (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise. (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise. (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
This commit is contained in:
parent
93d5cbf809
commit
f06199587d
3 changed files with 59 additions and 11 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
||||||
|
2008-09-01 Colin D Bennett <colin@gibibit.com>
|
||||||
|
|
||||||
|
* commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
|
||||||
|
values with defines.
|
||||||
|
|
||||||
|
* include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
|
||||||
|
(GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_COLOR): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
|
||||||
|
(GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
|
||||||
|
(GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
|
||||||
|
(GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
|
||||||
|
(GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
|
||||||
|
(GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
|
||||||
|
(GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
|
||||||
|
(GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
|
||||||
|
|
||||||
2008-08-31 Robert Millan <rmh@aybabtu.com>
|
2008-08-31 Robert Millan <rmh@aybabtu.com>
|
||||||
|
|
||||||
* loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
|
* loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
|
||||||
|
|
|
@ -57,6 +57,8 @@ grub_cmd_vbeinfo (struct grub_arg_list *state __attribute__ ((unused)),
|
||||||
controller_info.version & 0xFF,
|
controller_info.version & 0xFF,
|
||||||
controller_info.oem_software_rev >> 8,
|
controller_info.oem_software_rev >> 8,
|
||||||
controller_info.oem_software_rev & 0xFF);
|
controller_info.oem_software_rev & 0xFF);
|
||||||
|
|
||||||
|
/* The total_memory field is in 64 KiB units. */
|
||||||
grub_printf (" total memory: %d KiB\n",
|
grub_printf (" total memory: %d KiB\n",
|
||||||
(controller_info.total_memory << 16) / 1024);
|
(controller_info.total_memory << 16) / 1024);
|
||||||
|
|
||||||
|
@ -90,32 +92,32 @@ grub_cmd_vbeinfo (struct grub_arg_list *state __attribute__ ((unused)),
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mode_info_tmp.mode_attributes & 0x001) == 0)
|
if ((mode_info_tmp.mode_attributes & GRUB_VBE_MODEATTR_SUPPORTED) == 0)
|
||||||
/* If not available, skip it. */
|
/* If not available, skip it. */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((mode_info_tmp.mode_attributes & 0x002) == 0)
|
if ((mode_info_tmp.mode_attributes & GRUB_VBE_MODEATTR_RESERVED_1) == 0)
|
||||||
/* Not enough information. */
|
/* Not enough information. */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((mode_info_tmp.mode_attributes & 0x008) == 0)
|
if ((mode_info_tmp.mode_attributes & GRUB_VBE_MODEATTR_COLOR) == 0)
|
||||||
/* Monochrome is unusable. */
|
/* Monochrome is unusable. */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((mode_info_tmp.mode_attributes & 0x080) == 0)
|
if ((mode_info_tmp.mode_attributes & GRUB_VBE_MODEATTR_LFB_AVAIL) == 0)
|
||||||
/* We support only linear frame buffer modes. */
|
/* We support only linear frame buffer modes. */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((mode_info_tmp.mode_attributes & 0x010) == 0)
|
if ((mode_info_tmp.mode_attributes & GRUB_VBE_MODEATTR_GRAPHICS) == 0)
|
||||||
/* We allow only graphical modes. */
|
/* We allow only graphical modes. */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (mode_info_tmp.memory_model)
|
switch (mode_info_tmp.memory_model)
|
||||||
{
|
{
|
||||||
case 0x04:
|
case GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL:
|
||||||
memory_model = "Packed";
|
memory_model = "Packed";
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR:
|
||||||
memory_model = "Direct";
|
memory_model = "Direct";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -134,7 +136,7 @@ grub_cmd_vbeinfo (struct grub_arg_list *state __attribute__ ((unused)),
|
||||||
memory_model);
|
memory_model);
|
||||||
|
|
||||||
/* Show mask and position details for direct color modes. */
|
/* Show mask and position details for direct color modes. */
|
||||||
if (mode_info_tmp.memory_model == 0x06)
|
if (mode_info_tmp.memory_model == GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR)
|
||||||
grub_printf (", mask: %d/%d/%d/%d pos: %d/%d/%d/%d",
|
grub_printf (", mask: %d/%d/%d/%d pos: %d/%d/%d/%d",
|
||||||
mode_info_tmp.red_mask_size,
|
mode_info_tmp.red_mask_size,
|
||||||
mode_info_tmp.green_mask_size,
|
mode_info_tmp.green_mask_size,
|
||||||
|
|
|
@ -30,9 +30,30 @@
|
||||||
/* VBE status codes. */
|
/* VBE status codes. */
|
||||||
#define GRUB_VBE_STATUS_OK 0x004f
|
#define GRUB_VBE_STATUS_OK 0x004f
|
||||||
|
|
||||||
/* VBE memory model types. */
|
/* Bits from the GRUB_VBE "mode_attributes" field in the mode info struct. */
|
||||||
#define GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL 0x04
|
#define GRUB_VBE_MODEATTR_SUPPORTED (1 << 0)
|
||||||
#define GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR 0x06
|
#define GRUB_VBE_MODEATTR_RESERVED_1 (1 << 1)
|
||||||
|
#define GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT (1 << 2)
|
||||||
|
#define GRUB_VBE_MODEATTR_COLOR (1 << 3)
|
||||||
|
#define GRUB_VBE_MODEATTR_GRAPHICS (1 << 4)
|
||||||
|
#define GRUB_VBE_MODEATTR_VGA_COMPATIBLE (1 << 5)
|
||||||
|
#define GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL (1 << 6)
|
||||||
|
#define GRUB_VBE_MODEATTR_LFB_AVAIL (1 << 7)
|
||||||
|
#define GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL (1 << 8)
|
||||||
|
#define GRUB_VBE_MODEATTR_INTERLACED_AVAIL (1 << 9)
|
||||||
|
#define GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL (1 << 10)
|
||||||
|
#define GRUB_VBE_MODEATTR_STEREO_AVAIL (1 << 11)
|
||||||
|
#define GRUB_VBE_MODEATTR_DUAL_DISPLAY_START (1 << 12)
|
||||||
|
|
||||||
|
/* Values for the GRUB_VBE memory_model field in the mode info struct. */
|
||||||
|
#define GRUB_VBE_MEMORY_MODEL_TEXT 0x00
|
||||||
|
#define GRUB_VBE_MEMORY_MODEL_CGA 0x01
|
||||||
|
#define GRUB_VBE_MEMORY_MODEL_HERCULES 0x02
|
||||||
|
#define GRUB_VBE_MEMORY_MODEL_PLANAR 0x03
|
||||||
|
#define GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL 0x04
|
||||||
|
#define GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256 0x05
|
||||||
|
#define GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR 0x06
|
||||||
|
#define GRUB_VBE_MEMORY_MODEL_YUV 0x07
|
||||||
|
|
||||||
/* Note:
|
/* Note:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue