aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-03-30 16:17:59 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-03-30 16:17:59 -0700
commit52c9d5ba2af4e1f77aa2486a2af2bcab0b0af52c (patch)
tree0ef759bffc55ed0f7811805440f58412e6ba3d8f
parentd6fb0861c55f062797c8706f484bd47ae0f94568 (diff)
parentdcecb9f395f3ca0da3df774cb6102d885894bf84 (diff)
downloadsyslinux-52c9d5ba2af4e1f77aa2486a2af2bcab0b0af52c.tar.gz
syslinux-52c9d5ba2af4e1f77aa2486a2af2bcab0b0af52c.tar.xz
syslinux-52c9d5ba2af4e1f77aa2486a2af2bcab0b0af52c.zip
Merge branch 'master' into pathbased
Resolved Conflicts: com32/modules/Makefile core/comboot.inc core/cpuinit.inc core/idle.inc Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--NEWS9
-rw-r--r--com32/hdt/hdt-cli-syslinux.c4
-rw-r--r--com32/hdt/hdt-menu-syslinux.c8
-rw-r--r--com32/modules/Makefile2
-rw-r--r--com32/modules/cpuid.c60
-rw-r--r--core/conio.inc1
-rw-r--r--core/diskstart.inc5
-rw-r--r--core/pxelinux.asm1
-rw-r--r--core/ui.inc1
-rw-r--r--doc/comboot.txt4
-rw-r--r--memdisk/setup.c2
11 files changed, 85 insertions, 12 deletions
diff --git a/NEWS b/NEWS
index fafa54c4..1bf7480d 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,15 @@ to all derivatives.
Changes in 3.86:
* chain.c32: fix chainloading the MBR of a hard disk (broken
in 3.85).
+ * mboot.c32: report the boot loader name in the information
+ structure.
+ * com32: set argv[0] in a com32 module.
+ * core: add a workaround for a bug in Xen HVM older than
+ version 3.3: disable halt on those platforms.
+ * Fix problems where certain operations in com32 modules would
+ cause the core to believe the system was idle.
+ * MEMDISK: fix MBR detection when used with a DOSEMU header or
+ an offset.
Changes in 3.85:
* gPXELINUX: updated to gPXE 1.0.0. gPXELINUX can now do NBP
diff --git a/com32/hdt/hdt-cli-syslinux.c b/com32/hdt/hdt-cli-syslinux.c
index 6c231ed5..302ca24a 100644
--- a/com32/hdt/hdt-cli-syslinux.c
+++ b/com32/hdt/hdt-cli-syslinux.c
@@ -42,10 +42,10 @@ void main_show_syslinux(int argc __unused, char **argv __unused,
reset_more_printf();
more_printf("SYSLINUX\n");
more_printf(" Bootloader : %s\n", hardware->syslinux_fs);
- more_printf(" Version : %s\n", hardware->sv->version_string + 2);
+ more_printf(" Version : %s\n", hardware->sv->version_string);
more_printf(" Version : %u\n", hardware->sv->version);
more_printf(" Max API : %u\n", hardware->sv->max_api);
- more_printf(" Copyright : %s\n", hardware->sv->copyright_string + 1);
+ more_printf(" Copyright : %s\n", hardware->sv->copyright_string);
}
struct cli_module_descr syslinux_show_modules = {
diff --git a/com32/hdt/hdt-menu-syslinux.c b/com32/hdt/hdt-menu-syslinux.c
index c85bfbf4..02de5b31 100644
--- a/com32/hdt/hdt-menu-syslinux.c
+++ b/com32/hdt/hdt-menu-syslinux.c
@@ -51,9 +51,9 @@ void compute_syslinuxmenu(struct s_my_menu *menu, struct s_hardware *hardware)
menu->items_count++;
snprintf(buffer, sizeof buffer, "Version : %s",
- hardware->sv->version_string + 2);
+ hardware->sv->version_string);
snprintf(statbuffer, sizeof statbuffer, "Version: %s",
- hardware->sv->version_string + 2);
+ hardware->sv->version_string);
add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0);
menu->items_count++;
@@ -71,10 +71,10 @@ void compute_syslinuxmenu(struct s_my_menu *menu, struct s_hardware *hardware)
add_item("", "", OPT_SEP, "", 0);
- snprintf(buffer, sizeof buffer, "%s", hardware->sv->copyright_string + 1);
+ snprintf(buffer, sizeof buffer, "%s", hardware->sv->copyright_string);
/* Remove the trailing LF in the copyright string to avoid scrolling */
snprintf(statbuffer, sizeof statbuffer, "%s",
- remove_trailing_lf(hardware->sv->copyright_string + 1));
+ remove_trailing_lf(hardware->sv->copyright_string));
add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0);
menu->items_count++;
diff --git a/com32/modules/Makefile b/com32/modules/Makefile
index b7d6212e..40df0c86 100644
--- a/com32/modules/Makefile
+++ b/com32/modules/Makefile
@@ -22,7 +22,7 @@ MODULES = chain.c32 config.c32 ethersel.c32 dmitest.c32 cpuidtest.c32 \
disk.c32 pcitest.c32 elf.c32 linux.c32 reboot.c32 pmload.c32 \
meminfo.c32 sdi.c32 sanboot.c32 ifcpu64.c32 vesainfo.c32 \
kbdmap.c32 cmd.c32 vpdtest.c32 host.c32 dir.c32 gpxecmd.c32 \
- ifcpu.c32
+ ifcpu.c32 cpuid.c32
TESTFILES =
diff --git a/com32/modules/cpuid.c b/com32/modules/cpuid.c
new file mode 100644
index 00000000..4758fbad
--- /dev/null
+++ b/com32/modules/cpuid.c
@@ -0,0 +1,60 @@
+/* ----------------------------------------------------------------------- *
+ *
+ * Copyright 2010 Intel Corporation; author: H. Peter Anvin
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston MA 02110-1301, USA; either version 2 of the License, or
+ * (at your option) any later version; incorporated herein by reference.
+ *
+ * ----------------------------------------------------------------------- */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/cpu.h>
+#include <console.h>
+#include <com32.h>
+
+static void dump_reg(const char *name, uint32_t val)
+{
+ int i;
+
+ printf("%-3s : %10d 0x%08x ", name, val, val);
+
+ for (i = 3; i >= 0; i--) {
+ uint8_t c = val >> (i*8);
+ putchar((c >= ' ' && c <= '~') ? c : '.');
+ }
+ putchar('\n');
+}
+
+int main(int argc, char *argv[])
+{
+ uint32_t leaf, counter;
+ uint32_t eax, ebx, ecx, edx;
+
+ openconsole(&dev_null_r, &dev_stdcon_w);
+
+ if (argc < 2 || argc > 4) {
+ printf("Usage: %s leaf [counter]\n", argv[0]);
+ exit(1);
+ }
+
+ leaf = strtoul(argv[1], NULL, 0);
+ counter = (argv > 2) ? strtoul(argv[2], NULL, 0) : 0;
+
+ if (!cpu_has_eflag(EFLAGS_ID)) {
+ printf("The CPUID instruction is not supported\n");
+ exit(1);
+ }
+
+ cpuid_count(leaf, counter, &eax, &ebx, &ecx, &edx);
+
+ dump_reg("eax", eax);
+ dump_reg("eax", ebx);
+ dump_reg("eax", ecx);
+ dump_reg("eax", edx);
+
+ return 0;
+}
diff --git a/core/conio.inc b/core/conio.inc
index 5157e485..b4505027 100644
--- a/core/conio.inc
+++ b/core/conio.inc
@@ -286,7 +286,6 @@ write_serial_str:
; pollchar: check if we have an input character pending (ZF = 0)
;
pollchar:
- call do_idle
pushad
mov ah,11h ; Poll keyboard
int 16h
diff --git a/core/diskstart.inc b/core/diskstart.inc
index 610c9fd4..c24b64ab 100644
--- a/core/diskstart.inc
+++ b/core/diskstart.inc
@@ -474,9 +474,8 @@ bootsignature dw kaboom.again-bootsec
LDLINUX_SYS equ ($-$$)+TEXT_START
ldlinux_sys:
-syslinux_banner db 0Dh, 0Ah
- db MY_NAME, ' ', VERSION_STR, ' ', DATE_STR, ' ', 0
- db 0Dh, 0Ah, 1Ah ; EOF if we "type" this in DOS
+syslinux_banner db CR, LF, MY_NAME, ' ', VERSION_STR, ' ', DATE_STR, ' ', 0
+ db CR, LF, 1Ah ; EOF if we "type" this in DOS
alignz 8
ldlinux_magic dd LDLINUX_MAGIC
diff --git a/core/pxelinux.asm b/core/pxelinux.asm
index 3020cf26..2e7e6075 100644
--- a/core/pxelinux.asm
+++ b/core/pxelinux.asm
@@ -333,6 +333,7 @@ kaboom:
.wait2: mov dx,[BIOS_timer]
.wait3: call pollchar
jnz .keypress
+ call do_idle
cmp dx,[BIOS_timer]
je .wait3
loop .wait2,ecx
diff --git a/core/ui.inc b/core/ui.inc
index d60d5ca7..00d2cfd3 100644
--- a/core/ui.inc
+++ b/core/ui.inc
@@ -545,6 +545,7 @@ getchar_timeout:
push word [__jiffies]
call pollchar
jnz .got_char
+ call do_idle
pop ax
cmp ax,[__jiffies] ; Has the timer advanced?
je .loop
diff --git a/doc/comboot.txt b/doc/comboot.txt
index 0f64097a..f39d7243 100644
--- a/doc/comboot.txt
+++ b/doc/comboot.txt
@@ -262,6 +262,10 @@ AX=0001h [2.00] Get Version
This API call returns the Syslinux version and API
information.
+ Note: before version 3.86, the version string had a leading CR LF
+ and the copyright string had a leading space. The strings might
+ still contain trailing CR and/or LF.
+
AX=0002h [2.01] Write String
diff --git a/memdisk/setup.c b/memdisk/setup.c
index bcb5d040..cec25ad3 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -648,7 +648,7 @@ static const struct geometry *get_disk_image_geometry(uint32_t where,
if (!hd_geometry.driveno)
hd_geometry.driveno = 0x80;
- if (*(uint16_t *) ((char *)where + 512 - 2) == 0xaa55) {
+ if (*(uint16_t *) ((char *)where + hd_geometry.offset + 512 - 2) == 0xaa55) {
for (i = 0; i < 4; i++) {
if (ptab[i].type && !(ptab[i].active & 0x7f)) {
s = (ptab[i].start_s & 0x3f);