[Qemu-devel] [PATCH v2 1/3] target-xtensa: add dc233c core

2012-04-15 Thread Max Filippov
This is Diamond 233L Standard Core Rev.C (LE), implemented through
linux/gdb overlay.

Signed-off-by: Max Filippov jcmvb...@gmail.com
---
 Makefile.target|1 +
 target-xtensa/core-dc233c.c|   55 
 target-xtensa/core-dc233c/core-isa.h   |  475 
 target-xtensa/core-dc233c/gdb-config.c |  145 ++
 4 files changed, 676 insertions(+), 0 deletions(-)
 create mode 100644 target-xtensa/core-dc233c.c
 create mode 100644 target-xtensa/core-dc233c/core-isa.h
 create mode 100644 target-xtensa/core-dc233c/gdb-config.c

diff --git a/Makefile.target b/Makefile.target
index 65fb8f0..3ab791a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -416,6 +416,7 @@ obj-xtensa-y += xtensa_sim.o
 obj-xtensa-y += xtensa_lx60.o
 obj-xtensa-y += xtensa-semi.o
 obj-xtensa-y += core-dc232b.o
+obj-xtensa-y += core-dc233c.o
 obj-xtensa-y += core-fsf.o
 
 main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
diff --git a/target-xtensa/core-dc233c.c b/target-xtensa/core-dc233c.c
new file mode 100644
index 000..d643f41
--- /dev/null
+++ b/target-xtensa/core-dc233c.c
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2012, Max Filippov, Open Source and Linux Lab.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Open Source and Linux Lab nor the
+ *   names of its contributors may be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include cpu.h
+#include exec-all.h
+#include gdbstub.h
+#include qemu-common.h
+#include host-utils.h
+
+#include core-dc233c/core-isa.h
+#include overlay_tool.h
+
+static const XtensaConfig dc233c = {
+.name = dc233c,
+.options = XTENSA_OPTIONS,
+.gdb_regmap = {
+.num_regs = 121,
+.num_core_regs = 52,
+.reg = {
+#include core-dc233c/gdb-config.c
+}
+},
+.nareg = XCHAL_NUM_AREGS,
+.ndepc = 1,
+EXCEPTIONS_SECTION,
+INTERRUPTS_SECTION,
+TLB_SECTION,
+.clock_freq_khz = 1,
+};
+
+REGISTER_CORE(dc233c)
diff --git a/target-xtensa/core-dc233c/core-isa.h 
b/target-xtensa/core-dc233c/core-isa.h
new file mode 100644
index 000..8476dc3
--- /dev/null
+++ b/target-xtensa/core-dc233c/core-isa.h
@@ -0,0 +1,475 @@
+/*
+ * xtensa/config/core-isa.h -- HAL definitions that are dependent on Xtensa
+ *  processor CORE configuration
+ *
+ *  See xtensa/config/core.h, which includes this file, for more details.
+ */
+
+/* Xtensa processor core configuration information.
+
+   Copyright (c) 1999-2010 Tensilica Inc.
+
+   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.  */
+
+#ifndef 

Re: [Qemu-devel] [PATCH v2 1/3] target-xtensa: add dc233c core

2012-04-15 Thread Andreas Färber
Am 15.04.2012 17:12, schrieb Max Filippov:
 This is Diamond 233L Standard Core Rev.C (LE), implemented through
 linux/gdb overlay.
 
 Signed-off-by: Max Filippov jcmvb...@gmail.com
 ---
  Makefile.target|1 +
  target-xtensa/core-dc233c.c|   55 
  target-xtensa/core-dc233c/core-isa.h   |  475 
 
  target-xtensa/core-dc233c/gdb-config.c |  145 ++
  4 files changed, 676 insertions(+), 0 deletions(-)
  create mode 100644 target-xtensa/core-dc233c.c
  create mode 100644 target-xtensa/core-dc233c/core-isa.h
  create mode 100644 target-xtensa/core-dc233c/gdb-config.c

Thanks, whole series

Reviewed-by: Andreas Färber afaer...@suse.de

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



Re: [Qemu-devel] [PATCH v2 1/3] target-xtensa: add dc233c core

2012-04-15 Thread Blue Swirl
On Sun, Apr 15, 2012 at 15:16, Andreas Färber afaer...@suse.de wrote:
 Am 15.04.2012 17:12, schrieb Max Filippov:
 This is Diamond 233L Standard Core Rev.C (LE), implemented through
 linux/gdb overlay.

 Signed-off-by: Max Filippov jcmvb...@gmail.com
 ---
  Makefile.target                        |    1 +
  target-xtensa/core-dc233c.c            |   55 
  target-xtensa/core-dc233c/core-isa.h   |  475 
 
  target-xtensa/core-dc233c/gdb-config.c |  145 ++
  4 files changed, 676 insertions(+), 0 deletions(-)
  create mode 100644 target-xtensa/core-dc233c.c
  create mode 100644 target-xtensa/core-dc233c/core-isa.h
  create mode 100644 target-xtensa/core-dc233c/gdb-config.c

 Thanks, whole series

 Reviewed-by: Andreas Färber afaer...@suse.de

Thanks, applied all. Please use the cover letter (--cover-letter in git).


 Andreas

 --
 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
 GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg