From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by mx.groups.io with SMTP id smtpd.web09.89.1572583662901534489 for ; Thu, 31 Oct 2019 21:47:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V1DBHsz6; spf=pass (domain: gmail.com, ip: 209.85.166.194, mailfrom: prabhakar.pkin@gmail.com) Received: by mail-il1-f194.google.com with SMTP id a13so7714921ilp.1 for ; Thu, 31 Oct 2019 21:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4qwttTJ/JAAKNOldM/8FBnPS7UJ4NR/DVQ8iJsQHRs8=; b=V1DBHsz6EXKqqIYGColfK+JpTP8sjddnV/cK1ZWrpgcDDInJx5vJ/ZJUpkzJCFCJUS YPTpUWLdtcMwpclMMpoYIZYWcc3m97WmtVMo3QExGp3EqM4IiQi2i/U8iUDHt5jcQOD/ xukdBm/pW2MJkISSVHUSihUVLOHv7qLLWj7GiSoSrIG6xHwA4LqS6gDCFt6Dd5FHm39Y /YwsABd16sox3GaSyN7iPYdgRn6dGaWd7dz1XK7InLBmR0VM5JLZRteH3xhf4I4aAG/Y 5i1MdefGq/cXyNsiDtxFJHgSY4Hi8/x/T3na9xhKWP2rx2TpFZ8AFAHv5SNdrTtOy3j3 JGNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4qwttTJ/JAAKNOldM/8FBnPS7UJ4NR/DVQ8iJsQHRs8=; b=T2L/Y65whdEzXC5oyNe++J7h2hLBufj56aK6zh+gP+CJ3l0CkEsoJJryViTzwr2Lnh 4gDznTDBzlBvb7eSRxy/g3lXn8GfyAkMHjmlwTo02L+a5em4IzChqtnypFFIW4hX329L rrL67mkCutH8tTmaFkYsE8vjC9d30oRFXxpIn62zLDGkCpVkcohkpo++ncI9gOqM0Fpl qGL/rqlYY6kZGtqgHZ2hKQ0cyZSjLBShJil3WiNNOMNec7Elbf74qI9M2z6hbH5+g0EB uC/lFX7xRvSZ6xfrnVHqwci+/EH69njP7mtqe6Ony/PGi+MiFKYbA2BcU2VPKn0kCZ87 P/4A== X-Gm-Message-State: APjAAAUx1FcmkZaV4HKmsumU2ReTMP8pfRKU9oiyWZ5coZ2IshMoKwUN uvJN5SgQD23YxHlpKGvmbLb5byNYt7SifT8LnrA70SIk X-Google-Smtp-Source: APXvYqynS/fqXOjavs+T0AHBXjE1Konja9L3NeZPb3P/NyODLOK4h9gorrj3WS5V9r/9wi3a6Efxf4GUfc/BAi5E8QI= X-Received: by 2002:a92:9adb:: with SMTP id c88mr10137376ill.193.1572583662246; Thu, 31 Oct 2019 21:47:42 -0700 (PDT) MIME-Version: 1.0 References: <2b268378-d9be-adb5-f139-a0ca8dab4329@redhat.com> <20191031121642.GA16820@bivouac.eciton.net> <15D2D0302F8A1888.21389@groups.io> <20191031203452.GA24512@xps13.dannf> In-Reply-To: <20191031203452.GA24512@xps13.dannf> From: "Prabhakar Kushwaha" Date: Fri, 1 Nov 2019 10:17:30 +0530 Message-ID: Subject: Re: [edk2-devel] How /sys/firmware/fdt getting created To: dann frazier Cc: Leif Lindholm , Laszlo Ersek , edk2-devel-groups-io , Ard Biesheuvel , Naresh Bhat Content-Type: text/plain; charset="UTF-8" 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. 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