From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1l31He-0002m9-Np for mharc-grub-devel@gnu.org; Fri, 22 Jan 2021 13:35:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l31Hd-0002lU-65 for grub-devel@gnu.org; Fri, 22 Jan 2021 13:35:45 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:38261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1l31HZ-0005ZJ-MD for grub-devel@gnu.org; Fri, 22 Jan 2021 13:35:44 -0500 Received: from mail-qv1-f70.google.com ([209.85.219.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l31HW-0000r7-1G for grub-devel@gnu.org; Fri, 22 Jan 2021 18:35:38 +0000 Received: by mail-qv1-f70.google.com with SMTP id t16so4514825qvk.13 for ; Fri, 22 Jan 2021 10:35:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:autocrypt:to:cc:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=Y0vB8DRpcenddOZMyba4xQ1wcEgI3cdkGgGEA6MIxIY=; b=k/xDKFe+n8ua4HSTVPe9VDgTX3FE54+2Dbv5zcBkpZdVfoEVetlTmoic0krRM0qLu8 IsqJxauciTFqSOPa++QTrJNlox+CQpmQcM/Ydq1u92/654BBgu2omyj+UlN9iBV9HA0G t2qpf8VJ9M42hEPJKuk2lYHnlk61zDiRtZZjnt5ripOTOBnAMd48pLMHDLEKVp3E7dN3 jOmeVfesRhllP5nJAhoCHAQnJVeEFJ6TfZ5SXkSzSM1rAWViNf137pmoacwm+pHapjod /QMbzuO04FEaQjqyfgy6zOky16OVTtbsWjvNr7mEoX5Knn0NUa4hN/4b0yUh2orr7rI7 IySg== X-Gm-Message-State: AOAM533Vhn59Vj5eIQA7P0otLBRLHtocpVTGP+9RB2MMX2Ygxy+MzSyf Qq98DeB4EDUeexZN5eVV6wH5ghlNIc8L/6/2Y3xhPMYh3N+Q/QVqvX+8BYOa50E+wqvR1TgH340 HJsfZYzcXTFFGZswDTR79FF6+Yylq X-Received: by 2002:aed:38c5:: with SMTP id k63mr2743298qte.142.1611340537148; Fri, 22 Jan 2021 10:35:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvpWbYs5mZgHA7jgtdZANtAY1n5QOnTfQq9d0GhOc0p7raId9DyhYpW0hEnKj0ADh9CCNXrw== X-Received: by 2002:aed:38c5:: with SMTP id k63mr2743258qte.142.1611340536842; Fri, 22 Jan 2021 10:35:36 -0800 (PST) Received: from [192.168.1.75] ([179.110.97.151]) by smtp.gmail.com with ESMTPSA id v196sm6730671qkb.84.2021.01.22.10.35.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jan 2021 10:35:36 -0800 (PST) From: "Guilherme G. Piccoli" Subject: Dell BIOS issue reading Disk Extended data Autocrypt: addr=gpiccoli@canonical.com; prefer-encrypt=mutual; keydata= xsBNBFpVBxcBCADPNKmu2iNKLepiv8+Ssx7+fVR8lrL7cvakMNFPXsXk+f0Bgq9NazNKWJIn Qxpa1iEWTZcLS8ikjatHMECJJqWlt2YcjU5MGbH1mZh+bT3RxrJRhxONz5e5YILyNp7jX+Vh 30rhj3J0vdrlIhPS8/bAt5tvTb3ceWEic9mWZMsosPavsKVcLIO6iZFlzXVu2WJ9cov8eQM/ irIgzvmFEcRyiQ4K+XUhuA0ccGwgvoJv4/GWVPJFHfMX9+dat0Ev8HQEbN/mko/bUS4Wprdv 7HR5tP9efSLucnsVzay0O6niZ61e5c97oUa9bdqHyApkCnGgKCpg7OZq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UtRwVx112wtaQwArT2+bDbb/Y Yh6gTrYoRYHo6FuQl5YsHop/fmTahpTx11IMjuh6IJQ+lvdpdfYJ6hmAZ9kiVszDF6pGFVkY kHWtnE2Aa5qkxnA2HoFpqFifNWn5TyvJFpyqwVhVI8XYtXyVHub/WbXLWQwSJA4OHmqU8gDl X18zwLgdiQ== To: mario.limonciello@dell.com, divya.bharathi@dell.com, Alexander.Barabash@dell.com, amit.engel@dell.com, crag.wang@dell.com, david.chen7@dell.com, Narendra.K@dell.com Cc: gpiccoli@canonical.com, "Guilherme G. Piccoli" , halves@canonical.com, Jay Vosburgh , Dan Streetman , Gavin Guo , x86@kernel.org, grub-devel@gnu.org Message-ID: Date: Fri, 22 Jan 2021 15:35:30 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=91.189.89.112; envelope-from=gpiccoli@canonical.com; helo=youngberry.canonical.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2021 18:35:45 -0000 Hello Dell folks, I'm Guilherme Piccoli from Canonical - first of all, apologies for the out-of-nowhere communication. We've been investigating an issue that seems to date long time ago, and eventually we could narrow it to what appears to be a Dell BIOS bug. Notice I'm also looping a kernel x86 ML and grub-devel, just for the purpose of archiving such discussion in public lists, to help others that may find such an issue in the future. Since I don't have contacts of Dell representatives, I've just raised a list of people from Dell contributing to kernel in the last 2 years - maybe one of you could point me towards the path of a proper contact/channel to discuss such an issue. If not, I'm sorry for the noise. Let me detail the problem we're observing - notice all of this is about legacy BIOS mode, not UEFI. After creating a HW RAID on a Dell PowerEdge R730 (RAID5, total of 8T), GRUB fails to load its modules, dropping to "rescue mode". After a lot of investigation, we narrowed the issue to a bad return from BIOS to service 48h, int 13h [0] - this is the way GRUB collects disk size information. To double-check that, I've booted Linux in 16-bit realmode and with that, I could observe that EDD module [1] gets the same wrong value as total sectors - both GRUB and kernel EDD returns 0xFFFFFFFF. The correct value would be 0x3A3600000 according to SCSI Read Capacity 16 command (tested through the sg_readcap tool). In the P.S. session below there are details of the outputs collected by GRUB instrumentation, kernel EDD and sg_readcap tool. There are some workarounds to that, like having a smaller partition _before_ the rootfs in the disk topology, to hold grub modules and linux/initrd images - in that case it seems the BIOS responds the int 13h/48h service with proper values, but this issue dates from a while ago [3][4], so I'm hereby seeking a proper discussion with Dell firmware engineers to understand if that could be fixed or at least to understand the root cause of such limitation. Thanks in advance, Guilherme [0] https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH=48h:_Extended_Read_Drive_Parameters [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/boot/edd.c [2] https://askubuntu.com/q/867047 [3] https://askubuntu.com/q/416418 P.S. GRUB debug output [dump of struct grub_biosdisk_drp in grub_biosdisk_get_diskinfo_real() function]: size=1e, flags=9 cyl=0, heads=0, sec=0 bytesp_s=200, total=ffffffff, kernel EDD output: [ 0.741378] edd[0]->total_secs=ffffffff sg_readcap output: $ sg_readcap /dev/sdb READ CAPACITY (10) indicates device capacity too large now trying 16 byte cdb variant Read Capacity results: Protection: prot_en=0, p_type=0, p_i_exponent=0 Logical block provisioning: lbpme=0, lbprz=0 Last logical block address=15625879551 (0x3a35fffff), Number of logical blocks=15625879552 [...]