From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Dragan Mladjenovic <Dragan.Mladjenovic@syrmia.com>,
Milica Lazarevic <milica.lazarevic@syrmia.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Djordje Todorovic <djordje.todorovic@syrmia.com>,
Aurelien Jarno <aurelien@aurel32.net>,
Bernhard Beschow <shentey@gmail.com>
Subject: Re: [PATCH-for-8.0 v2 08/11] hw/mips/malta: Use bootloader generator API for nanoMIPS CPUs (3/5)
Date: Mon, 12 Dec 2022 08:37:54 -0600 [thread overview]
Message-ID: <ba8c1f63-08cd-e073-3a6e-45f806658d67@linaro.org> (raw)
In-Reply-To: <20221211204533.85359-9-philmd@linaro.org>
On 12/11/22 14:45, Philippe Mathieu-Daudé wrote:
> Part 3/5: Convert PCI0 I/O BAR setup
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
> ---
> hw/mips/malta.c | 40 ++++++++--------------------------------
> 1 file changed, 8 insertions(+), 32 deletions(-)
>
> diff --git a/hw/mips/malta.c b/hw/mips/malta.c
> index 3e80a12221..16161b1b03 100644
> --- a/hw/mips/malta.c
> +++ b/hw/mips/malta.c
> @@ -685,9 +685,6 @@ static void write_bootloader_nanomips(uint8_t *base, uint64_t run_addr,
>
> /*
> * Load BAR registers as done by YAMON:
> - *
> - * - set up PCI0 I/O BARs from 0x18000000 to 0x181fffff
> - *
> */
> stw_p(p++, 0xe040); stw_p(p++, 0x0681);
> /* lui t1, %hi(0xb4000000) */
> @@ -707,21 +704,6 @@ static void write_bootloader_nanomips(uint8_t *base, uint64_t run_addr,
>
> stw_p(p++, 0xe020); stw_p(p++, 0x0801);
> /* lui t0, %hi(0xc0000000) */
> -
> - /* 0x48 corresponds to GT_PCI0IOLD */
> - stw_p(p++, 0x8422); stw_p(p++, 0x9048);
> - /* sw t0, 0x48(t1) */
> -
> - stw_p(p++, 0xe020); stw_p(p++, 0x0800);
> - /* lui t0, %hi(0x40000000) */
> -
> - /* 0x50 corresponds to GT_PCI0IOHD */
> - stw_p(p++, 0x8422); stw_p(p++, 0x9050);
> - /* sw t0, 0x50(t1) */
> -
> - stw_p(p++, 0xe020); stw_p(p++, 0x0001);
> - /* lui t0, %hi(0x80000000) */
> -
> #else
> #define cpu_to_gt32 cpu_to_be32
>
> @@ -738,23 +720,17 @@ static void write_bootloader_nanomips(uint8_t *base, uint64_t run_addr,
>
> stw_p(p++, 0x0020); stw_p(p++, 0x00c0);
> /* addiu[32] t0, $0, 0xc0 */
> -
> - /* 0x48 corresponds to GT_PCI0IOLD */
> - stw_p(p++, 0x8422); stw_p(p++, 0x9048);
> - /* sw t0, 0x48(t1) */
> -
> - stw_p(p++, 0x0020); stw_p(p++, 0x0040);
> - /* addiu[32] t0, $0, 0x40 */
> -
> - /* 0x50 corresponds to GT_PCI0IOHD */
> - stw_p(p++, 0x8422); stw_p(p++, 0x9050);
> - /* sw t0, 0x50(t1) */
> -
> - stw_p(p++, 0x0020); stw_p(p++, 0x0080);
> - /* addiu[32] t0, $0, 0x80 */
> #endif
> v = p;
>
> + /* setup PCI0 io window to 0x18000000-0x181fffff */
> + bl_gen_write_u32(&v, /* GT_PCI0IOLD */
> + cpu_mips_phys_to_kseg1(NULL, 0x1be00000 + 0x48),
> + cpu_to_gt32(0x18000000 << 3));
> + bl_gen_write_u32(&v, /* GT_PCI0IOHD */
> + cpu_mips_phys_to_kseg1(NULL, 0x1be00000 + 0x50),
> + cpu_to_gt32(0x08000000 << 3));
> +
> /* setup PCI0 mem windows */
> bl_gen_write_u32(&v, /* GT_PCI0M0LD */
> cpu_mips_phys_to_kseg1(NULL, 0x1be00000 + 0x58),
next prev parent reply other threads:[~2022-12-12 14:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-11 20:45 [PATCH-for-8.0 v2 00/11] hw/mips/malta: Generate nanoMIPS bootloader with bootloader generator API Philippe Mathieu-Daudé
2022-12-11 20:45 ` [PATCH-for-8.0 v2 01/11] hw/mips/bootloader: Handle buffers as opaque arrays Philippe Mathieu-Daudé
2022-12-11 20:52 ` Philippe Mathieu-Daudé
2022-12-12 13:46 ` Richard Henderson
2022-12-11 20:45 ` [PATCH-for-8.0 v2 02/11] hw/mips/bootloader: Implement nanoMIPS NOP opcode generator Philippe Mathieu-Daudé
2022-12-11 20:45 ` [PATCH-for-8.0 v2 03/11] hw/mips/bootloader: Implement nanoMIPS SW " Philippe Mathieu-Daudé
2022-12-12 13:50 ` Richard Henderson
2022-12-11 20:45 ` [PATCH-for-8.0 v2 04/11] hw/mips/bootloader: Implement nanoMIPS LI (LUI+ORI) " Philippe Mathieu-Daudé
2022-12-12 13:52 ` Richard Henderson
2022-12-11 20:45 ` [PATCH-for-8.0 v2 05/11] hw/mips/bootloader: Implement nanoMIPS JALRc " Philippe Mathieu-Daudé
2022-12-12 13:55 ` Richard Henderson
2022-12-11 20:45 ` [PATCH-for-8.0 v2 06/11] hw/mips/malta: Use bootloader generator API for nanoMIPS CPUs (1/5) Philippe Mathieu-Daudé
2022-12-12 14:31 ` Richard Henderson
2022-12-11 20:45 ` [PATCH-for-8.0 v2 07/11] hw/mips/malta: Use bootloader generator API for nanoMIPS CPUs (2/5) Philippe Mathieu-Daudé
2022-12-12 14:35 ` Richard Henderson
2022-12-11 20:45 ` [PATCH-for-8.0 v2 08/11] hw/mips/malta: Use bootloader generator API for nanoMIPS CPUs (3/5) Philippe Mathieu-Daudé
2022-12-12 14:37 ` Richard Henderson [this message]
2022-12-11 20:45 ` [PATCH-for-8.0 v2 09/11] hw/mips/malta: Use bootloader generator API for nanoMIPS CPUs (4/5) Philippe Mathieu-Daudé
2022-12-12 14:40 ` Richard Henderson
2022-12-11 20:45 ` [PATCH-for-8.0 v2 10/11] hw/mips/malta: Use bootloader generator API for nanoMIPS CPUs (5/5) Philippe Mathieu-Daudé
2022-12-12 14:53 ` Richard Henderson
2022-12-11 20:45 ` [PATCH-for-8.0 v2 11/11] hw/mips/malta: Merge common BL code as bl_setup_gt64120_jump_kernel() Philippe Mathieu-Daudé
2022-12-12 14:58 ` Richard Henderson
2022-12-21 7:07 ` [PATCH-for-8.0 v2 00/11] hw/mips/malta: Generate nanoMIPS bootloader with bootloader generator API Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ba8c1f63-08cd-e073-3a6e-45f806658d67@linaro.org \
--to=richard.henderson@linaro.org \
--cc=Dragan.Mladjenovic@syrmia.com \
--cc=aurelien@aurel32.net \
--cc=djordje.todorovic@syrmia.com \
--cc=jiaxun.yang@flygoat.com \
--cc=milica.lazarevic@syrmia.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=shentey@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).