From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5PV4-0002fG-Ge for qemu-devel@nongnu.org; Wed, 17 Jun 2015 22:24:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5PUz-0007hj-GP for qemu-devel@nongnu.org; Wed, 17 Jun 2015 22:24:18 -0400 Received: from terminus.zytor.com ([2001:1868:205::10]:45711 helo=mail.zytor.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5PUz-0007hV-9i for qemu-devel@nongnu.org; Wed, 17 Jun 2015 22:24:13 -0400 Date: Wed, 17 Jun 2015 23:23:56 -0300 From: Paulo Alcantara Message-ID: <20150617232356.53f63f0b@zytor.com> In-Reply-To: <20150617153504-mutt-send-email-mst@redhat.com> References: <1433023482-25721-1-git-send-email-pcacjr@zytor.com> <1433202521-3094-1-git-send-email-pcacjr@zytor.com> <1433202521-3094-3-git-send-email-pcacjr@zytor.com> <20150617153504-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 3/3] tests: add testcase for TCO watchdog emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: pbonzini@redhat.com, seabios@seabios.org, Paulo Alcantara , qemu-devel@nongnu.org On Wed, 17 Jun 2015 15:37:49 +0200 "Michael S. Tsirkin" wrote: > On Mon, Jun 01, 2015 at 08:48:41PM -0300, Paulo Alcantara wrote: > > v1 -> v2: > > * some cleanup > > * add test for TCO_LOCK bit > > v2 -> v3: > > * add tests for TCO control & status bits > > * fix check of SECOND_TO_STS bit (it's set in TCO2_STS reg) > > Changelog after -- please. > Pls add a bit of description here. Ok. > > > Signed-off-by: Paulo Alcantara > > --- > > tests/Makefile | 2 + > > tests/tco-test.c | 475 > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files > > changed, 477 insertions(+) create mode 100644 tests/tco-test.c > > > > diff --git a/tests/Makefile b/tests/Makefile > > index 729b969..43950d0 100644 > > --- a/tests/Makefile > > +++ b/tests/Makefile > > @@ -150,6 +150,7 @@ check-qtest-i386-y += tests/i440fx-test$(EXESUF) > > check-qtest-i386-y += tests/fw_cfg-test$(EXESUF) > > check-qtest-i386-y += tests/drive_del-test$(EXESUF) > > check-qtest-i386-y += tests/wdt_ib700-test$(EXESUF) > > +check-qtest-i386-y += tests/tco-test$(EXESUF) > > gcov-files-i386-y += hw/watchdog/watchdog.c hw/watchdog/wdt_ib700.c > > check-qtest-i386-y += $(check-qtest-pci-y) > > gcov-files-i386-y += $(gcov-files-pci-y) > > @@ -363,6 +364,7 @@ tests/eepro100-test$(EXESUF): > > tests/eepro100-test.o tests/vmxnet3-test$(EXESUF): > > tests/vmxnet3-test.o tests/ne2000-test$(EXESUF): tests/ne2000-test.o > > tests/wdt_ib700-test$(EXESUF): tests/wdt_ib700-test.o > > +tests/tco-test$(EXESUF): tests/tco-test.o $(libqos-pc-obj-y) > > tests/virtio-balloon-test$(EXESUF): tests/virtio-balloon-test.o > > tests/virtio-blk-test$(EXESUF): tests/virtio-blk-test.o > > $(libqos-virtio-obj-y) tests/virtio-net-test$(EXESUF): > > tests/virtio-net-test.o $(libqos-pc-obj-y) diff --git > > a/tests/tco-test.c b/tests/tco-test.c new file mode 100644 > > index 0000000..b9acf43 > > --- /dev/null > > +++ b/tests/tco-test.c > > @@ -0,0 +1,475 @@ > > +/* > > + * QEMU ICH9 TCO emulation tests > > + * > > + * Copyright (c) 2015 Paulo Alcantara > > + * > > + * Permission is hereby granted, free of charge, to any person > > obtaining a copy > > + * of this software and associated documentation files (the > > "Software"), to deal > > + * in the Software without restriction, including without > > limitation the rights > > + * to use, copy, modify, merge, publish, distribute, sublicense, > > and/or sell > > + * copies of the Software, and to permit persons to whom the > > Software is > > + * furnished to do so, subject to the following conditions: > > + * > > + * The above copyright notice and this permission notice shall be > > included in > > + * all copies or substantial portions of the Software. > > + * > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, > > EXPRESS OR > > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > > MERCHANTABILITY, > > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO > > EVENT SHALL > > + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, > > DAMAGES OR OTHER > > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, > > ARISING FROM, > > + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > > DEALINGS IN > > + * THE SOFTWARE. > > + */ > > +#include > > +#include > > +#include > > +#include > > + > > +#include "libqtest.h" > > +#include "libqos/pci.h" > > +#include "libqos/pci-pc.h" > > +#include "hw/pci/pci_regs.h" > > +#include "hw/i386/ich9.h" > > +#include "hw/acpi/ich9.h" > > +#include "hw/acpi/tco.h" > > + > > +#define PM_IO_BASE_ADDR 0xb000 > > +#define RCBA_BASE_ADDR 0xfed1c000 > > + > > This is duplicated in DSL. Add a macro? Ok. I will add a macro for RCBA address. Thanks, Paulo -- Paulo Alcantara, C.E.S.A.R Speaking for myself only.