From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=212.61.153.67; helo=mail.prodrive-technologies.com; envelope-from=hristo.mihaylov@prodrive-technologies.com; receiver=edk2-devel@lists.01.org Received: from mail.prodrive-technologies.com (mail.prodrive-technologies.com [212.61.153.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C46F52118848E for ; Wed, 31 Oct 2018 05:54:30 -0700 (PDT) Received: from mail.prodrive-technologies.com (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 4DB5032F53_BD9A605B for ; Wed, 31 Oct 2018 12:54:29 +0000 (GMT) Received: from mail.prodrive-technologies.com (mdb-dag.prodrive.nl [10.1.1.212]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.prodrive-technologies.com", Issuer "Prodrive Technologies B.V. OV SSL Issuing CA" (verified OK)) by mail.prodrive-technologies.com (Sophos Email Appliance) with ESMTPS id E92F430351_BD9A604F for ; Wed, 31 Oct 2018 12:54:28 +0000 (GMT) Received: from EXC04.bk.prodrive.nl (10.1.1.213) by EXC03.bk.prodrive.nl (10.1.1.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 31 Oct 2018 13:54:25 +0100 Received: from EXC04.bk.prodrive.nl ([fe80::652c:6b39:fe91:49c8]) by EXC04.bk.prodrive.nl ([fe80::652c:6b39:fe91:49c8%15]) with mapi id 15.01.1261.035; Wed, 31 Oct 2018 13:54:25 +0100 From: Hristo Mihaylov To: "edk2-devel@lists.01.org" Thread-Topic: Linux kernel fails to boot after "Set boot script outside SMM after SmmReadyToLock" Thread-Index: AdRxGNcnhum/GItqSBm6icVhWaOnVg== Date: Wed, 31 Oct 2018 12:54:25 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.2.1] MIME-Version: 1.0 X-SASI-RCODE: 200 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Linux kernel fails to boot after "Set boot script outside SMM after SmmReadyToLock" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2018 12:54:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, I'm building a custom x86_64 platform. It gets to BDS, where I select an US= B with Debian as a boot device. ``` [Bds]Booting UEFI USB Flash Memory C412F52D6C89C0210002C15B error: no suitable video mode found. error: no video mode activated. GNU GRUB version 2.02~beta3-5 /--------------------------------------------------------------------------= --\ | Graphical install = | |*Install = | | Advanced options ... = | | Install with speech synthesis = | | = | | = | | = | | = | | = | | = | | = | | = | | = | \--------------------------------------------------------------------------= --/ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, `e' to edit the commands before booting or `c' for a command-line. GNU GRUB version 2.02~beta3-5 /--------------------------------------------------------------------------= --\ |setparams 'Install' = | | = | | set background_color=3Dblack = | | linux /install.amd/vmlinuz console=3DttyS0,115200 = | | initrd /install.amd/initrd.gz = | | = | | = | | = | | = | | = | | = | | = | | = | \--------------------------------------------------------------------------= --/ Minimum Emacs-like screen editing is supported. TAB lists completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for a command-line or ESC to discard edits and return to the GRUB menu. Booting a command list error: no suitable video mode found. Booting in blind mode ``` Here I set the serial console as a display device. Then I continue into boo= ting the USB stick where I see 2 fatal errors. Afterwhich, the kernel starts booting, but fails to boot completely with no= error message or anything. The last few lines Discover SATA devices. ``` OnExitBootServices.. IioInit Late Secure the Platform (TXT).. S3BootScriptSaveMemWrite called FATAL ERROR: Set boot script outside SMM after SmmReadyToLock!!! S3BootScriptSaveMemWrite called FATAL ERROR: Set boot script outside SMM after SmmReadyToLock!!! SmmInstallProtocolInterface: 296EB418-C4C8-4E05-AB59-39E8AF56F00A 0 SmmLockBoxSmmLib RestoreLockBox - Enter SmmLockBoxSmmLib RestoreLockBox - Exit (Success) SmmLockBoxSmmLib SaveLockBox - Enter LockBoxGuid - B5AF1D7A-B8CF-4EB3-8925-A820E16B687D, SmramBuffer - 0x76F4900= 0, Length - 0x36F6 SmmLockBoxSmmLib SaveLockBox - Exit (Success) SmmLockBoxSmmLib SaveLockBox - Enter LockBoxGuid - 627EE2DA-3BF9-439B-929F-2E0E6E9DBA62, SmramBuffer - 0x76F4800= 0, Length - 0x18 SmmLockBoxSmmLib SaveLockBox - Exit (Success) SmmLockBoxSmmLib SetLockBoxAttributes - Enter SmmLockBoxSmmLib SetLockBoxAttributes - Exit (Success) [ 0.000000] Linux version 4.9.0-6-amd64 (debian-kernel@lists.debian.org)= (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.8= 2-1+deb9u3 (2018-03-02) [ 0.000000] Command line: BOOT_IMAGE=3D/install.amd/vmlinuz console=3Dtt= yS0,115200 [ 0.000000] Intel Spectre v2 broken microcode detected; disabling Specul= ation Control ``` Is this related to the SMM fatal errors? It's occurring here https://github= .com/tianocore/edk2/blob/14923c1a6bf9940b48feeaf47cb5d6c662b6528c/MdeModule= Pkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c#L829 There a lot of function calls and I can't print a stack trace. If this is related to the SMM errors, any advice on how to fix them? If not= , I guess it's off to the Debian mailing lists. Regards, Hristo Mihaylov