Page MenuHomeFreeBSD
Feed Advanced Search

Jul 25 2017

mw_semihalf.com added a comment to D11703: Fix TEX index acquisition using L2 attributes.

Hi, any comments to the patch?

Jul 25 2017, 1:02 PM · ARM

Jun 21 2017

mw_semihalf.com updated the diff for D11204: Enable arm,io-coherent property of PL310 L2 cache on Armada 38x platforms.

Do not add redundant 'dma-coherent', and add the property only for the PL310 node. Unlike linux, we do not have to do it in runtime, hacking the platform code.

Jun 21 2017, 9:55 AM · ARM
mw_semihalf.com updated the diff for D11203: Create root DMA tag and fix MBUS windows on DMA coherent platforms.
  • Modify nexus dma tag, following https://reviews.freebsd.org/D11202
  • Improve commit log
  • Change ddr_attr for A38x SoCs, depending on the compatible string in the ofwbus ("/")
Jun 21 2017, 9:50 AM · ARM
mw_semihalf.com added a comment to D11202: Enable setting the dma tag at the nexus level.

Extract @ian 's changes around nexus and modify the commit log.

Jun 21 2017, 9:46 AM · ARM
mw_semihalf.com updated the diff for D11202: Enable setting the dma tag at the nexus level.
Jun 21 2017, 9:45 AM · ARM
mw_semihalf.com commandeered D11202: Enable setting the dma tag at the nexus level.

Need to take over the revision for the patch update.

Jun 21 2017, 9:44 AM · ARM
mw_semihalf.com updated the diff for D11201: Introduce support for DMA coherent ARM platforms.

Correct comments in the code, pointed by @ian

Jun 21 2017, 9:42 AM · ARM

Jun 20 2017

mw_semihalf.com added a comment to D11202: Enable setting the dma tag at the nexus level.
In D11202#233493, @ian wrote:

Hi @ian we cleaned the code a bit, solution seems nice, but... bus_dma_tag_create() won't work in platform_late_init stage, because it uses malloc :/ I have some hacks in mind how to overcome it, e.g. create the default dma tag in nexus code only when nexus_set_dma_tag() is called. The caller would only pass the desired flag and trigger tag creation inside nexus. What do you think?

Oh. Hmm, simple fix, add a "void *dummy" arg to ​mv_busdma_tag_init(), and instead of calling it from platform_late_init(), add:

SYSINIT(​mv_dmatag_init, SI_SUB_DRIVERS, SI_ORDER_ANY, ​mv_busdma_tag_init, NULL);
Jun 20 2017, 3:35 PM · ARM
mw_semihalf.com added a comment to D11202: Enable setting the dma tag at the nexus level.

Hi @ian we cleaned the code a bit, solution seems nice, but... bus_dma_tag_create() won't work in platform_late_init stage, because it uses malloc :/ I have some hacks in mind how to overcome it, e.g. create the default dma tag in nexus code only when nexus_set_dma_tag() is called. The caller would only pass the desired flag and trigger tag creation inside nexus. What do you think?

Jun 20 2017, 12:13 PM · ARM

Jun 19 2017

mw_semihalf.com added a comment to D11202: Enable setting the dma tag at the nexus level.

@ian thank - I'll test and let know.

Jun 19 2017, 6:41 PM · ARM
mw_semihalf.com added a comment to D11202: Enable setting the dma tag at the nexus level.
In D11202#233185, @ian wrote:

Hi @ian
...
In linux all 'magic' happens in arch/arm/mach-mvebu/coherency.c, which is:

  • set coherent dma ops
  • runtime PL310 DT node fixup (add "arm,io-coherent") property, due to CONFIG_SMP limitation (not relevant for us)

We tested and unfortunately it seems there is no way to add new property to the DT in FreeBSD (only modify existing one, but the value must be not bigger than original), hence another way should be made up.

I would really like to be able to use some mechanism (e.g. in platform_late_init). So basing your expertise, do you think it is possible to force settings of parent dma tag (nexus, ofwbus, simple-bus - whatever you prefer), so that all children (devices) can inherit this when creating theirs?

Yes, doing it in platform_late_init is just the sort of thing I was imagining, if it is a property of the entire system. Let me put together a little proposal-patch to see if my vague idea is practical.

Jun 19 2017, 3:22 PM · ARM
mw_semihalf.com added a comment to D11202: Enable setting the dma tag at the nexus level.
In D11202#233180, @ian wrote:

I decided to create dma tag in ofwbus and moved 'dma-coherent' property to '/' node in DTS.
All changes related to dma tag creation are now done only if FDT is defined.

The 'dma-coherent' property is not documented on FreeBSD.
On Linux it is used by arm/arm64 code and can be placed in various device and bus nodes (e.g. amba bus in artpec6.dtsi).

That was kind of my point: it's not documented, period. You just made it up, taking us another step further away from supporting standard DTS sources for marvell on freebsd.

How does the standard DTS for marvell systems handle this? How does linux handle it?

If this is truly a platform-wide attribute, not a per-bus attribute, then nexus is where the tag should be.

If standard DTS and linux don't describe this with a property in the dts source, but rather just let the platform code handle it somehow, then we should do something similar rather than creating even more non-standard dts for ourselves.

Jun 19 2017, 3:05 PM · ARM

Jun 17 2017

mw_semihalf.com updated the diff for D11245: Disable PL310 outer cache sync for IO coherent platforms.

Improve checking the "arm,io-coherent" property as pointed by @meloun-miracle-cz

Jun 17 2017, 9:24 PM · ARM
mw_semihalf.com closed D11238: Allow to fetch tunable variable introduced in r319896 from getenv().

I checked, and indeed r320054 fixes problems with obtaing the variables, so this patch is no longer needed.

Jun 17 2017, 9:22 PM
mw_semihalf.com updated the diff for D11204: Enable arm,io-coherent property of PL310 L2 cache on Armada 38x platforms.

Add "arm,io-coherent" to PL310 node (see https://reviews.freebsd.org/D11245)

Jun 17 2017, 10:11 AM · ARM
mw_semihalf.com updated the diff for D11203: Create root DMA tag and fix MBUS windows on DMA coherent platforms.

Do not remove cpufuncs.cf_l2cache_drain_writebuf, due to introducing "arm,io-coherent" property for PL310 in https://reviews.freebsd.org/D11245

Jun 17 2017, 10:09 AM · ARM
mw_semihalf.com created D11245: Disable PL310 outer cache sync for IO coherent platforms.
Jun 17 2017, 10:05 AM · ARM

Jun 16 2017

mw_semihalf.com accepted D10218: Implement workaround for Armada 38X family HW issue between CPU and devices.

Tested on Armada 388 Clearfog

Jun 16 2017, 4:11 PM
mw_semihalf.com accepted D11238: Allow to fetch tunable variable introduced in r319896 from getenv().

Tested on Armada 38x

Jun 16 2017, 4:10 PM

Jun 15 2017

mw_semihalf.com added a comment to D11203: Create root DMA tag and fix MBUS windows on DMA coherent platforms.
In D11203#231935, @meloun-miracle-cz wrote:

I do not think this patch was accepted in mainline Linux -> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-August/363953.html

But this one is -> https://github.com/torvalds/linux/commit/98ea2dba65932ffc456b6d7b11b8a0624e2f7b95
Please note that commit log uses "the outer cache sync operation is useless: and not a " the entire outer cache operations are useless".
Also note that this behavior is driven by "arm,io-coherent" property.

Jun 15 2017, 1:24 PM · ARM
mw_semihalf.com added a comment to D11203: Create root DMA tag and fix MBUS windows on DMA coherent platforms.

Yes, it's all documented in Marvell errata for the support. Both their private and the mainline kernels had to be modified in a similar way. Just please take a look:
https://patchwork.kernel.org/patch/6993601/

Jun 15 2017, 11:23 AM · ARM

Jun 14 2017

mw_semihalf.com created D11204: Enable arm,io-coherent property of PL310 L2 cache on Armada 38x platforms.
Jun 14 2017, 10:52 PM · ARM
mw_semihalf.com created D11203: Create root DMA tag and fix MBUS windows on DMA coherent platforms.
Jun 14 2017, 10:50 PM · ARM
mw_semihalf.com created D11202: Enable setting the dma tag at the nexus level.
Jun 14 2017, 10:47 PM · ARM
mw_semihalf.com created D11201: Introduce support for DMA coherent ARM platforms.
Jun 14 2017, 10:45 PM · ARM
mw_semihalf.com updated the diff for D10899: Enhance Armada 38x SoC identification string.

Instead of using weak_reference for get_cpu_clk, provide dummy functions for all other Marvell SoC's (same way as get_tclk is done).

Jun 14 2017, 10:42 PM · ARM
mw_semihalf.com added a comment to D10909: Add detection of CPU class for ARMv6/v7.

Indeed, but what you propose (remove cpu_class check for ARMv7), was done in the first version of this patch - briefly rejected.

Jun 14 2017, 8:01 PM · ARM

Jun 11 2017

mw_semihalf.com abandoned D10906: Support multi-port PCIe hierarchy in Marvell boards DTS.

Commited to revision 319706

Jun 11 2017, 8:20 AM · ARM

Jun 8 2017

mw_semihalf.com updated the diff for D10706: Introduce Armada 38x/XP network controller support.
  • correct style for all #define and other style(9) fixes
  • remove magics
  • enable dynamic coherency settings detection instead of option config
  • remove SoC ifdefs in mv_common and use custom setup/dump routines for neta
  • enable setting MVNETA_MULTIQUEUE and MVNETA_KTR as a config option
  • optimize DELAY usage in busy wait loops in miibus methods
  • add missing resources free on error in init
  • remove HWCSUM_IPV6 ifdefs
  • replace fdt_find_compatible with ofw_bus_find_compatible
Jun 8 2017, 3:05 AM · ARM
mw_semihalf.com commandeered D10706: Introduce Armada 38x/XP network controller support.
Jun 8 2017, 3:03 AM · ARM
mw_semihalf.com edited reviewers for D10706: Introduce Armada 38x/XP network controller support, added: zbb; removed: mw_semihalf.com.
Jun 8 2017, 3:02 AM · ARM
mw_semihalf.com updated the diff for D10910: Fix HWPMC interrupt handling in Counting Mode.

Replace magic number with macro, as pointed by @bz

Jun 8 2017, 2:54 AM · ARM
mw_semihalf.com updated the diff for D10909: Add detection of CPU class for ARMv6/v7.

Instead of removing cpu_class check in hwpmc, enable its usage amoung ARMv6/v7 SoCs.

Jun 8 2017, 2:52 AM · ARM

Jun 7 2017

mw_semihalf.com added a comment to D10682: Introduce platform CPU init for ARM.

Hi @meloun-miracle-cz and @andrew

Jun 7 2017, 10:51 PM

Jun 3 2017

mw_semihalf.com added inline comments to D10706: Introduce Armada 38x/XP network controller support.
Jun 3 2017, 7:54 AM · ARM

May 25 2017

mw_semihalf.com added a comment to D10902: Introduce Genesys GL3224 quirks.

GL3224 is a dual LUN, but fails to report them properly - the outcome without quirks are errors and undetected devices, connected to it.

May 25 2017, 5:30 PM · ARM
mw_semihalf.com added a comment to D10903: Increase timeout in Atheros HAL.

Thanks for a brief response. It happened on various Marvell Armada 38x boards + different AR983x cards. With this small fix all init problems were gone.

May 25 2017, 3:54 PM · network
mw_semihalf.com created D10913: Enable HWPMC overflow IRQ on both CPUs in MPIC.
May 25 2017, 3:36 PM · ARM
mw_semihalf.com created D10912: Fix INVARIANTS debug code in HWPMC.
May 25 2017, 3:34 PM · pmc
mw_semihalf.com created D10911: Fix event table for Cortex A9..
May 25 2017, 3:32 PM · ARM
mw_semihalf.com created D10910: Fix HWPMC interrupt handling in Counting Mode.
May 25 2017, 3:31 PM · ARM
mw_semihalf.com created D10909: Add detection of CPU class for ARMv6/v7.
May 25 2017, 3:29 PM · ARM
mw_semihalf.com created D10908: Add function to dump PCIE MBUS decoding windows and bars.
May 25 2017, 3:26 PM · ARM
mw_semihalf.com created D10907: Restore DTS node of PCIe controller for A38X boards.
May 25 2017, 3:23 PM · ARM
mw_semihalf.com created D10906: Support multi-port PCIe hierarchy in Marvell boards DTS.
May 25 2017, 3:21 PM · ARM
mw_semihalf.com created D10905: Fix PCIe window decoding on Armada 38x.
May 25 2017, 3:19 PM · ARM
mw_semihalf.com created D10904: Enable wireless Atheros cards in ARMADA38X.
May 25 2017, 3:16 PM · ARM
mw_semihalf.com created D10903: Increase timeout in Atheros HAL.
May 25 2017, 3:14 PM · network
mw_semihalf.com created D10902: Introduce Genesys GL3224 quirks.
May 25 2017, 3:12 PM · ARM
mw_semihalf.com created D10901: Enable MBUS bridge configuration in mv_rtc driver.
May 25 2017, 3:09 PM · ARM
mw_semihalf.com created D10900: Add reset capability to mv_rtc driver.
May 25 2017, 3:03 PM · ARM
mw_semihalf.com created D10899: Enhance Armada 38x SoC identification string.
May 25 2017, 3:00 PM · ARM

May 19 2017

mw_semihalf.com added a comment to D10720: Fix memory corruption while configuring CPU windows on Marvell SoCs.

Switched to nitems, thanks for the suggestion.

May 19 2017, 12:35 PM · ARM
mw_semihalf.com updated the diff for D10720: Fix memory corruption while configuring CPU windows on Marvell SoCs.
May 19 2017, 12:34 PM · ARM

May 18 2017

mw_semihalf.com abandoned D10782: Process MBUS decode windows only for enabled nodes.

The issue was already fixed on HEAD in r312746

May 18 2017, 5:29 AM · ARM

May 17 2017

mw_semihalf.com created D10783: Fix boot up on ARMADA38X uniprocessor variant.
May 17 2017, 10:55 PM · ARM
mw_semihalf.com created D10782: Process MBUS decode windows only for enabled nodes.
May 17 2017, 10:53 PM · ARM
mw_semihalf.com updated the diff for D10716: Fix MPIC mask/unmask.
May 17 2017, 10:49 PM · ARM
mw_semihalf.com added a comment to D10716: Fix MPIC mask/unmask.

Thanks, I've just prepared a patch rebased against your change - it has slightly improved if statements. Verified with the network traffic.

May 17 2017, 10:48 PM · ARM

May 16 2017

mw_semihalf.com updated the diff for D10717: Fix registration of MPIC driver.
May 16 2017, 11:32 AM · ARM
mw_semihalf.com added a comment to D10717: Fix registration of MPIC driver.

Thanks for the suggestion. It works, so I'll the patch in a moment.

May 16 2017, 11:15 AM · ARM
mw_semihalf.com updated the diff for D10717: Fix registration of MPIC driver.
May 16 2017, 1:36 AM · ARM
mw_semihalf.com updated the diff for D10716: Fix MPIC mask/unmask.
May 16 2017, 1:34 AM · ARM

May 14 2017

mw_semihalf.com added inline comments to D10716: Fix MPIC mask/unmask.
May 14 2017, 8:34 AM · ARM
mw_semihalf.com created D10724: Add workaround for CESA MBUS windows with 4GB DRAM.
May 14 2017, 1:05 AM · ARM
mw_semihalf.com created D10723: Enable proper configuration of CESA MBUS windows.
May 14 2017, 1:03 AM · ARM
mw_semihalf.com created D10722: Parse EHCI windows on Marvell platforms.
May 14 2017, 1:01 AM · ARM
mw_semihalf.com created D10721: Fix USB3.0 decoding windows on Armada38x.
May 14 2017, 1:00 AM · ARM
mw_semihalf.com created D10720: Fix memory corruption while configuring CPU windows on Marvell SoCs.
May 14 2017, 12:58 AM · ARM
mw_semihalf.com created D10719: Enable proper parsing of nested simlpe-buses on Marvell platforms.
May 14 2017, 12:55 AM · ARM
mw_semihalf.com created D10718: Fix PM recognition on recent Marvell boards.
May 14 2017, 12:54 AM · ARM
mw_semihalf.com created D10717: Fix registration of MPIC driver.
May 14 2017, 12:52 AM · ARM
mw_semihalf.com created D10716: Fix MPIC mask/unmask.
May 14 2017, 12:50 AM · ARM
mw_semihalf.com created D10715: Correct MPIC order of attachment.
May 14 2017, 12:48 AM · ARM
mw_semihalf.com created D10714: Poll PHY status using internal e6000sw registers.
May 14 2017, 12:46 AM · ARM
mw_semihalf.com created D10713: Improve busy-wait loop during switch phy access in e6000sw.
May 14 2017, 12:44 AM · ARM
mw_semihalf.com created D10712: Fix missing unlock in e6000sw driver.
May 14 2017, 12:41 AM · ARM
mw_semihalf.com created D10711: Fix broken malloc in e6000sw.
May 14 2017, 12:40 AM · ARM
mw_semihalf.com created D10710: Introduce separate watchdog driver for Armada to fix phony DELAY.
May 14 2017, 12:39 AM · ARM
mw_semihalf.com created D10709: Enable SCU Speculative linefills to L2 on Armada 38x.
May 14 2017, 12:36 AM · ARM
mw_semihalf.com created D10708: Enable in-band link management on A388-Clearfog board.
May 14 2017, 12:33 AM · ARM
mw_semihalf.com created D10707: Enable neta controller support in ARMADA38X.
May 14 2017, 12:31 AM · ARM
mw_semihalf.com created D10706: Introduce Armada 38x/XP network controller support.
May 14 2017, 12:28 AM · ARM

May 10 2017

mw_semihalf.com accepted D10606: Enable the SDHCI controller on ARMADA38X.
May 10 2017, 7:05 PM
mw_semihalf.com added inline comments to D10606: Enable the SDHCI controller on ARMADA38X.
May 10 2017, 7:05 PM

May 9 2017

mw_semihalf.com accepted D10601: Add the SDHCI Address Decoder registers and routines for ARMADA 38X..
May 9 2017, 8:46 PM
mw_semihalf.com added inline comments to D10601: Add the SDHCI Address Decoder registers and routines for ARMADA 38X..
May 9 2017, 8:04 AM

May 5 2017

mw_semihalf.com added inline comments to D10606: Enable the SDHCI controller on ARMADA38X.
May 5 2017, 7:38 AM
mw_semihalf.com added inline comments to D10601: Add the SDHCI Address Decoder registers and routines for ARMADA 38X..
May 5 2017, 7:21 AM

May 4 2017

mw_semihalf.com added a comment to D10218: Implement workaround for Armada 38X family HW issue between CPU and devices.

Would it be possible that you commit change pointed by zbb?
https://github.com/strejda/tegra/commit/3b5138751ee5643992b20fcb21b280fab433bb20

May 4 2017, 5:55 PM

Apr 19 2017

mw_semihalf.com created D10427: Add support for Amazon Elastic Network Adapter (ENA) NIC.
Apr 19 2017, 11:35 AM

Apr 11 2017

mw_semihalf.com updated the diff for D10221: Execute PL310_ERRATA_727915 only for related revisions.
Apr 11 2017, 11:24 AM
mw_semihalf.com added a comment to D10221: Execute PL310_ERRATA_727915 only for related revisions.

Ok, checked - Armada38x comprises r3p3 cache controller revision. I'm uploading second version of the patch, which adds missing condition checks for PL310_ERRATA_727915.

Apr 11 2017, 11:22 AM
mw_semihalf.com added a comment to D10217: Increase number of L2 tables required for kernel bootstrap.

Here's an explanation from gber, who is the commit author:
If my understanding of code responsible for initial mapping is correct, then all the memory reserved from kernel space by pmap_alloc_specials() function called in pmap_bootstrap() should be mapped initially by initarm(). To create initial mapping initarm() function reserves proper number of l2 page tables. However the number of the l2 page tables does not take into account memory for: pmap_kernel_l2ptp_kva, pmap_kernel_l2dtable_kva, crashdumpmap, etc.

Apr 11 2017, 6:26 AM

Apr 1 2017

mw_semihalf.com added a comment to D10218: Implement workaround for Armada 38X family HW issue between CPU and devices.

Ok, agree, the ifdef is not nice. Thank you for the hint, I'll try it.

Apr 1 2017, 7:55 AM
mw_semihalf.com added a comment to D10221: Execute PL310_ERRATA_727915 only for related revisions.

Thanks. I'll confirm this and either abandon this patch or get back with something cleaner.

Apr 1 2017, 7:54 AM

Mar 31 2017

mw_semihalf.com added a comment to D10218: Implement workaround for Armada 38X family HW issue between CPU and devices.

Does GENERIC kernel support Armada 38x SoC? If not, is this really an issue here?

Mar 31 2017, 3:49 PM
mw_semihalf.com created D10223: Fix bit assignment in PL310_POWER_CTRL.
Mar 31 2017, 2:43 PM
mw_semihalf.com created D10222: Add PL310 device in ARMADA38X config.
Mar 31 2017, 2:37 PM
mw_semihalf.com created D10221: Execute PL310_ERRATA_727915 only for related revisions.
Mar 31 2017, 2:35 PM