diff options
author | Daniil Baturin <daniil@baturin.org> | 2015-03-05 18:26:04 +0600 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2015-03-05 18:26:04 +0600 |
commit | 856f9576619b46eee9d1bcf7d789875c4986d5f0 (patch) | |
tree | 713637be8b4a1c61d5d2542c1a25a98c3cc2dae0 | |
parent | a0addb5d8e568493dc659039487eb5b95c6da530 (diff) | |
download | hvinfo-856f9576619b46eee9d1bcf7d789875c4986d5f0.tar.gz hvinfo-856f9576619b46eee9d1bcf7d789875c4986d5f0.zip |
Minor cleanup.
-rw-r--r-- | src/hypervisor_check.adb | 6 |
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; |