Conversation

@lunabee this is why i would never write a kernel for x86 u___u

2
0
0

@lunabee last year or possibly the year before that intel published a white paper in which they made noises about maybe possibly not having the processor boot in 16-bit mode anymore but i dunno if that's gone anywhere

0
0
0

@lunabee

And the original 16/20-bit memory segmentation scheme was absolute madness too. At no point in its history was x86 ever sane.

1
0
0

@lunabee @argv_minus_one

I take credit for designing a tiny piece of the Pentium architecture: the Virtual Mode Extensions (VME) documented in the infamous Appendix H. After implementing a VM86-mode virtual machine on the 386 I wrote a memo to Intel proposing a CPU enhancement to significantly improve the performance of VM86 virtual machines. Intel took it seriously and added my design into the Pentium.

This is the memo I wrote back in 1987:
https://github.com/DavidButterfield/Random/blob/master/Merge386/vm86_perf_1987-04.pdf

0
1
0

@lunabee i would consider risc-v or if i'm feeling ambitious aarch64

1
0
0

@argv_minus_one @lunabee

The four protection rings combined with task descriptors and IO port protections actually was really cool and would’ve made porting Multics to x86 relatively easy, OpenVMS too.

But nobody used those features, everyone just used rings 0 and 3 and TSS was ignored. IO ports aren’t used much because of their inherent limitations and hardware/bus design outgrew them for anything but configuration.

But there were some neat, if insane, things there.

0
0
0

@haskal ...wait why AM i writing a kernel for x86 and not risc-v

..

1
0
0
@lunabee 32-bit x86 is necessarily out of patent by now (it's too old)

Two protection rings are useful (0 and 3)
0
0
0
@lunabee See https://www.phoronix.com/news/Linux-6.9-More-X86S . And compared to spectre / meltdown issues, these are really... non-issues.
0
0
1

@lunabee you probably know this already, given how much you demonstrated you already know about x86 - but the keyboard controller hack isn't necessary anymore and even ages ago there were lots of other methods made to replace the keyboard controller hack. https://wiki.osdev.org/A20_Line#Fast_A20_Gate

also stuff like pc-98 didn't use the keyboard controller for that, although it had some other magic in its chipset for it with an I/O port.

0
0
0

@haskal @lunabee It really is pretty miserable. A few years back I ported xv6 from x86 to amd64 as an exercise to learn about the 64bit architecture and it was just full of these absurd headaches due to the backward compatibility to 32bit and then 16bit. Since then the xv6 folks have migrated their teaching kernel to RISC-V...

0
0
0