[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F65016F6CB04E49BFFA15D4F7B798D998BA8303@orsmsx506.amr.corp.intel.com>
Date: Mon, 11 May 2009 22:26:11 -0700
From: "Cihula, Joseph" <joseph.cihula@...el.com>
To: Ingo Molnar <mingo@...e.hu>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
"hpa@...or.com" <hpa@...or.com>,
"andi@...stfloor.org" <andi@...stfloor.org>,
"chrisw@...s-sol.org" <chrisw@...s-sol.org>,
"jmorris@...ei.org" <jmorris@...ei.org>,
"jbeulich@...ell.com" <jbeulich@...ell.com>,
"peterm@...hat.com" <peterm@...hat.com>,
"Wei, Gang" <gang.wei@...el.com>,
"Wang, Shane" <shane.wang@...el.com>
Subject: RE: [RFC v3][PATCH 2/2] intel_txt: Intel(R) TXT and tboot kernel
support
> From: Ingo Molnar [mailto:mingo@...e.hu]
> Sent: Friday, May 08, 2009 2:58 AM
>
> * Joseph Cihula <joseph.cihula@...el.com> wrote:
>
> > + /* if we're being called before the 1:1 mapping is set up then just
> > + return and let the normal shutdown happen; this should only be
> > + due to very early panic() */
> > + if (!tboot_pg_dir)
> > + return;
>
> Please use the customary comment style:
>
> /*
> * Comment .....
> * ...... goes here:
> */
>
> specified in Documentation/CodingStyle. Please fix this in all other
> multi-line comments in your patch as well.
Will do.
> > + if (shutdown_type == TB_SHUTDOWN_S3) {
> > + tboot_shared->num_mac_regions = 3;
> > + /* S3 resume code */
> > + tboot_shared->mac_regions[0].start =
> > + PFN_PHYS(PFN_DOWN(acpi_wakeup_address));
> > + tboot_shared->mac_regions[0].size =
> > + PFN_UP(WAKEUP_SIZE) << PAGE_SHIFT;
> > + /* AP trampoline code */
> > + tboot_shared->mac_regions[1].start =
> > + PFN_PHYS(PFN_DOWN(virt_to_phys(trampoline_base)));
> > + tboot_shared->mac_regions[1].size =
> > + PFN_UP(TRAMPOLINE_SIZE) << PAGE_SHIFT;
> > + /* kernel code + data + bss */
> > + tboot_shared->mac_regions[2].start =
> > + PFN_PHYS(PFN_DOWN(virt_to_phys(&_text)));
> > + tboot_shared->mac_regions[2].size =
> > + PFN_PHYS(PFN_UP(virt_to_phys(&_end))) -
> > + PFN_PHYS(PFN_DOWN(virt_to_phys(&_text)));
> > + }
> > +
> > + tboot_shared->shutdown_type = shutdown_type;
> > +
> > + switch_to_tboot_pt();
> > +
> > + ((void(*)(void))(unsigned long)tboot_shared->shutdown_entry)();
>
> shutdown_entry should probably have a proper function pointer type,
> to avoid this ugliness.
Since pointer types are different lengths depending on whether it is a 32b or 64b build environment, that would not allow a separately-compiled tboot to be used with both 32b and 64b kernels.
Joe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists