From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web09.4279.1654158914713208785 for ; Thu, 02 Jun 2022 01:35:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DO0UGz8T; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654158913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/78xyAJrsu0yWPcTRm8wSJGVZxHgbA9zMC4Q9uS+RYs=; b=DO0UGz8TaFYJ8WESmDmM/RBDNB0WJlR4VStNU2c3YesqboIyTeJlG+Lfp7NX/pFs0xyOL2 OHEjNNisfkesjIiitV0xAga9UwDTbRoUxsR0ObuaawkTyMhhvtLz6GwBMDlv8PQ1pyISHA 0OCHwQyF4CDg++9kG2j/y4CLKjGjwiU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-356-U1qL-2EaPpO6WeeYNmDBeQ-1; Thu, 02 Jun 2022 04:35:07 -0400 X-MC-Unique: U1qL-2EaPpO6WeeYNmDBeQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 317431C16B48; Thu, 2 Jun 2022 08:35:07 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.194.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 01E8F40EC005; Thu, 2 Jun 2022 08:35:06 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5001618000B2; Thu, 2 Jun 2022 10:35:05 +0200 (CEST) Date: Thu, 2 Jun 2022 10:35:05 +0200 From: "Gerd Hoffmann" To: Benjamin Doron Cc: devel@edk2.groups.io Subject: Re: [edk2-devel] [PATCH 00/12] Introduce Bootlog DEBUG() output Message-ID: <20220602083505.dfyb5pmchbe5rgkp@sirius.home.kraxel.org> References: <20220601093352.hx4w447n7myc7re6@sirius.home.kraxel.org> <30076.1654102720972535874@groups.io> MIME-Version: 1.0 In-Reply-To: <30076.1654102720972535874@groups.io> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > > Hmm. Maybe it's time to tackle the log performance problem for virtual > > machines? Create a debug log device with DMA support, so we don't need > > a vmexit for every single character we want log? > > Of course, that doesn't work for native systems. Yep. Maybe we should have both ;) > > How does that relate to coreboot? coreboot has logging-to-memory too. > > Not sure what the state is, there have been discussions on the coreboot > > list about changing that from a pure text log to something structed with > > timestamps a while back. Don't know whenever this did actually happen. > > > > So, when adding logging-to-memory to edk2 it surely make sense to > > coordinate that with coreboot, so we'll have both coreboot and edk2 logs > > there in case edk2 runs as coreboot payload. > > I'm working on getting a SerialPortLib that logs to CBMEM merged. It's on the list at the moment. > Some comments on DebugLibBootlog: > - SMM-phase logging can be implemented, but I'm not convinced that sharing DXE's buffer is entirely safe. Using SMM communicate could be safer, but would be more complicated. I stopped working on it when the return-on-investment was too low. DebugLibBootlog supports multiple buffers. So we could have one for coreboot, one for edk2 pei/dxe, one for edk2 smm, one for shim, one for grub, ... take care, Gerd