diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-09-29 21:32:42 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-09-29 21:32:42 -0700 |
commit | 6ce3fcc997931e7903408724b4cade3ed09b1e99 (patch) | |
tree | 199aebb75f3c037f3f2f307f05539764e7e8bc2a | |
parent | 1c8d53bf85b1f570d1dc69b1498b880a3ade836a (diff) | |
parent | 633ce833e5be19ee51400e5e5771ffb880c4291a (diff) | |
download | syslinux-3.83-pre12.tar.gz |
Merge branch 'hdt'syslinux-3.83-pre12
-rw-r--r-- | com32/gplinclude/cpuid.h | 2 | ||||
-rw-r--r-- | com32/gpllib/cpuid.c | 2 | ||||
-rw-r--r-- | com32/hdt/hdt-cli-cpu.c | 4 | ||||
-rw-r--r-- | com32/hdt/hdt-menu-processor.c | 4 | ||||
-rw-r--r-- | com32/include/cpufeature.h | 2 | ||||
-rw-r--r-- | com32/modules/chain.c | 8 | ||||
-rw-r--r-- | com32/modules/cpuidtest.c | 4 |
7 files changed, 22 insertions, 4 deletions
diff --git a/com32/gplinclude/cpuid.h b/com32/gplinclude/cpuid.h index 95d66e99..0b59a08f 100644 --- a/com32/gplinclude/cpuid.h +++ b/com32/gplinclude/cpuid.h @@ -65,6 +65,8 @@ typedef struct { bool nowext; /* AMD 3DNow! extensions */ bool now; /* 3DNow! */ bool smp; /* A smp configuration has been found */ + bool vmx; /* Hardware virtualization */ + bool svm; /* Secure virtual machine */ } s_cpu_flags; typedef struct { diff --git a/com32/gpllib/cpuid.c b/com32/gpllib/cpuid.c index 6d464c7e..fb69cef6 100644 --- a/com32/gpllib/cpuid.c +++ b/com32/gpllib/cpuid.c @@ -295,6 +295,8 @@ void set_cpu_flags(struct cpuinfo_x86 *c, s_cpu * cpu) cpu->flags.nowext = cpu_has(c, X86_FEATURE_3DNOWEXT); cpu->flags.now = cpu_has(c, X86_FEATURE_3DNOW); cpu->flags.smp = find_smp_config(); + cpu->flags.vmx = cpu_has(c, X86_FEATURE_VMX); + cpu->flags.svm = cpu_has(c, X86_FEATURE_SVM); } void set_generic_info(struct cpuinfo_x86 *c, s_cpu * cpu) diff --git a/com32/hdt/hdt-cli-cpu.c b/com32/hdt/hdt-cli-cpu.c index f0f0a1bb..d2b5979f 100644 --- a/com32/hdt/hdt-cli-cpu.c +++ b/com32/hdt/hdt-cli-cpu.c @@ -174,6 +174,10 @@ static void show_cpu(int argc __unused, char **argv __unused, strcat(buffer1, "3dnowext "); if (hardware->cpu.flags.now) strcat(buffer1, "3dnow! "); + if (hardware->cpu.flags.svm) + strcat(buffer1, "svm "); + if (hardware->cpu.flags.vmx) + strcat(buffer1, "vmx "); if (buffer1[0]) { snprintf(buffer, sizeof buffer, "Flags : %s\n", buffer1); more_printf(buffer); diff --git a/com32/hdt/hdt-menu-processor.c b/com32/hdt/hdt-menu-processor.c index a30cf0f6..4e102cb5 100644 --- a/com32/hdt/hdt-menu-processor.c +++ b/com32/hdt/hdt-menu-processor.c @@ -231,6 +231,10 @@ void compute_processor(struct s_my_menu *menu, struct s_hardware *hardware) strcat(buffer1, "3dnowext "); if (hardware->cpu.flags.now) strcat(buffer1, "3dnow! "); + if (hardware->cpu.flags.vmx) + strcat(buffer1, "vmx "); + if (hardware->cpu.flags.svm) + strcat(buffer1, "svm "); snprintf(buffer, sizeof buffer, "Flags : %s", buffer1); snprintf(statbuffer, sizeof statbuffer, "Flags: %s", buffer1); add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); diff --git a/com32/include/cpufeature.h b/com32/include/cpufeature.h index 2fd47579..036631a7 100644 --- a/com32/include/cpufeature.h +++ b/com32/include/cpufeature.h @@ -72,6 +72,7 @@ #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ #define X86_FEATURE_MWAIT (4*32+ 3) /* Monitor/Mwait support */ #define X86_FEATURE_DSCPL (4*32+ 4) /* CPL Qualified Debug Store */ +#define X86_FEATURE_VMX (4*32+ 5) /* Hardware virtualization */ #define X86_FEATURE_EST (4*32+ 7) /* Enhanced SpeedStep */ #define X86_FEATURE_TM2 (4*32+ 8) /* Thermal Monitor 2 */ #define X86_FEATURE_CID (4*32+10) /* Context ID */ @@ -87,6 +88,7 @@ /* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ #define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ #define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */ +#define X86_FEATURE_SVM (6*32+ 2) /* Secure virtual machine */ #endif /* __ASM_I386_CPUFEATURE_H */ diff --git a/com32/modules/chain.c b/com32/modules/chain.c index bdeb82d5..a8c4adea 100644 --- a/com32/modules/chain.c +++ b/com32/modules/chain.c @@ -446,7 +446,7 @@ static void do_boot(void *boot_sector, size_t boot_size, mmap = syslinux_memory_map(); if (!mmap) { - error("Cannot read system memory map"); + error("Cannot read system memory map\n"); return; } @@ -547,11 +547,11 @@ static void do_boot(void *boot_sector, size_t boot_size, return; too_big: - error("Loader file too large"); + error("Loader file too large\n"); return; enomem: - error("Out of memory"); + error("Out of memory\n"); return; } @@ -614,7 +614,7 @@ int main(int argc, char *argv[]) } else if (!strncmp(argv[i], "seg=", 4)) { uint32_t segval = strtoul(argv[i] + 4, NULL, 0); if (segval < 0x50 || segval > 0x9f000) { - error("Invalid segment"); + error("Invalid segment\n"); goto bail; } opt.seg = segval; diff --git a/com32/modules/cpuidtest.c b/com32/modules/cpuidtest.c index bfc1c190..b7688852 100644 --- a/com32/modules/cpuidtest.c +++ b/com32/modules/cpuidtest.c @@ -121,6 +121,10 @@ int main(void) printf("3dnowext "); if (cpu.flags.now) printf("3dnow! "); + if (cpu.flags.vmx) + printf("vmx "); + if (cpu.flags.svm) + printf("svm "); printf("\n"); printf("SMP = "); if (cpu.flags.smp) |