From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mx.groups.io with SMTP id smtpd.web12.225.1572625509469572399 for ; Fri, 01 Nov 2019 09:25:09 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=SPF record not found (domain: canonical.com, ip: 91.189.89.112, mailfrom: dann.frazier@canonical.com) Received: from mail-il1-f197.google.com ([209.85.166.197]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iQZjX-0006vL-It for devel@edk2.groups.io; Fri, 01 Nov 2019 16:25:07 +0000 Received: by mail-il1-f197.google.com with SMTP id n81so8857816ili.22 for ; Fri, 01 Nov 2019 09:25:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qocgCTeRbxAz8ymSwYnphmNORJAULUJg9Jb4JD8VsVI=; b=LknNa3mc9usGfT/OQ/dutGpFK5KTeBkfOF7nMOWiuo0R7N3bS5fm2tre8zuHOxAmEP mL1VjDN16lzfx3+SG7Q2Feu+WLBFYi+jM0iQLUJrNvijqc8livxMGWw7DG7+Z9/Q0VzH 7ik2kdgdpnmD7xZWuzZ1TSsSVvExBuixMuxSbfDiV1pkPzYNpWw4Lyyc7ztpEzmhTB6S ZyjjKiB5zQjSPJcPuh2BYrhz719e239KpNispptI2cI1g4Rv5PuPs4erT5xSsvafgJZb DHuELAIXZf52uS5fj2YhnqYwZRS1KWTFcvpl7B7yXuv5kolLeVvbYzRjW1rwCMGQzG7+ dnZA== X-Gm-Message-State: APjAAAWxfcZdlq80Z1NT9ef9TbpQ/pSSmEoXO1IAPRAgWUctnbLvjW2w Y1Oq1mmfO4GihrKWgBoGfFNNqLgX+Lm14SLvWlqXTwkbyDaHOuHQYBlEjUDpDcK7ZsqRWrJx7Bh WJE9HcaYdT96zuCIVTYJVZp4hMjrmoPQ= X-Received: by 2002:a02:82:: with SMTP id 124mr2949536jaa.131.1572625506348; Fri, 01 Nov 2019 09:25:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGozoqPCSu6OXTjbHFFU/ygvQNEMhgTT0eJlJLVeSBDOZqYixuUCiydDWGZMwFQm3+Tv03MA== X-Received: by 2002:a02:82:: with SMTP id 124mr2949506jaa.131.1572625505905; Fri, 01 Nov 2019 09:25:05 -0700 (PDT) Received: from xps13.canonical.com (c-71-56-235-36.hsd1.co.comcast.net. [71.56.235.36]) by smtp.gmail.com with ESMTPSA id t13sm860547ilf.73.2019.11.01.09.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2019 09:25:05 -0700 (PDT) Date: Fri, 1 Nov 2019 10:25:04 -0600 From: "dann frazier" To: Prabhakar Kushwaha Cc: Leif Lindholm , Laszlo Ersek , edk2-devel-groups-io , Ard Biesheuvel , Naresh Bhat Subject: Re: [edk2-devel] How /sys/firmware/fdt getting created Message-ID: <20191101162504.GD24512@xps13.dannf> References: <2b268378-d9be-adb5-f139-a0ca8dab4329@redhat.com> <20191031121642.GA16820@bivouac.eciton.net> <15D2D0302F8A1888.21389@groups.io> <20191031203452.GA24512@xps13.dannf> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 01, 2019 at 10:17:30AM +0530, Prabhakar Kushwaha wrote: > On Fri, Nov 1, 2019 at 2:04 AM dann frazier wrote: > > > > On Thu, Oct 31, 2019 at 12:55:10PM -0600, dann frazier wrote: > > > On Thu, Oct 31, 2019 at 6:16 AM Leif Lindholm wrote: > > > > > > > > On Thu, Oct 31, 2019 at 11:07:52AM +0100, Laszlo Ersek wrote: > > > > > +Leif, comment at bottom > > > > > > > > Thanks Laszlo. +Dann, -kexec. > > > > > > > > > On 10/30/19 09:16, Prabhakar Kushwaha wrote: > > > > > >> So if you want to add these properties, you should add them there. > > > > > >> > > > > > >> Can you explain why doing this is necessary? > > > > > > > > > > > > I am trying to test kexec -p (kdump feature) on CentOS-release > > > > > > 7.7.1908 and Ubuntu-18.04 distributions. > > > > > > > > > > > > "kexec -p" command show error on Ubuntu. While no error on CentOS > > > > > > > > > > > > CentOS: > > > > > > $ kexec -p /boot/vmlinuz-`uname -r` --initrd=/boot/initramfs-`uname > > > > > > -r`.img --reuse-cmdline > > > > > > $ ==> No error > > > > > > > > > > > > Ubuntu > > > > > > $ kexec -p /boot/vmlinuz-`uname -r` --initrd=/boot/initrd.img-`uname > > > > > > -r` --reuse-cmdline > > > > > > $ kexec: elfcorehdr doesn't fit cells-size. > > > > > > $ kexec: setup_2nd_dtb failed. > > > > > > $ kexec: load failed. > > > > > > $ Cannot load /boot/vmlinuz-5.4.0-rc4+ > > > > > > > > > > > > Note: Both CentOS and Ubuntu has Linux-5.4-rc4 tag. > > > > > > > > > > > > When i debugged further reason for Ubuntu error is due to > > > > > > address-cells and size-cells as "1" > > > > > > log from kexec tool :- > > > > > > load_crashdump_segments: elfcorehdr 0x7f7cbfc000-0x7f7cbff7ff > > > > > > read_1st_dtb: found name =dtb_sys /sys/firmware/fdt > > > > > > get_cells_size: #address-cells:1 #size-cells:1 > > > > > > > > > > > > On CentOS both values are "2". > > > > > > log from kexec tool :- > > > > > > load_crashdump_segments: elfcorehdr 0xbf98bf0000-0xbf98bf33ff > > > > > > read_1st_dtb: found nmae=dtb_sys /sys/firmware/fdt > > > > > > get_cells_size: #address-cells:2 #size-cells:2 > > > > > > > > > > > > Note: Kexec tool read values from /sys/firmware/fdt. > > > > > > > > > > > > I am trying to figure out why 2 distributions showing different values. > > > > > > > > > > http://git.savannah.gnu.org/cgit/grub.git/commit/?id=347210a5d5ce655b95315f320faa515afb723c11 > > > > > > > > > > Ubuntu probably ships a grub version that lacks this commit. > > > > > > > > Yes, it came after the 18.04 release. > > > > Dann: given that 18.04 is LTS, would it be reasonable to cherry-pick > > > > this grub patch? I would consider the behaviour without it to be a > > > > bug. > > > > > > Leif, > > > > > > Likely - I'll run some tests and get back to you... > > > > Can you help me understand the scenario in which the above patch is > > required? I tested an 18.04 VM w/ AAVMF (ACPI-mode), and kexec -p > > worked fine. I also verified that 18.04 does not carry the above patch. > > > > This issue is only visible when crashkernel region reserved beyond 4GB > by kernel. > I reproduced this issue by providing "crashkernel=2G" in bootargs. Prabhakar, Thanks. I was able to reproduce w/ crashkernel=1G@4G. In order to get this addressed in 18.04 we'll need a LP bug to track it - would you mind filing one at https://bugs.launchpad.net/ubuntu/+source/grub2 and subscribing me (lpid dannf) to it? -dann > > if kernel is not reserving memory due to crashkernel region > overlapping with "reserved regions", you can apply below patch. > https://patchwork.kernel.org/patch/10144305/ > > Update: When I migrated ubuntu grub to 2.05 this issue is gone. > > --pk