docs: Document TEXTMODE option

This commit is contained in:
mintsuki 2021-08-17 00:58:02 +02:00
parent b2e66e5a2d
commit 32192f73a4
4 changed files with 18 additions and 10 deletions

View File

@ -102,6 +102,7 @@ Some keys take *URIs* as values; these are described in the next section.
to the 1st module string entry that appear, and so on.
* `RESOLUTION` - The resolution to be used should the kernel request a graphical framebuffer. This setting takes the form of `<width>x<height>x<bpp>` and *overrides* any resolution requested by the kernel, or automatic resolution requests. If the resolution is not available, Limine will pick another one automatically. Omitting `<bpp>` will default to 32.
* `KASLR` - For relocatable kernels, if set to `no`, disable kernel address space layout randomisation. KASLR is enabled by default.
* `TEXTMODE` - If set to `yes`, prefer text mode if the kernel has no video mode requirements. (Only for stivale2)
* Chainload protocol on BIOS:
* `DRIVE` - The 1-based BIOS drive to chainload.
* `PARTITION` - The 1-based BIOS partition to chainload, if omitted, chainload drive.

View File

@ -82,6 +82,8 @@ static const char *VALID_KEYS[] = {
"TERMINAL_FONT",
"THEME_COLOURS",
"THEME_COLORS",
"THEME_BRIGHT_COLOURS",
"THEME_BRIGHT_COLORS",
"THEME_BACKGROUND",
"THEME_FOREGROUND",
"THEME_MARGIN",
@ -94,6 +96,9 @@ static const char *VALID_KEYS[] = {
"EDITOR_HIGHLIGHTING",
"EDITOR_VALIDATION",
"VERBOSE",
"RANDOMISE_MEMORY",
"RANDOMIZE_MEMORY",
"COMMENT",
"PROTOCOL",
"CMDLINE",
"KERNEL_CMDLINE",
@ -101,11 +106,11 @@ static const char *VALID_KEYS[] = {
"MODULE_PATH",
"MODULE_STRING",
"RESOLUTION",
"TEXTMODE",
"KASLR",
"DRIVE",
"PARTITION",
"IMAGE_PATH",
"COMMENT",
NULL
};

View File

@ -382,19 +382,16 @@ failed_to_load_header_section:
size_t req_width = 0, req_height = 0, req_bpp = 0;
if (hdrtag != NULL) {
req_width = hdrtag->framebuffer_width;
req_height = hdrtag->framebuffer_height;
req_bpp = hdrtag->framebuffer_bpp;
}
char *resolution = config_get_value(config, 0, "RESOLUTION");
if (resolution != NULL)
parse_resolution(&req_width, &req_height, &req_bpp, resolution);
if (hdrtag != NULL) {
if (hdrtag->framebuffer_width)
req_width = hdrtag->framebuffer_width;
if (hdrtag->framebuffer_height)
req_height = hdrtag->framebuffer_height;
if (hdrtag->framebuffer_bpp)
req_bpp = hdrtag->framebuffer_bpp;
}
struct stivale2_header_tag_any_video *avtag = get_tag(&stivale2_hdr, STIVALE2_HEADER_TAG_ANY_VIDEO_ID);
#if uefi == 1

View File

@ -112,6 +112,11 @@ void stivale2_main(struct stivale2_struct *info) {
e9_printf("\tBlue mask size: %d", f->blue_mask_shift);
break;
}
case STIVALE2_STRUCT_TAG_TEXTMODE_ID: {
struct stivale2_struct_tag_textmode *tm = (struct stivale2_struct_tag_textmode *)tag;
e9_puts("Textmode tag");
break;
}
case STIVALE2_STRUCT_TAG_EDID_ID: {
struct stivale2_struct_tag_edid *edid = (struct stivale2_struct_tag_edid *)tag;