Alon Bar-Lev wrote:
On 8/28/06, Matt Domsch <[email protected]> wrote:No reason. I was just trying to be careful, not leaving data in the upper bits of those registers going uninitialized. If we know they're not being used ever, then it's not a problem. But I don't think that's the source of the command line size concern, is it?Since the cmd_line_ptr is 32bit, we can load the lower 16bits into si, ignoring the upper 16bits, or we can use esi for all references. I think using esi for all references is cleaner...
Bullshit. You're in 16 bit mode, and your segment limits are only 64K in size, so you HAVE to use a segment:offset type addressing:
Thus, you want to do something like this. movl cmd_line_ptr, %esi movl %esi, %eax shrl $4, %eax mov %ax, %es andw $0xf, %si... and then address it through es:si. Anything else is total, utterly and completely wrong.
-hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- From: Andi Kleen <[email protected]>
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- From: Alon Bar-Lev <[email protected]>
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- From: Alon Bar-Lev <[email protected]>
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- From: "Alon Bar-Lev" <[email protected]>
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- From: Matt Domsch <[email protected]>
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- From: "Alon Bar-Lev" <[email protected]>
- Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- Prev by Date: [PATCH 3/3] Add section on function return values to CodingStyle
- Next by Date: Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- Previous by thread: Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)
- Next by thread: [PATCH] Fix the EDD code misparsing the command line
- Index(es):