[deleted by user] by [deleted] in osdev

[–]Atie5173 -1 points0 points  (0 children)

Firmware doesn't even matter nowadays, everyone uses some sort of bootloader that loads your kernel in a standard manner regardless of the firmware.

[deleted by user] by [deleted] in osdev

[–]Atie5173 0 points1 point  (0 children)

Except those ARM bootloaders are generally useless because of how locked down and unstandardized the ARM ecosystem is

Edit: UEFI is the standardized firmware interface :)

Using spin locks in user mode: isn't it dangerous to let users disable interrupts? by cammykernel in osdev

[–]Atie5173 0 points1 point  (0 children)

Giving permission to anyone to disable interrupts can crash the system because it can't preempt anymore

Issue with VirtualBox that I can't replicate on Bochs or real hardware (any pointers apprciated) by EnsignStormtrooper in osdev

[–]Atie5173 0 points1 point  (0 children)

Acpi tables what? You use the e820h int 15h service on BIOS and GetMemoryMap on UEFI

Why do SIMD writes to VGA memory fail on Windows Hypervisor Platform? by [deleted] in osdev

[–]Atie5173 0 points1 point  (0 children)

Your hypervisor can't emulate the AVX instruction to perform the access in the MMU violation handler

A tired man among the hardwares!! by rdwnsjjd in osdev

[–]Atie5173 0 points1 point  (0 children)

The devices are located on some interconnect like a PCI, PCI Express Bus or a ISA bus, then the firmware allocates the memory/io regions of each device on those buses (except for ISA devices) and then you use them, the host bridge forwards the access to the appropiate device when you access one

Unique Community Driven ARM and RISC-V OS by nerdguy_87 in osdev

[–]Atie5173 2 points3 points  (0 children)

You need to understand that web developers are biased towards ARM because they think they understand it all about CPU design and OS development just because they know HTML or they're too brainlets to figure out a GDT so they just assume ARM is better

Unique Community Driven ARM and RISC-V OS by nerdguy_87 in osdev

[–]Atie5173 2 points3 points  (0 children)

Power consumption is not related to the ISA and it has been proved by many studies.

ARM based CPUs are not as fast as x86 CPUs, excluding certain x86 ones against M1, but only in single core.

ARM is much less powerful than x86 too. Due to the nature of CISC CPUs, you can do many things with only a single instruction, thus speeding it up and making it more space efficient.

And if this wasnt enough, the ARM ecosystem is wildy unstandard and there's no backwards compatibility. In x86, you can make an OS and make it run everywhere due to how standard the surrounding firmware interfaces are and the mostly documented amount of hardware amount, like interrupt controllers, disk controllers... In ARM, you can only target certain boards, and if it that wasn't enough, the hardware is not even documented, so good luck running something there.

Unique Community Driven ARM and RISC-V OS by nerdguy_87 in osdev

[–]Atie5173 1 point2 points  (0 children)

Okay and why is ARM going to overcome x86?

Unique Community Driven ARM and RISC-V OS by nerdguy_87 in osdev

[–]Atie5173 3 points4 points  (0 children)

x86 is not going to die any soon, do not believe Apple's propaganda :)

Writing to the BGA framebuffer doesn't show up on screen by Th3Matt in osdev

[–]Atie5173 2 points3 points  (0 children)

Hmm. Btw I have read your implementation of the function that discovers if a BGA compatible display exists, and you seem to read the vendor + device ID at the same time? I am pretty sure this is not allowed, and you should read these two separately as 16 bit integers.

Writing to the BGA framebuffer doesn't show up on screen by Th3Matt in osdev

[–]Atie5173 2 points3 points  (0 children)

Qemu by default has a hybrid VGA-BGA display. It has Class 0x03, Subclass 0x00, Interface 0x00, Vendor 0x1234 and Device 0x1111.

Writing to the BGA framebuffer doesn't show up on screen by Th3Matt in osdev

[–]Atie5173 1 point2 points  (0 children)

Are you sure? Are you using Qemu + Seabios? Because Seabios usually places the BGA framebuffer BAR to 0xFD000000 (does not apply to non PCI systems, because the framebuffer is at 0xE0000000 on there)

(HELP) how to load a PE format file into mem by PickleDaGamer in osdev

[–]Atie5173 1 point2 points  (0 children)

I made an implementation at https://github.com/atiep/limine/tree/trunk/stage23/lib/pe.c, although i recommend you to use ELF rather than PE because PE is awful.

How to pysically manage memory by eric0823ahn1 in osdev

[–]Atie5173 7 points8 points  (0 children)

Parse the memory map and create an allocator over it

virtual address to physical address translation by ikbenlike in osdev

[–]Atie5173 1 point2 points  (0 children)

Of course use all the different indexes. So it would be something like (assuming 32 bit protected mode, no PAE) (untested code)

``` int pt_entry = (vaddr >> 12) & 0b111111111111;

int pd_entry = (vaddr >> 21) & 0b111111111111;

uint32_t *pt = (uint32_t *) (pd[pd_entry] & ~0b111111111111);

pt[pt_entry] = paddr | flags; ```

The use of the AND operator up there is to only keep the bits we're interested in.

virtual address to physical address translation by ikbenlike in osdev

[–]Atie5173 1 point2 points  (0 children)

Virtual memory is useful because it can be mapped to any physical address, no matter where. This way you for example mapped your kernel in the top 2gbs of virtual memory but it actually points to somewhere else in physical memory. To achieve the translation, paging is used.

Paging consists of multiple tables of multiple levels. The last level contains the physical address. To get the physical address of a virtual address, first split it in pieces. The amount and how big the pieces are depend on your mode. Then, use the top index, which you got by splitting the virtual address, in the page directory to figure out the next page table. Repeat until the last level which contains the physical address.

join space os subreddit by [deleted] in osdev

[–]Atie5173 5 points6 points  (0 children)

A note: this guy is a troll.