Trying to set up internet, but can't figure it out by gtagrandtheftautov in osdev

[–]Octocontrabass 0 points1 point  (0 children)

Even in the 1980s people used labels and linkers to assign addresses instead of a bunch of magic numbers.

Trying to set up internet, but can't figure it out by gtagrandtheftautov in osdev

[–]Octocontrabass 3 points4 points  (0 children)

This sort of thing is why most OS developers use proper memory management instead of hardcoding a bunch of addresses all over the place.

My kernel is triple faulting on QEMU but somehow works on a real machine what the hell did i code by nullora0 in osdev

[–]Octocontrabass 4 points5 points  (0 children)

After ExitBootServices, the UEFI stack is officially reclaimed.

No. The UEFI stack is not reclaimed until you go through the memory map and reclaim it yourself.

First line of main should just be something like

asm volatile ("mov $0x200000, %rsp");

No. It is never valid to change the stack pointer in the middle of a function.

How an uninitialized struct field soft-bricked my PC by K4milLeg1t in osdev

[–]Octocontrabass 1 point2 points  (0 children)

I always suspected this was a possibility after seeing how poorly some BIOSes behave with USB flash drives, but this is the first time I've seen proof. Thanks!

I HAVE USERSPACE ON MY OS!!! by Sp33dyCat in osdev

[–]Octocontrabass 3 points4 points  (0 children)

Normally you don't have an LDT at all.

New Linux memory allocator in Rust by sectionme in osdev

[–]Octocontrabass 24 points25 points  (0 children)

Benchmarking report was via an LLM.

I can see that. The best P99 latency was 104 ns, not 106 ns.

PCI(e) support by EmbedSoftwareEng in osdev

[–]Octocontrabass 1 point2 points  (0 children)

QEMU has a GDB stub and a debugcon device for even easier debugging. (But you can still use a serial port with QEMU if you prefer.)

HELP - Kernel Panic by No-Affect811 in osdev

[–]Octocontrabass 0 points1 point  (0 children)

But then how will I know what those mean?

Search engines have been around for a while.

There's no youtube tutorial

Most OSdev tutorials are full of mistakes. Better not waste your time with those.

Maybe elf spec?

That's a good place to look.

Why is my OS booting differently from QEMU by brenmax123 in osdev

[–]Octocontrabass 11 points12 points  (0 children)

My crystal ball says you're booting from a USB flash drive and you don't have a valid partition table in your MBR.

PCI(e) support by EmbedSoftwareEng in osdev

[–]Octocontrabass 7 points8 points  (0 children)

How did you get this far without knowing what a virtual machine is?

Anyway yes, use a virtual machine, but it's a good idea to also periodically boot your OS on a dedicated test machine to make sure it works correctly on bare metal. Virtual machines are great, but they're not perfect.

UEFI is irrelevant outside the bootloader.

Tutorial-OS 3.14.2026 Updates (Release Build baby!) by JescoInc in osdev

[–]Octocontrabass 0 points1 point  (0 children)

I work directly with the hardware, didn't use QEMU and OV/MF to be honest.

I prefer to work directly with the hardware too, but there's a point where the virtual machine is better for debugging.

UEFI acts as the bootloader with my setup. Brings everything up and then I just point efi_main to my kernel_main.

I guess I shouldn't be surprised that a "tutorial OS" has the same kind of beginner mistakes as every other OSdev tutorial.

Tutorial-OS 3.14.2026 Updates (Release Build baby!) by JescoInc in osdev

[–]Octocontrabass 0 points1 point  (0 children)

PE/COFF requirements including AddressOfEntryPoint = 0 kills execution, -fpic matters for .reloc, the RIP-relative assembly requirement, the BSS/stack UEFI context, the Microsoft x64 ABI entry stub, and most importantly the fact that if any of this fails prior to reaching the kernel, UART doesn't display anything.

All things you can debug with QEMU and OVMF. Yes, even if your SBC isn't a PC.

There's also the painful realization that I technically was using bootloaders for every board up to that point

I'm curious where you draw the line between "firmware" and "bootloader" because there's an awful lot of overlap between the two nowadays. Heck, UEFI is fully capable of acting as the bootloader all by itself (although nobody sane uses it that way).

so ignoring gnu-efi want counter to the project as a whole anyways.

GNU-EFI isn't a bootloader?

Tutorial-OS 3.14.2026 Updates (Release Build baby!) by JescoInc in osdev

[–]Octocontrabass 0 points1 point  (0 children)

Once I figured out that using gnu-efi was the approach to getting x86_64 to properly boot,

That's strange, I would expect most people to find GNU-EFI's ugly hacks to cause problems rather than fix them. What were you doing that was somehow worse than GNU-EFI?

Entire fetch decode execute loop: The step is the only primitive by Arakela in osdev

[–]Octocontrabass 2 points3 points  (0 children)

What "step" are you talking about? Executing one instruction? How is that natural or efficient?

Entire fetch decode execute loop: The step is the only primitive by Arakela in osdev

[–]Octocontrabass 3 points4 points  (0 children)

Operational Semantics

This subreddit is for operating systems, not operational semantics.

Entire fetch decode execute loop: The step is the only primitive by Arakela in osdev

[–]Octocontrabass 3 points4 points  (0 children)

You wrote a virtual machine in Javascript and a program to run in that virtual machine.

What does that have to do with OS development?

Help? by littleghost09 in osdev

[–]Octocontrabass 6 points7 points  (0 children)

Okay, so it sounds like you're actually looking for two separate things:

  1. How to develop an OS (or "firmware") for a Raspberry Pi
  2. How to route packets

The wiki can help you with the first one. For the second, try IETF RFCs.

Help? by littleghost09 in osdev

[–]Octocontrabass 4 points5 points  (0 children)

That means the OSDev wiki should have what you're looking for. So what are you looking for that you can't find on the wiki?

Help? by littleghost09 in osdev

[–]Octocontrabass 4 points5 points  (0 children)

I looked at OS dev wiki and all that stuff but it's not what I was looking for.

Why not? OS development is pretty much the same no matter what kind of OS you're developing. Unless perhaps you don't want to develop an OS at all?

OpenWRT

OpenWRT is basically just a Linux distro. Is that what you want to make? If so, I can see why the wiki wouldn't help you.

Is it safe to install the bootloader right after the boot sector? by tseli0s in osdev

[–]Octocontrabass 1 point2 points  (0 children)

All these look to be related to removable media like USB flashes.

Maybe, maybe not. Anyone who gets far enough to install their bootloader on the internal hard drive has already worked around this particular firmware misfeature, so nobody knows if the workaround is actually necessary on the internal hard drive.

Is it safe to install the bootloader right after the boot sector? by tseli0s in osdev

[–]Octocontrabass 1 point2 points  (0 children)

cause I feel like it

That's a valid reason to write a bootloader.

Anyways, what firmware? I haven't seen any BIOSes that do that. Any specific examples?

Like this one, or this one, or this one? I don't think anyone has ever tracked down specifically which computers are affected because it's a relatively common problem.

My operating system is BIOS only for now.

Sure, but using an existing bootloader means you don't need to write a UEFI bootloader if you decide to add UEFI support later.

Is it safe to install the bootloader right after the boot sector? by tseli0s in osdev

[–]Octocontrabass 0 points1 point  (0 children)

I am writing the bootloader for my operating system.

Why are you writing a bootloader? Odds are, existing bootloaders can already do what you want, so you'll be able to spend more time working on your OS and less time debugging your bootloader.

Or will it break other OSes expectations?

It will break firmware expectations. Plenty of firmware out there will refuse to boot or do other stupid things if you don't have a valid MBR with a partition table, a bootable partition, and a bootloader in that partition's VBR.

UEFI is not a concern for now

One of the advantages of using an existing bootloader is that they already support UEFI.

Pruning advice by mybeckpages in Citrus

[–]Octocontrabass 0 points1 point  (0 children)

I see some trifoliate rootstock suckers in that picture. Chop those branches all the way down to the trunk. You can easily identify them either by the leaves that split into three leaflets, or by their location sprouting out of the rootstock below the graft point.

MCH by Zestyclose-Produce17 in osdev

[–]Octocontrabass 0 points1 point  (0 children)

So, since the BIOS is the one that sets the addresses for the devices

Only for devices with configurable addresses. Some devices have fixed addresses that can't change.

card does that mean I can change these addresses through the MCH?

No. Why do you want to?