Re: Question about the A20 line



You're most welcome :).

Ouch, its been awhile since I thought about all this.

The first half of your address designates a segment and the second half
an offset (segment:offset). So basically you have 65536 segments (FFFF)
with a maximum possible offset of 65536 (FFFF). The thing is that all
the segments overlap every 16 bytes (10h) (this is where the 1Mb limit
comes from (65536 * 16 = 1048576 = 1Mb)

And so you have 0001:0000 (1st segment offset 0)

which is the same as 0000:0010 (0th segment offset 16 which is
basically overlapping in the 1st segment offset 0)

Same with FFFF:0010 and 0000:0000

65536th segment offset 16 which overlaps into the next segment which,
in this case, is the *0th* segment offset 0 (there's the wrap around)

Are you making your own OS?

Regards
Jean-Francois Michaud

.



Relevant Pages

  • Re: Question about the A20 line
    ... code, second stage loader, kernel, without stealing or copying any code. ... > The first half of your address designates a segment and the second half ... > basically overlapping in the 1st segment offset 0) ... > 65536th segment offset 16 which overlaps into the next segment which, ...
    (comp.lang.asm.x86)
  • Re: [PATCH 5/7] Use %gs for per-cpu sections in kernel
    ... you need to subtract __per_cpu_start from the symbols to get a 0-based segment offset? ... the gs segment is set up based ... Since .data.percpu is part of the init data section, it starts at some address X, so the real offset into the actual per-cpu memory is actually ... large, and so this scheme pretty much relies on being able to wrap around the segment limit, and will be very bad for Xen. ...
    (Linux-Kernel)
  • Re: Projecting segment with normals
    ... > "point along the segment offset by an interpolated vector" in 3D. ... I am almost sure that it will not be a straight line segment. ...
    (comp.graphics.algorithms)