Date: Mon, 16 Aug 2010 14:30:32 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: freebsd-hackers@freebsd.org Cc: Christian Zander <czander@nvidia.com>, Oleg Sharoyko <osharoiko@gmail.com> Subject: Re: PCI config space is not restored upon resume (macbook pro) Message-ID: <201008161430.44974.jkim@FreeBSD.org> In-Reply-To: <201008161422.01541.jkim@FreeBSD.org> References: <AANLkTikMFhG1QLDf4raf%2BrxOKhobjoA-dRbUew2-8KeF@mail.gmail.com> <AANLkTi=Yq_UTWpOiKR7=-_1mQfQOBBE_H16L_TpnDRdJ@mail.gmail.com> <201008161422.01541.jkim@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 16 August 2010 02:21 pm, Jung-uk Kim wrote: > On Monday 16 August 2010 12:46 pm, Oleg Sharoyko wrote: > > On 6 August 2010 08:15, Oleg Sharoyko <osharoiko@gmail.com> wrote: > > >> When using the NVIDIA driver, you will need to make sure that > > >> you're using 256.44, you'll need to be running X at the time > > >> of entry to S3/S4, and you'll need to make sure you've > > >> switched away from X's VT (this didn't happen automatically on > > >> FreeBSD last time I checked). > > > > > > I'll give 256.44 a try, but at first I'll try to fix bios > > > emulation issues. > > > > Sorry for a long delay - it has been a really busy week here. It > > does indeed works with 256.44 just the way you describe. Though I > > had a couple of strange lockups of ACPI subsystem, but I haven't > > had enough time to debug them. I guess other drivers could also > > work if only this wasn't a MacBook. FreeBSD can call BIOS reset, > > but it looks like this doesn't work with MacBook as it has no > > BIOS, and would require to copy video card BIOS into memory and > > execute it in emulation mode. I've seen such a code for linux > > loader (to boot linux in non-emulation mode), but I don't think > > it worth doing this on resume. > > I am glad to hear it helped. :-) > > In theory, we can shadow video ROM and execute it in emulation > *iff* it actually contains x86 real mode code. It won't be too > hard but I am not sure whether it is worth trying. Are you sure > the option ROM is actually real mode code but not shadowed again > after resume? FYI, you can add a printf() in sys/dev/fb/vesa.c > like this to verify, I think: > > if (x86bios_get_orm(0xc0000) == NULL) { > printf("No option ROM found\n"); > return (1); > } I forgot "where" to add it. It's in vesa_bios_post(). You need to replace: if (x86bios_get_orm(0xc0000) == NULL) return (1); with the above three lines. Just in case. :-) Jung-uk Kim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008161430.44974.jkim>