Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33782
Change subject: vbe.h: Convert hardcode vega mode into macro ......................................................................
vbe.h: Convert hardcode vega mode into macro
This patch replaces vega framebuffer mode hard coded value into macro (MAX_VBE_FRAMEBUFFER_MODE).
Also make use of __packed to align data access.
Change-Id: I5e79b21acf44f6ca184a09d42acdf69c31dd4841 Signed-off-by: Subrata Banik subrata.banik@intel.com --- M src/include/vbe.h 1 file changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/33782/1
diff --git a/src/include/vbe.h b/src/include/vbe.h index 2c40d05..88888e8 100644 --- a/src/include/vbe.h +++ b/src/include/vbe.h @@ -14,6 +14,10 @@ #define VBE_H
#include <boot/coreboot_tables.h> + +/* Let's hope we never have more than 256 video modes. */ +#define MAX_VBE_FRAMEBUFFER_MODE 256 + // these structs are for input from and output to OF typedef struct { u8 display_type; // 0 = NONE, 1 = analog, 2 = digital @@ -41,10 +45,9 @@ u16 version; u8 *oem_string_ptr; u32 capabilities; - u16 video_mode_list[256]; // lets hope we never have more than - // 256 video modes... + u16 video_mode_list[MAX_VBE_FRAMEBUFFER_MODE]; u16 total_memory; -} vbe_info_t; +} __packed vbe_info_t;
typedef struct { u16 mode_attributes; // 00