From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 19 04:48:05 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A350B1065694; Thu, 19 Aug 2010 04:48:05 +0000 (UTC) (envelope-from osharoiko@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5A34C8FC1C; Thu, 19 Aug 2010 04:48:05 +0000 (UTC) Received: by iwn36 with SMTP id 36so1635508iwn.13 for ; Wed, 18 Aug 2010 21:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=m4p8wBHGITzyD1LHb6QdAPMqIh3ChJE0c4hs/FCm8CY=; b=I57TydMml7Tmi8cxAKquChL/PL9IqcMtFaQyI4T7wQiqa+w5QRm5/0IaGjAnpHqaTz NRQnKXKg96qjMdqm80vVYt1X69slRzB2kMaD4yt5kZ4PX80LNE2i2/uwzDtENva3tKPH riPmXKpQpYDYx7/0+6Y6POojaBv6yQQdX19cs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=osQA0X1L/HZb3l4IxtFraEaJqMMljiTixaZr7HpEGzJDrRhUBI668w9hoEF24gXDro w0R6C8j6pCMrhAxrCunFhtQNU/B8y++JsNAIPAUyHpODjwe6O34QT/ZwBxEevtpMhv41 cPGbcwxmlO9Q2BnqtICNykDr/fz0rF/srfwAY= MIME-Version: 1.0 Received: by 10.231.30.75 with SMTP id t11mr7673053ibc.27.1282193284649; Wed, 18 Aug 2010 21:48:04 -0700 (PDT) Received: by 10.231.185.7 with HTTP; Wed, 18 Aug 2010 21:48:04 -0700 (PDT) In-Reply-To: <201008161422.01541.jkim@FreeBSD.org> References: <201008161422.01541.jkim@FreeBSD.org> Date: Thu, 19 Aug 2010 08:48:04 +0400 Message-ID: From: Oleg Sharoyko To: Jung-uk Kim Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Christian Zander Subject: Re: PCI config space is not restored upon resume (macbook pro) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2010 04:48:05 -0000 On 16 August 2010 22:21, Jung-uk Kim wrote: > In theory, we can shadow video ROM and execute it in emulation *iff* > it actually contains x86 real mode code. =C2=A0It won't be too hard but I > am not sure whether it is worth trying. =C2=A0Are you sure the option ROM > is actually real mode code but not shadowed again after resume? Sorry, I guess I wasn't clear enough. There is no VGA ROM at 0xc0000 after resume. In patches for linux loader (which I've mentioned in previous message) they search for ROM, then copy it into memory, execute and install at proper address. This is possible during boot, but I don't think this can be done after resume. And, moreover, I tend to agree that this isn't worth trying as this is very specific to macboocs only (AFAIK). By the way, do you think it could be possible to dump option ROM contents into a file before suspending the system and then load it back on resume from userland? I've seen a userland tool in ports (sysutils/vbetool) which can execute VESA BIOS functions. So, I guess, it could be possible to try to call POST using saved ROM dump, but I don't know if it's possible to stick this ROM image into memory "forever" and for all processes. --=20 Oleg Sharoyko