Jump to content











Photo
- - - - -

Grub4DOS AHCI / NVMe speed patch for memory maps

grub4dos ahci nvme

  • Please log in to reply
3 replies to this topic

#1 schtrom

schtrom

    Newbie

  • Members
  • 14 posts
  •  
    Germany

Posted 27 October 2018 - 03:36 PM

Download-Link: sourceforge.net/projects/grub4dosahcipatch

 

Grub4DOS AHCI / NVMe speed patch for memory maps

This package includes the following directories:
- bin -> compiled grldr version 0.4.5c with AHCI / NVMe support
- patch -> ahcinvme.patch for updating stock grub 0.4.5c source code
- src -> all changed and additional source code files used with grub 0.4.5c

The AHCI and NVMe support can be enabled by using the additional grub menu commands "ahci"
and "nvme". We can set the following parameters with the new commands:

ahci --set-drive=DRIVE --set-controller=CONTR --set-port=PORT [--showall] [--showselected]
nvme --set-drive=DRIVE --set-controller=CONTR [--showall] [--showselected]

Using these commands searches PCI configuration space for all present AHCI / NVMe controllers.
After setting this option every read to DRIVE is redirected to the selected AHCI / NVMe
controller. The CONTR and PORT arguments start at zero, where 0 corresponds to the 1st present
AHCI / NVMe controller / port found. If the option --showall is used, all AHCI / NVMe
controllers, ports and connected devices are displayed. If the option --showselected is used,
the selected AHCI / NVMe controller, port and connected device is displayed. The argument
--uninit uninitializes all AHCI / NVMe controllers. This command was implemented to speed up
transfer rates if an image file is loaded from an AHCI / NVMe SSD and mapped to RAM.

The AHCI / NVMe support can not be disabled anymore during compile with the configure command.
We removed this feature to make the code simpler.

The standard read block size is now always 32 MB, because this is the maximum data transfer
size we can get from an AHCI hard disk device at issuing one read command. If an image file
is mapped to RAM we get a speed of 550 MB/s with a Samsung 840 Pro SSD and 3 GB/s for a
Samsung 960 EVO NVMe SSD.

Pay attention that this AHCI / NVMe addition is only useful if you load the images from SSD to RAM.
Loading a disk image directly or using a normal platter HDD does not increase the read speed much.
Use this patch with care on your own risk!

Because we added some parameters to the AHCI and NVMe command line we wanna show you two sample
menu entries for both RAM disk mappings:

title Win10 - RAMDISK AHCI
ahci --set-drive=0x80 --set-controller=0 --set-port=0 --showselected
find --set-root --ignore-floppies /win10.vhd
map --mem /win10.vhd (hd0)
map --hook
ahci --uninit
root (hd0,0)
chainloader /bootmgr

title Win10 - RAMDISK NVMe
nvme --set-drive=0x80 --set-controller=0 --showselected
find --set-root --ignore-floppies /win10.vhd
map --mem /win10.vhd (hd0)
map --hook
nvme --uninit
root (hd0,0)
chainloader /bootmgr

You should always include the new "--uninit" parameter directly after the "map --hook" command.
This stops the redirection of drive 0x80 (hd0) to the AHCI / NVMe read procedure. The drive
number should always match the real BIOS drive number for the system, otherwise the system may
hang.

Many thanks to all the developers and forum members of reboot pro for making it possible to boot
a full-sized Windows from RAM and harddisk image.

Greets
Kai Schtrom


  • ReTokener likes this

#2 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 144 posts

Posted 27 October 2018 - 07:08 PM

Hi Kai

Previous version was very good, thanks for sharing this new build.

I´m going test it in the next days.

 

 Regards   T.



#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14389 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 28 October 2018 - 05:58 PM

Good.news. :)

 

Only to confirm how grumpy and old I am, and for the record, there is however NO such thing as grub4dos 0.4.5c.

 

There are a zillion versions of 0.4.5c (105 of them on Chenall's site) of which the latest is 0.4.5c-2016-01-18.

 

If this is the patched one (I seem not being able to understand which version it is, all I can find is "GRUB4DOS 0.4.5c 2018-10-27" which is fine, because of the recompiling after the patch), it would be IMHO a good thing to specify which exact version as before or later there would be some mixup of versions (as an example since the patched one has only grldr and not grub.exe).

 

:duff:

Wonko



#4 schtrom

schtrom

    Newbie

  • Members
  • 14 posts
  •  
    Germany

Posted 4 weeks ago

Hi Wonko,

 

you are right we are both old and grumpy! The Grub4Dos 0.4.5c versioning is a mess. Therefore I uploaded my code base of Grub4Dos 0.4.5c to sourceforge. At the past I used the SVN repository with revision number 359 to download the base sources. This source code base is contained in the archive named

 

grub4dos_0.4.5c_svn_revision_359_source.rar.

 

It was downloaded some time ago with the following SVN command:

svn co -r 359 http://grub4dos-chen...e.com/svn/trunkgrub4dos

 

The SVN repository with revision number 359 is no longer present, therefore I uploaded it to make building your own GRUB4DOS loader based on my patches easier.

 

I hope this helps someone!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users