From: <ole...@ce...> - 2004-11-03 13:54:17
|
Andi> On Wed, Nov 03, 2004 at 12:31:46PM +0100, ole...@ce... wrote: Andi> Or rather not apply this. I have no plans to support switch back Andi> to real mode on x86-64. It is just far too hackish and fragile. >> >> I agree that return to real mode is kind of *hackish* - but I do not >> agree that it has to be *fragile*. I'd like to repeat my general >> comments on the alternatives, not particularly connected to x86-64: Andi> I very much doubt it you can get it reliable because it's such an Andi> extremly intrusive operation. Why do you say so? As we're resuming from S3 sleep, we've just come out of real mode anyway, and we're just relying on the same mechanism to work twice. We need of course to be careful setting up the real mode environment and make sure it happens before SMP etc. Apart from that, there is nothing particularly "intrusive" about running known real-mode code. Andi> Either do it before switching to protected/long mode or later Andi> in a emulator. >> Properly supporting the "POST before switching to PM" would require a >> full real-mode bus/device resume. The ACPI specs doesn't even >> guarantee a working southbridge at real mode resume. Andi> Not sure what you mean with "working southbridge". I'm not really sure myself... I'm just trying to understand why the original s3_bios just plainly doesn't work on some machines. The ACPI specs only guarantee memory mapping Andi> If you need PCI why not call the PCI BIOS to initialize it Andi> first? I'm sure that could be tried... I'd guess this is the way Windows does it, initializing everything and the kitchen sink before even returning to PM. >> "Later in an emulator" is arguably safer than real mode. But the >> emulation needs to be done from kernel at the proper point in the >> resume sequence. Leaving it to the user-mode suspend/resume script >> is not an option. Andi> Why not? There is just too much stuff even in kernel space that depends on the graphics hardware behaving sanely. IMU, thrashing across a non-initialized adapter can and will hang a system. For everyone's sanity, it is just better to leave resuming hardware with the kernel. Ole |