From: Chee, Tien Fong <tien.fong.chee@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/9] ARM: socfpga: Add FPGA drivers for Arria 10 FPGA bitstream loading
Date: Tue, 27 Nov 2018 08:54:39 +0000 [thread overview]
Message-ID: <1543308878.10323.14.camel@intel.com> (raw)
In-Reply-To: <4f54cd3c-5231-c052-bb47-b2cb33b65c9d@denx.de>
On Mon, 2018-11-26 at 12:18 +0100, Marek Vasut wrote:
> On 11/26/2018 11:09 AM, Chee, Tien Fong wrote:
> [...]
> >
> > >
> > > >
> > > > >
> > > > > >
> > > > > > diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
> > > > > > index 50e9019..06a8204 100644
> > > > > > --- a/drivers/fpga/Kconfig
> > > > > > +++ b/drivers/fpga/Kconfig
> > > > > > @@ -21,6 +21,15 @@ config FPGA_SOCFPGA
> > > > > >
> > > > > > This provides common functionality for Gen5 and
> > > > > > Arria10
> > > > > > devices.
> > > > > >
> > > > > > +config CHECK_FPGA_DATA_CRC
> > > > > config FPGA_SOCFPGA_A10_CRC_CHECK
> > > > >
> > > > > What is this for and why shouldn't this be ON by default ?
> > > > Both periph.rbf or full.rbf are wrapped with mkimage. So, this
> > > > CRC
> > > > checking can be used to check the integrity of the loading
> > > > bitstream
> > > > data against checksum from mkimage. It is off for the sake of
> > > > performance.
> > > Is there a measurable performance degradation ? I presume that's
> > > because
> > > caches are disabled at that point, yes? Enable caches and see if
> > > that
> > > helps.
> > Just logical sense, performance sure getting degraded, especially
> > loading full rbf, but may be not that obvious for periph.rbf
> > because of
> > very small size, i can try to measure. If not much difference, i
> > can
> > enable checking in default.
> Hard numbers are the only relevant argument here, please measure.
> And try it with caches enabled as much as possible, you want users to
> boot fast. Arria10 is particularly annoyingly slow at booting.
sure.
>
> >
> > >
> > >
> > > >
> > > >
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > + bool "Enable CRC cheking on Arria10 FPGA bistream"
> > > > > > + depends on FPGA_SOCFPGA
> > > > > > + help
> > > > > > + Say Y here to enable the CRC checking on Arria 10
> > > > > > FPGA
> > > > > > bitstream
> > > > > > +
> > > > > > + This provides CRC checking to ensure integrated
> > > > > > of
> > > > > > Arria
> > > > > > 10 FPGA
> > > > > > + bitstream is programmed into FPGA.
> > > > > > +
> > > > > > config FPGA_CYCLON2
> > > > > > bool "Enable Altera FPGA driver for Cyclone II"
> > > > > > depends on FPGA_ALTERA
> > > > > > diff --git a/drivers/fpga/socfpga_arria10.c
> > > > > > b/drivers/fpga/socfpga_arria10.c
> > > > > > index 114dd91..d9ad237 100644
> > > > > > --- a/drivers/fpga/socfpga_arria10.c
> > > > > > +++ b/drivers/fpga/socfpga_arria10.c
> > > > > > @@ -1,6 +1,6 @@
> > > > > > // SPDX-License-Identifier: GPL-2.0
> > > > > > /*
> > > > > > - * Copyright (C) 2017 Intel Corporation <www.intel.com>
> > > > > > + * Copyright (C) 2017-2018 Intel Corporation <www.intel.co
> > > > > > m>
> > > > > > */
> > > > > >
> > > > > > #include <asm/io.h>
> > > > > > @@ -10,8 +10,10 @@
> > > > > > #include <asm/arch/sdram.h>
> > > > > > #include <asm/arch/misc.h>
> > > > > > #include <altera.h>
> > > > > > +#include <asm/arch/pinmux.h>
> > > > > > #include <common.h>
> > > > > > #include <errno.h>
> > > > > > +#include <fs_loader.h>
> > > > > > #include <wait_bit.h>
> > > > > > #include <watchdog.h>
> > > > > >
> > > > > > @@ -21,6 +23,10 @@
> > > > > > #define COMPRESSION_OFFSET 229
> > > > > > #define FPGA_TIMEOUT_MSEC 1000 /* timeout in ms */
> > > > > > #define FPGA_TIMEOUT_CNT 0x1000000
> > > > > > +#define RBF_UNENCRYPTED 0xa65c
> > > > > > +#define RBF_ENCRYPTED 0xa65d
> > > > > > +#define ARRIA10RBF_PERIPH 0x0001
> > > > > > +#define ARRIA10RBF_CORE 0x8001
> > > > > This looks awfully similar to the PERIPH_RBF and CORE_RBF
> > > > > above.
> > > > PERIPH_RBF and CORE_RBF are the flags, so i can change them to
> > > > enum.
> > > > But above #define are magic content used to identify the
> > > > bistream
> > > > type.
> > > > If above #define are not suitable, what can you suggest?
> > > Maybe you can just align those two to avoid duplication ?
> > What's you means with duplication, they are different thing.
> > How about i change the name to ARRIA10RBF_PERIPH_TYPE
> > and ARRIA10RBF_CORE_TYPE.
> ARRIA10RBF_PERIPH = (PERIPH_RBF << 15) | 1
We can't use the flag PERIPH_RBF(similar TRUE/FALSE) for magic content,
because they are not related each other. Magic content is defined by HW
design.
We identify the type of rbf such as periph, and core through this magic
content within the rbf. After we getting the type, then only we setting
the flag such as PERIPH_RBF to the function.
>
> same for ... _CORE ... is that a coincidence ?
>
> [...]
>
next prev parent reply other threads:[~2018-11-27 8:54 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 10:41 [U-Boot] [PATCH 0/9] Add support for loading FPGA bitstream tien.fong.chee at intel.com
2018-11-21 10:41 ` [U-Boot] [PATCH 1/9] ARM: socfpga: Description on FPGA bitstream type and file name for Arria 10 tien.fong.chee at intel.com
2018-11-21 14:11 ` Marek Vasut
2018-11-23 9:19 ` Chee, Tien Fong
2018-11-23 12:23 ` Marek Vasut
2018-11-26 9:44 ` Chee, Tien Fong
2018-11-26 11:15 ` Marek Vasut
2018-11-27 8:45 ` Chee, Tien Fong
2018-11-27 12:07 ` Marek Vasut
2018-11-28 14:49 ` Chee, Tien Fong
2018-11-28 15:10 ` Marek Vasut
2018-11-28 15:36 ` Chee, Tien Fong
2018-11-28 16:17 ` Chee, Tien Fong
2018-11-28 17:55 ` Marek Vasut
2018-12-14 8:07 ` Chee, Tien Fong
2018-11-21 10:41 ` [U-Boot] [PATCH 2/9] ARM: socfpga: Add FPGA drivers for Arria 10 FPGA bitstream loading tien.fong.chee at intel.com
2018-11-21 14:18 ` Marek Vasut
2018-11-23 9:43 ` Chee, Tien Fong
2018-11-23 12:28 ` Marek Vasut
2018-11-26 10:09 ` Chee, Tien Fong
2018-11-26 11:18 ` Marek Vasut
2018-11-27 8:54 ` Chee, Tien Fong [this message]
2018-11-27 12:08 ` Marek Vasut
2018-11-28 14:53 ` Chee, Tien Fong
2018-11-28 15:11 ` Marek Vasut
2018-11-21 10:41 ` [U-Boot] [PATCH 3/9] spl : socfpga: Implement fpga bitstream loading with socfpga loadfs tien.fong.chee at intel.com
2018-11-21 14:19 ` Marek Vasut
2018-11-23 9:51 ` Chee, Tien Fong
2018-11-23 12:31 ` Marek Vasut
2018-11-26 10:10 ` Chee, Tien Fong
2018-11-26 11:20 ` Marek Vasut
2018-11-27 8:55 ` Chee, Tien Fong
2018-11-27 12:08 ` Marek Vasut
2018-11-21 10:41 ` [U-Boot] [PATCH 4/9] ARM: socfpga: Bundle U-Boot fitImage into SFP on Arria10 tien.fong.chee at intel.com
2018-11-21 14:21 ` Marek Vasut
2018-11-23 9:54 ` Chee, Tien Fong
2018-11-23 12:40 ` Marek Vasut
2018-11-26 10:30 ` Chee, Tien Fong
2018-11-26 11:22 ` Marek Vasut
2018-11-27 9:00 ` Chee, Tien Fong
2018-11-27 12:09 ` Marek Vasut
2018-11-28 14:43 ` Chee, Tien Fong
2018-11-28 15:11 ` Marek Vasut
2018-11-21 10:41 ` [U-Boot] [PATCH 5/9] ARM: socfpga: Add SPL fitImage config match tien.fong.chee at intel.com
2018-11-21 14:21 ` Marek Vasut
2018-11-23 10:05 ` Chee, Tien Fong
2018-11-23 12:34 ` Marek Vasut
2018-11-26 10:11 ` Chee, Tien Fong
2018-11-21 10:41 ` [U-Boot] [PATCH 6/9] ARM: socfpga: Set default DTB address on A10 tien.fong.chee at intel.com
2018-11-21 14:22 ` Marek Vasut
2018-11-23 10:10 ` Chee, Tien Fong
2018-11-23 12:39 ` Marek Vasut
2018-11-21 10:41 ` [U-Boot] [PATCH 7/9] ARM: socfpga: Use custom header target buffer in SPL tien.fong.chee at intel.com
2018-11-21 10:41 ` [U-Boot] [PATCH 8/9] ARM: socfpga: Add default fitImage for Arria10 SoCDK tien.fong.chee at intel.com
2018-11-21 10:41 ` [U-Boot] [PATCH 9/9] ARM: socfpga: Synchronize the configuration for A10 SoCDK tien.fong.chee at intel.com
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=1543308878.10323.14.camel@intel.com \
--to=tien.fong.chee@intel.com \
--cc=u-boot@lists.denx.de \
/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