aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bhyvectl
diff options
context:
space:
mode:
authorNeel Natu <neel@FreeBSD.org>2013-01-09 04:04:30 +0000
committerNeel Natu <neel@FreeBSD.org>2013-01-09 04:04:30 +0000
commitc83f77500cb2e9bacf9512576de76fc3ad5e10c1 (patch)
tree213b9a08ad8ab039ded9e63bf8b3c85f821edd9b /usr.sbin/bhyvectl
parent0ff4c7027183cee52f2ee4775f3f354cc500c571 (diff)
downloadsrc-c83f77500cb2e9bacf9512576de76fc3ad5e10c1.tar.gz
src-c83f77500cb2e9bacf9512576de76fc3ad5e10c1.zip
Get rid of 'sample.sh' from here - it belongs in the /usr/share/examples
directory. Obtained from: NetApp
Notes
Notes: svn path=/projects/bhyve/; revision=245213
Diffstat (limited to 'usr.sbin/bhyvectl')
-rwxr-xr-xusr.sbin/bhyvectl/sample.sh75
1 files changed, 0 insertions, 75 deletions
diff --git a/usr.sbin/bhyvectl/sample.sh b/usr.sbin/bhyvectl/sample.sh
deleted file mode 100755
index 356bd5f4301d..000000000000
--- a/usr.sbin/bhyvectl/sample.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD$
-
-BHYVECTL="sudo ./bhyvectl"
-VMNAME=sample
-
-${BHYVECTL} --vm=${VMNAME} --create
-${BHYVECTL} --vm=${VMNAME} --set-lowmem=128 --set-highmem=256
-${BHYVECTL} --vm=${VMNAME} --get-lowmem --get-highmem
-
-CR0_PE=$((1 << 0))
-CR0_PG=$((1 << 31))
-CR0=$(($CR0_PE | $CR0_PG))
-${BHYVECTL} --vm=${VMNAME} --set-cr0=${CR0} --get-cr0
-
-# XXX this is bogus the value of %cr3 should come from the loader
-CR3=0
-${BHYVECTL} --vm=${VMNAME} --set-cr3=${CR3} --get-cr3
-
-CR4_PAE=$((1 << 5))
-CR4=$((${CR4_PAE}))
-${BHYVECTL} --vm=${VMNAME} --set-cr4=${CR4} --get-cr4
-
-DR7=0x00000400 # Table 9-1 from Intel Architecture Manual 3A
-${BHYVECTL} --vm=${VMNAME} --set-dr7=${DR7} --get-dr7
-
-#
-# XXX the values of rsp and rip are bogus and should come from the loader.
-#
-RSP=0xa5a5a5a5
-RIP=0x0000bfbfbfbf0000
-RFLAGS=0x2
-${BHYVECTL} --vm=${VMNAME} --set-rsp=${RSP} --get-rsp
-${BHYVECTL} --vm=${VMNAME} --set-rip=${RIP} --get-rip
-${BHYVECTL} --vm=${VMNAME} --set-rflags=${RFLAGS} --get-rflags
-
-# Set "hidden" state of %cs descriptor to indicate long mode code segment.
-#
-# Note that this should match the contents of the entry pointed to by the
-# segment selector in the GDTR.
-#
-${BHYVECTL} --vm=${VMNAME} --set-desc-cs --desc-access=0x00002098 --get-desc-cs
-
-# Set "hidden" state of all data descriptors to indicate a usable segment.
-# The only useful fields are the "Present" and "Descriptor Type" bits.
-${BHYVECTL} --vm=${VMNAME} --set-desc-ds --desc-access=0x00000090 --get-desc-ds
-${BHYVECTL} --vm=${VMNAME} --set-desc-es --desc-access=0x00000090 --get-desc-es
-${BHYVECTL} --vm=${VMNAME} --set-desc-fs --desc-access=0x00000090 --get-desc-fs
-${BHYVECTL} --vm=${VMNAME} --set-desc-gs --desc-access=0x00000090 --get-desc-gs
-${BHYVECTL} --vm=${VMNAME} --set-desc-ss --desc-access=0x00000090 --get-desc-ss
-
-#
-# Set the code segment selector to point to entry at offset 8 in the GDTR.
-#
-${BHYVECTL} --vm=${VMNAME} --set-cs=0x0008 --get-cs
-
-# Set all the remaining data segment selectors to point to entry at offset
-# 16 in the GDTR.
-${BHYVECTL} --vm=${VMNAME} --set-ds=0x0010 --get-ds
-${BHYVECTL} --vm=${VMNAME} --set-es=0x0010 --get-es
-${BHYVECTL} --vm=${VMNAME} --set-fs=0x0010 --get-fs
-${BHYVECTL} --vm=${VMNAME} --set-gs=0x0010 --get-gs
-${BHYVECTL} --vm=${VMNAME} --set-ss=0x0010 --get-ss
-
-# XXX the value of the GDTR should come from the loader.
-# Set the GDTR
-GDTR_BASE=0xffff0000
-GDTR_LIMIT=0x10
-${BHYVECTL} --vm=${VMNAME} --set-desc-gdtr --desc-base=${GDTR_BASE} --desc-limit=${GDTR_LIMIT} --get-desc-gdtr
-
-${BHYVECTL} --vm=${VMNAME} --set-pinning=0 --get-pinning
-${BHYVECTL} --vm=${VMNAME} --set-pinning=-1 --get-pinning
-
-${BHYVECTL} --vm=${VMNAME} --destroy