summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-03-05 18:26:04 +0600
committerDaniil Baturin <daniil@baturin.org>2015-03-05 18:26:04 +0600
commit856f9576619b46eee9d1bcf7d789875c4986d5f0 (patch)
tree713637be8b4a1c61d5d2542c1a25a98c3cc2dae0
parenta0addb5d8e568493dc659039487eb5b95c6da530 (diff)
downloadhvinfo-856f9576619b46eee9d1bcf7d789875c4986d5f0.tar.gz
hvinfo-856f9576619b46eee9d1bcf7d789875c4986d5f0.zip
Minor cleanup.
-rw-r--r--src/hypervisor_check.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hypervisor_check.adb b/src/hypervisor_check.adb
index d939cd9..998070b 100644
--- a/src/hypervisor_check.adb
+++ b/src/hypervisor_check.adb
@@ -27,17 +27,17 @@ package body Hypervisor_Check is
-- Hypervisors should set the bit 31 of %ecx to 1 in CPUID leaf 1
function Hypervisor_Present return Boolean is
Registers : CPUID_Registers;
- ECX : Unsigned_32;
begin
Registers := CPUID (1);
- ECX := Shift_Right (Registers(3), 31);
- if (ecx and 1) = 1 then
+ if (((Shift_Right (Registers(3), 31)) and 1) = 1) then
return True;
else
return False;
end if;
end Hypervisor_Present;
+ -- Calling CPUID instruction with hypervisor leaf in %eax
+ -- puts the vendor string in %ebx, %ecx, and %edx
function Get_Vendor_String return US.Unbounded_String is
use US;
Vendor_String : US.Unbounded_String;