FreeNVMe
Jon Abbott (1421) 2651 posts |
HForm is traditionally crunched, so it’s possible it was either done with the wrong settings or the changes have broken something. I’ve been trying to add support to Parttition Manager by reverse engineering the Modules this weekend, but not having much luck so far. There’s no low level disc access, so I can’t send a Namespace Identify command to drives. There is an SWI for disc info, but it appears to cap the max LBA value. There also doesn’t appear to be a means to notify the Filer of drive changes, although there are Service calls I’ve yet to investigate. As it’s written in C, it’s really hard to identify what’s going on in the code. Source and documention would be really helpful, so I might have to back burner this until they’re available. From what I’ve noted so far, some additions will be required before I can properly support NVMe in Partition Manager. Low-level access to drives, bypassing the OS is essential. I’ve also looked at NVFS and it has similar issues, but slightly worse, as there doesn’t appear to be a way to discover the physical drive size. There’s also the issue of the Service, SWI block and Filing system numbers possibly not being allocated – they’re not in the official tables at any rate. As things stand I can’t add support for NVFS, but might be able to add limited support for NVMeFS, although partitioning will break things without low-level access. On this last point, ROOL and the two companies involved need to agree an interface, along the line of what is already implemented for IDE and SCSI, where commands can be sent directly to drives. |
David Pitt (9872) 363 posts |
It is only NVMe formatting that goes wrong. The tool doing the damage is squish. Warnings are issued during the build but no errors. There is also a BASIC CRUNCH done, which is benign. |
Colin Ferris (399) 1818 posts |
It’s a pity the BASIC compare progs couldn’t compare crunched progs with the uncrunched versions. |
David Pitt (9872) 363 posts |
Somehow the SWI number is wrong at line 945. In the squished BASIC it is 370208, NVMeFS_FreeOp. From the source it should be NVMeFS_DiscInfo, 370207. A manual change of that last digit suffices, the format dialogue continues. (I used Zap to preserve the BASIC file format. This may not be necessary.) I have not tried a full NVMe format as it is possible that may be other SWI number errors, what else is broken? |
David Pitt (9872) 363 posts |
Oops, duplicate post.
Somehow the SWI number is wrong at line 945. In the squished BASIC it is 370208, NVMeFS_FreeOp. From the source it should be NVMeFS_DiscInfo, 370207. A manual change of that last digit suffices, the format dialogue continues. (I used Zap to preserve the BASIC file format.This may not be necessary.) I have not tried a full NVMe format as it is possible that may be other SWI number errors, what else is broken. |
Sprow (202) 1158 posts |
It seems unlikely that ROOL (the organisation responsible for allocations) would be announcing NVMe while simultaneously having forgotten to allocate these quantities with themselves. A quick squint at the front page ‘Recent changes in Git’ confirms my hypothesis. How are you not finding this stuff? At time of writing it’s literally the top 4 items in the change history. |
Jon Abbott (1421) 2651 posts |
If you re-read my post you will see I referring to NVFS. |
RISCOSBits (3000) 143 posts |
Minor amendments made to the NVME Drivers so that they work with ROOL’s HForm, as expected. Please redownload from https://www.riscosbits.co.uk/nvme |
David Pitt (9872) 363 posts |
That has sorted it, thanks. My SWI number to string app is now showing 370208 as NVMe_DiscInfo. Ditching the squish operation also ditched the SWI name to number conversion which is why an unsquished HForm worked but a squished one did not. |
Colin Ferris (399) 1818 posts |
Has anyone explained the differences between all these hard drive systems – scsii idfs etc. Last year SW Show was telling about fastest RO system – gets rather confusing to old duffers :-( |
Steve Fryatt (216) 2105 posts |
We’ve carried quite a few articles about the new hardware in The WROCC over the past year or so. |
Thomas Milius (7848) 116 posts |
If trying to load the new version which seems to be compiled by ROOL I am getting an “invalid library chunk” on all of my machines (independently whether there is PCIe existing or not). I am not getting this if using my own versions however. Regarding HForm troubles. I used originally 3270207 for DiscInfo. It seems that ROOL changed this to 320208 during code review which is in general ok. However I was not aware of this change. The bas version of HForm uses the name and not the number so this never was detected. Sorry for that. |
Thomas Milius (7848) 116 posts |
Regarding Jons problems with Namespace Identify commands I am finding this a bit strange. I am not aware what ROOL left from my original source but NVMeDriver contained exactly this possibility. I used it during development and from BASIC and it works. Offering no low level access doesn’t make fun. |
Jon Abbott (1421) 2651 posts |
If you have any documentation or failing that, a test example, please send me a copy. I’ve been asking after documentation since January and have had to resort to looking through Modules. |
David Pitt (9872) 363 posts |
The new version as downloaded from the riscosbits site dated 24-03-03 is good here. *fx0 RISC OS 5.29 (23 Feb 2024) *help SharedCLibrary ==> Help on keyword SharedCLibrary Module is: C Library 6.22 (29 Nov 2023) Loaded NVMeDriver 0.01 (30 Jan 2024) Loaded NVMeFiler 0.01 (03 Mar 2024) Loaded NVMeFS 0.01 (14 Feb 2024) |
Martin Avison (27) 1494 posts |
Beware though that the first zip version, downloaded here from RiscOSbits on 26th Feb, contained… … and they all have the the same module version as the latest zip (dated 2024-03-03).Their sizes are also rather different (and yes, I did unqueeze the latest ones!). All potential confusion! Just noticed that the zip from gag.de is different again! |
Jon Abbott (1421) 2651 posts |
I expect the sizes will change (without a version bump) when the autobuilder is creating the Modules, as the original release was compiled with 26bit compatibility. |
Thomas Milius (7848) 116 posts |
Regarding versions: I dared to make a walk yestderday afternoon as it was one of the first sunny spring days here after a long grey rainy winter and because of this I read RISCOSBits email first at evening. RISCOSBits wanted to remove the problem with HForm quickly and so they published the module variants obtained from ROOL compiled already before after a short test (and it worked for them). ROOL is developing their code and I am still owning my code. There is a loose exchange between us about findings and changes. In most cases this worked until now but sometimes it fails. However I am not aware how ROOL is doing their version management in the moment. Their version isn’t offcial yet. So I assume that they didn’t pay attention to the version number. I am myself trying to adapt at least the date. Regarding size I can only say that my versions are debug versions which are containing a lot of debug messages. May be that the ROOL modules are non debug versions. And of course they did already some optimizations. Regarding GAG: Mr. zur Nedden as maintainer of the homepage is very engaged in RISC OS. However AFAIK he has also a live beyond RISC OS. ;-) If RISCOSBits is publishing a new variant he will try to update the GAG website accordingly within a few days after he is informed and when he has time to do so. In this case there was also the problem that I wrote to RISCOSBits that I am facing trouble running the new modules. So I assume Mr. zur Nedden will wait with his updates until there is a version running on all machines. |
Colin Ferris (399) 1818 posts |
Enjoy your walking :-)) |
Thomas Milius (7848) 116 posts |
I meanwhile found the problem on my side. The ROOL modules are requiring at least SharedCLibary 6.22 from November 2023 to work. |
Colin Ferris (399) 1818 posts |
Sprising what ideas come when out walking :-) |
Chris Hall (132) 3558 posts |
Minor amendments made to the NVME Drivers so that they work with ROOL’s HForm, as expected. Please redownload from I am sticking to the 22-Feb-2024 versions (and the uncrunched HForm) as the later 20-Feb/3-Mar ones fall over. Version numbers the same most puzzling: In the 22-Feb bundle (released at the show): In the 03-Mar bundle (from link above): I suspect these have been put together with some haste. I am using a 29 Feb 2024 ROM with updated start4.elf and fixup4.dat so that large SD cards and eMMc appear to work and be allocated the correct drive numbers, i.e. :0 or :4 depending whether removable. No doubt the bug fixes (to #512 and #611) will make their way to the daily roms in due course. Having reformatted the NVMe drive after some testing with PartMan (which may have corrupted the boot block) I found the 03-Mar bundle worked OK. It seems the version numbers and datestamps are still slightly odd though. Putting the version numbers to one side, I have reformatted the NVMe drive after various testing as it got beyond the abilities of DiscKnight to fix. I have used the 03-Mar RISC OS Bits drivers and done some performance checks: ROM unpack 33s HD Read – Block load 8MB file 202772 6799% This is extremely good performance – lots of thanks to RISC OS Bits and ROOL. |
Chris Hall (132) 3558 posts |
I have tried a 1TB NVMe drive, formatted with 4k sectors giving a RISC OS partition of 750GB. This gives a worthwhile improvement in random read and writes: Also ROM unpack 33s |
RISCOSBits (3000) 143 posts |
Using a 4K Sector formatting application currently in development, we’ve managed to format and use a 1 Terabyte NVMe drive with FreeNVMe under RISC OS. We only needed to pop over to Linux to switch the drive from emulated 512 byte sectors to native 4k sectors. We’re also getting very similar speeds to those shown above. |
RISCOSBits (3000) 143 posts |
The developer of the 4k formatting tool has just informed me that work is underway to remove that last Linux hurdle, and that his formatter will soon be able to convert drives from 512 byte sectors to 4K sectors under RISC OS! Already working in testing, too. |