From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by mx.groups.io with SMTP id smtpd.web09.1666.1572423419757699238 for ; Wed, 30 Oct 2019 01:16:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D1deaDya; spf=pass (domain: gmail.com, ip: 209.85.166.67, mailfrom: prabhakar.pkin@gmail.com) Received: by mail-io1-f67.google.com with SMTP id 1so1515311iou.4 for ; Wed, 30 Oct 2019 01:16:59 -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=lpYGBg1jJ5KEN2i5nHLFGyRT07x4GIIRr3DHeUFz3Is=; b=D1deaDyaEfvXbQDKVIG0IHCUiSfGzM+4j1qziMkbFn12I4lNWM0j/wZhvc1VOUcPhX XMwn7PLdQaQ+b0M9vh8fTX784V/9ya8NyB2SX6namwoGiNr4iCAff4Ds6eUidMv+Ndmf ksbsLB1npJDpMv+Eod6rB5CgCyykGbaUDLXlkQuOvG5FvtD2xdFuGcREMx3WBsre9poW QXJyTnJnNOu5HIfssH2JVbjDfzJNUS8p3G6YCNdH1tD4uV87S3gLeL3dMpwZV12kVOAL nCcHVgZ8UAcIlcsAjWcwhqJIPshWnf2WMg11buOar5ZzHGOaotCj57is2HSMedNZw7da uGOw== 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=lpYGBg1jJ5KEN2i5nHLFGyRT07x4GIIRr3DHeUFz3Is=; b=kLSol4WpqSI2/P8bkH2f6UuPPbg1f9rqfRQDFKlWd5il5G42TbzyMMW4q94xk0vNjm R5XXPXq5v05tOzXA8vpEq0b5ENhAodj8+ch10rEMT7DU51k62IYZ9j307LvS/Ci6MtEb Q9VASd+zb7KFlOksa7f0exwO8jSJgwX0S62dsOPitUgkAlge23DwNTVP03HKRyxLhrXL q5tMf3lV+HGqrezrUCEWd+4oX+XBfXahhCc7b2kou4HmEYeZtOpZsEwWoue9AjuOdPVx jUFJyYZigWc+Rd0b9KVIIc+DS/fMux5ur6+/3WO5piT1Gh/EHIvVWnxXKE7C4zCPRUey 24JA== X-Gm-Message-State: APjAAAV5Iz2gGP23i1B3WbIoHVAZmgY3B4CkRDQRevCxm6wOj2So+7MY EdX5khZVitW4beEgz9iiwJTvH6QEw7cOOBnG5Wc= X-Google-Smtp-Source: APXvYqypapPM5T3Br0ld3dkjJmWgX89hnX8BUfKUwzCWYxJwmyaChH/qiyHcmrdiyj7uj7zJujzeq+MceJftGcQT9LQ= X-Received: by 2002:a05:6602:2284:: with SMTP id d4mr6105827iod.10.1572423419195; Wed, 30 Oct 2019 01:16:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Prabhakar Kushwaha" Date: Wed, 30 Oct 2019 13:46:48 +0530 Message-ID: Subject: Re: [edk2-devel] How /sys/firmware/fdt getting created To: Ard Biesheuvel Cc: edk2-devel-groups-io , naresh.bhat@linaro.org, kexec@lists.infradead.org Content-Type: text/plain; charset="UTF-8" On Wed, Oct 30, 2019 at 1:14 PM Ard Biesheuvel wrote: > > On Wed, 30 Oct 2019 at 08:36, Prabhakar Kushwaha > wrote: > > > > On Wed, Oct 30, 2019 at 12:43 PM Ard Biesheuvel > > wrote: > > > > > > On Tue, 29 Oct 2019 at 18:17, Prabhakar Kushwaha > > > wrote: > > > > > > > > Hi All, > > > > > > > > I am working on Ubuntu-18.04 with UEFI on ARM64(64 bit) platform. The > > > > UEFI used is having ACPI tables. > > > > > > > > I am trying to understand where and how /sys/firmware/fdt is getting > > > > created. is it created by UEFI or grub and passed to Linux? > > > > > > > > > > Neither. It is created by Linux itself. > > > > > > > > > > > > > Thanks Ard, > > > > Can you please point me the code where it is getting created. > > I want to add below in /sys/firmware/fdt. > > > > #size-cells = <0x02>; > > #address-cells = <0x02>; > > > > Actually, in your case it is GRUB not the kernel that creates the FDT. > It does this to pass the initrd information. > > 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. --pk