[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1myxbnpag.fsf@ebiederm.dsl.xmission.com>
Date: Wed, 01 Aug 2007 11:21:59 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: "Huang, Ying" <ying.huang@...el.com>
Cc: ak@...e.de, akpm@...ux-foundation.org,
Yinghai Lu <yhlu.kernel@...il.com>,
Randy Dunlap <randy.dunlap@...cle.com>,
Chandramouli Narayanan <mouli@...ux.intel.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/5] x86_64 EFI support -v3
"Huang, Ying" <ying.huang@...el.com> writes:
> On Mon, 2007-07-30 at 22:16 -0600, Eric W. Biederman wrote:
>> "Huang, Ying" <ying.huang@...el.com> writes:
>> > - The variable efi_enabled is used throughout across architecutres if
>> > CONFIG_EFI option is enabled. The i386 code also uses this variable.
>> > This is something that can be revisited with code consolidation
>> > across architectures.
>>
>> Fix it first. arch/i386/ efi support is horrible, and show what happens
>> when things are not done properly the first time. Later doesn't happen.
>> With the partvirt logic we have a lot of operations properly split out
>> already. Figure out how to use them.
>
> What do you suggest to use instead of efi_enabled?
>
> Current method is (efi_enabled based):
>
> (1) Encapsulate EFI based implementation and legacy BIOS based
> implementation into separate functions.
> (2) Define a wrapper function for each interface in (1), efi_enabled is
> used to choose implementation between EFI and legacy BIOS.
>
> Another possible method is (function pointer based):
Exactly. Which is what everything else in the kernel does and is
extensible.
> 1. Encapsulate EFI based implementation and legacy BIOS based
> implementation into separate functions.
> 2. Define a function pointer for each interface in (1), the function
> pointer is set to legacy BIOS based implementation by default and
> changed to EFI based implementation if appropriate.
>
> Because there are only two possible choice, I think the function pointer
> based method has no big advantages over the efi_enabled based method.
Not at all every hypervisor does these things differently as well,
so in the real world there are a lot of choices.
Eric
-
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