Skip to content

Commit

Permalink
PetaLinux QEMU v2015.2
Browse files Browse the repository at this point in the history
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
  • Loading branch information
alistair23 committed Jul 9, 2015
2 parents aa35106 + 732f348 commit 02d2f02
Show file tree
Hide file tree
Showing 283 changed files with 47,158 additions and 3,865 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Expand Up @@ -11,7 +11,7 @@ option) any later version.

As of July 2013, contributions under version 2 of the GNU General Public
License (and no later version) are only accepted for the following files
or directories: bsd-user/, linux-user/, hw/misc/vfio.c, hw/xen/xen_pt*.
or directories: bsd-user/, linux-user/, hw/vfio/, hw/xen/xen_pt*.

3) The Tiny Code Generator (TCG) is released under the BSD license
(see license headers in files).
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Expand Up @@ -657,7 +657,7 @@ F: hw/usb/dev-serial.c
VFIO
M: Alex Williamson <alex.williamson@redhat.com>
S: Supported
F: hw/misc/vfio.c
F: hw/vfio/*

vhost
M: Michael S. Tsirkin <mst@redhat.com>
Expand Down
2 changes: 2 additions & 0 deletions Makefile.target
Expand Up @@ -88,6 +88,8 @@ obj-$(CONFIG_TCG_INTERPRETER) += tci.o
obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
obj-y += fpu/softfloat.o
obj-y += target-$(TARGET_BASE_ARCH)/
obj-y += etrace.o
obj-y += etrace-gpio.o
obj-y += disas.o
obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o
obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
Expand Down
14 changes: 10 additions & 4 deletions block.c
Expand Up @@ -456,7 +456,7 @@ int bdrv_create(BlockDriver *drv, const char* filename,
goto out;
}

if (qemu_in_coroutine()) {
if (0) {
/* Fast-path if already in coroutine context */
bdrv_create_co_entry(&cco);
} else {
Expand Down Expand Up @@ -2706,7 +2706,7 @@ static int bdrv_prwv_co(BlockDriverState *bs, int64_t offset,
bdrv_io_limits_disable(bs);
}

if (qemu_in_coroutine()) {
if (0) {
/* Fast-path if already in coroutine context */
bdrv_rw_co_entry(&rwco);
} else {
Expand Down Expand Up @@ -2775,6 +2775,12 @@ int bdrv_write(BlockDriverState *bs, int64_t sector_num,
return bdrv_rw_co(bs, sector_num, (uint8_t *)buf, nb_sectors, true, 0);
}

int bdrv_rw(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors, bool is_write)
{
return bdrv_rw_co(bs, sector_num, (uint8_t *)buf, nb_sectors, is_write, 0);
}

int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, BdrvRequestFlags flags)
{
Expand Down Expand Up @@ -5042,7 +5048,7 @@ int bdrv_flush(BlockDriverState *bs)
.ret = NOT_DONE,
};

if (qemu_in_coroutine()) {
if (0) {
/* Fast-path if already in coroutine context */
bdrv_flush_co_entry(&rwco);
} else {
Expand Down Expand Up @@ -5157,7 +5163,7 @@ int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors)
.ret = NOT_DONE,
};

if (qemu_in_coroutine()) {
if (0) {
/* Fast-path if already in coroutine context */
bdrv_discard_co_entry(&rwco);
} else {
Expand Down
6 changes: 6 additions & 0 deletions block/block-backend.c
Expand Up @@ -416,6 +416,12 @@ int blk_write(BlockBackend *blk, int64_t sector_num, const uint8_t *buf,
return bdrv_write(blk->bs, sector_num, buf, nb_sectors);
}

int blk_rw(BlockBackend *blk, int64_t sector_num, uint8_t *buf,
int nb_sectors, bool is_write)
{
return bdrv_rw(blk->bs, sector_num, buf, nb_sectors, is_write);
}

BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t sector_num,
int nb_sectors, BdrvRequestFlags flags,
BlockCompletionFunc *cb, void *opaque)
Expand Down
2 changes: 2 additions & 0 deletions block/raw_bsd.c
Expand Up @@ -209,6 +209,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
{
bs->sg = bs->file->sg;

#if 0
if (bs->probed && !bdrv_is_read_only(bs)) {
fprintf(stderr,
"WARNING: Image format was not specified for '%s' and probing "
Expand All @@ -219,6 +220,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
"restrictions.\n",
bs->file->filename);
}
#endif

return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions blockdev.c
Expand Up @@ -226,10 +226,12 @@ bool drive_check_orphaned(void)
/* Unless this is a default drive, this may be an oversight. */
if (!blk_get_attached_dev(blk) && !dinfo->is_default &&
dinfo->type != IF_NONE) {
#if 0
fprintf(stderr, "Warning: Orphaned drive without device: "
"id=%s,file=%s,if=%s,bus=%d,unit=%d\n",
blk_name(blk), blk_bs(blk)->filename, if_name[dinfo->type],
dinfo->bus, dinfo->unit);
#endif
rs = true;
}
}
Expand Down
9 changes: 4 additions & 5 deletions bsd-user/main.c
Expand Up @@ -34,6 +34,7 @@
#include "qemu/timer.h"
#include "qemu/envlist.h"

bool tcg_tb_chain = true;
int singlestep;
#if defined(CONFIG_USE_GUEST_BASE)
unsigned long mmap_min_addr;
Expand Down Expand Up @@ -850,6 +851,8 @@ int main(int argc, char **argv)
usage();
}
optind++;
} else if (!strcmp(r, "no-tb-chain")) {
tcg_tb_chain = false;
} else if (!strcmp(r, "singlestep")) {
singlestep = 1;
} else if (!strcmp(r, "strace")) {
Expand All @@ -863,14 +866,10 @@ int main(int argc, char **argv)
/* init debug */
qemu_set_log_filename(log_file);
if (log_mask) {
int mask;

mask = qemu_str_to_log_mask(log_mask);
if (!mask) {
if (!qemu_setup_log_args(log_mask)) {
qemu_print_log_usage(stdout);
exit(1);
}
qemu_set_log(mask);
}

if (optind >= argc) {
Expand Down
56 changes: 52 additions & 4 deletions configure
Expand Up @@ -335,6 +335,9 @@ libssh2=""
vhdx=""
quorum=""
numa=""
libgcrypt="yes"

dtc_internal=""

# parse CC options first
for opt do
Expand Down Expand Up @@ -996,6 +999,8 @@ for opt do
;;
--enable-fdt) fdt="yes"
;;
--force-internal-fdt) dtc_internal="yes"
;;
--disable-linux-aio) linux_aio="no"
;;
--enable-linux-aio) linux_aio="yes"
Expand Down Expand Up @@ -1129,6 +1134,10 @@ for opt do
;;
--enable-numa) numa="yes"
;;
--disable-libgcrypt) libgcrypt="no"
;;
--enable-libgcrypt) libgcrypt="yes"
;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
Expand Down Expand Up @@ -1400,6 +1409,8 @@ Advanced options (experts only):
--enable-quorum enable quorum block filter support
--disable-numa disable libnuma support
--enable-numa enable libnuma support
--disable-libgcrypt disable devices that depend on libgcrypt
--enable-libgcrypt enable use of libgcrypt
NOTE: The object files are built at the place where configure is launched
EOF
Expand Down Expand Up @@ -2872,6 +2883,34 @@ EOF
fi
fi

##########################################
# libgcrypt probe
if test "$libgcrypt" != "no" ; then
cat > $TMPC <<EOF
#include <stdio.h>
#include <gcrypt.h>
int main(void)
{
/* TODO: Check for specific version ranges. */
if (!gcry_check_version (GCRYPT_VERSION)) {
printf("libgcrypt version mismatch\n");
exit(1);
}
return 0;
}
EOF
libgcrypt_cflags=`libgcrypt-config --cflags`
libgcrypt_libs=`libgcrypt-config --libs`
if compile_prog "$libgcrypt_cflags" "$libgcrypt_libs" ; then
libgcrypt=yes
libs_softmmu="$libgcrypt_libs $libs_softmmu"
QEMU_CFLAGS="$QEMU_CFLAGS $libgcrypt_cflags"
else
feature_not_found "libgcrypt"
libgcrypt=no
fi
fi

##########################################
# libssh2 probe
min_libssh2_version=1.2.8
Expand Down Expand Up @@ -3026,7 +3065,7 @@ if test "$fdt" != "no" ; then
#include <libfdt_env.h>
int main(void) { return 0; }
EOF
if compile_prog "" "$fdt_libs" ; then
if compile_prog "" "$fdt_libs" && test "$dtc_internal" != "yes" ; then
# system DTC is good - use it
fdt=yes
elif test -d ${source_path}/dtc/libfdt ; then
Expand All @@ -3039,7 +3078,7 @@ EOF
symlink "$source_path/dtc/scripts" "dtc/scripts"
fi
fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
fdt_libs="\$(BUILD_DIR)/dtc/libfdt/libfdt.a"
elif test "$fdt" = "yes" ; then
# have neither and want - prompt for system/submodule install
error_exit "DTC (libfdt) not present. Your options:" \
Expand All @@ -3048,6 +3087,7 @@ EOF
" git submodule update --init dtc"
else
# don't have and don't want
dtc_internal=
fdt_libs=
fdt=no
fi
Expand Down Expand Up @@ -4105,7 +4145,7 @@ fi

if test "$solaris" = "no" ; then
if $ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then
LDFLAGS="-Wl,--warn-common $LDFLAGS"
LDFLAGS="$LDFLAGS"
fi
fi

Expand Down Expand Up @@ -4334,6 +4374,7 @@ echo "gcov $gcov_tool"
echo "gcov enabled $gcov"
echo "TPM support $tpm"
echo "libssh2 support $libssh2"
echo "libgcrypt $libgcrypt"
echo "TPM passthrough $tpm_passthrough"
echo "QOM debugging $qom_cast_debug"
echo "vhdx $vhdx"
Expand Down Expand Up @@ -4794,6 +4835,10 @@ if test "$quorum" = "yes" ; then
echo "CONFIG_QUORUM=y" >> $config_host_mak
fi

if test "$libgcrypt" = "yes" ; then
echo "CONFIG_LIBGCRYPT=y" >> $config_host_mak
fi

if test "$vhdx" = "yes" ; then
echo "CONFIG_VHDX=y" >> $config_host_mak
fi
Expand Down Expand Up @@ -5030,7 +5075,10 @@ case "$target_name" in
aarch64)
TARGET_BASE_ARCH=arm
bflt="yes"
gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
arm_gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
armv8_gdb_xml_files="aarch64-el1.xml aarch64-el2.xml aarch64-el3.xml"
gdb_xml_files="aarch64-core.xml aarch64-fpu.xml $arm_gdb_xml_files $armv8_gdb_xml_files"
echo $gdb_xml_files
;;
cris)
;;
Expand Down

0 comments on commit 02d2f02

Please sign in to comment.