* [PATCH -mm -v4 0/3] i386/x86_64 boot: 32-bit boot protocol
@ 2007-10-09 6:40 Huang, Ying
2007-10-09 19:23 ` H. Peter Anvin
0 siblings, 1 reply; 4+ messages in thread
From: Huang, Ying @ 2007-10-09 6:40 UTC (permalink / raw)
To: H. Peter Anvin, Andi Kleen, Eric W. Biederman, akpm, Yinghai Lu,
Chandramouli Narayanan
Cc: linux-kernel
This patchset defines a 32-bit boot protocol for i386/x86_64 platform,
adds an extensible boot parameter passing mechanism, export the boot
parameters via sysfs.
The patchset has been tested against 2.6.23-rc8-mm2 kernel on x86_64
and i386.
This patchset is based on the proposal of Peter Anvin.
Known Issues:
- Where is safe to place the linked list of setup_data? Because the
length of the linked list of setup_data is variable, it can not be
copied into BSS segment of kernel as that of "zero page". We must
find a safe place for it, where it will not be overwritten by kernel
during booting up. The i386 kernel will overwrite some pages after
_end. The x86_64 kernel will overwrite some pages from 0x1000 on.
- The fields in zero page are fairly complex (such as struct
edd_info). Is it necessary to document every field inside the first
level fields, until the primary data type? Or is it sufficient to
provide the C struct name only?
- Which fields of boot parameters should be exported directly in
sysfs? Export all fields of boot parameters in sysfs is too complex
and unnecessary. Which fields should be?
-v4
* Reserve setup_data and boot parameters for accessing during
runtime.
* Export boot parameters via sysfs.
-v3
* Move hd0_info and hd1_info back to zero page for compatibility.
-v2
* Increase the boot protocol version number
* Check version number before parsing setup data.
* Revise zero page description according to the source code and move
them to zero-page.txt.
Best Regards,
Huang Ying
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -mm -v4 0/3] i386/x86_64 boot: 32-bit boot protocol
2007-10-09 6:40 [PATCH -mm -v4 0/3] i386/x86_64 boot: 32-bit boot protocol Huang, Ying
@ 2007-10-09 19:23 ` H. Peter Anvin
2007-10-10 1:03 ` Huang, Ying
0 siblings, 1 reply; 4+ messages in thread
From: H. Peter Anvin @ 2007-10-09 19:23 UTC (permalink / raw)
To: Huang, Ying
Cc: Andi Kleen, Eric W. Biederman, akpm, Yinghai Lu,
Chandramouli Narayanan, linux-kernel
Huang, Ying wrote:
>
> - Which fields of boot parameters should be exported directly in
> sysfs? Export all fields of boot parameters in sysfs is too complex
> and unnecessary. Which fields should be?
>
The main this is that since this is a fixed-format, ABI-defined
structure, regardless of individual fields it should be exported as a
binary object. That is also the only way to deal with a kernel which
may not itself know about specific items making the data available to
other users, like kexec.
It's not clear to me from reading the code what model you're using for
exporting this data in sysfs. Could you describe it in some detail?
What I had envisioned would be an object for the boot_params structure
and a systematic object for each linked-list object, at a very minimum.
-hpa
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -mm -v4 0/3] i386/x86_64 boot: 32-bit boot protocol
2007-10-09 19:23 ` H. Peter Anvin
@ 2007-10-10 1:03 ` Huang, Ying
2007-10-10 1:08 ` H. Peter Anvin
0 siblings, 1 reply; 4+ messages in thread
From: Huang, Ying @ 2007-10-10 1:03 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Andi Kleen, Eric W. Biederman, akpm, Yinghai Lu,
Chandramouli Narayanan, linux-kernel
On Tue, 2007-10-09 at 12:23 -0700, H. Peter Anvin wrote:
> Huang, Ying wrote:
> >
> > - Which fields of boot parameters should be exported directly in
> > sysfs? Export all fields of boot parameters in sysfs is too complex
> > and unnecessary. Which fields should be?
> >
>
> The main this is that since this is a fixed-format, ABI-defined
> structure, regardless of individual fields it should be exported as a
> binary object. That is also the only way to deal with a kernel which
> may not itself know about specific items making the data available to
> other users, like kexec.
>
> It's not clear to me from reading the code what model you're using for
> exporting this data in sysfs. Could you describe it in some detail?
>
> What I had envisioned would be an object for the boot_params structure
> and a systematic object for each linked-list object, at a very minimum.
>
OK. The directory structure is as follow:
+ sys + kernel + boot_params - version /* version of boot protocol */
- data /* binary file of boot_params */
+ setup_data + 0 - type /* type id of setup_data 0 */
- data /* binary file of setup_data 0 */
+ 1 - type /* type id of setup_data 1 */
- data /* binary file of setup_data 1 */
+ 2 - type
- data
...
Best Regards,
Huang Ying
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH -mm -v4 0/3] i386/x86_64 boot: 32-bit boot protocol
2007-10-10 1:03 ` Huang, Ying
@ 2007-10-10 1:08 ` H. Peter Anvin
0 siblings, 0 replies; 4+ messages in thread
From: H. Peter Anvin @ 2007-10-10 1:08 UTC (permalink / raw)
To: Huang, Ying
Cc: Andi Kleen, Eric W. Biederman, akpm, Yinghai Lu,
Chandramouli Narayanan, linux-kernel
Huang, Ying wrote:
> On Tue, 2007-10-09 at 12:23 -0700, H. Peter Anvin wrote:
>> Huang, Ying wrote:
>>> - Which fields of boot parameters should be exported directly in
>>> sysfs? Export all fields of boot parameters in sysfs is too complex
>>> and unnecessary. Which fields should be?
>>>
>> The main this is that since this is a fixed-format, ABI-defined
>> structure, regardless of individual fields it should be exported as a
>> binary object. That is also the only way to deal with a kernel which
>> may not itself know about specific items making the data available to
>> other users, like kexec.
>>
>> It's not clear to me from reading the code what model you're using for
>> exporting this data in sysfs. Could you describe it in some detail?
>>
>> What I had envisioned would be an object for the boot_params structure
>> and a systematic object for each linked-list object, at a very minimum.
>>
>
> OK. The directory structure is as follow:
>
> + sys + kernel + boot_params - version /* version of boot protocol */
> - data /* binary file of boot_params */
> + setup_data + 0 - type /* type id of setup_data 0 */
> - data /* binary file of setup_data 0 */
> + 1 - type /* type id of setup_data 1 */
> - data /* binary file of setup_data 1 */
> + 2 - type
> - data
> ...
>
Looks good to me.
-hpa
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-10 1:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-09 6:40 [PATCH -mm -v4 0/3] i386/x86_64 boot: 32-bit boot protocol Huang, Ying
2007-10-09 19:23 ` H. Peter Anvin
2007-10-10 1:03 ` Huang, Ying
2007-10-10 1:08 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox