oxidecomputer / phbl

Pico Host Boot Loader
Mozilla Public License 2.0
98 stars 7 forks source link

assembler: Comments and simplify. #40

Closed dancrossnyc closed 9 months ago

dancrossnyc commented 9 months ago

Simplify finding the GDT descriptor in real mode, and update comments.

Tested on sn14.

dancrossnyc commented 9 months ago

Ping?

daym commented 9 months ago

The assumption is $reset == 64 * 1024 - 16 (mod 65536) by linker arrangement, yes? Since the linker script does put reset explicitly at 0x000000007ffefff0 == 0xfff0 (mod 65536) that is fine.

dancrossnyc commented 9 months ago

The assumption is $reset == 64 * 1024 - 16 (mod 65536) by linker arrangement, yes? Since the linker script does put reset explicitly at 0x000000007ffefff0 = 0xfff0 (mod 65536) that is fine.

Yes. Also, since the address of the GDT is segment relative, and the segment is (architecturally) aligned on 64k boundary, using knowledge of the offset of reset is unnecessary.