Re: [RFC] ieee1275: Avoiding many unnecessary open/close

2020-11-20 Thread Eric Snowberg
> On Nov 16, 2020, at 10:29 AM, diegodo wrote: > > On 2020-09-24 20:58, Eric Snowberg wrote: >>> On Sep 24, 2020, at 11:11 AM, diegodo wrote: >>> Hi, >>> we are facing some performance issues with ieee1275 platform (ppc64le >>> architecture to be

Re: [RFC] ieee1275: Avoiding many unnecessary open/close

2020-09-24 Thread Eric Snowberg
> On Sep 24, 2020, at 11:11 AM, diegodo wrote: > > Hi, > > we are facing some performance issues with ieee1275 platform (ppc64le > architecture to be more specific) and I would like to suggest a couple of > changes to try to avoid them. > > Sometimes the system can take more than 10 minutes

Re: Verifier running out of memory on ieee1275/powerpc64

2020-03-20 Thread Eric Snowberg
> On Mar 19, 2020, at 10:37 AM, Stefan Berger wrote: > > On 3/18/20 6:17 PM, Simon Hardy wrote: I was wondering whether it would not be possible to load the raw file into memory, pass it to the firmware for hashing (and logging) via the verifier, and if we do not trust that the fi

Re: [PATCH] sparc64: Fix BIOS Boot Partition support

2019-07-16 Thread Eric Snowberg
,6 @@ unable_to_embed: >> #ifdef GRUB_SETUP_SPARC64 >> { >> grub_partition_t container = root_dev->disk->partition; >> -bl.gpt_offset = 0; >> >> if (grub_strstr (container->partmap->name, "gpt

[PATCH] docs: bootstrap changes required for older distros

2019-06-19 Thread Eric Snowberg
Some older distros do not contain gettext 0.18. Document the workaround to use the bootstrap utility on these systems. Signed-off-by: Eric Snowberg --- docs/grub-dev.texi | 34 ++ 1 file changed, 34 insertions(+) diff --git a/docs/grub-dev.texi b/docs/grub

Re: Summary: GRUB installed but boot failed on Fujitsu M10-4

2019-06-06 Thread Eric Snowberg
> On Jun 5, 2019, at 7:54 PM, Sonnie Hook wrote: > > {0} ok probe-scsi-all > /pci@8000/pci@4/pci@0/pci@1/pci@0/usb@4,1/storage@1 > Unit 0 Removable Read Only deviceSlimtypeDVD A DS8ACSH LC21 > > /pci@8000/pci@4/pci@0/pci@1/pci@0/usb@4,1/hub@2/storage@1 > Unit 0 Removable Disk

Re: Summary: GRUB installed but boot failed on Fujitsu M10-4

2019-06-05 Thread Eric Snowberg
> On Jun 5, 2019, at 9:42 AM, Sonnie Hook wrote: > > This is an Fujitsu M10-4 machine. It could be we are not enumerating the disk correctly. What kind of HBA is in this system? > DVD drive is installed on rear USB. Flash disk is installed on front USB. > > cdrom is an alias of /pci@8000/pc

Re: GRUB failed to install on Fujitsu M10-4

2019-06-03 Thread Eric Snowberg
> On Jun 3, 2019, at 6:56 PM, Sonnie Hook wrote: > > Model: LSI Logical Volume (scsi) > Disk /dev/sda: 599GB > Sector size (logical/physical): 512B/4096B > Partition Table: gpt > Disk Flags: > > Number Start End SizeFile system Name Flags > 1 1049kB 10.5MB 9437kB

Re: GRUB failed to install on Fujitsu M10-4

2019-06-03 Thread Eric Snowberg
> On Jun 3, 2019, at 7:37 AM, Sonnie Hook wrote: > > When installing Debian SPARC 10.0(2019-05-24) on Fujitsu M10-4, everything > seemed OK except that the GRUB installation reported an EFI warning. I forced > to install GRUB on /dev/sda, finally the installation finished without any > error.

Re: GRUB fails to load kernel on linux-sparc64

2019-04-17 Thread Eric Snowberg
> On Apr 17, 2019, at 3:40 AM, John Paul Adrian Glaubitz > wrote: > > On 4/17/19 11:34 AM, John Paul Adrian Glaubitz wrote: >> Going to decompress the kernel now and see if that helps. I'm just surprised >> that GRUB supposedly doesn't support compressed kernels on sparc64 when >> we have used

Re: GRUB fails to load kernel on linux-sparc64

2019-04-16 Thread Eric Snowberg
> On Apr 16, 2019, at 9:15 AM, John Paul Adrian Glaubitz > wrote: > > Hi! > > I have been doing some RC testing with GRUB 2.04~rc1 and actually > ran into a problem on sparc64 after updating from 2.02 (debian) > to 2.04~rc1. > > GRUB itself starts fine, but it fails to load the kernel with t

Re: [PATCH] x86/msr: Fix build with older GCC versions

2019-04-15 Thread Eric Snowberg
d. > > Additionally, fix incorrect coding style. > > Reported-by: Eric Snowberg > Reported-by: adrian15 > Signed-off-by: Daniel Kiper Reviewed-by: Eric Snowberg > --- > include/grub/i386/rdmsr.h | 3 ++- > include/grub/i386/wrmsr.h | 3 ++- > 2 files changed, 4 ins

[PATCH] ieee1275: Null pointer dereference in grub_ieee1275_encode_devname

2019-04-02 Thread Eric Snowberg
Function grub_strndup may return NULL, this is called from function grub_ieee1275_get_devname which is then called from function grub_ieee1275_encode_devname to set device. The device variable could then be used with a NULL pointer. Signed-off-by: Eric Snowberg --- grub-core/kern/ieee1275

[PATCH 1/2] efidisk: null pointer dereference in is_child

2019-03-28 Thread Eric Snowberg
Function grub_efi_find_last_device path may return NULL when called from is_child. Signed-off-by: Eric Snowberg --- grub-core/disk/efi/efidisk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c index 961c155..78ab2d2 100644 --- a

[PATCH 0/2] efidisk: null pointer dereference

2019-03-28 Thread Eric Snowberg
Additional null pointer dereference fixes. I wasn't sure if you wanted all these folded into a single patch or separate. Eric Snowberg (2): efidisk: null pointer dereference in is_child efidisk: null pointer dereference in grub_efidisk_get_device_name grub-core/disk/efi/efidisk.

[PATCH 2/2] efidisk: null pointer dereference in grub_efidisk_get_device_name

2019-03-28 Thread Eric Snowberg
Function grub_efi_find_last_device_path may return NULL when called from grub_efidisk_get_device_name Signed-off-by: Eric Snowberg --- grub-core/disk/efi/efidisk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c index 78ab2d2

[PATCH] efidisk: write to null pointer ldp

2019-03-28 Thread Eric Snowberg
Function grub_efi_find_last_device_path may return constant NULL when called from find_parent_device. Signed-off-by: Eric Snowberg --- grub-core/disk/efi/efidisk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c index 0f132f5

Re: [PATCH v2] msr: Rearrange return values.

2019-03-26 Thread Eric Snowberg
> On Mar 26, 2019, at 5:40 AM, Daniel Kiper wrote: > > On Tue, Mar 26, 2019 at 12:30:51PM +0100, Daniel Kiper wrote: >> CC-ing Eric. >> >> On Mon, Mar 25, 2019 at 07:37:29PM +0100, Jesús Diéguez Fernández wrote: >>> Rearrange return values in the function declaration of rdmsr.h and wrmsr.h. >>

Re: [PATCH, v6] ieee1275: Include a.out header in assembly of sparc64 boot loader

2019-03-26 Thread Eric Snowberg
> rather simple to calculate in our case, we just write the header > ourselves instead of relying on external tools to do that. > > Signed-off-by: John Paul Adrian Glaubitz Reviewed-by: Eric Snowberg ___ Grub-devel mailing list Grub-devel

Re: [PATCH] ieee1275: Include a.out header in assembly of sparc64 boot loader

2019-03-25 Thread Eric Snowberg
> On Mar 25, 2019, at 3:11 PM, John Paul Adrian Glaubitz > wrote: > > On 3/25/19 9:41 PM, Eric Snowberg wrote: >>> Is this on Solaris? I want to try reproducing it, so I can figure what >>> happened. >>> >> >> I’m using Oracle Linux for

Re: [PATCH] ieee1275: Include a.out header in assembly of sparc64 boot loader

2019-03-25 Thread Eric Snowberg
> On Mar 25, 2019, at 1:21 PM, John Paul Adrian Glaubitz > wrote: > > On 3/25/19 5:20 PM, Eric Snowberg wrote: >> I tried it out, but on my system it doesn’t fit in the 512 byte block? Am I >> missing something? >> >> Before the patch: >> >>

Re: [PATCH] ieee1275: Include a.out header in assembly of sparc64 boot loader

2019-03-25 Thread Eric Snowberg
> On Mar 25, 2019, at 5:45 AM, Daniel Kiper wrote: > > On Fri, Mar 22, 2019 at 07:35:55AM +0100, John Paul Adrian Glaubitz wrote: >> Recent versions of binutils dropped support for the a.out and COFF >> formats on sparc64 targets. Since the boot loader on sparc64 is >> supposed to be an a.out bi

Re: [PATCH v3 2/2] Add new MSR modules (rdmsr/wrmsr)

2019-03-21 Thread Eric Snowberg
> On Mar 7, 2019, at 5:26 PM, Jesús Diéguez Fernández wrote: > > In order to be able to read from and write to model-specific registers, > two new modules are added. They are i386 specific, as the cpuid module. > > rdmsr module registers the command rdmsr that allows reading from a MSR. > wrmsr

Re: [PATCH] sparc64: add bios boot partition support

2019-03-06 Thread Eric Snowberg
> On Mar 6, 2019, at 3:52 AM, Daniel Kiper wrote: > > On Mon, Mar 04, 2019 at 05:34:01PM -0800, Eric Snowberg wrote: >> Add BIOS Boot Partition support for sparc64 platforms. This will work a >> little different than x86. With GPT, both the OBP "load" and &

Re: [PATCH V3] ieee1275: obdisk driver

2019-03-06 Thread Eric Snowberg
> On Mar 6, 2019, at 4:32 AM, Daniel Kiper wrote: > > On Mon, Mar 04, 2019 at 05:27:39PM -0800, Eric Snowberg wrote: >> Add a new disk driver called obdisk for IEEE1275 platforms. Currently >> the only platform using this disk driver is SPARC, however other IEEE1275 >

[PATCH] sparc64: add bios boot partition support

2019-03-04 Thread Eric Snowberg
/pci@0/pci@13/nvme@0/disk@1:b Signed-off-by: Eric Snowberg --- util/setup.c | 76 +++--- 1 files changed, 67 insertions(+), 9 deletions(-) diff --git a/util/setup.c b/util/setup.c index 9c1e1b7..7a1db9e 100644 --- a/util/setup.c +++ b/ut

[PATCH V3] ieee1275: obdisk driver

2019-03-04 Thread Eric Snowberg
determining the disk size. Finally and probably most importantly, this new driver is also capable of seeing all partitions on a GPT disk. With the old driver, the GPT partition table can not be read and only the first partition on the disk can be seen. Signed-off-by: Eric Snowberg --- Changes

Re: Current status of [PATCH v2] ieee1275: obdisk driver

2019-01-08 Thread Eric Snowberg
> On Jan 8, 2019, at 4:07 AM, Daniel Kiper wrote: > > Hey, > > On Tue, Jan 08, 2019 at 11:49:02AM +0100, John Paul Adrian Glaubitz wrote: >> Hello! >> >> I was wondering what the current status of the new obdisk driver for GRUB >> was and whether there is still a chance for the driver to be m

[PATCH] ofnet: fix build regression in grub_ieee1275_parse_bootpath

2018-11-27 Thread Eric Snowberg
;) make[3]: *** [net/drivers/ieee1275/ofnet_module-ofnet.o] Error 1 Initialize the entire structure. Signed-off-by: Eric Snowberg --- Ref: http://lists.gnu.org/archive/html/grub-devel/2018-03/msg00034.html --- grub-core/net/drivers/ieee1275/ofnet.c |4 ++-- 1 files changed, 2 insertions(+),

Re: [PATCH v2] ieee1275: obdisk driver

2018-09-04 Thread Eric Snowberg
> On Sep 1, 2018, at 11:10 AM, Daniel Kiper wrote: > > On Thu, Aug 30, 2018 at 09:28:52AM -0600, Eric Snowberg wrote: >>> On Aug 30, 2018, at 8:06 AM, Daniel Kiper wrote: >>> On Tue, Jul 17, 2018 at 09:59:33AM -0600, Eric Snowberg wrote: >>>>> On Jul

Re: [PATCH v2] ieee1275: obdisk driver

2018-08-30 Thread Eric Snowberg
> On Aug 30, 2018, at 8:06 AM, Daniel Kiper wrote: > > On Tue, Jul 17, 2018 at 09:59:33AM -0600, Eric Snowberg wrote: >>> On Jul 17, 2018, at 7:38 AM, Daniel Kiper wrote: >>> On Mon, Jul 16, 2018 at 09:33:17AM -0600, Eric Snowberg wrote: >>>>> On Jul

Re: [PATCH v2] ieee1275: obdisk driver

2018-07-17 Thread Eric Snowberg
> On Jul 17, 2018, at 7:38 AM, Daniel Kiper wrote: > > On Mon, Jul 16, 2018 at 09:33:17AM -0600, Eric Snowberg wrote: >>> On Jul 16, 2018, at 7:51 AM, Daniel Kiper wrote: >>> >>> Sorry for late reply but I was busy with other stuff. >>> >&

Re: [PATCH v2] ieee1275: obdisk driver

2018-07-16 Thread Eric Snowberg
> On Jul 16, 2018, at 7:51 AM, Daniel Kiper wrote: > > Sorry for late reply but I was busy with other stuff. > > On Thu, Jun 21, 2018 at 01:46:46PM -0600, Eric Snowberg wrote: >>> On Jun 21, 2018, at 10:58 AM, Daniel Kiper wrote: >>> On Fri, Jun 15, 2018 a

Re: [PATCH v2] ieee1275: obdisk driver

2018-06-21 Thread Eric Snowberg
> On Jun 21, 2018, at 10:58 AM, Daniel Kiper wrote: > > On Fri, Jun 15, 2018 at 09:58:56AM -0600, Eric Snowberg wrote: >>> On Jun 15, 2018, at 6:02 AM, Daniel Kiper wrote: >>> On Wed, May 30, 2018 at 04:55:22PM -0700, Eric Snowberg wrote: >

Re: [PATCH v2] ieee1275: obdisk driver

2018-06-15 Thread Eric Snowberg
> On Jun 15, 2018, at 6:02 AM, Daniel Kiper wrote: > > On Wed, May 30, 2018 at 04:55:22PM -0700, Eric Snowberg wrote: >> Add a new disk driver called obdisk for IEEE1275 platforms. Currently >> the only platform using this disk driver is SPARC, however other IEEE1275 >

[PATCH v2] ieee1275: obdisk driver

2018-05-30 Thread Eric Snowberg
determining the disk size. Finally and probably most importantly, this new driver is also capable of seeing all partitions on a GPT disk. With the old driver, the GPT partition table can not be read and only the first partition on the disk can be seen. Signed-off-by: Eric Snowberg --- Changes from

Re: [PATCH] ieee1275: obdisk driver

2018-04-29 Thread Eric Snowberg
> On Apr 11, 2018, at 4:29 AM, Daniel Kiper wrote: > > On Thu, Apr 05, 2018 at 10:53:55AM -0700, Eric Snowberg wrote: >> Add a new disk driver called obdisk for IEEE1275 platforms. Currently >> the only platform using this disk driver is SPARC, however other IEEE1275 >

[PATCH] ieee1275: obdisk driver

2018-04-05 Thread Eric Snowberg
determining the disk size. Finally and probably most importantly, this new driver is also capable of seeing all partitions on a GPT disk. With the old driver, the GPT partition table can not be read and only the first partition on the disk can be seen. Signed-off-by: Eric Snowberg --- grub-core

[PATCH] ieee1275: NULL pointer dereference in grub_machine_get_bootlocation

2018-03-14 Thread Eric Snowberg
Read from NULL pointer canon in function grub_machine_get_bootlocation. Function grub_ieee1275_canonicalise_devname may return NULL. Signed-off-by: Eric Snowberg --- grub-core/kern/ieee1275/init.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/grub-core/kern/ieee1275

[PATCH V2] ieee1275: split up grub_machine_get_bootlocation

2018-03-09 Thread Eric Snowberg
Split up some of the functionality in grub_machine_get_bootlocation into grub_ieee1275_get_boot_dev. This will allow for code reuse in a follow on patch. Signed-off-by: Eric Snowberg --- V2 changes: Coding style changes requested by Daniel Kiper --- grub-core/kern/ieee1275/init.c | 20

Re: [PATCH] ieee1275: split up grub_machine_get_bootlocation

2018-03-08 Thread Eric Snowberg
> On Mar 8, 2018, at 4:19 AM, Daniel Kiper wrote: > > On Wed, Mar 07, 2018 at 01:48:10PM -0800, Eric Snowberg wrote: >> Split up some of the functionality in grub_machine_get_bootlocation into >> grub_ieee1275_get_boot_dev. This will allow for code reuse in a follow on &

[PATCH] ieee1275: split up grub_machine_get_bootlocation

2018-03-07 Thread Eric Snowberg
Split up some of the functionality in grub_machine_get_bootlocation into grub_ieee1275_get_boot_dev. This will allow for code reuse in a follow on patch. Signed-off-by: Eric Snowberg --- grub-core/kern/ieee1275/init.c | 24 grub-core/kern/ieee1275/openfw.c | 27

[PATCH] mkimage: fix build regression in grub_mkimage_load_image

2018-03-06 Thread Eric Snowberg
'grub_mkimage_load_image32': util/grub-mkimagexx.c:1968: error: missing initializer util/grub-mkimagexx.c:1968: error: (near initialization for 'smd.sections') make[2]: *** [util/grub_mkimage-grub-mkimage32.o] Error 1 Initialize the entire section_metadata structure. Signed-off-by: Eric

[PATCH] sparc64: Limit nvme of_path_of_nvme to just SPARC

2018-03-01 Thread Eric Snowberg
Limit NVMe of_path_of_nvme to just SPARC hardware for now. It has been found that non-Open Firmware hardware platforms can some how access this function. Signed-off-by: Eric Snowberg --- Note: This patch should be applied after Adrian's "ieee1275: Fix crash in of_path_of_nvme wh

Re: [PATCH] ieee1275: Fix crash in of_path_of_nvme when of_path is empty

2018-03-01 Thread Eric Snowberg
free (sysfs_path); > - strcat (of_path, disk); > return of_path; > } > > -- > 2.16.2 Reviewed-by: Eric Snowberg ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH 5/7] ieee1275: block-size deblocker support method

2018-02-26 Thread Eric Snowberg
the device block-size ( -- block-len ) Return "granularity" for accesses to this device. Signed-off-by: Eric Snowberg --- grub-core/kern/ieee1275/ieee1275.c | 23 +++ include/grub/ieee1275/ieee1275.h |1 + 2 files changed, 24 insertions(+), 0 deletions(-) di

[PATCH 6/7] sparc64: #blocks disk node method

2018-02-26 Thread Eric Snowberg
m unsigned integer (which, because of Open Firmware's assumption of two's complement arithmetic, is equivalent to the signed number -1). If the number of blocks exceeds the range of an unsigned number, return 0 to alert the caller to try the #blocks64 command. Signed-off-by: Eric Snowberg -

[PATCH 3/7] ieee1275: set-address bus specific method

2018-02-26 Thread Eric Snowberg
target number (0x0..0xf) and unit number (0..7) to which subsequent commands apply. This function is for devices with #address-cells == 2 Signed-off-by: Eric Snowberg --- grub-core/kern/ieee1275/ieee1275.c | 38 include/grub/ieee1275/ieee1275.h |4

[PATCH 7/7] sparc64: #blocks64 disk node method

2018-02-26 Thread Eric Snowberg
ceeds the range return -1. Signed-off-by: Eric Snowberg --- grub-core/kern/sparc64/ieee1275/ieee1275.c | 24 include/grub/sparc64/ieee1275/ieee1275.h |1 + 2 files changed, 25 insertions(+), 0 deletions(-) diff --git a/grub-core/kern/sparc64/ieee1275/ieee1275.c

[PATCH 0/7] Add additional IEEE1275 methods

2018-02-26 Thread Eric Snowberg
Add additional IEEE1275 methods. This is in preparation for a follow on patch that will make use of all of them. Eric Snowberg (7): ieee1275: decode-unit command for 4 addr cell devs ieee1275: encode-unit command for 4 addr cell devs ieee1275: set-address bus specific method ieee1275: no

[PATCH 2/7] ieee1275: encode-unit command for 4 addr cell devs

2018-02-26 Thread Eric Snowberg
by the value of the #address-cells property of this node. This function is for devices with #address-cells == 4 Signed-off-by: Eric Snowberg --- grub-core/kern/ieee1275/ieee1275.c | 46 include/grub/ieee1275/ieee1275.h |7 + 2 files changed, 53

[PATCH 4/7] ieee1275: no-data-command bus specific method

2018-02-26 Thread Eric Snowberg
nonzero if an error occurred, zero otherwise. NOTE no-data-command is a convenience function. It provides no capabilities that are not present in retry-command, but for those commands that meet its restrictions, it is easier to use. Signed-off-by: Eric Snowberg --- grub-core/kern/ieee1275/ieee1275.c

[PATCH 1/7] ieee1275: decode-unit command for 4 addr cell devs

2018-02-26 Thread Eric Snowberg
in the list phys.lo ... phys.hi is determined by the value of the #address-cells property of this node. This function is for devices with #address-cells == 4 Signed-off-by: Eric Snowberg --- grub-core/kern/ieee1275/ieee1275.c | 42 include/grub/ieee1275

[PATCH] ieee1275: add nvme support within ofpath

2018-02-20 Thread Eric Snowberg
. At the moment only a single Namespace is supported, therefore the value is currently hard coded to one. Signed-off-by: Eric Snowberg --- grub-core/osdep/linux/ofpath.c | 47 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/grub-core

Re: [PATCH V2] sparc64: fix OF path names for sun4v systems

2018-02-08 Thread Eric Snowberg
> On Feb 8, 2018, at 8:11 AM, Daniel Kiper wrote: > > On Wed, Feb 07, 2018 at 10:39:00AM -0700, Eric Snowberg wrote: >>> On Feb 7, 2018, at 4:53 AM, Daniel Kiper wrote: >>> On Tue, Jan 30, 2018 at 08:49:48PM -0800, Eric Snowberg wrote: >>>> Fix the Ope

Re: [PATCH V2] sparc64: fix OF path names for sun4v systems

2018-02-07 Thread Eric Snowberg
> On Feb 7, 2018, at 4:53 AM, Daniel Kiper wrote: > > On Tue, Jan 30, 2018 at 08:49:48PM -0800, Eric Snowberg wrote: >> Fix the Open Firmware (OF) path property for sun4v SPARC systems. >> These platforms do not have a /sas/ within their path. Over time >> different

[PATCH V2] sparc64: fix OF path names for sun4v systems

2018-01-30 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 --- V2

Re: [PATCH] sparc64: fix OF path names for sun4v systems

2017-12-18 Thread Eric Snowberg
> On Dec 18, 2017, at 8:22 AM, Daniel Kiper wrote: > > On Wed, Dec 06, 2017 at 03:53:30PM -0800, Eric Snowberg wrote: >> Fix the Open Firmware (OF) path property for sun4v SPARC systems. >> These platforms do not have a /sas/ within their path. Over time >> different

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

2017-12-06 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

[PATCH resend] ieee1275: fix segfault in grub-ofpathname

2017-11-28 Thread Eric Snowberg
fix segfault in grub-ofpathname Signed-off-by: Eric Snowberg --- Originally sent on Wed, 29 Jun 2016 14:43:18 -0700 http://lists.gnu.org/archive/html/grub-devel/2016-06/msg00033.html --- util/ieee1275/grub-ofpathname.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util

[PATCH resend] grub-install: fix memory leak

2017-11-27 Thread Eric Snowberg
Fix memory leak Signed-off-by: Eric Snowberg --- Originally sent on Wed, 29 Jun 2016 14:43:16 -0700 http://lists.gnu.org/archive/html/grub-devel/2016-06/msg00031.html --- util/grub-install.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/util/grub-install.c b/util/grub

Re: [PATCH v2] ls: prevent double open

2017-11-21 Thread Eric Snowberg
> On Nov 21, 2017, at 6:20 AM, Daniel Kiper wrote: > > On Mon, Nov 13, 2017 at 08:27:28AM -0800, Eric Snowberg wrote: >> Prevent a double open. This can cause problems with some ieee1275 >> devices, causing the system to hang. The double open can occur >> as follows

[PATCH v2] ls: prevent double open

2017-11-13 Thread Eric Snowberg
: grub_normal_print_device_info (device_name); dev = grub_device_open (name); Signed-off-by: Eric Snowberg --- changes from v1: - Added comment --- grub-core/commands/ls.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/grub-core/commands/ls.c b/grub-core

Re: [PATCH] ls: prevent double open

2017-10-18 Thread Eric Snowberg
> On Oct 18, 2017, at 11:03 AM, Vladimir 'phcoder' Serbinenko > wrote: > > > > On Wed, Oct 18, 2017, 19:02 Eric Snowberg wrote: > > > On Oct 18, 2017, at 10:32 AM, Vladimir 'phcoder' Serbinenko > > wrote: > > > > > &

Re: [PATCH] ls: prevent double open

2017-10-18 Thread Eric Snowberg
> On Oct 18, 2017, at 10:32 AM, Vladimir 'phcoder' Serbinenko > wrote: > > > > On Mon, Oct 16, 2017, 22:11 Eric Snowberg wrote: > Prevent a double open. This can cause problems with some ieee1275 > devices, causing the system to hang. The double open can

Re: [PATCH] ls: prevent double open

2017-10-18 Thread Eric Snowberg
> On Oct 17, 2017, at 7:22 AM, Daniel Kiper wrote: > > On Mon, Oct 16, 2017 at 01:11:12PM -0700, Eric Snowberg wrote: >> Prevent a double open. This can cause problems with some ieee1275 >> devices, causing the system to hang. The double open can occur >> as follows

Re: [PATCH] parser: Remove escape from the state transitions

2017-10-17 Thread Eric Snowberg
> On Oct 17, 2017, at 6:53 AM, Daniel Kiper wrote: > > On Mon, Oct 16, 2017 at 02:04:17PM -0600, Eric Snowberg wrote: >>> On Oct 16, 2017, at 2:44 AM, Daniel Kiper wrote: > > [...] > >>> I am a bit surprised that you are not able to quote a string b

[PATCH] ls: prevent double open

2017-10-16 Thread Eric Snowberg
: grub_normal_print_device_info (device_name); dev = grub_device_open (name); Signed-off-by: Eric Snowberg --- grub-core/commands/ls.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/grub-core/commands/ls.c b/grub-core/commands/ls.c index 0eaf836..a7318ab

Re: [PATCH] parser: Remove escape from the state transitions

2017-10-16 Thread Eric Snowberg
> On Oct 16, 2017, at 2:44 AM, Daniel Kiper wrote: > > On Fri, Oct 13, 2017 at 08:53:23AM -0600, Eric Snowberg wrote: >>> On Oct 13, 2017, at 3:36 AM, Daniel Kiper wrote: >>> On Thu, Oct 12, 2017 at 08:38:51AM -0600, Eric Snowberg wrote: >>>>> On Oct

Re: [PATCH] parser: Remove escape from the state transitions

2017-10-13 Thread Eric Snowberg
> On Oct 13, 2017, at 3:36 AM, Daniel Kiper wrote: > > On Thu, Oct 12, 2017 at 08:38:51AM -0600, Eric Snowberg wrote: >>> On Oct 12, 2017, at 5:43 AM, Daniel Kiper wrote: >>> On Mon, Oct 09, 2017 at 09:23:44AM -0600, Eric Snowberg wrote: >>>>> On Oc

Re: [PATCH] parser: Remove escape from the state transitions

2017-10-12 Thread Eric Snowberg
> On Oct 12, 2017, at 5:43 AM, Daniel Kiper wrote: > > On Mon, Oct 09, 2017 at 09:23:44AM -0600, Eric Snowberg wrote: >>> On Oct 9, 2017, at 5:48 AM, Daniel Kiper wrote: >>> On Fri, Oct 06, 2017 at 09:37:54AM -0600, Eric Snowberg wrote: >>>>> On Oc

Re: [PATCH] parser: Remove escape from the state transitions

2017-10-09 Thread Eric Snowberg
> On Oct 9, 2017, at 5:48 AM, Daniel Kiper wrote: > > On Fri, Oct 06, 2017 at 09:37:54AM -0600, Eric Snowberg wrote: >>> On Oct 6, 2017, at 8:47 AM, Daniel Kiper wrote: >>> On Tue, May 30, 2017 at 04:07:52PM -0600, Eric Snowberg wrote: >>>>

Re: [PATCH v2] sparc64: Add blocklist GPT support for SPARC

2017-10-09 Thread Eric Snowberg
> On Oct 9, 2017, at 5:57 AM, Daniel Kiper wrote: > > On Fri, Oct 06, 2017 at 02:58:30PM -0600, Eric Snowberg wrote: >>> On Oct 6, 2017, at 8:04 AM, Daniel Kiper wrote: >>> On Thu, May 11, 2017 at 06:25:24PM -0700, Eric Snowberg wrote: >>>> Add block-lis

Re: [PATCH v2] sparc64: Add blocklist GPT support for SPARC

2017-10-06 Thread Eric Snowberg
> On Oct 6, 2017, at 8:04 AM, Daniel Kiper wrote: > > On Thu, May 11, 2017 at 06:25:24PM -0700, Eric Snowberg wrote: >> Add block-list GPT support for SPARC. The OBP "load" and "boot" methods >> are partition aware and neither command can see the par

Re: [PATCH] parser: Remove escape from the state transitions

2017-10-06 Thread Eric Snowberg
> On Oct 6, 2017, at 8:47 AM, Daniel Kiper wrote: > > On Tue, May 30, 2017 at 04:07:52PM -0600, Eric Snowberg wrote: >> Remove GRUB_PARSER_STATE_ESC with state GRUB_PARSER_STATE_TEXT from >> the list of not allowed characters. > > Once again, NACK for this patch.

Re: [PATCH v2] sparc64: Add blocklist GPT support for SPARC

2017-10-06 Thread Eric Snowberg
> On Oct 6, 2017, at 8:04 AM, Daniel Kiper wrote: > > On Thu, May 11, 2017 at 06:25:24PM -0700, Eric Snowberg wrote: >> Add block-list GPT support for SPARC. The OBP "load" and "boot" methods >> are partition aware and neither command can see the par

Re: State of the SPARC patches for GRUB

2017-09-29 Thread Eric Snowberg
> On Sep 28, 2017, at 2:46 PM, Daniel Kiper wrote: > > Hi Adrian, > > On Thu, Sep 28, 2017 at 10:25:54AM +0200, John Paul Adrian Glaubitz wrote: >> Hi! >> >> Last year, Eric Snowberg from Oracle posted a number of patches [1] to >> improve SPARC supp

Re: [PATCH] parser: Remove escape from the state transitions

2017-06-13 Thread Eric Snowberg
> On Jun 13, 2017, at 6:59 AM, Daniel Kiper wrote: > > On Wed, Jun 07, 2017 at 03:43:34PM -0600, Eric Snowberg wrote: >> >>> On Jun 7, 2017, at 3:36 PM, Daniel Kiper wrote: >>> >>> On Wed, Jun 07, 2017 at 02:48:04PM -0600, Eric Snowberg wrote: >

Re: [PATCH] parser: Remove escape from the state transitions

2017-06-07 Thread Eric Snowberg
> On Jun 7, 2017, at 3:36 PM, Daniel Kiper wrote: > > On Wed, Jun 07, 2017 at 02:48:04PM -0600, Eric Snowberg wrote: >>> On Jun 7, 2017, at 1:23 PM, Daniel Kiper wrote: >>> On Mon, Jun 05, 2017 at 08:29:47AM -0600, Eric Snowberg wrote: >>>>> On Ju

Re: [PATCH] parser: Remove escape from the state transitions

2017-06-07 Thread Eric Snowberg
> On Jun 7, 2017, at 1:23 PM, Daniel Kiper wrote: > > On Mon, Jun 05, 2017 at 08:29:47AM -0600, Eric Snowberg wrote: >>> On Jun 2, 2017, at 4:41 AM, Daniel Kiper wrote: >>> On Tue, May 30, 2017 at 04:07:52PM -0600, Eric Snowberg wrote: >>>>

Re: [PATCH] parser: Remove escape from the state transitions

2017-06-05 Thread Eric Snowberg
> On Jun 2, 2017, at 4:41 AM, Daniel Kiper wrote: > > On Tue, May 30, 2017 at 04:07:52PM -0600, Eric Snowberg wrote: >> Remove GRUB_PARSER_STATE_ESC with state GRUB_PARSER_STATE_TEXT from >> the list of not allowed characters. >> >> This fixes a problem where a

[PATCH] parser: Remove escape from the state transitions

2017-05-30 Thread Eric Snowberg
ove is not correct. It should be: hint: ieee1275//pci@306/pci@1/LSI\,mrsas@0/disk@0:a Later on, when it tries to use this disk, it incorrectly truncates the device name since the comma isn’t escaped and tries to do the grub_disk_open with ieee1275//pci@306/pci@1/LSI. Signed-off-by: Eric Snowberg

[PATCH] sparc64: Don't use devspec to determine the OBP path

2017-05-18 Thread Eric Snowberg
e this patch grub-ofpathname always returned the wrong value for a virtual disk. For example: % grub-ofpathname /dev/vdiskc2 vdisk/disk@2:b After this patch it now returns the correct value: % grub-ofpathname /dev/vdiskc2 /virtual-devices@100/channel-devices@200/disk@2:b Orabug: 24459765 Sign

[PATCH] sparc64: close cdboot ihandle

2017-05-11 Thread Eric Snowberg
The ihandle is left open with a cd-core image. This will cause a delay booting grub from a virtual cdrom in a LDOM. It will also cause problems as Linux boots, since it expects the ihandle to be closed during init. Orabug: 25911275 Signed-off-by: Eric Snowberg --- grub-core/boot/sparc64

[PATCH v2] sparc64: Add blocklist GPT support for SPARC

2017-05-11 Thread Eric Snowberg
the beginning of the physical disk, not the beginning of the parition. This patch fixes the block-list entries so they match what OBP expects during boot for a GPT disk. T5 and above now supports GPT as well as VTOC. This patch has been tested on T5-2 and newer SPARC systems. Signed-off-by: Eric Snow

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

2017-05-10 Thread Eric Snowberg
> On May 10, 2017, at 6:40 PM, Vladimir 'phcoder' Serbinenko > wrote: > > > > On Thu, May 11, 2017, 02:37 Vladimir 'phcoder' Serbinenko > wrote: > > > On Thu, May 11, 2017, 01:21 Eric Snowberg wrote: > > > On May 10,

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

2017-05-10 Thread Eric Snowberg
> On May 10, 2017, at 4:42 PM, Vladimir 'phcoder' Serbinenko > wrote: > > > > On Wed, Jun 29, 2016, 23:47 Eric Snowberg wrote: > Add block-list GPT support for SPARC. The OBP "load" and "boot" methods > are partition aware and neith

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

2016-06-29 Thread Eric Snowberg
ove is not correct. It should be: hint: ieee1275//pci@306/pci@1/LSI\,mrsas@0/disk@0:a Later on, when it tries to use this disk, it incorrectly truncates the device name since the comma isn’t escaped and tries to do the grub_disk_open with ieee1275//pci@306/pci@1/LSI. Signed-off-by: Eric Snowberg

[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

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

2016-06-29 Thread Eric Snowberg
However there could be just a single disk installed in disk0. Now grub will no longer try to use these disks that don't exist. This was causing long delays on boot and showed nonexistent drives in the shell. Signed-off-by: Eric Snowberg --- grub-core/disk/ieee1275/ofdisk.c |

[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

[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
ff-by: Eric Snowberg --- grub-core/disk/ieee1275/ofdisk.c | 17 - grub-core/kern/ieee1275/cmain.c |4 include/grub/ieee1275/ieee1275.h |2 ++ 3 files changed, 22 insertions(+), 1 deletions(-) diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofd

[PATCH 07/15] ofdisk: memory corruption fix

2016-06-29 Thread Eric Snowberg
by cleaning up the new copy when it is no longer needed. Signed-off-by: Eric Snowberg --- grub-core/disk/ieee1275/ofdisk.c | 30 +- 1 files changed, 13 insertions(+), 17 deletions(-) diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c in

[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 |

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

2016-06-29 Thread Eric Snowberg
e, fix logic in grub_ofdisk_get_block_size so the block size is not requested upon each open since it will not change. Signed-off-by: Eric Snowberg --- grub-core/disk/ieee1275/ofdisk.c | 26 +- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/grub-cor

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

2016-06-29 Thread Eric Snowberg
statement. Signed-off-by: Eric Snowberg --- include/grub/emu/getroot.h |2 ++ util/grub-install.c| 13 + util/probe.c |2 +- 3 files changed, 16 insertions(+), 1 deletions(-) diff --git a/include/grub/emu/getroot.h b/include/grub/emu/getroot.h ind

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

2016-06-29 Thread Eric Snowberg
the beginning of the physical disk, not the beginning of the parition. This patch fixes the block-list entries so they match what OBP expects during boot for a GPT disk. T5 and above now supports GPT as well as VTOC. This patch has been tested on T5-2 and newer SPARC systems. Signed-off-by: Eric Snow

[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

[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

  1   2   >