[PATCH 14/15] parser: Remove escape from the state transitions

2016-06-29 Thread Eric Snowberg
Remove GRUB_PARSER_STATE_ESC with state GRUB_PARSER_STATE_TEXT from the list of not allowed characters This fixes a problem where a properly escaped comma is in the disk path. For example: /pci@306/pci@1/LSI,mrsas@0/disk@0:a During grub install, the search.fs_uuid is correctly stored in the core

[PATCH 13/15] sparc64: add disks that don't have a devalias to the device list

2016-06-29 Thread Eric Snowberg
Add ability for grub2 to be capable of booting from a disk that does not have a device alias. This patch will find all disks in the system and add them to the device list. Signed-off-by: Eric Snowberg --- grub-core/disk/ieee1275/ofdisk.c | 144 ++ 1 files cha

[PATCH 12/15] ofdisk: only add aliases that exist

2016-06-29 Thread Eric Snowberg
Only add device aliases that really exist for SPARC. SPARC hardware ships with devaliases the could exist in the future. For example a T7 might contain the following predefined devalias list: {20} ok devalias disk0/pci@301/pci@1/scsi@0/disk@p0 disk1/pci@30

[PATCH 10/15] ofdisk: refactor open logic

2016-06-29 Thread Eric Snowberg
Consolidate duplicate code into grub_ofdisk_new_open. This is in preperation for further last_ihandle changes for disk open caching on SPARC. Signed-off-by: Eric Snowberg --- grub-core/disk/ieee1275/ofdisk.c | 47 +++-- 1 files changed, 29 insertions(+), 18 del

[PATCH 08/15] ofdisk: move open logic

2016-06-29 Thread Eric Snowberg
Move open logic from grub_ofdisk_get_block_size into grub_ofdisk_open. This will simplify reviewing future performance improvement patches in this area. In preparation for last_ihandle changes. Signed-off-by: Eric Snowberg --- grub-core/disk/ieee1275/ofdisk.c | 29 ++---

[PATCH 11/15] sparc64: boot performance improvements

2016-06-29 Thread Eric Snowberg
Keep sun4v OF devices open. This can save 6 - 7 seconds per open call and can decrease boot times from over 10 minutes to a few seconds on larger SPARC systems. The open/close calls with some vendors' SAS controllers cause the entire card to be reinitialized after each close. Signed-off-by: Eric

[PATCH 07/15] ofdisk: memory corruption fix

2016-06-29 Thread Eric Snowberg
The goal of this patch is to clean up memory corruption by having memory allocation take place in a single location, while not causing any new memory leaks. In various parts of the code the same path is called different things, for example it is called curcan, device, name_dup, can, and devpath,

[PATCH 15/15] sparc64: ignore hypervisor reboot memory block device

2016-06-29 Thread Eric Snowberg
Ignore the hypervisor's reboot memory block device. Newer sun4v hardware contain a block device for the hypervisor. This block device should not be used by anyone else. Signed-off-by: Eric Snowberg --- grub-core/disk/ieee1275/ofdisk.c |3 +++ grub-core/kern/ieee1275/cmain.c |1 + inclu

[PATCH 09/15] ieee1275: ofdisk - don't continue to query block-size after we have it

2016-06-29 Thread Eric Snowberg
Within commit: 87ec3b7fa9061f470616ed927fc140e995831c00 - "Don't continue to query block-size if disk doesn't have it.” Disks that returned 0 to the block-size query, still get queried every time. OpenBoot PROM (OBP) does not have hotplug support until the OS is running. Therefore, fix logic in g

[PATCH 04/15] sparc64: Use the correct disk name in core.img

2016-06-29 Thread Eric Snowberg
Use the correct disk name and escape it properly in core.img for SPARC. Prior to this patch, search.fs_uuid was missing from the core.img. On SPARC, the core.img is very small and doesn't contain everything needed to boot. Therefore many modules contained within: /boot/grub/sparc64-ieee1275 are nee

[PATCH 02/15] sparc64: Add blocklist GPT support for SPARC

2016-06-29 Thread Eric Snowberg
Add block-list GPT support for SPARC. The OBP "load" and "boot" methods are partition aware and neither command can see the partition table. Also neither command can address the entire physical disk. When the install happens, grub generates the block-list entries based on the beginning of the phys

[PATCH 05/15] ieee1275: fix segfault in grub-ofpathname

2016-06-29 Thread Eric Snowberg
fix segfault in grub-ofpathname Signed-off-by: Eric Snowberg --- util/ieee1275/grub-ofpathname.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/util/ieee1275/grub-ofpathname.c b/util/ieee1275/grub-ofpathname.c index 8e5d766..300fbdd 100644 --- a/util/ieee1275/grub-of

[PATCH 03/15] grub-install: fix memory leak

2016-06-29 Thread Eric Snowberg
Fix memory leak Signed-off-by: Eric Snowberg --- util/grub-install.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/util/grub-install.c b/util/grub-install.c index 6c89c2b..7394739 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -1468,6 +1468,7 @@ main (in

[PATCH 06/15] ieee1275: add nvme support within ofpath

2016-06-29 Thread Eric Snowberg
Add nvme support within ofpath Signed-off-by: Eric Snowberg --- grub-core/osdep/linux/ofpath.c | 46 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/grub-core/osdep/linux/ofpath.c b/grub-core/osdep/linux/ofpath.c index 0994e08..4c1c95b 1

[PATCH 01/15] sparc64: fix OF path names for sun4v systems

2016-06-29 Thread Eric Snowberg
Fix the Open Firmware (OF) path property for sun4v SPARC systems. These platforms do not have a /sas/ within their path. Over time different OF addressing schemes have been supported. There is no generic addressing scheme that works across every HBA. Signed-off-by: Eric Snowberg --- grub-core/o

[PATCH 00/15] Add missing SPARC support

2016-06-29 Thread Eric Snowberg
First set of patches to add sun4v SPARC support to grub. Major additions include: * Properly scan for both SAS and SCSI disks * Increasing boot performance * GPT support * NVMe support * Various bug fixes Before this patch, there isn’t a single SAS HBA that was enumerated correctly on SPARC. I