* [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
@ 2009-01-11 9:10 Shin-ichiro KAWASAKI
2009-01-11 12:57 ` Edgar E. Iglesias
2009-01-11 13:04 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 2 replies; 21+ messages in thread
From: Shin-ichiro KAWASAKI @ 2009-01-11 9:10 UTC (permalink / raw)
To: qemu-devel
This patch simply provides basic SE7750 board definition.
Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
Index: trunk/target-sh4/machine.c
===================================================================
--- trunk/target-sh4/machine.c (revision 6133)
+++ trunk/target-sh4/machine.c (working copy)
@@ -5,4 +5,5 @@
{
qemu_register_machine(&shix_machine);
qemu_register_machine(&r2d_machine);
+ qemu_register_machine(&se7750_machine);
}
Index: trunk/target-sh4/translate.c
===================================================================
--- trunk/target-sh4/translate.c (revision 6133)
+++ trunk/target-sh4/translate.c (working copy)
@@ -212,6 +212,12 @@
static sh4_def_t sh4_defs[] = {
{
+ .name = "SH7750",
+ .id = SH_CPU_SH7750,
+ .pvr = 0x04020500,
+ .prr = 0x00000000,
+ .cvr = 0x00000000,
+ }, {
.name = "SH7750R",
.id = SH_CPU_SH7750R,
.pvr = 0x00050000,
Index: trunk/Makefile.target
===================================================================
--- trunk/Makefile.target (revision 6133)
+++ trunk/Makefile.target (working copy)
@@ -719,7 +719,7 @@
CPPFLAGS += -DHAS_AUDIO
endif
ifeq ($(TARGET_BASE_ARCH), sh4)
-OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
+OBJS+= shix.o r2d.o se.o sh7750.o sh7750_regnames.o tc58128.o
OBJS+= sh_timer.o ptimer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o
OBJS+= ide.o
endif
Index: trunk/hw/se.c
===================================================================
--- trunk/hw/se.c (revision 0)
+++ trunk/hw/se.c (revision 0)
@@ -0,0 +1,94 @@
+/*
+ * Hitachi ULSI Systems' evaludation boards, Solution Engine emulation.
+ *
+ * Copyright (c) 2008 Shin-ichiro KAWASAKI
+ *
+ * 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 "hw.h"
+#include "sh.h"
+#include "sysemu.h"
+#include "boards.h"
+#include "sh7750_regs.h"
+
+#define SDRAM_BASE 0x0c000000 /* Physical location of SDRAM: Area 3 */
+#define SDRAM_SIZE 0x02000000
+#define ENTRY_OFFSET 0x00001000
+#define COMMAND_LINE_OFFSET 0x0000100
+
+static void se7750_init(ram_addr_t ram_size, int vga_ram_size,
+ const char *boot_device, DisplayState * ds,
+ const char *kernel_filename, const char *kernel_cmdline,
+ const char *initrd_filename, const char *cpu_model)
+{
+ CPUState *env;
+ struct SH7750State *s;
+ ram_addr_t sdram_addr;
+ int kernel_size;
+ uint8 * phys_load_addr = phys_ram_base;
+
+ /* initialize CPU */
+ if (!cpu_model)
+ cpu_model = "SH7750";
+
+ env = cpu_init(cpu_model);
+ if (!env) {
+ fprintf(stderr, "Unable to find CPU definition\n");
+ exit(1);
+ }
+
+ /* Allocate memory space */
+ sdram_addr = qemu_ram_alloc(SDRAM_SIZE);
+ cpu_register_physical_memory(SDRAM_BASE, SDRAM_SIZE, sdram_addr);
+
+ /* Register peripherals */
+ s = sh7750_init(env);
+
+ /* initialization which should be done by firmware */
+ uint32_t bcr1 = 1 << 3; /* cs3 SDRAM */
+ uint16_t bcr2 = 3 << (3 * 2); /* cs3 32-bit */
+ cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
+ cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
+
+ /* Start from P2 area */
+ env->pc = SDRAM_BASE | 0xa0000000;
+
+ /* pass kernel cmdline */
+ if (kernel_cmdline) {
+ pstrcpy((char *)phys_load_addr + ENTRY_OFFSET + COMMAND_LINE_OFFSET,
+ strlen(kernel_cmdline) + 1, kernel_cmdline);
+ env->pc += 0x80000;
+ phys_load_addr += 0x80000;
+ }
+
+ /* load kernel image */
+ kernel_size = load_image(kernel_filename, phys_load_addr);
+ if (kernel_size < 0) {
+ fprintf(stderr, "qemu: could not load kernel '%s'\n", kernel_filename);
+ exit(1);
+ }
+}
+
+QEMUMachine se7750_machine = {
+ .name = "se7750",
+ .desc = "Solution Engine SH7750 board",
+ .init = se7750_init,
+ .ram_require = SDRAM_SIZE | RAMSIZE_FIXED,
+};
Index: trunk/hw/boards.h
===================================================================
--- trunk/hw/boards.h (revision 6133)
+++ trunk/hw/boards.h (working copy)
@@ -60,6 +60,9 @@
/* r2d.c */
extern QEMUMachine r2d_machine;
+/* se.c */
+extern QEMUMachine se7750_machine;
+
/* sun4m.c */
extern QEMUMachine ss5_machine, ss10_machine, ss600mp_machine, ss20_machine;
extern QEMUMachine voyager_machine, ss_lx_machine, ss4_machine, scls_machine;
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-11 9:10 [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition Shin-ichiro KAWASAKI
@ 2009-01-11 12:57 ` Edgar E. Iglesias
2009-01-11 13:04 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 0 replies; 21+ messages in thread
From: Edgar E. Iglesias @ 2009-01-11 12:57 UTC (permalink / raw)
To: Shin-ichiro KAWASAKI; +Cc: qemu-devel
On Sun, Jan 11, 2009 at 06:10:22PM +0900, Shin-ichiro KAWASAKI wrote:
> This patch simply provides basic SE7750 board definition.
This looks good to me.
> Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
>
> Index: trunk/target-sh4/machine.c
> ===================================================================
> --- trunk/target-sh4/machine.c (revision 6133)
> +++ trunk/target-sh4/machine.c (working copy)
> @@ -5,4 +5,5 @@
> {
> qemu_register_machine(&shix_machine);
> qemu_register_machine(&r2d_machine);
> + qemu_register_machine(&se7750_machine);
> }
> Index: trunk/target-sh4/translate.c
> ===================================================================
> --- trunk/target-sh4/translate.c (revision 6133)
> +++ trunk/target-sh4/translate.c (working copy)
> @@ -212,6 +212,12 @@
>
> static sh4_def_t sh4_defs[] = {
> {
> + .name = "SH7750",
> + .id = SH_CPU_SH7750,
> + .pvr = 0x04020500,
> + .prr = 0x00000000,
> + .cvr = 0x00000000,
> + }, {
> .name = "SH7750R",
> .id = SH_CPU_SH7750R,
> .pvr = 0x00050000,
> Index: trunk/Makefile.target
> ===================================================================
> --- trunk/Makefile.target (revision 6133)
> +++ trunk/Makefile.target (working copy)
> @@ -719,7 +719,7 @@
> CPPFLAGS += -DHAS_AUDIO
> endif
> ifeq ($(TARGET_BASE_ARCH), sh4)
> -OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
> +OBJS+= shix.o r2d.o se.o sh7750.o sh7750_regnames.o tc58128.o
> OBJS+= sh_timer.o ptimer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o
> OBJS+= ide.o
> endif
> Index: trunk/hw/se.c
> ===================================================================
> --- trunk/hw/se.c (revision 0)
> +++ trunk/hw/se.c (revision 0)
> @@ -0,0 +1,94 @@
> +/*
> + * Hitachi ULSI Systems' evaludation boards, Solution Engine emulation.
> + *
> + * Copyright (c) 2008 Shin-ichiro KAWASAKI
> + *
> + * 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 "hw.h"
> +#include "sh.h"
> +#include "sysemu.h"
> +#include "boards.h"
> +#include "sh7750_regs.h"
> +
> +#define SDRAM_BASE 0x0c000000 /* Physical location of SDRAM: Area 3 */
> +#define SDRAM_SIZE 0x02000000
> +#define ENTRY_OFFSET 0x00001000
> +#define COMMAND_LINE_OFFSET 0x0000100
> +
> +static void se7750_init(ram_addr_t ram_size, int vga_ram_size,
> + const char *boot_device, DisplayState * ds,
> + const char *kernel_filename, const char *kernel_cmdline,
> + const char *initrd_filename, const char *cpu_model)
> +{
> + CPUState *env;
> + struct SH7750State *s;
> + ram_addr_t sdram_addr;
> + int kernel_size;
> + uint8 * phys_load_addr = phys_ram_base;
> +
> + /* initialize CPU */
> + if (!cpu_model)
> + cpu_model = "SH7750";
> +
> + env = cpu_init(cpu_model);
> + if (!env) {
> + fprintf(stderr, "Unable to find CPU definition\n");
> + exit(1);
> + }
> +
> + /* Allocate memory space */
> + sdram_addr = qemu_ram_alloc(SDRAM_SIZE);
> + cpu_register_physical_memory(SDRAM_BASE, SDRAM_SIZE, sdram_addr);
> +
> + /* Register peripherals */
> + s = sh7750_init(env);
> +
> + /* initialization which should be done by firmware */
> + uint32_t bcr1 = 1 << 3; /* cs3 SDRAM */
> + uint16_t bcr2 = 3 << (3 * 2); /* cs3 32-bit */
> + cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
> + cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
> +
> + /* Start from P2 area */
> + env->pc = SDRAM_BASE | 0xa0000000;
> +
> + /* pass kernel cmdline */
> + if (kernel_cmdline) {
> + pstrcpy((char *)phys_load_addr + ENTRY_OFFSET + COMMAND_LINE_OFFSET,
> + strlen(kernel_cmdline) + 1, kernel_cmdline);
> + env->pc += 0x80000;
> + phys_load_addr += 0x80000;
> + }
> +
> + /* load kernel image */
> + kernel_size = load_image(kernel_filename, phys_load_addr);
> + if (kernel_size < 0) {
> + fprintf(stderr, "qemu: could not load kernel '%s'\n", kernel_filename);
> + exit(1);
> + }
> +}
> +
> +QEMUMachine se7750_machine = {
> + .name = "se7750",
> + .desc = "Solution Engine SH7750 board",
> + .init = se7750_init,
> + .ram_require = SDRAM_SIZE | RAMSIZE_FIXED,
> +};
> Index: trunk/hw/boards.h
> ===================================================================
> --- trunk/hw/boards.h (revision 6133)
> +++ trunk/hw/boards.h (working copy)
> @@ -60,6 +60,9 @@
> /* r2d.c */
> extern QEMUMachine r2d_machine;
>
> +/* se.c */
> +extern QEMUMachine se7750_machine;
> +
> /* sun4m.c */
> extern QEMUMachine ss5_machine, ss10_machine, ss600mp_machine, ss20_machine;
> extern QEMUMachine voyager_machine, ss_lx_machine, ss4_machine, scls_machine;
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-11 9:10 [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition Shin-ichiro KAWASAKI
2009-01-11 12:57 ` Edgar E. Iglesias
@ 2009-01-11 13:04 ` Jean-Christophe PLAGNIOL-VILLARD
2009-01-12 3:48 ` Shin-ichiro KAWASAKI
1 sibling, 1 reply; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-01-11 13:04 UTC (permalink / raw)
To: Shin-ichiro KAWASAKI; +Cc: qemu-devel
On 18:10 Sun 11 Jan , Shin-ichiro KAWASAKI wrote:
> This patch simply provides basic SE7750 board definition.
>
>
> Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
>
> Index: trunk/target-sh4/machine.c
> ===================================================================
> --- trunk/target-sh4/machine.c (revision 6133)
> +++ trunk/target-sh4/machine.c (working copy)
> @@ -5,4 +5,5 @@
> {
> qemu_register_machine(&shix_machine);
> qemu_register_machine(&r2d_machine);
> + qemu_register_machine(&se7750_machine);
> }
> Index: trunk/target-sh4/translate.c
> ===================================================================
> --- trunk/target-sh4/translate.c (revision 6133)
> +++ trunk/target-sh4/translate.c (working copy)
> @@ -212,6 +212,12 @@
>
> static sh4_def_t sh4_defs[] = {
> {
> + .name = "SH7750",
> + .id = SH_CPU_SH7750,
> + .pvr = 0x04020500,
> + .prr = 0x00000000,
> + .cvr = 0x00000000,
> + }, {
> .name = "SH7750R",
> .id = SH_CPU_SH7750R,
> .pvr = 0x00050000,
> Index: trunk/Makefile.target
> ===================================================================
> --- trunk/Makefile.target (revision 6133)
> +++ trunk/Makefile.target (working copy)
> @@ -719,7 +719,7 @@
> CPPFLAGS += -DHAS_AUDIO
> endif
> ifeq ($(TARGET_BASE_ARCH), sh4)
> -OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
> +OBJS+= shix.o r2d.o se.o sh7750.o sh7750_regnames.o tc58128.o
> OBJS+= sh_timer.o ptimer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o
> OBJS+= ide.o
> endif
> Index: trunk/hw/se.c
> ===================================================================
> --- trunk/hw/se.c (revision 0)
> +++ trunk/hw/se.c (revision 0)
> @@ -0,0 +1,94 @@
> +/*
> + * Hitachi ULSI Systems' evaludation boards, Solution Engine emulation.
> + *
> + * Copyright (c) 2008 Shin-ichiro KAWASAKI
> + *
> + * 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 "hw.h"
> +#include "sh.h"
> +#include "sysemu.h"
> +#include "boards.h"
> +#include "sh7750_regs.h"
> +
> +#define SDRAM_BASE 0x0c000000 /* Physical location of SDRAM: Area 3 */
> +#define SDRAM_SIZE 0x02000000
> +#define ENTRY_OFFSET 0x00001000
> +#define COMMAND_LINE_OFFSET 0x0000100
IIRC it's the case for all SH4 maybe we could define it in a header and all
board to overwrite it
> +
> +static void se7750_init(ram_addr_t ram_size, int vga_ram_size,
> + const char *boot_device, DisplayState * ds,
> + const char *kernel_filename, const char *kernel_cmdline,
> + const char *initrd_filename, const char *cpu_model)
> +{
> + CPUState *env;
> + struct SH7750State *s;
> + ram_addr_t sdram_addr;
> + int kernel_size;
> + uint8 * phys_load_addr = phys_ram_base;
> +
> + /* initialize CPU */
> + if (!cpu_model)
> + cpu_model = "SH7750";
> +
> + env = cpu_init(cpu_model);
> + if (!env) {
> + fprintf(stderr, "Unable to find CPU definition\n");
> + exit(1);
> + }
> +
> + /* Allocate memory space */
> + sdram_addr = qemu_ram_alloc(SDRAM_SIZE);
> + cpu_register_physical_memory(SDRAM_BASE, SDRAM_SIZE, sdram_addr);
> +
> + /* Register peripherals */
> + s = sh7750_init(env);
> +
> + /* initialization which should be done by firmware */
> + uint32_t bcr1 = 1 << 3; /* cs3 SDRAM */
> + uint16_t bcr2 = 3 << (3 * 2); /* cs3 32-bit */
please move tihs too the beginning of the function
> + cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
> + cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
> +
> + /* Start from P2 area */
> + env->pc = SDRAM_BASE | 0xa0000000;
> +
> + /* pass kernel cmdline */
> + if (kernel_cmdline) {
> + pstrcpy((char *)phys_load_addr + ENTRY_OFFSET + COMMAND_LINE_OFFSET,
> + strlen(kernel_cmdline) + 1, kernel_cmdline);
> + env->pc += 0x80000;
> + phys_load_addr += 0x80000;
> + }
do you known the flash model present on the real board?
Best Regards,
J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-11 13:04 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-01-12 3:48 ` Shin-ichiro KAWASAKI
2009-01-12 12:49 ` Paul Mundt
0 siblings, 1 reply; 21+ messages in thread
From: Shin-ichiro KAWASAKI @ 2009-01-12 3:48 UTC (permalink / raw)
To: Shin-ichiro KAWASAKI, qemu-devel; +Cc: linux-sh@vger.kernel.org
Thank you for the review!
# This mail CCed to linux-sh ML expecting some comments on SE7750 flash.
Jean-Christophe PLAGNIOL-VILLARD wrote:
>> +#define SDRAM_BASE 0x0c000000 /* Physical location of SDRAM: Area 3 */
>> +#define SDRAM_SIZE 0x02000000
>
>> +#define ENTRY_OFFSET 0x00001000
>> +#define COMMAND_LINE_OFFSET 0x0000100
> IIRC it's the case for all SH4 maybe we could define it in a header and all
> board to overwrite it
I agree. I think it will be another patch.
>> +
>> +static void se7750_init(ram_addr_t ram_size, int vga_ram_size,
>> + const char *boot_device, DisplayState * ds,
>> + const char *kernel_filename, const char *kernel_cmdline,
>> + const char *initrd_filename, const char *cpu_model)
>> +{
>> + CPUState *env;
>> + struct SH7750State *s;
>> + ram_addr_t sdram_addr;
>> + int kernel_size;
>> + uint8 * phys_load_addr = phys_ram_base;
>> +
>> + /* initialize CPU */
>> + if (!cpu_model)
>> + cpu_model = "SH7750";
>> +
>> + env = cpu_init(cpu_model);
>> + if (!env) {
>> + fprintf(stderr, "Unable to find CPU definition\n");
>> + exit(1);
>> + }
>> +
>> + /* Allocate memory space */
>> + sdram_addr = qemu_ram_alloc(SDRAM_SIZE);
>> + cpu_register_physical_memory(SDRAM_BASE, SDRAM_SIZE, sdram_addr);
>> +
>> + /* Register peripherals */
>> + s = sh7750_init(env);
>> +
>> + /* initialization which should be done by firmware */
>> + uint32_t bcr1 = 1 << 3; /* cs3 SDRAM */
>> + uint16_t bcr2 = 3 << (3 * 2); /* cs3 32-bit */
> please move tihs too the beginning of the function
Sure. I'll do so.
>> + cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
>> + cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
>> +
>> + /* Start from P2 area */
>> + env->pc = SDRAM_BASE | 0xa0000000;
>> +
>> + /* pass kernel cmdline */
>> + if (kernel_cmdline) {
>> + pstrcpy((char *)phys_load_addr + ENTRY_OFFSET + COMMAND_LINE_OFFSET,
>> + strlen(kernel_cmdline) + 1, kernel_cmdline);
>> + env->pc += 0x80000;
>> + phys_load_addr += 0x80000;
>> + }
> do you known the flash model present on the real board?
No, I don't.
The patches for SE7750 are all implemented using informations in linux source code.
I visited Solution Engine site (in Japanese) but could not find useful specs.
http://www.hitachi-ul.co.jp/system/SH-SE/shiyou.html
Regards,
Shin-ichiro KAWASAKI
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-12 3:48 ` Shin-ichiro KAWASAKI
@ 2009-01-12 12:49 ` Paul Mundt
2009-01-13 2:32 ` Nobuhiro Iwamatsu
0 siblings, 1 reply; 21+ messages in thread
From: Paul Mundt @ 2009-01-12 12:49 UTC (permalink / raw)
To: Shin-ichiro KAWASAKI
Cc: Takashi Yoshii, Nobuhiro Iwamatsu, qemu-devel,
linux-sh@vger.kernel.org
On Mon, Jan 12, 2009 at 12:48:02PM +0900, Shin-ichiro KAWASAKI wrote:
> >>+ cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
> >>+ cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
> >>+
> >>+ /* Start from P2 area */
> >>+ env->pc = SDRAM_BASE | 0xa0000000;
> >>+
> >>+ /* pass kernel cmdline */
> >>+ if (kernel_cmdline) {
> >>+ pstrcpy((char *)phys_load_addr + ENTRY_OFFSET +
> >>COMMAND_LINE_OFFSET,
> >>+ strlen(kernel_cmdline) + 1, kernel_cmdline);
> >>+ env->pc += 0x80000;
> >>+ phys_load_addr += 0x80000;
> >>+ }
> >do you known the flash model present on the real board?
> No, I don't.
> The patches for SE7750 are all implemented using informations in linux
> source code.
> I visited Solution Engine site (in Japanese) but could not find useful
> specs.
> http://www.hitachi-ul.co.jp/system/SH-SE/shiyou.html
>
I haven't seen one of these boards in at least 7 years, so I can't help
you with specifications. Yoshii-san or Iwamatsu-san might know, though?
SE7751 should have the same flash model and layout IIRC.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-12 12:49 ` Paul Mundt
@ 2009-01-13 2:32 ` Nobuhiro Iwamatsu
2009-01-13 6:28 ` Jean-Christophe PLAGNIOL-VILLARD
` (2 more replies)
0 siblings, 3 replies; 21+ messages in thread
From: Nobuhiro Iwamatsu @ 2009-01-13 2:32 UTC (permalink / raw)
To: Shin-ichiro KAWASAKI
Cc: Takashi Yoshii, Nobuhiro Iwamatsu, qemu-devel,
linux-sh@vger.kernel.org
Paul Mundt wrote:
> On Mon, Jan 12, 2009 at 12:48:02PM +0900, Shin-ichiro KAWASAKI wrote:
>>>> + cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
>>>> + cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
>>>> +
>>>> + /* Start from P2 area */
>>>> + env->pc = SDRAM_BASE | 0xa0000000;
>>>> +
>>>> + /* pass kernel cmdline */
>>>> + if (kernel_cmdline) {
>>>> + pstrcpy((char *)phys_load_addr + ENTRY_OFFSET +
>>>> COMMAND_LINE_OFFSET,
>>>> + strlen(kernel_cmdline) + 1, kernel_cmdline);
>>>> + env->pc += 0x80000;
>>>> + phys_load_addr += 0x80000;
>>>> + }
>>> do you known the flash model present on the real board?
>> No, I don't.
>> The patches for SE7750 are all implemented using informations in linux
>> source code.
>> I visited Solution Engine site (in Japanese) but could not find useful
>> specs.
>> http://www.hitachi-ul.co.jp/system/SH-SE/shiyou.html
>>
> I haven't seen one of these boards in at least 7 years, so I can't help
> you with specifications. Yoshii-san or Iwamatsu-san might know, though?
> SE7751 should have the same flash model and layout IIRC.
>
This board can not get from Hitachi-ULSI now and this is too old.
I can send it later by examining the flash memory of this board.
# I do not understand the meaning that supports this board ....
BTW, I have question about Qemu-sh board support.
Does the developer of Qemu-SH try to support all boards?
I think that it is good to make it the base of Qemu-SH by
thinking about one board as virtual as MIPS.
Because first of all, I am not so interested in the support of the board.
I am interested in emulation of CPU and the userland.
In the current situation, the number of supported real boards increases
when the support of CPU increases. The code of the board enters whenever
CPU is supported.
I think that you should decide a virtual board of SH and switch CPU.
How about you?
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-13 2:32 ` Nobuhiro Iwamatsu
@ 2009-01-13 6:28 ` Jean-Christophe PLAGNIOL-VILLARD
2009-01-15 1:25 ` Nobuhiro Iwamatsu
2009-01-13 7:46 ` Laurent Desnogues
2009-01-13 13:36 ` Shin-ichiro KAWASAKI
2 siblings, 1 reply; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-01-13 6:28 UTC (permalink / raw)
To: Nobuhiro Iwamatsu
Cc: Takashi Yoshii, Shin-ichiro KAWASAKI, qemu-devel,
linux-sh@vger.kernel.org
On 11:32 Tue 13 Jan , Nobuhiro Iwamatsu wrote:
> Paul Mundt wrote:
>> On Mon, Jan 12, 2009 at 12:48:02PM +0900, Shin-ichiro KAWASAKI wrote:
>>>>> + cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
>>>>> + cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
>>>>> +
>>>>> + /* Start from P2 area */
>>>>> + env->pc = SDRAM_BASE | 0xa0000000;
>>>>> +
>>>>> + /* pass kernel cmdline */
>>>>> + if (kernel_cmdline) {
>>>>> + pstrcpy((char *)phys_load_addr + ENTRY_OFFSET +
>>>>> COMMAND_LINE_OFFSET,
>>>>> + strlen(kernel_cmdline) + 1, kernel_cmdline);
>>>>> + env->pc += 0x80000;
>>>>> + phys_load_addr += 0x80000;
>>>>> + }
>>>> do you known the flash model present on the real board?
>>> No, I don't.
>>> The patches for SE7750 are all implemented using informations in
>>> linux source code.
>>> I visited Solution Engine site (in Japanese) but could not find
>>> useful specs.
>>> http://www.hitachi-ul.co.jp/system/SH-SE/shiyou.html
>>>
>> I haven't seen one of these boards in at least 7 years, so I can't help
>> you with specifications. Yoshii-san or Iwamatsu-san might know, though?
>> SE7751 should have the same flash model and layout IIRC.
>>
> This board can not get from Hitachi-ULSI now and this is too old.
> I can send it later by examining the flash memory of this board.
> # I do not understand the meaning that supports this board ....
>
> BTW, I have question about Qemu-sh board support.
> Does the developer of Qemu-SH try to support all boards?
> I think that it is good to make it the base of Qemu-SH by
> thinking about one board as virtual as MIPS.
>
> Because first of all, I am not so interested in the support of the board.
> I am interested in emulation of CPU and the userland.
> In the current situation, the number of supported real boards increases
> when the support of CPU increases. The code of the board enters whenever
> CPU is supported.
> I think that you should decide a virtual board of SH and switch CPU.
A virtual board is good to test CPU and different IPs, but you can not compare
the comportment of qemu against the real hard. IMHO, this is the more
important part for supporting new boards.
Best Regards,
J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-13 6:28 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-01-15 1:25 ` Nobuhiro Iwamatsu
0 siblings, 0 replies; 21+ messages in thread
From: Nobuhiro Iwamatsu @ 2009-01-15 1:25 UTC (permalink / raw)
To: Nobuhiro Iwamatsu, Shin-ichiro KAWASAKI, Paul Mundt, qemu-devel,
linux-sh@vger.kernel.org, Takashi Yoshii
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 11:32 Tue 13 Jan , Nobuhiro Iwamatsu wrote:
>> Paul Mundt wrote:
>>> On Mon, Jan 12, 2009 at 12:48:02PM +0900, Shin-ichiro KAWASAKI wrote:
>>>>>> + cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
>>>>>> + cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
>>>>>> +
>>>>>> + /* Start from P2 area */
>>>>>> + env->pc = SDRAM_BASE | 0xa0000000;
>>>>>> +
>>>>>> + /* pass kernel cmdline */
>>>>>> + if (kernel_cmdline) {
>>>>>> + pstrcpy((char *)phys_load_addr + ENTRY_OFFSET +
>>>>>> COMMAND_LINE_OFFSET,
>>>>>> + strlen(kernel_cmdline) + 1, kernel_cmdline);
>>>>>> + env->pc += 0x80000;
>>>>>> + phys_load_addr += 0x80000;
>>>>>> + }
>>>>> do you known the flash model present on the real board?
>>>> No, I don't.
>>>> The patches for SE7750 are all implemented using informations in
>>>> linux source code.
>>>> I visited Solution Engine site (in Japanese) but could not find
>>>> useful specs.
>>>> http://www.hitachi-ul.co.jp/system/SH-SE/shiyou.html
>>>>
>>> I haven't seen one of these boards in at least 7 years, so I can't help
>>> you with specifications. Yoshii-san or Iwamatsu-san might know, though?
>>> SE7751 should have the same flash model and layout IIRC.
>>>
>> This board can not get from Hitachi-ULSI now and this is too old.
>> I can send it later by examining the flash memory of this board.
>> # I do not understand the meaning that supports this board ....
>>
>> BTW, I have question about Qemu-sh board support.
>> Does the developer of Qemu-SH try to support all boards?
>> I think that it is good to make it the base of Qemu-SH by
>> thinking about one board as virtual as MIPS.
>>
>> Because first of all, I am not so interested in the support of the board.
>> I am interested in emulation of CPU and the userland.
>> In the current situation, the number of supported real boards increases
>> when the support of CPU increases. The code of the board enters whenever
>> CPU is supported.
>> I think that you should decide a virtual board of SH and switch CPU.
> A virtual board is good to test CPU and different IPs, but you can not compare
> the comportment of qemu against the real hard. IMHO, this is the more
> important part for supporting new boards.
I understood your comment.
Then, I do not support in each board and I think support it by the unit of IP.
Because we can be tested IP with a real machine.
BTW, because I think that qemu is CPU or userland emulator,
I don't think that complete emulation of the board is so important.
Best regards,
Nobuhiro
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-13 2:32 ` Nobuhiro Iwamatsu
2009-01-13 6:28 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-01-13 7:46 ` Laurent Desnogues
2009-01-24 17:59 ` Shin-ichiro KAWASAKI
2009-01-13 13:36 ` Shin-ichiro KAWASAKI
2 siblings, 1 reply; 21+ messages in thread
From: Laurent Desnogues @ 2009-01-13 7:46 UTC (permalink / raw)
To: qemu-devel
On Tue, Jan 13, 2009 at 3:32 AM, Nobuhiro Iwamatsu
<iwamatsu.nobuhiro@renesas.com> wrote:
>
> Because first of all, I am not so interested in the support of the board.
> I am interested in emulation of CPU and the userland.
> In the current situation, the number of supported real boards increases
> when the support of CPU increases. The code of the board enters whenever
> CPU is supported.
I agree. I was very surprised to find last Sunday that a simple instruction
such as FMAC was not implemented. I wonder how many holes are still
there.
Laurent
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-13 7:46 ` Laurent Desnogues
@ 2009-01-24 17:59 ` Shin-ichiro KAWASAKI
0 siblings, 0 replies; 21+ messages in thread
From: Shin-ichiro KAWASAKI @ 2009-01-24 17:59 UTC (permalink / raw)
To: qemu-devel
Laurent Desnogues wrote:
> On Tue, Jan 13, 2009 at 3:32 AM, Nobuhiro Iwamatsu
> <iwamatsu.nobuhiro@renesas.com> wrote:
>> Because first of all, I am not so interested in the support of the board.
>> I am interested in emulation of CPU and the userland.
>> In the current situation, the number of supported real boards increases
>> when the support of CPU increases. The code of the board enters whenever
>> CPU is supported.
>
> I agree. I was very surprised to find last Sunday that a simple instruction
> such as FMAC was not implemented. I wonder how many holes are still
> there.
I've got anxious about implementation hole of instruction set.
Then I want to add a comment on it.
I reviewed target-sh4/translate.c and SH-4 (not SH-4A) instruction
set document again, and found that following four instructions are
not yet implemented. (They will cause illegal instruction exceptions
on QEMU-SH.)
- STC SGR,Rn
- STC SRG,@-Rn
- FIPR
- FTRV (Patch sent by Mans Rullgard before)
SGR is a register which holds stack pointer when exception happens.
But SH-Linux seems not to check SGR ever. These can be left safely
until other OS runs on QEMU-SH.
FIPR and FTRV provide floating point vector/matrix operations.
I have no idea which program or library runs these instructions...
Does anyone have it?
Regards,
Shin-ichiro KAWASAKI
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-13 2:32 ` Nobuhiro Iwamatsu
2009-01-13 6:28 ` Jean-Christophe PLAGNIOL-VILLARD
2009-01-13 7:46 ` Laurent Desnogues
@ 2009-01-13 13:36 ` Shin-ichiro KAWASAKI
2009-01-15 1:46 ` Nobuhiro Iwamatsu
2009-01-21 9:04 ` Paul Mundt
2 siblings, 2 replies; 21+ messages in thread
From: Shin-ichiro KAWASAKI @ 2009-01-13 13:36 UTC (permalink / raw)
To: qemu-devel; +Cc: Takashi Yoshii, Nobuhiro Iwamatsu, linux-sh@vger.kernel.org
Nobuhiro Iwamatsu wrote:
> Paul Mundt wrote:
>> On Mon, Jan 12, 2009 at 12:48:02PM +0900, Shin-ichiro KAWASAKI wrote:
>>>>> + cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
>>>>> + cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
>>>>> +
>>>>> + /* Start from P2 area */
>>>>> + env->pc = SDRAM_BASE | 0xa0000000;
>>>>> +
>>>>> + /* pass kernel cmdline */
>>>>> + if (kernel_cmdline) {
>>>>> + pstrcpy((char *)phys_load_addr + ENTRY_OFFSET +
>>>>> COMMAND_LINE_OFFSET,
>>>>> + strlen(kernel_cmdline) + 1, kernel_cmdline);
>>>>> + env->pc += 0x80000;
>>>>> + phys_load_addr += 0x80000;
>>>>> + }
>>>> do you known the flash model present on the real board?
>>> No, I don't.
>>> The patches for SE7750 are all implemented using informations in
>>> linux source code.
>>> I visited Solution Engine site (in Japanese) but could not find
>>> useful specs.
>>> http://www.hitachi-ul.co.jp/system/SH-SE/shiyou.html
>>>
>> I haven't seen one of these boards in at least 7 years, so I can't help
>> you with specifications. Yoshii-san or Iwamatsu-san might know, though?
>> SE7751 should have the same flash model and layout IIRC.
>>
> This board can not get from Hitachi-ULSI now and this is too old.
> I can send it later by examining the flash memory of this board.
> # I do not understand the meaning that supports this board ....
I should have explained it. To avoid messy many board support,
board should be selected carefully.
I wanted a board which can test SCI (not SCIF) console emulation.
I'm sure that SE7750 supports both SCI and SCIF, and it is suitable
to check SCI work. For this purpose, any other board is OK if it
uses SCI for console.
# The reason I stick to SCI is r2d+ board's RTC. The r2d+ board uses
# SCI not for console but for SPI connection with RTC chip. Before
# thinking about RTC emulation, SCI emulation should be done.
Another reason for SE7750 is support for TOPPERS. TOPPERS is an open
source realtime OS. I think QEMU will be a strong tool for TOPPERS
developers. They already utilizes SkyEye, the ARM dedicated CPU
simulator for board-less development. Of course SkyEye cannot be
used for the work for SuperH.
Here's the list of the CPUs and boards which can run TOPPERS.
http://www.toppers.jp/en/jsp-kernel-e.html
SE7750 is the only one board which has SuperH, can run TOPPERS, and
has Linux kernel's default config.
We should focus on completing SH-Linux emulation before thinking about
other OSes. But if I have to add new board emulation, I think SE7750
is a good choice.
> BTW, I have question about Qemu-sh board support.
> Does the developer of Qemu-SH try to support all boards?
> I think that it is good to make it the base of Qemu-SH by
> thinking about one board as virtual as MIPS.
>
> Because first of all, I am not so interested in the support of the board.
> I am interested in emulation of CPU and the userland.
> In the current situation, the number of supported real boards increases
> when the support of CPU increases. The code of the board enters whenever
> CPU is supported.
> I think that you should decide a virtual board of SH and switch CPU.
>
> How about you?
Good idea. I agree that virtual board is useful.
I wonder how linux kernel config will be.
Or on what kind of policy, its specs should be decided?
Regards,
Shin-ichiro KAWASAKI
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-13 13:36 ` Shin-ichiro KAWASAKI
@ 2009-01-15 1:46 ` Nobuhiro Iwamatsu
2009-01-17 10:45 ` Shin-ichiro KAWASAKI
2009-01-21 9:04 ` Paul Mundt
1 sibling, 1 reply; 21+ messages in thread
From: Nobuhiro Iwamatsu @ 2009-01-15 1:46 UTC (permalink / raw)
To: Shin-ichiro KAWASAKI; +Cc: Takashi Yoshii, qemu-devel, linux-sh@vger.kernel.org
Shin-ichiro KAWASAKI wrote:
> Nobuhiro Iwamatsu wrote:
>> Paul Mundt wrote:
>>> On Mon, Jan 12, 2009 at 12:48:02PM +0900, Shin-ichiro KAWASAKI wrote:
>>>>>> + cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
>>>>>> + cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
>>>>>> +
>>>>>> + /* Start from P2 area */
>>>>>> + env->pc = SDRAM_BASE | 0xa0000000;
>>>>>> +
>>>>>> + /* pass kernel cmdline */
>>>>>> + if (kernel_cmdline) {
>>>>>> + pstrcpy((char *)phys_load_addr + ENTRY_OFFSET +
>>>>>> COMMAND_LINE_OFFSET,
>>>>>> + strlen(kernel_cmdline) + 1, kernel_cmdline);
>>>>>> + env->pc += 0x80000;
>>>>>> + phys_load_addr += 0x80000;
>>>>>> + }
>>>>> do you known the flash model present on the real board?
>>>> No, I don't.
>>>> The patches for SE7750 are all implemented using informations in
>>>> linux source code.
>>>> I visited Solution Engine site (in Japanese) but could not find
>>>> useful specs.
>>>> http://www.hitachi-ul.co.jp/system/SH-SE/shiyou.html
>>>>
>>> I haven't seen one of these boards in at least 7 years, so I can't help
>>> you with specifications. Yoshii-san or Iwamatsu-san might know, though?
>>> SE7751 should have the same flash model and layout IIRC.
>>>
>> This board can not get from Hitachi-ULSI now and this is too old.
>> I can send it later by examining the flash memory of this board.
>> # I do not understand the meaning that supports this board ....
Flash model is 29lv160t.
>
> I should have explained it. To avoid messy many board support,
> board should be selected carefully.
>
> I wanted a board which can test SCI (not SCIF) console emulation.
> I'm sure that SE7750 supports both SCI and SCIF, and it is suitable
> to check SCI work. For this purpose, any other board is OK if it
> uses SCI for console.
>
> # The reason I stick to SCI is r2d+ board's RTC. The r2d+ board uses
> # SCI not for console but for SPI connection with RTC chip. Before
> # thinking about RTC emulation, SCI emulation should be done.
OK.
>
> Another reason for SE7750 is support for TOPPERS. TOPPERS is an open
> source realtime OS. I think QEMU will be a strong tool for TOPPERS
> developers. They already utilizes SkyEye, the ARM dedicated CPU
> simulator for board-less development. Of course SkyEye cannot be
> used for the work for SuperH.
>
> Here's the list of the CPUs and boards which can run TOPPERS.
> http://www.toppers.jp/en/jsp-kernel-e.html
> SE7750 is the only one board which has SuperH, can run TOPPERS, and
> has Linux kernel's default config.
>
> We should focus on completing SH-Linux emulation before thinking about
> other OSes. But if I have to add new board emulation, I think SE7750
> is a good choice.
I understood.
But this board can not get now and CPU is too old.
And you don't have this. How do you develop this board and IP?
# Does the development of SH of Toppers still continue?
>
>
>> BTW, I have question about Qemu-sh board support.
>> Does the developer of Qemu-SH try to support all boards?
>> I think that it is good to make it the base of Qemu-SH by
>> thinking about one board as virtual as MIPS.
>>
>> Because first of all, I am not so interested in the support of the board.
>> I am interested in emulation of CPU and the userland.
>> In the current situation, the number of supported real boards increases
>> when the support of CPU increases. The code of the board enters whenever
>> CPU is supported.
>> I think that you should decide a virtual board of SH and switch CPU.
>>
>> How about you?
> Good idea. I agree that virtual board is useful.
> I wonder how linux kernel config will be.
> Or on what kind of policy, its specs should be decided?
I think that the Qemu-sh developer talk about it.
# Though the talk might be not settled....
Or get from other architectures (ex. MIPS).
Or I thought create of configurable mechanism to be good.
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-15 1:46 ` Nobuhiro Iwamatsu
@ 2009-01-17 10:45 ` Shin-ichiro KAWASAKI
2009-01-17 11:16 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 21+ messages in thread
From: Shin-ichiro KAWASAKI @ 2009-01-17 10:45 UTC (permalink / raw)
To: qemu-devel; +Cc: Takashi Yoshii, linux-sh@vger.kernel.org
Nobuhiro Iwamatsu wrote:
> Shin-ichiro KAWASAKI wrote:
>> Nobuhiro Iwamatsu wrote:
>>> Paul Mundt wrote:
>>>> On Mon, Jan 12, 2009 at 12:48:02PM +0900, Shin-ichiro KAWASAKI wrote:
>>>>>>> + cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
>>>>>>> + cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
>>>>>>> +
>>>>>>> + /* Start from P2 area */
>>>>>>> + env->pc = SDRAM_BASE | 0xa0000000;
>>>>>>> +
>>>>>>> + /* pass kernel cmdline */
>>>>>>> + if (kernel_cmdline) {
>>>>>>> + pstrcpy((char *)phys_load_addr + ENTRY_OFFSET +
>>>>>>> COMMAND_LINE_OFFSET,
>>>>>>> + strlen(kernel_cmdline) + 1, kernel_cmdline);
>>>>>>> + env->pc += 0x80000;
>>>>>>> + phys_load_addr += 0x80000;
>>>>>>> + }
>>>>>> do you known the flash model present on the real board?
>>>>> No, I don't.
>>>>> The patches for SE7750 are all implemented using informations in
>>>>> linux source code.
>>>>> I visited Solution Engine site (in Japanese) but could not find
>>>>> useful specs.
>>>>> http://www.hitachi-ul.co.jp/system/SH-SE/shiyou.html
>>>>>
>>>> I haven't seen one of these boards in at least 7 years, so I can't help
>>>> you with specifications. Yoshii-san or Iwamatsu-san might know, though?
>>>> SE7751 should have the same flash model and layout IIRC.
>>>>
>>> This board can not get from Hitachi-ULSI now and this is too old.
>>> I can send it later by examining the flash memory of this board.
>>> # I do not understand the meaning that supports this board ....
>
> Flash model is 29lv160t.
>>
>> I should have explained it. To avoid messy many board support,
>> board should be selected carefully.
>>
>> I wanted a board which can test SCI (not SCIF) console emulation.
>> I'm sure that SE7750 supports both SCI and SCIF, and it is suitable
>> to check SCI work. For this purpose, any other board is OK if it
>> uses SCI for console.
>>
>> # The reason I stick to SCI is r2d+ board's RTC. The r2d+ board uses
>> # SCI not for console but for SPI connection with RTC chip. Before
>> # thinking about RTC emulation, SCI emulation should be done.
>
> OK.
>
>>
>> Another reason for SE7750 is support for TOPPERS. TOPPERS is an open
>> source realtime OS. I think QEMU will be a strong tool for TOPPERS
>> developers. They already utilizes SkyEye, the ARM dedicated CPU
>> simulator for board-less development. Of course SkyEye cannot be
>> used for the work for SuperH.
>>
>> Here's the list of the CPUs and boards which can run TOPPERS.
>> http://www.toppers.jp/en/jsp-kernel-e.html
>> SE7750 is the only one board which has SuperH, can run TOPPERS, and
>> has Linux kernel's default config.
>>
>> We should focus on completing SH-Linux emulation before thinking about
>> other OSes. But if I have to add new board emulation, I think SE7750
>> is a good choice.
>
> I understood.
> But this board can not get now and CPU is too old.
> And you don't have this. How do you develop this board and IP?
>
> # Does the development of SH of Toppers still continue?
Right, the board's not available. It is a problem, even though
some amount of development can be done from SH-Linux source code
and chip specifications.
I posted a mail to TOPPERS users ML, and got an advice that
the type of board is not so important to run TOPPERS kernel.
So, now I think I should not stick to SE7750.
# Development of SH Toppers seems going.
But anyway, to check how SCI console works, qemu-sh should have
another board support which uses SCI. Is there any suggestion
about board? One idea is to let the virtual board have it.
>>> BTW, I have question about Qemu-sh board support.
>>> Does the developer of Qemu-SH try to support all boards?
>>> I think that it is good to make it the base of Qemu-SH by
>>> thinking about one board as virtual as MIPS.
>>>
>>> Because first of all, I am not so interested in the support of the
>>> board.
>>> I am interested in emulation of CPU and the userland.
>>> In the current situation, the number of supported real boards increases
>>> when the support of CPU increases. The code of the board enters whenever
>>> CPU is supported.
>>> I think that you should decide a virtual board of SH and switch CPU.
>>>
>>> How about you?
>> Good idea. I agree that virtual board is useful.
>> I wonder how linux kernel config will be.
>> Or on what kind of policy, its specs should be decided?
> I think that the Qemu-sh developer talk about it.
> # Though the talk might be not settled....
> Or get from other architectures (ex. MIPS).
I guess you mean "hw/mips_mipssim.c". It seems emulate MIPSsim, the
MIPS emulator. In a same way, "hw/sh_virtual_board.c" or
"hw/sh_pseudo_machine.c" can be implemented. It will be useful to
check how SH CPU cores and its SoC internal IPs work.
> Or I thought create of configurable mechanism to be good.
Once machine config file was discussed on this ML.
It will be useful for qemu-sh also, I think.
Regards,
Shin-ichiro KAWASAKI
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-17 10:45 ` Shin-ichiro KAWASAKI
@ 2009-01-17 11:16 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-01-17 11:16 UTC (permalink / raw)
To: Shin-ichiro KAWASAKI; +Cc: Takashi Yoshii, qemu-devel, linux-sh@vger.kernel.org
>>>
>>> Another reason for SE7750 is support for TOPPERS. TOPPERS is an open
>>> source realtime OS. I think QEMU will be a strong tool for TOPPERS
>>> developers. They already utilizes SkyEye, the ARM dedicated CPU
>>> simulator for board-less development. Of course SkyEye cannot be
>>> used for the work for SuperH.
>>>
>>> Here's the list of the CPUs and boards which can run TOPPERS.
>>> http://www.toppers.jp/en/jsp-kernel-e.html
>>> SE7750 is the only one board which has SuperH, can run TOPPERS, and
>>> has Linux kernel's default config.
>>>
>>> We should focus on completing SH-Linux emulation before thinking about
>>> other OSes. But if I have to add new board emulation, I think SE7750
>>> is a good choice.
>>
>> I understood.
>> But this board can not get now and CPU is too old.
>> And you don't have this. How do you develop this board and IP?
>>
>> # Does the development of SH of Toppers still continue?
>
> Right, the board's not available. It is a problem, even though
> some amount of development can be done from SH-Linux source code
> and chip specifications.
>
> I posted a mail to TOPPERS users ML, and got an advice that
> the type of board is not so important to run TOPPERS kernel.
> So, now I think I should not stick to SE7750.
> # Development of SH Toppers seems going.
my the TOPPERS dev could help us to have a common board to use it as reference
>>> BTW, I have question about Qemu-sh board support.
>>>> Does the developer of Qemu-SH try to support all boards?
>>>> I think that it is good to make it the base of Qemu-SH by
>>>> thinking about one board as virtual as MIPS.
>>>>
>>>> Because first of all, I am not so interested in the support of the
>>>> board.
>>>> I am interested in emulation of CPU and the userland.
>>>> In the current situation, the number of supported real boards increases
>>>> when the support of CPU increases. The code of the board enters whenever
>>>> CPU is supported.
>>>> I think that you should decide a virtual board of SH and switch CPU.
>>>>
>>>> How about you?
>>> Good idea. I agree that virtual board is useful.
>>> I wonder how linux kernel config will be.
>>> Or on what kind of policy, its specs should be decided?
>> I think that the Qemu-sh developer talk about it.
>> # Though the talk might be not settled....
>> Or get from other architectures (ex. MIPS).
> I guess you mean "hw/mips_mipssim.c". It seems emulate MIPSsim, the
> MIPS emulator. In a same way, "hw/sh_virtual_board.c" or
> "hw/sh_pseudo_machine.c" can be implemented. It will be useful to
> check how SH CPU cores and its SoC internal IPs work.
>
>> Or I thought create of configurable mechanism to be good.
> Once machine config file was discussed on this ML.
> It will be useful for qemu-sh also, I think.
I've in mind to use fdt to describe the board
when implementating the qemu sh generic board
Best Regards,
J.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-13 13:36 ` Shin-ichiro KAWASAKI
2009-01-15 1:46 ` Nobuhiro Iwamatsu
@ 2009-01-21 9:04 ` Paul Mundt
2009-01-21 16:51 ` Shin-ichiro KAWASAKI
1 sibling, 1 reply; 21+ messages in thread
From: Paul Mundt @ 2009-01-21 9:04 UTC (permalink / raw)
To: qemu-devel; +Cc: Takashi Yoshii, Nobuhiro Iwamatsu, linux-sh@vger.kernel.org
On Tue, Jan 13, 2009 at 10:36:43PM +0900, Shin-ichiro KAWASAKI wrote:
> Nobuhiro Iwamatsu wrote:
> >Paul Mundt wrote:
> >>I haven't seen one of these boards in at least 7 years, so I can't help
> >>you with specifications. Yoshii-san or Iwamatsu-san might know, though?
> >>SE7751 should have the same flash model and layout IIRC.
> >>
> >This board can not get from Hitachi-ULSI now and this is too old.
> >I can send it later by examining the flash memory of this board.
> ># I do not understand the meaning that supports this board ....
>
> I should have explained it. To avoid messy many board support,
> board should be selected carefully.
>
> I wanted a board which can test SCI (not SCIF) console emulation.
> I'm sure that SE7750 supports both SCI and SCIF, and it is suitable
> to check SCI work. For this purpose, any other board is OK if it
> uses SCI for console.
>
> # The reason I stick to SCI is r2d+ board's RTC. The r2d+ board uses
> # SCI not for console but for SPI connection with RTC chip. Before
> # thinking about RTC emulation, SCI emulation should be done.
>
SCI is pretty much a relic at this point. No current hardware uses it,
and there isn't much point in spending too much effort supporting legacy
hardware. R2D does use the SCI for SPI bitbang for the RTC, but all other
SH platforms either use the SH-RTC directly or something hanging off of
I2C. SPI bitbang is pretty much a corner case for the SH platforms, it
would be much more useful to see SH-RTC emulation. R2D is basically the
only platform that wants SCI anyways.
> Another reason for SE7750 is support for TOPPERS. TOPPERS is an open
> source realtime OS. I think QEMU will be a strong tool for TOPPERS
> developers. They already utilizes SkyEye, the ARM dedicated CPU
> simulator for board-less development. Of course SkyEye cannot be
> used for the work for SuperH.
>
> Here's the list of the CPUs and boards which can run TOPPERS.
> http://www.toppers.jp/en/jsp-kernel-e.html
> SE7750 is the only one board which has SuperH, can run TOPPERS, and
> has Linux kernel's default config.
>
> We should focus on completing SH-Linux emulation before thinking about
> other OSes. But if I have to add new board emulation, I think SE7750
> is a good choice.
>
Supporting other OSes is good, but standardizing on SE7750 doesn't seem
like it will really help anything, given all of the legacy SH-4 stuff it
drags along with it. If we are going to standardize on a board, it should
be something current, something that is readily available in hardware,
and something that people are actively using. The SE7750 does not meet
any of these requirements, nor does any other SH-4. Something like the
SH7785LCR board on the other hand does.
I also don't see much point in catering to OSes that don't support
hardware manufactured this century. If the TOPPERS and BSD people want to
toy around with legacy support, they are welcome to, but QEMU certainly
doesn't have much to gain by spending time on this.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-21 9:04 ` Paul Mundt
@ 2009-01-21 16:51 ` Shin-ichiro KAWASAKI
2009-01-21 17:06 ` Paul Brook
2009-01-21 19:01 ` [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 2 replies; 21+ messages in thread
From: Shin-ichiro KAWASAKI @ 2009-01-21 16:51 UTC (permalink / raw)
To: Paul Mundt, qemu-devel, Takashi Yoshii, Nobuhiro Iwamatsu,
linux-sh@vger.kernel.org
Paul Mundt wrote:
> On Tue, Jan 13, 2009 at 10:36:43PM +0900, Shin-ichiro KAWASAKI wrote:
>> Nobuhiro Iwamatsu wrote:
>>> Paul Mundt wrote:
>>>> I haven't seen one of these boards in at least 7 years, so I can't help
>>>> you with specifications. Yoshii-san or Iwamatsu-san might know, though?
>>>> SE7751 should have the same flash model and layout IIRC.
>>>>
>>> This board can not get from Hitachi-ULSI now and this is too old.
>>> I can send it later by examining the flash memory of this board.
>>> # I do not understand the meaning that supports this board ....
>> I should have explained it. To avoid messy many board support,
>> board should be selected carefully.
>>
>> I wanted a board which can test SCI (not SCIF) console emulation.
>> I'm sure that SE7750 supports both SCI and SCIF, and it is suitable
>> to check SCI work. For this purpose, any other board is OK if it
>> uses SCI for console.
>>
>> # The reason I stick to SCI is r2d+ board's RTC. The r2d+ board uses
>> # SCI not for console but for SPI connection with RTC chip. Before
>> # thinking about RTC emulation, SCI emulation should be done.
>>
> SCI is pretty much a relic at this point. No current hardware uses it,
> and there isn't much point in spending too much effort supporting legacy
> hardware. R2D does use the SCI for SPI bitbang for the RTC, but all other
> SH platforms either use the SH-RTC directly or something hanging off of
> I2C. SPI bitbang is pretty much a corner case for the SH platforms, it
> would be much more useful to see SH-RTC emulation. R2D is basically the
> only platform that wants SCI anyways.
I checked SH7785 spec, and found that it does not support SCI.
# SCIF, SIOF, and HSPI are the supported serial interfaces.
You are right. SCI is obsolete. I'll postpone the work on SCI and RTC
for R2D until some necessity comes out (or forever).
>> Another reason for SE7750 is support for TOPPERS. TOPPERS is an open
>> source realtime OS. I think QEMU will be a strong tool for TOPPERS
>> developers. They already utilizes SkyEye, the ARM dedicated CPU
>> simulator for board-less development. Of course SkyEye cannot be
>> used for the work for SuperH.
>>
>> Here's the list of the CPUs and boards which can run TOPPERS.
>> http://www.toppers.jp/en/jsp-kernel-e.html
>> SE7750 is the only one board which has SuperH, can run TOPPERS, and
>> has Linux kernel's default config.
>>
>> We should focus on completing SH-Linux emulation before thinking about
>> other OSes. But if I have to add new board emulation, I think SE7750
>> is a good choice.
>>
> Supporting other OSes is good, but standardizing on SE7750 doesn't seem
> like it will really help anything, given all of the legacy SH-4 stuff it
> drags along with it. If we are going to standardize on a board, it should
> be something current, something that is readily available in hardware,
> and something that people are actively using. The SE7750 does not meet
> any of these requirements, nor does any other SH-4. Something like the
> SH7785LCR board on the other hand does.
One of TOPPERS developer gave me an advice not to stick to old boards.
One SCIF and one TMU is the minimal requirement for TOPPERS. Then, almost
all boards are suitable. Now I have no reason to push old SE7750 as the
standard board. Sorry for my pointless reasoning.
# SE7750 support is not useful as a standard board, but it is as a test platform
# of movca.l/ocbi patch. That patch may be pendent for a while...
> I also don't see much point in catering to OSes that don't support
> hardware manufactured this century. If the TOPPERS and BSD people want to
> toy around with legacy support, they are welcome to, but QEMU certainly
> doesn't have much to gain by spending time on this.
I've just heard that newest TOPPERS (TOPPERS/ASP) supports SH-4A.
Now, I hope that we would reach a consensus about the spec of new standard board
for SH-4A. SH7785LCR is a choice. And, as Iwamatsu-san suggested, a virtual
generic board is another choice. I'm not sure SH7785LCR's hardware spec is available
or not. (Does anyone know it?) If it is, I push SH7785LCR. Otherwise, virtual board
sounds good.
Regards,
Shin-ichiro KAWASAKI
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-21 16:51 ` Shin-ichiro KAWASAKI
@ 2009-01-21 17:06 ` Paul Brook
2009-01-24 5:46 ` sh: Virtual Board or Real board? (was Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition) Shin-ichiro KAWASAKI
2009-01-21 19:01 ` [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 1 reply; 21+ messages in thread
From: Paul Brook @ 2009-01-21 17:06 UTC (permalink / raw)
To: qemu-devel
Cc: Takashi Yoshii, Shin-ichiro KAWASAKI, Nobuhiro Iwamatsu,
linux-sh@vger.kernel.org
> Now, I hope that we would reach a consensus about the spec of new standard
> board for SH-4A. SH7785LCR is a choice. And, as Iwamatsu-san suggested, a
> virtual generic board is another choice. I'm not sure SH7785LCR's hardware
> spec is available or not. (Does anyone know it?) If it is, I push
> SH7785LCR. Otherwise, virtual board sounds good.
I recommend against using a virtual board. It means you have to maintain both
qemu and a kernel port. The mips virtual board suffered exactly this fate,
and IIUC is likely to be removed fairly soon.
Paul
^ permalink raw reply [flat|nested] 21+ messages in thread
* sh: Virtual Board or Real board? (was Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition)
2009-01-21 17:06 ` Paul Brook
@ 2009-01-24 5:46 ` Shin-ichiro KAWASAKI
2009-01-27 0:43 ` Paul Mundt
0 siblings, 1 reply; 21+ messages in thread
From: Shin-ichiro KAWASAKI @ 2009-01-24 5:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Takashi Yoshii, Nobuhiro Iwamatsu, linux-sh@vger.kernel.org
Paul Brook wrote:
>> Now, I hope that we would reach a consensus about the spec of new standard
>> board for SH-4A. SH7785LCR is a choice. And, as Iwamatsu-san suggested, a
>> virtual generic board is another choice. I'm not sure SH7785LCR's hardware
>> spec is available or not. (Does anyone know it?) If it is, I push
>> SH7785LCR. Otherwise, virtual board sounds good.
>
> I recommend against using a virtual board. It means you have to maintain both
> qemu and a kernel port. The mips virtual board suffered exactly this fate,
> and IIUC is likely to be removed fairly soon.
Thank you for your comment. As you pointed out, we need to maintain kernel
config for virtual board. SH-Linux developpers' help is important.
I guess we can expect Iwamatsu-san's help :) And once Paul Mundt
supported special kernel configuration for QEMU-SH kindly.
I try to clarify the difference of real board and virtual board, as follows.
* Real board
- We can compare the emulated system with the real board. The specification
is not vague, and deffects can be investitated by comaparison.
- No need to maintain kernel, and it can avoid the risk the maintenance
work would be terminated, as Paul Brook pointed out.
* Virtual board
- It decreases the number of supported boards, and avoid messy many board
supports. SuperH series have many CPU sub tyepes, and as number of
supported CPU types increase, number of suppoted boards will increase.
(Iwamatsu-san pointed it out.)
- It avoids rare peripheral support by QEMU.
Sometimes embedded boards have rare peripheral on it.
e.g.) RTL8139B (below Rev.C). on R2D+.
http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00961.html
If we make the virtual board have standard peripheral (e.g. RTL8139C),
we can reuse peripheral implemenation qualified with other board for other
CPU arch, and avoid messy many type peripheral support.
I'm not sure if QEMU's policy exists or not for this kind of choice.
We can support both of them in the future. But I think it is important
to make consensus which should be the default and standard for QEMU-SH,
to decide to which we'll try to contribute.
I'd like to your comments on them.
Regards,
Shin-ichiro KAWASAKI
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: sh: Virtual Board or Real board? (was Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition)
2009-01-24 5:46 ` sh: Virtual Board or Real board? (was Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition) Shin-ichiro KAWASAKI
@ 2009-01-27 0:43 ` Paul Mundt
2009-02-01 13:50 ` Shin-ichiro KAWASAKI
0 siblings, 1 reply; 21+ messages in thread
From: Paul Mundt @ 2009-01-27 0:43 UTC (permalink / raw)
To: Shin-ichiro KAWASAKI
Cc: Takashi Yoshii, Nobuhiro Iwamatsu, qemu-devel,
linux-sh@vger.kernel.org
On Sat, Jan 24, 2009 at 02:46:40PM +0900, Shin-ichiro KAWASAKI wrote:
> Paul Brook wrote:
> >>Now, I hope that we would reach a consensus about the spec of new standard
> >>board for SH-4A. SH7785LCR is a choice. And, as Iwamatsu-san suggested,
> >>a
> >>virtual generic board is another choice. I'm not sure SH7785LCR's
> >>hardware
> >>spec is available or not. (Does anyone know it?) If it is, I push
> >>SH7785LCR. Otherwise, virtual board sounds good.
> >
> >I recommend against using a virtual board. It means you have to maintain
> >both qemu and a kernel port. The mips virtual board suffered exactly this
> >fate, and IIUC is likely to be removed fairly soon.
>
> Thank you for your comment. As you pointed out, we need to maintain kernel
> config for virtual board. SH-Linux developpers' help is important.
> I guess we can expect Iwamatsu-san's help :) And once Paul Mundt
> supported special kernel configuration for QEMU-SH kindly.
>
>
> I try to clarify the difference of real board and virtual board, as follows.
>
> * Real board
>
> - We can compare the emulated system with the real board. The specification
> is not vague, and deffects can be investitated by comaparison.
>
> - No need to maintain kernel, and it can avoid the risk the maintenance
> work would be terminated, as Paul Brook pointed out.
>
>
> * Virtual board
>
> - It decreases the number of supported boards, and avoid messy many board
> supports. SuperH series have many CPU sub tyepes, and as number of
> supported CPU types increase, number of suppoted boards will increase.
> (Iwamatsu-san pointed it out.)
>
This depends roughly on the level of support you are looking for. You can
use the generic machine vector with any CPU you want and simply stick
with the on-chip peripherals without having to make any board
modifications. This should be sufficient for the simple case, especially
if you are interested in testing different CPUs, but will not help you if
you are looking for more complete board support.
> - It avoids rare peripheral support by QEMU.
> Sometimes embedded boards have rare peripheral on it.
> e.g.) RTL8139B (below Rev.C). on R2D+.
> http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00961.html
> If we make the virtual board have standard peripheral (e.g. RTL8139C),
> we can reuse peripheral implemenation qualified with other board for other
> CPU arch, and avoid messy many type peripheral support.
>
> I'm not sure if QEMU's policy exists or not for this kind of choice.
>
> We can support both of them in the future. But I think it is important
> to make consensus which should be the default and standard for QEMU-SH,
> to decide to which we'll try to contribute.
>
> I'd like to your comments on them.
>
>From the kernel point of view, whether we add a new machine type for
emulated boards or not doesn't really matter, it mostly depends on how
people are going to be using it, and what level of change you are looking
for. I will add as many defconfigs and boards as people want as long as
there are users for them anyways.
Anyways, I think there is value in supporting both. Emulating real
hardware is especially helpful if you want to compare and contrast the
environment between emulation and an existing platform, as well as
allowing people without access to real hardware to develop against the
emulated environment with testing conducted on real hardware as it
becomes available.
Real hardware on the other hand is quite restrictive, and there are a lot
of interesting features and capabilities that exist on some boards/CPUs
but not others, limiting the amount of testing that can be performed. If
people want to provide a virtual board that is pretty feature heavy to
try and help with regression testing and so on, that would also be pretty
useful.
I wouldn't worry about it too much anyways. If there is something you are
specifically interested on working on in QEMU, there is no real reason
why we can't accomodate that in the kernel too, it just depends on the
code changes you want. We do want people to experiment with both on a
regular basis anyways, so I have no real interest in setting any sort of
policy on this subject. ;-)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: sh: Virtual Board or Real board? (was Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition)
2009-01-27 0:43 ` Paul Mundt
@ 2009-02-01 13:50 ` Shin-ichiro KAWASAKI
0 siblings, 0 replies; 21+ messages in thread
From: Shin-ichiro KAWASAKI @ 2009-02-01 13:50 UTC (permalink / raw)
To: Paul Mundt, Shin-ichiro KAWASAKI, qemu-devel, Takashi Yoshii,
Nobuhiro Iwamatsu, linux-sh@vger.kernel.org
Paul Mundt wrote:
> On Sat, Jan 24, 2009 at 02:46:40PM +0900, Shin-ichiro KAWASAKI wrote:
>> Paul Brook wrote:
>>>> Now, I hope that we would reach a consensus about the spec of new standard
>>>> board for SH-4A. SH7785LCR is a choice. And, as Iwamatsu-san suggested,
>>>> a
>>>> virtual generic board is another choice. I'm not sure SH7785LCR's
>>>> hardware
>>>> spec is available or not. (Does anyone know it?) If it is, I push
>>>> SH7785LCR. Otherwise, virtual board sounds good.
>>> I recommend against using a virtual board. It means you have to maintain
>>> both qemu and a kernel port. The mips virtual board suffered exactly this
>>> fate, and IIUC is likely to be removed fairly soon.
>> Thank you for your comment. As you pointed out, we need to maintain kernel
>> config for virtual board. SH-Linux developpers' help is important.
>> I guess we can expect Iwamatsu-san's help :) And once Paul Mundt
>> supported special kernel configuration for QEMU-SH kindly.
>>
>>
>> I try to clarify the difference of real board and virtual board, as follows.
>>
>> * Real board
>>
>> - We can compare the emulated system with the real board. The specification
>> is not vague, and deffects can be investitated by comaparison.
>>
>> - No need to maintain kernel, and it can avoid the risk the maintenance
>> work would be terminated, as Paul Brook pointed out.
>>
>>
>> * Virtual board
>>
>> - It decreases the number of supported boards, and avoid messy many board
>> supports. SuperH series have many CPU sub tyepes, and as number of
>> supported CPU types increase, number of suppoted boards will increase.
>> (Iwamatsu-san pointed it out.)
>>
> This depends roughly on the level of support you are looking for. You can
> use the generic machine vector with any CPU you want and simply stick
> with the on-chip peripherals without having to make any board
> modifications. This should be sufficient for the simple case, especially
> if you are interested in testing different CPUs, but will not help you if
> you are looking for more complete board support.
Thank you. Your explanation clarifies the relation between purpose and
target board. I guess Iwamatsu-san's purpose is not board emulation but
CPU. Then virtual board is suitable for it.
My current purpose is to utilize QEMU to analyze SH system behavior mainly
for debug purpose. (Performance analysis with QEMU is my interest also, but
I do not expect exact analysis result.) Anyway, I'd like to compare QEMU-SH
system and real SH board to see what QEMU can do, and what QEMU cannot. Then
I wanted to complete R2D+ board emulation. But R2D+ is obsolete now, and
SH7785LCR will be my next choice.
>> - It avoids rare peripheral support by QEMU.
>> Sometimes embedded boards have rare peripheral on it.
>> e.g.) RTL8139B (below Rev.C). on R2D+.
>> http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg00961.html
>> If we make the virtual board have standard peripheral (e.g. RTL8139C),
>> we can reuse peripheral implemenation qualified with other board for other
>> CPU arch, and avoid messy many type peripheral support.
>>
>> I'm not sure if QEMU's policy exists or not for this kind of choice.
>>
>> We can support both of them in the future. But I think it is important
>> to make consensus which should be the default and standard for QEMU-SH,
>> to decide to which we'll try to contribute.
>>
>> I'd like to your comments on them.
>>
>>From the kernel point of view, whether we add a new machine type for
> emulated boards or not doesn't really matter, it mostly depends on how
> people are going to be using it, and what level of change you are looking
> for. I will add as many defconfigs and boards as people want as long as
> there are users for them anyways.
>
> Anyways, I think there is value in supporting both. Emulating real
> hardware is especially helpful if you want to compare and contrast the
> environment between emulation and an existing platform, as well as
> allowing people without access to real hardware to develop against the
> emulated environment with testing conducted on real hardware as it
> becomes available.
I agree. Board-less software development is very powerful use case of
QEMU. I thank to QEMU developers, and hope that SH developers would
enjoy it too, in near future.
> Real hardware on the other hand is quite restrictive, and there are a lot
> of interesting features and capabilities that exist on some boards/CPUs
> but not others, limiting the amount of testing that can be performed. If
> people want to provide a virtual board that is pretty feature heavy to
> try and help with regression testing and so on, that would also be pretty
> useful.
>
> I wouldn't worry about it too much anyways. If there is something you are
> specifically interested on working on in QEMU, there is no real reason
> why we can't accomodate that in the kernel too, it just depends on the
> code changes you want. We do want people to experiment with both on a
> regular basis anyways, so I have no real interest in setting any sort of
> policy on this subject. ;-)
I see. My current understanding is as follows.
- Both virtual and real boards will provide benefit for SH software developers,
in different ways.
- There is no restriction to add sh-linux defconfigs for virtual board, because
there exist some sh-linux users those who expect it. : e.g.) Iwamatsu-san
- Anyway, we need new board support for QEMU-SH, because R2D+ is obsolete.
(I do not much about 'shix' board, but I guess it is obsolete too.)
Then I'll begin to consider on SH7785LCR board emulation. If someone is working
on it, please let me know. I'll try to help it, or consider on virtual board
to avoid duplicated work.
# Of course, more advices on this issue are welcome.
Regards,
Shin-ichiro KAWASAKI
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition
2009-01-21 16:51 ` Shin-ichiro KAWASAKI
2009-01-21 17:06 ` Paul Brook
@ 2009-01-21 19:01 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 0 replies; 21+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-01-21 19:01 UTC (permalink / raw)
To: Shin-ichiro KAWASAKI
Cc: Takashi Yoshii, Nobuhiro Iwamatsu, qemu-devel,
linux-sh@vger.kernel.org
>> I also don't see much point in catering to OSes that don't support
>> hardware manufactured this century. If the TOPPERS and BSD people want to
>> toy around with legacy support, they are welcome to, but QEMU certainly
>> doesn't have much to gain by spending time on this.
> I've just heard that newest TOPPERS (TOPPERS/ASP) supports SH-4A.
>
>
> Now, I hope that we would reach a consensus about the spec of new standard board
> for SH-4A. SH7785LCR is a choice. And, as Iwamatsu-san suggested, a virtual
> generic board is another choice. I'm not sure SH7785LCR's hardware spec is available
> or not. (Does anyone know it?) If it is, I push SH7785LCR. Otherwise, virtual board
> sounds good.
The SH7785LCR is a good choice for the SH-4A
The RSK7203 will be a good choice for the SH-2A
The virtual board will be a good choice for IP test and integration test
Best Regards,
J.
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2009-02-01 13:50 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-11 9:10 [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition Shin-ichiro KAWASAKI
2009-01-11 12:57 ` Edgar E. Iglesias
2009-01-11 13:04 ` Jean-Christophe PLAGNIOL-VILLARD
2009-01-12 3:48 ` Shin-ichiro KAWASAKI
2009-01-12 12:49 ` Paul Mundt
2009-01-13 2:32 ` Nobuhiro Iwamatsu
2009-01-13 6:28 ` Jean-Christophe PLAGNIOL-VILLARD
2009-01-15 1:25 ` Nobuhiro Iwamatsu
2009-01-13 7:46 ` Laurent Desnogues
2009-01-24 17:59 ` Shin-ichiro KAWASAKI
2009-01-13 13:36 ` Shin-ichiro KAWASAKI
2009-01-15 1:46 ` Nobuhiro Iwamatsu
2009-01-17 10:45 ` Shin-ichiro KAWASAKI
2009-01-17 11:16 ` Jean-Christophe PLAGNIOL-VILLARD
2009-01-21 9:04 ` Paul Mundt
2009-01-21 16:51 ` Shin-ichiro KAWASAKI
2009-01-21 17:06 ` Paul Brook
2009-01-24 5:46 ` sh: Virtual Board or Real board? (was Re: [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition) Shin-ichiro KAWASAKI
2009-01-27 0:43 ` Paul Mundt
2009-02-01 13:50 ` Shin-ichiro KAWASAKI
2009-01-21 19:01 ` [Qemu-devel] [PATCH 1/3] sh: SE7750 board definition Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).