Re: [SeaBIOS] [PATCH v4] apm: fix shutdown

2013-08-02 Thread Kevin O'Connor
On Tue, Jul 30, 2013 at 10:52:12AM +0200, Gerd Hoffmann wrote:
> Qemu commit 9ee59f3 removed the bochs bios apm interface emulation at
> port 0x8900.  That broke poweroff via APM.  Fix it by powering off the
> machine using the acpi pm control register.
> 
> Old code is left in, so seabios wil try both poweroff methods.  Cleaning
> that eventually up is left for another patch, after checking it isn't
> needed.  Qemu never implemented "Standby" and "Suspend", only
> "Shutdown", so it looks like there might be non-qemu use cases (bochs
> probably).
> 
> Easiest way to test this is the syslinux poweroff module; modern linux
> distros usually have CONFIG_APM turned off.

Looks okay to me.

-Kevin

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] [PATCH] Support custom boot menu prompt and custom boot menu key.

2013-08-02 Thread Fred .
Can the message have some color codes?

"\nPress F12 for boot menu.\n\n"

So that it is possible to brighten/darken/highlight/emphasize certain parts
of text strings.

Also with the boot being so fast, it is easy to miss the window of press.
I hope it is possible to hold down the F12 key and that should work too, so
you don't have to repeatedly press it 10 times a second. :p


On Fri, Aug 2, 2013 at 8:18 PM, Kevin O'Connor  wrote:

> Allow configuration of the boot menu prompt and boot menu key (via the
> romfile interface).  Some machines don't have an F12 key, so make this
> configurable.
>
> Signed-off-by: Kevin O'Connor 
> ---
>  src/boot.c | 8 +---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/boot.c b/src/boot.c
> index d421a65..7bcb4b6 100644
> --- a/src/boot.c
> +++ b/src/boot.c
> @@ -413,14 +413,16 @@ interactive_bootmenu(void)
>  while (get_keystroke(0) >= 0)
>  ;
>
> -printf("\nPress F12 for boot menu.\n\n");
> +char *bootmsg = romfile_loadfile("etc/boot-menu-message", NULL);
> +int menukey = romfile_loadint("etc/boot-menu-key", 0x86);
> +printf(bootmsg ?: "\nPress F12 for boot menu.\n\n");
> +free(bootmsg);
>
>  u32 menutime = romfile_loadint("etc/boot-menu-wait",
> DEFAULT_BOOTMENU_WAIT);
>  enable_bootsplash();
>  int scan_code = get_keystroke(menutime);
>  disable_bootsplash();
> -if (scan_code != 0x86)
> -/* not F12 */
> +if (scan_code != menukey)
>  return;
>
>  while (get_keystroke(0) >= 0)
> --
> 1.7.11.7
>
>
> ___
> SeaBIOS mailing list
> SeaBIOS@seabios.org
> http://www.seabios.org/mailman/listinfo/seabios
>
___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios

[SeaBIOS] [PATCH] Support custom boot menu prompt and custom boot menu key.

2013-08-02 Thread Kevin O'Connor
Allow configuration of the boot menu prompt and boot menu key (via the
romfile interface).  Some machines don't have an F12 key, so make this
configurable.

Signed-off-by: Kevin O'Connor 
---
 src/boot.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/boot.c b/src/boot.c
index d421a65..7bcb4b6 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -413,14 +413,16 @@ interactive_bootmenu(void)
 while (get_keystroke(0) >= 0)
 ;
 
-printf("\nPress F12 for boot menu.\n\n");
+char *bootmsg = romfile_loadfile("etc/boot-menu-message", NULL);
+int menukey = romfile_loadint("etc/boot-menu-key", 0x86);
+printf(bootmsg ?: "\nPress F12 for boot menu.\n\n");
+free(bootmsg);
 
 u32 menutime = romfile_loadint("etc/boot-menu-wait", 
DEFAULT_BOOTMENU_WAIT);
 enable_bootsplash();
 int scan_code = get_keystroke(menutime);
 disable_bootsplash();
-if (scan_code != 0x86)
-/* not F12 */
+if (scan_code != menukey)
 return;
 
 while (get_keystroke(0) >= 0)
-- 
1.7.11.7


___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


[SeaBIOS] [PATCH] Fix bug in CBFS file walking with compressed files.

2013-08-02 Thread Kevin O'Connor
The file walking code was incorrectly using the uncompressed file size
when searching for the next file.

Signed-off-by: Kevin O'Connor 
---
 src/coreboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/coreboot.c b/src/coreboot.c
index 7f7b322..983a2b5 100644
--- a/src/coreboot.c
+++ b/src/coreboot.c
@@ -407,7 +407,7 @@ coreboot_cbfs_init(void)
 }
 romfile_add(&cfile->file);
 
-fhdr = (void*)ALIGN((u32)cfile->data + cfile->file.size
+fhdr = (void*)ALIGN((u32)cfile->data + cfile->rawsize
 , be32_to_cpu(hdr->align));
 }
 }
-- 
1.7.11.7


___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios