Received: from list by lists.gnu.org with archive (Exim 4.71) id 1csXvd-0000LL-1v for mharc-grub-devel@gnu.org; Mon, 27 Mar 2017 12:55:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csXvZ-0000KJ-J2 for grub-devel@gnu.org; Mon, 27 Mar 2017 12:55:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csXvW-0003Ht-FN for grub-devel@gnu.org; Mon, 27 Mar 2017 12:55:33 -0400 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]:33941) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1csXvW-0003GT-8Y for grub-devel@gnu.org; Mon, 27 Mar 2017 12:55:30 -0400 Received: by mail-lf0-x22e.google.com with SMTP id z15so25900401lfd.1 for ; Mon, 27 Mar 2017 09:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=g4+yJ7SIuIbFJXOmUriPEo5CSO2MXHZ2WHidkwlphRM=; b=GEnwKNAryoaviiDGAjqGPa6je/9M/EW+iZFlCBXCFCCBASF9HYJybdZ0sxXAgnj7UC zltp4wLCeESbd8wQMonk6uEb2YEpcu//oJcKMKCK5qZVvQduscFE8S4AZyy7Y+dS74F2 1xdiHXbzB2HWgsWFqCpd0IRLRuK9aFJ2wZ55qKUU/G6L7dwti8pL+Kk4GveG9vh4nh7p KfW8RQuZDxP9frKBqy1YcZ5nys6Lp90EvttZgkkMPTOrskxlAKBNhBfGkZTr/nLS/6Pb QJ2f6czf8MNephVY+TwibB9CqQRc0G5H1JtDoz4iDqT3q8G4aKfEHwoMiF+15rkfqmc8 702Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=g4+yJ7SIuIbFJXOmUriPEo5CSO2MXHZ2WHidkwlphRM=; b=k7rpV2WrqUqT/6CiczGAbaCyPPRYXD7K6mYQbVE36/+VgqA7aQ09rE6EmZ1aBqkXhl xkergVFWM8cTExV0hKT3EMJo0kvuyjrMG8TVjQe4nIMQlzbUYcP9P+BonSiZL6OGaB3F iqJOdVdKeSL5151cMBwkpoqNcPt8SNx8P33B2tEtra/yW8eBwAkwyLauMNi4haaJLnmR 8NO9b3GUQlxM795p2Pov0wTyuqrv4dROBVRXwSJ64B848+TM3Vjgmo9wxNFBXHtFV1AA 14Xn/TBW18KnpGtii7FJuxGadmbIweAG78CCbnuqmON9qFV3UJzjRnzXmLgR8mEHx2ie +pjA== X-Gm-Message-State: AFeK/H3/9mJvHreyXAgGx7PFEeBFlUmV8KWm/shJLnLaGyU1SWCAtEjCBnwB0HehLgTIJQ== X-Received: by 10.46.83.85 with SMTP id t21mr30385ljd.82.1490633727942; Mon, 27 Mar 2017 09:55:27 -0700 (PDT) Received: from [192.168.1.6] (ppp109-252-90-38.pppoe.spdop.ru. [109.252.90.38]) by smtp.gmail.com with ESMTPSA id s15sm212286ljd.27.2017.03.27.09.55.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Mar 2017 09:55:27 -0700 (PDT) Subject: Re: Loading DSDT table using 'acpi' or some memory write command? To: The development of GNU GRUB References: <1736729449.4676062.1487865639993.ref@mail.yahoo.com> <1736729449.4676062.1487865639993@mail.yahoo.com> <229125734.2281203.1488194973248@mail.yahoo.com> <144480689.2460565.1488208393781@mail.yahoo.com> <1893359760.2685777.1488219706759@mail.yahoo.com> <967677258.4693596.1490623960099@mail.yahoo.com> From: Andrei Borzenkov Message-ID: <8d3d1896-625b-97cf-b863-bf5d4b649f17@gmail.com> Date: Mon, 27 Mar 2017 19:55:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <967677258.4693596.1490623960099@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22e X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 16:55:35 -0000 27.03.2017 17:12, Nando Eva пишет: > OK, I found the cause if the problem: > - the ACPI tables specified to the 'acpi' command are loaded to new addresses and a new RSDT and XSDT created with pointers to them. This can be confirmed by the 'lsacpi' command. > > - the RSDP isn't updated to point to the new RSDT and XSDT. > How exactly do you find RSDP? On EFI RSDP should be retrieved from EFI Configuration Table, which grub tries to update. Please give as much details as possible. > So when chainload the OS, the original RSDT and XSDT are referenced from the RSDP. > I'm now manually doing the 'acpi [DSDT]' table load, then a 'lsacpi -2' to find the new RSDT+XSDT addresses and updating the RSDP via two write_dword memory writes (though not doing checksum correction). Again - what address are you updating? > Can a pach be made for grub2 to correct this behaviour to be automated without such manual intervention? We need to understand why it fails first. GRUB *does* attempt to override RSDP if it finds it. > Thank you,Nando > > On Tuesday, 28 February 2017, 5:21, Nando Eva wrote: > > > Vladimir 'phcoder' Serbinenko wrote: > > I reproduced the bug. I'm investigating > >>> Apparently finish_boot_services rewrites acpi tables. It's possible to workaround this, possibly by using acpi table protocol. >> But it's certainely not for 2.02 at this point. > Thank you for investigating the issue. Earlier I did a test to check to see if UEFI chainloading was altering ACPI tables. I did this by: > 1. performing two grub2 "write_dword" console memory commands to enable ASPM in the ACPI FADT (FACP on my system) table as per http://smackerelofopinion.blogspot.com.au/2011/03/making-sense-of-pcie-aspm.html > > 2. then chainloaded from Grub2 to windows: chainloader /efi/Microsoft/Boot/bootmgfw.efi > The ASPM enabling change was there as found by using r-w everything and reported by 'powercfg /energy', indicating the UEFI chainloading isn't, at least for ACPI FADT (FACP), altering the in-memory table. > As the DSDT table is much larger, I can't really write_dword it. Hence asking for some other memory loading module. > As another lead, I found the mentioned finish_boot_services routine in mm.c, quoted below. Would you mind pointing out which code is rewriting the ACPI tables? The whole ACPI tables mangling happens in grub-core/commands/acpi.c