Page MenuHomeFreeBSD
Feed Advanced Search

Fri, Jan 15

mmel accepted D28156: Add missing no-ctfconvert to C generation rules.

LGTM. thanks.
It is a bit questionable whether ctfconvert should generate an error in this case (I don't think so), but calling it is clearly unnecessary in this case.

Fri, Jan 15, 9:09 AM

Thu, Jan 14

mmel added a comment to D27529: Allow access to all accessible physical memory through /dev/mem.

I afraid that this approach have problem on FDT based systems. FDT typically uses reserved memory regions also for secure portion of base memory (memory used by secure monitor or PSCI). And reserved memory is handled by using EXFLAG_NOALLOC -> https://cgit.freebsd.org/src/tree/sys/arm64/arm64/machdep.c#n1193
And of course this kind of memory cannot be accessed by /dev/mem.

Thu, Jan 14, 9:21 AM

Sat, Jan 9

mmel added a reviewer for D27218: arm: tune vmparam.h towards a little more modern: kib.

Unfortunately, side effect of this is large reduction of VA space available for mmap -> available range for (unfixed) mmap is only in the interval <start of data segment + MAXDSIZ, end of user VA space>.

Sat, Jan 9, 8:02 PM

Sat, Jan 2

mmel accepted D27897: arm: fix atomic_testand{set,clear}_64 for ops on high bits.

Ohh right, my next mistake. Seems I have not lucky day today :(
Thanks for fixing my stupid bugs.

Sat, Jan 2, 8:50 PM
mmel added a comment to D27895: arm: atomic_testand{set,clear} didn't follow atomic(9) API.

I just committed fix for arm.
Thanks for cooperation.

Sat, Jan 2, 7:58 PM
mmel committed R10:bd03acedb804: arm: Fix atomic_testand{set,clear}_32(). According to atomic (9), the bit… (authored by mmel).
arm: Fix atomic_testand{set,clear}_32(). According to atomic (9), the bit…
Sat, Jan 2, 7:54 PM
mmel added a comment to D27886: arm64: fix mask in atomic_testand{set,clear}_64.
In D27886#623242, @mmel wrote:

Good catch. It never occurred to me that we could have a bug in atomics on two architectures at the same time, so I wasn't looking for a problem in my own garden :) I will try to fix arm by myself.

Are you saying 32-bit ARM is also broken? Those are a little weirder, I think it uses sys/sys/_atomic_subword.h.

Yes, it is also broken. ARM uses its own implementation, which does not do modulo for the bit position.
See https://cgit.freebsd.org/src/tree/sys/arm/include/atomic-v6.h#n862.
I will commit proper fix in next hour or so...

Sat, Jan 2, 6:30 PM
mmel abandoned D27891: bitset: Fix BIT_TEST_SET_ATOMIC and BIT_TEST_CLR_ATOMIC..

Hmm, right. It would be better to read the manual before coding. My bad.

Sat, Jan 2, 6:14 PM
mmel requested review of D27891: bitset: Fix BIT_TEST_SET_ATOMIC and BIT_TEST_CLR_ATOMIC..
Sat, Jan 2, 12:06 PM
mmel accepted D27886: arm64: fix mask in atomic_testand{set,clear}_64.

Good catch. It never occurred to me that we could have a bug in atomics on two architectures at the same time, so I wasn't looking for a problem in my own garden :) I will try to fix arm by myself.
Tested on real HW, everything OK.

Sat, Jan 2, 7:59 AM

Wed, Dec 30

mmel committed R10:28482babd08a: arm64: Use new arm_kernel_boothdr script for generating booti images. (authored by mmel).
arm64: Use new arm_kernel_boothdr script for generating booti images.
Wed, Dec 30, 12:58 PM
mmel committed R10:59f46e34cf64: sys/tools: Add a tool for generating arm and arm64 kernel images. (authored by mmel).
sys/tools: Add a tool for generating arm and arm64 kernel images.
Wed, Dec 30, 12:25 PM
mmel committed R10:509a00620523: Tegra210: Connect to GENERIC kernel. (authored by mmel).
Tegra210: Connect to GENERIC kernel.
Wed, Dec 30, 10:02 AM
mmel committed R10:30ae416898ef: Tegra210: Add lost-in-merge fixes: (authored by mmel).
Tegra210: Add lost-in-merge fixes:
Wed, Dec 30, 10:02 AM

Mon, Dec 28

mmel added inline comments to D26735: Improve loading of multipage aligned buffers..
Mon, Dec 28, 2:03 PM
mmel committed R10:e90347891960: ARM64: Port FreeBSD to Nvidia Jetson TX1 and Nano. (authored by mmel).
ARM64: Port FreeBSD to Nvidia Jetson TX1 and Nano.
Mon, Dec 28, 1:19 PM

Sun, Dec 27

mmel committed R10:c8300031980e: EXTRES: Ignore index modifier flags for table based clock dividers. (authored by mmel).
EXTRES: Ignore index modifier flags for table based clock dividers.
Sun, Dec 27, 4:49 PM
mmel accepted D27765: Use L2 blocks when in the identity map.

This is not entirely true, for every SoC we know where DRAM is located and its maximum size. Same is true for all MMIO peripherals.

Sun, Dec 27, 3:58 PM
mmel added a comment to D27765: Use L2 blocks when in the identity map.

Tested with LINUX_BOOT_ABI, everything works fine.
But why did you also change the behavior for SOCDEV_PA/VA? Removal of the option to choose a SOCDEV_PA looks a like step backward to me. This breaks existing code (but covered by #if 0) for example in uart_dev_snps.c. At least this change should be mentioned in commit message, but I think that old way is better.

Sun, Dec 27, 10:21 AM

Sat, Dec 26

mmel committed R10:b9cbd68d1cbb: ARM: Enhance common Nvidia Tegra drivers by support for Tegra210 SoC. (authored by mmel).
ARM: Enhance common Nvidia Tegra drivers by support for Tegra210 SoC.
Sat, Dec 26, 6:29 PM
mmel added a comment to D27765: Use L2 blocks when in the identity map.

Can you, please, rebase this to fresh tree?
Patch fails for me with:

git apply -p0  ../../git/D27765.diff
error: patch failed: sys/arm64/arm64/locore.S:497
error: sys/arm64/arm64/locore.S: patch does not app
Sat, Dec 26, 12:01 PM
mmel committed R10:9211df29150d: MFC r366192: (authored by mmel).
MFC r366192:
Sat, Dec 26, 7:53 AM

Fri, Dec 25

mmel committed R10:aa76f0c39741: PMC: remove now orphaned PMC for INTEL XScale processors. (authored by mmel).
PMC: remove now orphaned PMC for INTEL XScale processors.
Fri, Dec 25, 2:55 PM

Dec 17 2020

mmel committed rS368717: MFC r368167,r368187,r368203:.
MFC r368167,r368187,r368203:
Dec 17 2020, 1:17 PM
mmel committed rS368715: MFC r368364:.
MFC r368364:
Dec 17 2020, 12:58 PM

Dec 16 2020

mmel closed D27265: Use the standard method for localizing of MSI-X table bar..
Dec 16 2020, 2:39 PM
mmel committed rS368698: Use the standard method for localizing of MSI-X table bar..
Use the standard method for localizing of MSI-X table bar.
Dec 16 2020, 2:39 PM
mmel committed rS368697: Allocate right number of pages for the bounced buffers crossing the page..
Allocate right number of pages for the bounced buffers crossing the page.
Dec 16 2020, 2:37 PM

Dec 14 2020

mmel committed rS368635: Remove unused functions and variables in cpufunc.[ch]..
Remove unused functions and variables in cpufunc.[ch].
Dec 14 2020, 2:01 PM
mmel committed rS368634: Finish implementation of ARM PMU interrupts..
Finish implementation of ARM PMU interrupts.
Dec 14 2020, 1:10 PM
mmel committed rS368633: Verify (and fix) the context_id argument passed to the mpentry () by PSCI..
Verify (and fix) the context_id argument passed to the mpentry () by PSCI.
Dec 14 2020, 11:58 AM
mmel committed rS368631: MFC r368161:.
MFC r368161:
Dec 14 2020, 11:09 AM
mmel committed rS368630: MFC r367955:.
MFC r367955:
Dec 14 2020, 10:17 AM
mmel committed rS368629: MFC r367865:.
MFC r367865:
Dec 14 2020, 10:14 AM
mmel committed rS368628: MFC r367447:.
MFC r367447:
Dec 14 2020, 9:49 AM

Dec 7 2020

mmel added a comment to D27040: devel/gdb: Update to 10.1.

Unfortunately, this fails on armv7 and on aarch64.

Dec 7 2020, 6:20 PM
mmel accepted D27497: Ensure the boot CPU is CPU 0 on arm64.

Works for me and it's much better than my initial proposal.

Dec 7 2020, 4:37 PM

Dec 5 2020

mmel committed rS368373: Remove remaning definition of GFB_<foo> options..
Remove remaning definition of GFB_<foo> options.
Dec 5 2020, 7:44 PM
mmel closed D13863: Simplify and cleanup startup code for secondary cores..
Dec 5 2020, 2:06 PM
mmel committed rS368370: Simplify startup of secondary cores and store MPIDR register to pcpu..
Simplify startup of secondary cores and store MPIDR register to pcpu.
Dec 5 2020, 2:06 PM
mmel committed rS368369: Add basic support for Freescale LX2160A SoC..
Add basic support for Freescale LX2160A SoC.
Dec 5 2020, 12:09 PM
mmel committed rS368367: Connect DTB files based on LX2160A SoC to build..
Connect DTB files based on LX2160A SoC to build.
Dec 5 2020, 11:18 AM
mmel committed rS368364: DesignWare PCIe driver: Don't call bus_generic_attach() twice..
DesignWare PCIe driver: Don't call bus_generic_attach() twice.
Dec 5 2020, 10:55 AM
mmel committed rS368363: Connect RK3288 to GENERIC kernel..
Connect RK3288 to GENERIC kernel.
Dec 5 2020, 10:10 AM
mmel committed rS368362: Also build DTB files for Asus Tinker board (RK3288 based)..
Also build DTB files for Asus Tinker board (RK3288 based).
Dec 5 2020, 10:01 AM

Dec 4 2020

mmel added inline comments to D27448: Two commits to cleanup needless wmb() in nvme driver.
Dec 4 2020, 4:40 PM
mmel committed rS368340: Add support for RK3288 SoC..
Add support for RK3288 SoC.
Dec 4 2020, 4:24 PM
mmel committed rS368334: Add a driver for FAN53555 based PMIC..
Add a driver for FAN53555 based PMIC.
Dec 4 2020, 3:23 PM
mmel committed rS368332: Add a driver for HYM8563 based RTC..
Add a driver for HYM8563 based RTC.
Dec 4 2020, 3:10 PM
mmel committed rS368331: Add a driver for ACT8846 used as PMIC for RK3288 SoC..
Add a driver for ACT8846 used as PMIC for RK3288 SoC.
Dec 4 2020, 2:57 PM
mmel added inline comments to D27448: Two commits to cleanup needless wmb() in nvme driver.
Dec 4 2020, 10:00 AM

Dec 3 2020

mmel added a comment to D27448: Two commits to cleanup needless wmb() in nvme driver.

I want to be stronger :) - to the best of my knowledge, wmb ()) is not needed at all or bus_dmamap_sync() is broken for x86. Nothing in between.
In current revision, the memory barrier should be ensured by calling bus_dmamap_sync() - (it's an external function and the buffer is not local variable, so compiler must expect access to these data).
I think that x86 architecture ensures right store ordering also for external observers so I think usage of wmb() (or any other explicit synchronization) in any driver is nothing but bug.

Dec 3 2020, 11:44 AM
mmel added a reviewer for D27448: Two commits to cleanup needless wmb() in nvme driver: kib.
Dec 3 2020, 11:43 AM

Dec 2 2020

mmel closed D27446: NVME: Multiple busdma related fixes..
Dec 2 2020, 4:54 PM
mmel committed rS368279: NVME: Multiple busdma related fixes..
NVME: Multiple busdma related fixes.
Dec 2 2020, 4:54 PM
mmel added a comment to D27446: NVME: Multiple busdma related fixes..

Bah, Warner was much faster :)

Dec 2 2020, 4:44 PM
mmel added a comment to D27446: NVME: Multiple busdma related fixes..

This wmb() was exist in initial version of nvme drivers, which did not used standard FreeBSD busdma functions.
See https://svnweb.freebsd.org/base/head/sys/dev/nvme/nvme_qpair.c?view=markup&pathrev=240616#l415 .
I'm near sure it was used as barrier to ensure the visibility of memcpy() few line above to nvme dma before the real comand is fired (by nvme_mmio_write_4()).

Dec 2 2020, 4:35 PM
mmel updated the summary of D27446: NVME: Multiple busdma related fixes..
Dec 2 2020, 12:57 PM
mmel requested review of D27446: NVME: Multiple busdma related fixes..
Dec 2 2020, 12:56 PM
mmel committed rS368273: Fix r368153. Wrong branch of #ifdef __ARMEB__ was deleted..
Fix r368153. Wrong branch of #ifdef __ARMEB__ was deleted.
Dec 2 2020, 8:15 AM

Dec 1 2020

mmel added a comment to D27265: Use the standard method for localizing of MSI-X table bar..

ping.

Dec 1 2020, 3:17 PM
mmel committed rS368204: Remove duplicated SV_ASLR from the elf flags..
Remove duplicated SV_ASLR from the elf flags.
Dec 1 2020, 9:18 AM
mmel committed rS368203: Always use the __unused attribute even for potentially unused parameters..
Always use the __unused attribute even for potentially unused parameters.
Dec 1 2020, 8:53 AM

Nov 30 2020

mmel committed rS368187: Unbreak r368167 in userland. Decorate unused arguments..
Unbreak r368167 in userland. Decorate unused arguments.
Nov 30 2020, 2:52 PM
mmel committed rS368167: NVME: Don't try to swap data on little endian machines..
NVME: Don't try to swap data on little endian machines.
Nov 30 2020, 7:01 AM

Nov 29 2020

mmel committed rS368161: Store MPIDR register in pcpu..
Store MPIDR register in pcpu.
Nov 29 2020, 6:59 PM
mmel committed rS368159: Remove unused options..
Remove unused options.
Nov 29 2020, 5:42 PM
mmel committed rS368158: _ARM_ARCH_5E is always defined, we not support older CPUs..
_ARM_ARCH_5E is always defined, we not support older CPUs.
Nov 29 2020, 4:44 PM
mmel committed rS368155: Remove orphaned configs..
Remove orphaned configs.
Nov 29 2020, 3:40 PM
mmel committed rS368154: Remove remaining fragments of code for older already ceased ARM versions..
Remove remaining fragments of code for older already ceased ARM versions.
Nov 29 2020, 3:24 PM
mmel committed rS368153: Remove remaining support of big endian byte order..
Remove remaining support of big endian byte order.
Nov 29 2020, 3:04 PM
mmel committed rS368141: Remove the pre-ARMv6 and pre-INTRNG code..
Remove the pre-ARMv6 and pre-INTRNG code.
Nov 29 2020, 8:40 AM

Nov 28 2020

mmel committed rS368126: Remove now unused armv4 and not-INTRNG files..
Remove now unused armv4 and not-INTRNG files.
Nov 28 2020, 3:00 PM
mmel committed rS368121: MFC r366700:.
MFC r366700:
Nov 28 2020, 9:07 AM

Nov 23 2020

mmel committed rS367955: Ensure that the buffer is in nvme_single_map() mapped to single segment..
Ensure that the buffer is in nvme_single_map() mapped to single segment.
Nov 23 2020, 2:30 PM

Nov 20 2020

mmel committed rS367865: Also pass interrupt binding request to non-root interrupt controllers..
Also pass interrupt binding request to non-root interrupt controllers.
Nov 20 2020, 9:06 AM

Nov 18 2020

mmel requested review of D27265: Use the standard method for localizing of MSI-X table bar..
Nov 18 2020, 12:57 PM

Nov 16 2020

mmel added a comment to D24618: ARM SMMU v3.2 support.

Perfect. Many thanks for cooperation.

Nov 16 2020, 1:47 PM

Nov 15 2020

mmel accepted D24618: ARM SMMU v3.2 support.

In any case, with these minor issues fixed, LGTM

Nov 15 2020, 10:22 AM

Nov 7 2020

mmel committed rS367447: Add a method to determine whether given interrupt is per CPU or not..
Add a method to determine whether given interrupt is per CPU or not.
Nov 7 2020, 2:58 PM

Nov 5 2020

mmel accepted D26604: Remove td_sa.nap in sys/arm/.

Tested on real HW without issues.

Nov 5 2020, 11:50 AM

Nov 4 2020

mmel accepted D27057: vmspace: Convert to refcount(9).

Tested on ARM and ARM64

Nov 4 2020, 10:57 AM
mmel accepted D27056: refcount(9): Add refcount_release_if_last() and refcount_load().

Tested on ARM and ARM64

Nov 4 2020, 10:57 AM
mmel added a comment to D23085: DRM: Add DRM core files and DRMKPI.

I think that having one single codebase, fully based on GPL code for fast porting, is a MUCH more important goal than having display output without GPL (/in base).

Why you think that “single codebase, fully based on GPL” has any relation to fast porting in this context?
My understanding is that because the graphics on the SBC SoCs are related to virtually every subsystem, porting (and maintenance) cost increase exponentially.

Nov 4 2020, 9:55 AM

Nov 3 2020

mmel added a comment to D23085: DRM: Add DRM core files and DRMKPI.

The main issue in SBC DRM implementation is that graphic driver doesn’t handle separate self-contained device but it handle device tightly integrated in system, where many part of SoC are shared between GPU and rest of system. Also, graphic subsystem is not monolithic, it consist from multiple subdevices spreaded over whole SoC. some of these subdevices must be implemented by native drivers (rasterizer, HDMI formatter) we cannot condition presence of (unaccelerated) graphic console by GPL code.
Because of this we cannot use linux_device approach (we must be able to pass same struct device (or device_t) between native and ‘emulated’ code in all possible ways, same is true also for files and threads.
Number 1 for SBC is to have a working (with hotplug monitor) graphic output with a BSD license that can be used for X11 (Wayland). Acceleration 2D / 3D acceleration is optional and, in the worst case, can be performed by a GPL-licensed module.
And about DRMKPI - many goals are very different from LINUXKPI. DRMKPI is an attempt to implement some of the mostly used Linux functions or primitives used in DRM in a direct native way.
Another problem with LINUXKPI is significant namespace pollution caused by #define in the headers. I plan to make significant changes in this area. Each individual function should have the prefix linux_ <foo> defined to its original name only if the header is included in the Linux code.
For these reasons, I prefer to have separate implementations for now. Once the situation stabilizes, we can reconsider.
The problem has many threads that I am not able to express in a clear form, the problem is simply too complex. We have (unlike others) a functional (and I think usable) prototype, it needs some work before it can be committed (first it is necessary to resolve the real conflict LINUXKPI). But first we need a certain level of conclusion - no one is motivated to spread unacceptable code.
Plus, as you can see, I'm not a technical writer, so please excuse my chaotic words and sentences.
And let me not forget, this is by no means an attempt to slander LINUXKPI. But we are, although it does not seem so, in a very different situation.

Nov 3 2020, 3:16 PM
mmel added a comment to D24618: ARM SMMU v3.2 support.

I’m looking at this from perspective of presence of multiple different implementations of IOMMUs in ARM(64) world. From this point of view, I still have some problems with code partitioning, mainly in meaning of smmu_if.m.
I think that smmu_if.m should be taken as interface between system and individual IOMMU implementation. That’s mean that it should be decontaminated from using smmu (in names and/or as argument) and renamed to iommu_if.m.
The system wide function in smmu_iommu.c (like iommu_get_ctx(), iommu_find(),iommu_registe() or so) should be moved to own independent file (say iommu.c) and all HW dependent functionality should be passed by using iommu_if.m to given implementation.

Nov 3 2020, 1:21 PM

Nov 2 2020

mmel accepted D26869: arm64: QorIQ: gpio: return BUS_PROBE_DEFAULT.
Nov 2 2020, 9:39 AM
mmel accepted D26868: arm64: QorIQ: gpio: Cleanup qoriq_gpio_* helpers.
Nov 2 2020, 9:38 AM
mmel accepted D26867: arm64: QorIQ: gpio: Style cleanups..
Nov 2 2020, 9:30 AM
mmel closed D26735: Improve loading of multipage aligned buffers..
Nov 2 2020, 8:26 AM
mmel committed rS367268: Improve loading of multipage aligned buffers..
Improve loading of multipage aligned buffers.
Nov 2 2020, 8:26 AM

Nov 1 2020

mmel added a comment to D27041: Align SDHCI DMA bounce buffer to PAGE_SIZE.

I think it's wrong. In this case, multi-page alignment is required, the old comment is correct. Please see https://reviews.freebsd.org/D26735. I plan to commit this in the next day or two.

Nov 1 2020, 5:54 PM · arm64

Oct 31 2020

mmel committed rS367227: MFC r366197:.
MFC r366197:
Oct 31 2020, 5:27 PM
mmel committed rS367226: MFC r366312:.
MFC r366312:
Oct 31 2020, 5:18 PM
mmel committed rS367225: MFC r366161:.
MFC r366161:
Oct 31 2020, 5:11 PM
mmel committed rS367224: MFC r366156:.
MFC r366156:
Oct 31 2020, 5:09 PM
mmel committed rS367223: MFC r342008,r363799,r366146:.
MFC r342008,r363799,r366146:
Oct 31 2020, 5:07 PM
mmel committed rS367222: MFC r365929:.
MFC r365929:
Oct 31 2020, 4:51 PM
mmel committed rS367220: MFC r363123,r363510:.
MFC r363123,r363510:
Oct 31 2020, 4:24 PM
mmel committed rS367219: MFC r362387:.
MFC r362387:
Oct 31 2020, 4:19 PM