lkml.org 
[lkml]   [2021]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 09/20] signal/vm86_32: Replace open coded BUG_ON with an actual BUG_ON
Linus Torvalds <torvalds@linux-foundation.org> writes:

> On Fri, Nov 12, 2021 at 1:23 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> But I could see some quick test hack doing it - the IVT at boot is
>> actually not at zero, but at fffxxxxx. 8086 is magic.
>
> .. and it's been too long, and I'm too lazy to check - it may be that
> vm86 mode doesn't even do that magic boot-time address thing.
>
> It's not like we really care about vm86 mode any more, since pretty
> much nobody users it.

As I recall at boot CS == 0xffff0000 EIP == 0x0000fff0 and the cpu is in
16bit mode. Which means the cpu runs the instructions in the last
16bytes of memory at boot up. Which is just enough for a jump somewhere
else. Such as 64K backwards where there is enough space to actual have
enough code to do something.

I don't think vm86 even attempts to emulate that behavior as it is only
concerned about 16bit only cpus and emulation.

In the nobody cares camp I have just sent you a pull request to remove
the ancient (except it wasn't a BUG_ON) and problematic test in the
BUG_ON.

I think that is enough to resolve this.

Eric

\
 
 \ /
  Last update: 2021-11-12 22:44    [W:0.261 / U:1.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site