Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756957AbbFPW1v (ORCPT ); Tue, 16 Jun 2015 18:27:51 -0400 Received: from mga02.intel.com ([134.134.136.20]:17324 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754764AbbFPW1p (ORCPT ); Tue, 16 Jun 2015 18:27:45 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,628,1427785200"; d="scan'208";a="589146698" Message-ID: <1434493541.2353.97.camel@spandruv-DESK3.jf.intel.com> Subject: Re: [PATCH, DEBUG] x86/32: Add small delay after resume From: Srinivas Pandruvada To: "H. Peter Anvin" Cc: Ingo Molnar , mingo@redhat.com, tglx@linutronix.de, pavel@ucw.cz, rjw@rjwysocki.net, x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Denys Vlasenko , Andy Lutomirski , Borislav Petkov , Brian Gerst , Linus Torvalds , "Kleen, Andi" Date: Tue, 16 Jun 2015 15:25:41 -0700 In-Reply-To: <55809616.80204@zytor.com> References: <1434066338-6619-1-git-send-email-srinivas.pandruvada@linux.intel.com> <20150612060747.GA25024@gmail.com> <1434125724.2353.19.camel@spandruv-DESK3.jf.intel.com> <20150613071547.GA27446@gmail.com> <1434384627.2353.47.camel@spandruv-DESK3.jf.intel.com> <55809616.80204@zytor.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1421 Lines: 46 On Tue, 2015-06-16 at 14:33 -0700, H. Peter Anvin wrote: > On 06/15/2015 09:10 AM, Srinivas Pandruvada wrote: > >> > >> So is it true that we always execute wakeup_pmode_return first after we return > >> from the BIOS? > >> > >> If so then the BIOS touching DS cannot be an issue, as we re-initialize all > >> segment selectors, which reloads the descriptors: > >> > >> ENTRY(wakeup_pmode_return) > >> wakeup_pmode_return: > >> movw $__KERNEL_DS, %ax > >> movw %ax, %ss > >> movw %ax, %ds > >> movw %ax, %es > >> movw %ax, %fs > >> movw %ax, %gs > >> > >> # reload the gdt, as we need the full 32 bit address > >> lidt saved_idt > >> lldt saved_ldt > >> ljmp $(__KERNEL_CS), $1f > >> > > Where does the GDT get initialized? In wakeup_start During acpi_sleep_prepare we set a 32 bit FW waking vector which points to wakeup_start. Thanks, Srinivas > > -hpa > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-pm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/