#EvalynOS

1 messages · Page 10 of 1

hazy saddle
rotund furnace
#

I have no c compiler

#

ugh

hazy saddle
#

@viral bison that CPUID is barely supported it seems

hollow crater
#

10th gen is too old now
insert "feel old yet?" meme

rotund furnace
hazy saddle
#

Thanks Intel

rotund furnace
#

nvm

hazy saddle
#

And other hoo rah for intel right @rotund furnace

rotund furnace
#

limited amd support

#

eax: 0x3
ebx: 0xab
ecx: 0x124f800
edx: 0x0

#

for leaf 0x15

rotund furnace
hazy saddle
#

Uhhh so what’s the math for thoes

#

I’m on mobile rn

hazy saddle
rotund furnace
#

598830 hz

hazy saddle
#

It should like be in HGz

#

GHz

rotund furnace
#

uhhhhhh

hazy saddle
#

Because the TSC runs at like GHz

rotund furnace
#

I added the calculation to my little test program

#

ecx * (ebx / eax)

#

and got

hazy saddle
#

I think it’s just fucking busted

rotund furnace
#

1094400000 hz

hazy saddle
#

That’s like 1ghz

rotund furnace
#

which is 1ghz

hazy saddle
#

I think

rotund furnace
#

which SEEMS accurate

hazy saddle
#

Yeah that sounds right fit that laptop

#

What does Linux say when it setups

#

I think it logs TSC calibration

rotund furnace
#

yep

#

tsc: detected 1094.400 mhz processor

#

and tsc deadline support

#

damn

#

intel does not play around with it's budget laptop chips

hazy saddle
rotund furnace
#

"kfence: initialized - using ... bytes for ... objects at 0x(____ptrval____)-0x(____ptrval____)"

rotund furnace
#

that's in dmesg

#

lmao

hazy saddle
#

Looks like it’s censored

rotund furnace
#

oh no root will know where the kernel mode fence objects are

#

better censor it

hazy saddle
#

I mean by default it does that for all pointers

rotund furnace
#

no?

#

yeah lmao

hollow crater
rotund furnace
#

the acpi table virtual addresses are in dmesg

rotund furnace
hollow crater
#

its also kinda more convenient?

hollow crater
#

kekw

hazy saddle
hollow crater
#

whats so funny is that the cpu knows the fucking ratio 💔

hazy saddle
#

Honestly just calibrate the fucking TSC with HPET or PIT

#

They aren’t going anywhere

hazy saddle
hollow crater
hollow crater
hazy saddle
#

Dosnt Linux just calibrate the TSC

marble ridge
#

you cannot rely on either of them existing

hollow crater
hazy saddle
#

Replaced by what?

#

The PIT and HPET?

marble ridge
#

mostly the TSC and APIC timer and ACPI timer

hollow crater
#

ooo

hazy saddle
#

true but they need calibration to work from other times

marble ridge
#

the ACPI timer does not need calibration and the TSC/APIC may not need calibration either depending on the CPU

hazy saddle
#

And trying to get the TSC frequency was being a little messy

mild glacier
#

evalyn do I make bad apple for my distro 🔥

hazy saddle
#

Kind of off topic rn but sure

mild glacier
hazy saddle
marble ridge
#

frankly i would exclusively use the ACPI timer for calibration if i were to make a new OS right now

#

unless you plan to support ACPI-less x86 machines (you don't)

hazy saddle
#

Huh interesting

#

What is the ACPI timer?

hazy saddle
rotund furnace
soft snow
marble ridge
#

i don't think you need AML parsing for the ACPI timer though?

rotund furnace
#

do you?

hazy saddle
#

You only need table parsing

rotund furnace
#

I have no idea

hazy saddle
#

Right?

rotund furnace
#

oh shit

#

sick

#

🔥

hazy saddle
#

It should be a table

marble ridge
hollow crater
hazy saddle
#

I guess it has a chance of non existing?

rotund furnace
#

yeah doesn't seem like it

marble ridge
#

it will exist on literally every x86-64 machine afaik

hazy saddle
#

I could do a fallback if ACPI to HPET to PIT to your fucked lol

rotund furnace
#

the software people can go and fuck themselves

marble ridge
hazy saddle
#

I mean my current system lets me chain them really easy

#

So it’s no biggie

#

If one fails it attempts the next and replaces function pointers for relavent services

marble ridge
#

like i am not saying there is a reason why it is bad to have the fallbacks - fallbacks are never bad, beyond the fact that it could be annoying to maintain

hazy saddle
marble ridge
#

nope

hazy saddle
marble ridge
#

troll

rotund furnace
#

"oh neat do those timers work"

#

"idfk"

hazy saddle
#

“They did when I coded them”

rotund furnace
#

yep!

#

tbf I just calibrate the apic timer with the pit chip rn

marble ridge
#

i mean thankfully hardware doesn't really change, if anything

rotund furnace
#

could I do better? sure

#

am I lazy as fuck? yeah

hazy saddle
#

@rotund furnace Once I finish my suite of timer drivers steal mine

rotund furnace
#

but it's mit :(

hazy saddle
#

Il give you a special exception as a friend that I won’t break your legs

rotund furnace
#

sick

hazy saddle
#

What is your licence?

rotund furnace
#

3bsd

hazy saddle
#

That’s compatible

rotund furnace
#

it is?????

hazy saddle
#

BSD0 may not be tho

#

It’s like the same thing

rotund furnace
#

oh it is

#

sick

#

nothing can stop me from stealing the code 🔥

hazy saddle
#

Just like include the licence in a comment on the header

#

🔥

#

Else this will happen

#

@marble ridge thanks for telling me about the ACPI timer. That should make it bullet proof I think in terms of timing devices along with PIT APIC HPET and TSC

hollow crater
#

told ya u will have a whole lot of timers at ur disposal trl

#

now drop pit

hazy saddle
rotund furnace
#

add acpi timer to the list of shit to procrastinate on

hollow crater
hazy saddle
#

You don’t know the work it took for me to make it work

rotund furnace
#

as well as usermode server discovery and dropping uacpi in kernel mode (no hard feelings just pretty overkill for just table parsing)

hazy saddle
#

And the ACPI parsing

rotund furnace
#

I wanna write my own acpi shit

#

because like why the fuck not

hollow crater
hollow crater
#

.name = "PIT, its just setting there for nostalgic reasons" KEKW

hazy saddle
#

Wdym?

hollow crater
#

o well i thought i can abstract timers through some common interface here
so i describe them with structures and then the backing clock source and so on
not sure if thats actually a good idea anyway but i was joking about some name field describing pit which would have that string trl

#

since
in ur case u are keeping it for the effort it took u to get it up and stuff xP

hazy saddle
#

I do

#

Function pointers

#

Whenever a timer or abstracted device is setup

#

It replaces the function pointers for it

#

I could do a struct

#

But I just have them plainly there

#

Because it’s the same shit

hollow crater
# hazy saddle <:PSP1G_pspTrollar:1434611394782691429>

i thought id like
have the functions for setting, changing modes, reading current value, eoi and so on as function pointer for each struct
and i store irq line, divisor, freq, and whether its active as members
but then never implemented a lot of that and got distracted away to do memory management stuff trl
but i thought it'd be cool to abstract them like that
tho its just not necessary since one mostly wont end up using most of them anyway
so like it solves no problem

#

while ur approach is just having global pointers and set them to what u will be using
which kinda makes more sense ig

#

:P

hollow crater
viral bison
#

idk if WSL is causing issues

hazy saddle
#

And then have functions to read or write them

#

Then change function pointers

hollow crater
hazy saddle
#

I don’t either PSP1G_pspTrollar

#

It’s just exported in the header file

#

And a varrible

#

Ezpz

#

If I get dynamic loading I may freshen it up a bit though

#

With some tips from others

hazy saddle
#

Legacy APIC driver complete

#

Also why does this laptop have two IOAPICs

#

Why does this cheap ass shit ass laptop have TWO

#

What could it even be using them all for

#

@rotund furnace @hollow crater

hollow crater
hollow crater
hazy saddle
#

And my desktop also has two

hollow crater
#

also have u made bad apple play with a sane framerate yet trl

hazy saddle
#

Which is unusual I guess because it’s also cheap and not a server

hazy saddle
#

That was just a fuckup with the timer calibration

hollow crater
hollow crater
#

well thats cool
im sure my shitty thing would break under 2 out of these 3 machines chad trl

hazy saddle
hazy saddle
#

Just hollow with a few things

hollow crater
hollow crater
hazy saddle
#

💀

#

No RGB

#

720p screen

#

Entirely made of plastic

#

Also came with a hard drive

#

My grandma gave it 16gb ram and an ssd though in 2015 🙏

hollow crater
#

then how 😭 😭

hollow crater
hazy saddle
#

The CMOS battery is dead

#

But it’s my childhood laptop

#

And I took good care of it

#

I played so much heavily modded Minecraft on that shit 🙏

hollow crater
#

😭 😭
well sure it does appreciate that care
u shall get pardoned at the 2067 agi genocide against humans trl

hazy saddle
#

I treat all my computers and devices with respect

#

And they respect me

#

@hollow crater when taking the USB stick out of the laptop I pushed it down and the thing froze for a second 💀

#

But like this is not a bad condition for a laptop from 2015 tbh

#

The battery was removed because it died

#

And I can’t find replacements online

mild glacier
hollow crater
#

shit runs evalynOS wdym unsupported device letsgo

hazy saddle
#

And any other 64bit platforms later

#

Also

#

I’m cooking up some ideas for a micro kernel

#

Once I get IPC and other stuff working in this one

#

I may build a microkernel off of the EvalynOS kernel

#

I’m gonna call it pwease

#

With

#

As the logo

#

Because it’s a micro kernel

hollow crater
rotund furnace
#

we can compete on who has the most mid microkernel

hollow crater
hazy saddle
#

Same for scheduling

#

I would have a fixed set of slots for core ųKernel threads

#

For core services

#

So like the file server would call up the memory server for some memory

#

@rotund furnace This is where my
Commit is at right now

mild glacier
mild glacier
#

struct window 🔥
idk why, but still

struct window {
  short xres;
  short yres;
  char layer; // when to get rendered
  unsigned char *buf;
}

prolly not guud

rotund furnace
#

okay so is this like in kernel mode

#

or user mode

rotund furnace
hazy saddle
#

I start on one thing and I do many

opaque marten
hazy saddle
#

Another HP laptop only has one

#

Though the one with two is AMD

#

My desktop also has AMD

hazy saddle
#

and all the legacy crap still works and gets all fallen back to

#

(tested by disabling ACPI parsing)

#

@hollow crater this also has the missing IOAPIC message PSP1G_pspTrollar

#

i also handle legacy PIC EOIs by just sending them whenever a legacy device IRQ is ran

#

regardless because the lesser speed isnt a biggie

hazy saddle
#

@rotund furnace you got a moment to test my iso

rotund furnace
#

what am I testing

hazy saddle
#

that the timers come up properly

#

and bad apple runs at proper speed

rotund furnace
#

what timers should come up?

hazy saddle
#

and a photo of the init text

hazy saddle
rotund furnace
#

and it #pfed on boot

hazy saddle
#

wha

#

i was having issues with ISOs not updating right

#

leme try this

#

@rotund furnace even the fuckin checkups diddnt match 💀

rotund furnace
#

wait

#

do you compile

#

with debug symbs on?

hazy saddle
#

yes

rotund furnace
#

it crashed on strncmp

hazy saddle
#

huh

rotund furnace
#

cool kpanic btw

hazy saddle
#

what CR2 does it fault on

hazy saddle
rotund furnace
#

hm

#

strncmp

#

the first param

#

HERE

#

acpi_parse_fadt

hazy saddle
#

same with new iso?

rotund furnace
#

I tracked the stack trace

#

no

#

testing it now

#

read from non present

#

with lines up

#

same

hazy saddle
#

gimme IP

rotund furnace
#

kpanic on boot

hazy saddle
#

this code should be fine?

#

whats where i strncmp

#

firmware giving bad data?

#

send a photo

rotund furnace
#
rip -> ffffffff80007880
ffffffff80005eb3
ffffffff80005e2d
ffffffff8000e0ef
ffffffff800012f4
ffffffff80001828
ffffffff80001025
ffffffff800062c6```
#

that's the whole trace

#

cr2 = rdi = 0xffff800075063000

#

still fadt parsing

hazy saddle
#

seems the firmware is giving bad data?

rotund furnace
#

hm

#

are your changes on codeberg rn

hazy saddle
#

no

rotund furnace
#

damn

hazy saddle
#

it is parsing the madt too

rotund furnace
#

could you put them on codeberg

#

even on a branch

#

or as a patch set

#

cuz I'm happy to debug this rn

#

I aint got shit else to do

hazy saddle
#

il make a patch whilst i cleanup some shit

rotund furnace
#

ty

hazy saddle
#

do you have other PCs to test?

rotund furnace
#

nope

#

other then my macbook

#

I don't have a monitor or powercable for my ewaste pc yet

#

sadly

hazy saddle
#

see what it gives

rotund furnace
#

again I'm happy to do so

hazy saddle
#

tyty

#

leme make the ascii logo for my micro kernel rq

rotund furnace
#

ugh

#

git thinks this patch doesn't apply

#

for some reason

hazy saddle
#

did you goto dev branch

#

its based off dev

rotund furnace
#

ye

hazy saddle
#

but i did it and il clean it up later

rotund furnace
#

sync dev to master is the latest right?

hazy saddle
#

no

#

wait i never pushed to berg

rotund furnace
#

😭

hazy saddle
#

its pushed there

hazy saddle
rotund furnace
#

how the fuck do I apply this

#

git apply huh.patch doesn't work

hazy saddle
#

huh

#

leme remake it?

rotund furnace
#

BRO

#

please

hazy saddle
#

what

rotund furnace
hazy saddle
#

💀

#

wtf

#

maybe this will help

rancid viper
#

lol

#

how are u creating the patch?

rotund furnace
#

okay

#

yeah

#

that one worked

hazy saddle
rotund furnace
#

so I have bad news

#

uh

#

it's crashing instantly

#

on like

#

the first acpi_find_sdt

hazy saddle
#

in qemu?

rotund furnace
#

real hw only

#

firmware must just be aids

#

uacpi handles it fine

hazy saddle
#

wait

#

is it acpi 1.0?

rotund furnace
#

nope

hazy saddle
#

no i do check for that too

#

leme find my USB

#

why tf do i use it as a fidget toy

#

btw what happens if you manualy craft a USB @rotund furnace

#

with the old method

rotund furnace
#

idk

#

cba tbh

hazy saddle
#

Yeah @rotund furnace The ISO works fine

#

The firmware is just shit it seems

#

@rotund furnace I wonder what UACPI does differently for table parsing?

rotund furnace
#

why are you assuming the xsdt's pointers are aligned

hazy saddle
#

@rotund furnace What happens if you skip the table parsing?

rotund furnace
#

they aren't

hazy saddle
rotund furnace
#

they are at byte 36 they can't be aligned

hazy saddle
#

Where

rotund furnace
#

vs uacpi

hazy saddle
#

it very much is fine here

rotund furnace
#

hm

#

wtf

hazy saddle
#

And if that was bad QEMU would fuck up

rotund furnace
#

yeah wasn't that

#

hm

#

wtf

hazy saddle
#

i do not check the checksums tho

rotund furnace
#

well I found ya problem

#

the first entry is at 75063000 but limine only marks 75049000-7504a000 and 7504b000-7505a000 as acpi tables

#

the next entry is at 75068000

#

sadly I cannot debug further as I must slumber

hazy saddle
#

I assume ųACPI maps it its self

rotund furnace
#

Yes

#

That’s why you give it vmm alloc and free

rotund furnace
hazy saddle
#

I could probably change it to check the length of tables and map them its self?

rotund furnace
hazy saddle
hazy saddle
#

But like it feels like an issue if limine isn’t detecting it right?

#

Guaranteed

#

I guess the protocol was violated

#

unless this is bad

rotund furnace
#

Hm idk

#

This is far above me

hazy saddle
#

It’s a firmware or some other fuckup

#

Limine does have some more recent commits about ACPI it seems?

gentle void
#

you do not want to map acpi tables as RW

hazy saddle
#

I can change that and should

#

But it does at least work technically PSP1G_pspTrollar

gentle void
#

also, have you tried booting any other os with limine on that?

hazy saddle
#

It is @rotund furnace S laptop

#

Thier kernel boots but uses uacpi for tables

#

Which I assume traverses memory differently

#

Eg mapping the tables its self vs just using it like this

#

With HHDM

gentle void
#

that's only meant to access static tables

hazy saddle
#

I am only touching static tables

#

I don’t do any AML

#

Just FADT HPET and whatever the one is for APICs

#

And it works on every other device

gentle void
#

is this an old device

hazy saddle
#

I think so trl

#

That’s why I suspect shit firmware or some such

hazy saddle
hazy saddle
# marble ridge what's the full memory map?

I think water fell asleep. I have a MMAP command in my kernel “shell” that can print it if they disable the ACPI parsing or just pull up another kernel that can provide the limine one

mild glacier
#

and i got a friendly welcoming panic 💀

mild glacier
mild glacier
hollow crater
hazy saddle
#

No picture no crash

hazy saddle
rotund furnace
#

give me like

#

a bit

hazy saddle
#

Run MMAP

#

Take a photo

#

Il copy it for you

#

I have nothing better to do rn

rotund furnace
#

lemme try the limine test kernel rq

#

cuz I wonder

#

oh

#

it doesn't really parse shit

hazy saddle
#

It would atleast print out the memory map right

rotund furnace
#

figured out the problem

#

you're code is cooked

#

also the limine memory map on this system is cursed as fuck

#

but that shouldn't be an issue

#

some how this causes it to miss the page

hazy saddle
#

Damn

hazy saddle
hazy saddle
rotund furnace
#

it prints so much 😭

hazy saddle
#

Shouldn’t it be align down for the base?

rotund furnace
#

RESERVED
ACPI_TABLES
RESERVED
ACPI_TABLES
RESERVED
ACPI_TABLES
RESERVED
ACPI_TABLES
RESERVED
ACPI_TABLES
RESERVED
ACPI_TABLES
RESERVED
ACPI_TABLES
[... repeat ALOT...]

hazy saddle
hazy saddle
#

That’s fucking corded

#

Cursed

rotund furnace
#

here is what I do

hazy saddle
#

" I have a firm belief that most firmware developers are not actually humans, but are instead caged rodents fed a solid diet of crack cocaine. Because that would explain a lot."

#

whatever the fuck that shit is crazy

hazy saddle
#

should just be masking the 0xFFF bits nvm

rotund furnace
#

I'll send a patch in a bit

#

wait

#

lemme test it first

hazy saddle
rotund furnace
#

still dies

#

hmmm

hazy saddle
#

that iso or your patch?

rotund furnace
#

that iso

hazy saddle
#

it is being properly made now tho

#

@rotund furnace that memorymap is still so cursed as fuck

#

leme test sold older limine versions

#

version 10.0.0 fully locked up?

#

1.3.0 boots

#

leme make an iso with it

#

wait idk if that works for that

rotund furnace
#

what the fuck

#

every time

#

I write this iso to a usb

hazy saddle
#

huh

rotund furnace
#

it happens at 875mb/s

#

and doesn't do shit

#

linux!!!

hazy saddle
#

💀

#

run sync

#

sync

rotund furnace
#

I always use sync

hazy saddle
#

tf

rotund furnace
#

okay

#

so I just wrote your os

#

plug in the drive

#

JUST KIDDING

#

it booted mine

#

what the fuck

hazy saddle
#

btw

hazy saddle
#

depending on how large they are

rotund furnace
#

ehhh

#

maybe

#

that's for mint to decide

#

anyway

rotund furnace
hazy saddle
#

it has pros and cons at the very least

rotund furnace
#

cuz I gotta test something

hazy saddle
#

mark as esp/boot

#

unzip it on there

#

so it looks like this

rotund furnace
#

HUH????

hazy saddle
#

wuh

rotund furnace
hazy saddle
#

use gparted

#

make new parition table

#

gpt

#

its formated as a single iso458oo3u8o parition or whatever

rotund furnace
#

I don't know how do use gparted

#

nor do I have it installed

hazy saddle
#

its easy af

rotund furnace
#

istg

#

linux keeps fucking being stupid with usb drives

#

every fucking time

#

[reboot]

hazy saddle
#

when i get USB il make sure it works well 🙏

#

i also plan a hypervisor at some point

#

With IOMMU support of I can help it

#

So even if my kernel is fucking shit you can atleast game on it with GPU passthrough VMs

rotund furnace
#

bro

#

istg

hazy saddle
#

What

rotund furnace
#

the partition table just came back from the dead

hazy saddle
#

💀

rotund furnace
#

okay

#

now fdisk worked

hazy saddle
#

Your firmware may just be shit

rotund furnace
#

what the fuck

#

doesn't happen on windows btw

#

and now dd works

#

sometimes

#

linux just stops syncing to usb sticks

#

IT'S ALIVE

hollow crater
rotund furnace
#

nope

hollow crater
#

weird

rotund furnace
#

lemme make a patch rq

hazy saddle
#

Did it actually work though

rotund furnace
#

yes

hazy saddle
#

Damn

#

Was that my ISO?

rotund furnace
#

I gotta disable the idisplay and capture card it via hdmi

hazy saddle
#

What other changes did you make

rotund furnace
#

lemme remove my debugging shit and I'll send a patch

hazy saddle
#

Is it a patch over my patch?

rotund furnace
#

yes

hazy saddle
#

I wana see how cursed the memory map is

rotund furnace
#

i lwk just kinda ported my vmm init code

#

and it worked

#

BRO

#

WHY IS THE SCREEN

#

SO DAMN GLOSSY

#

ts pmo

#

hold on

hazy saddle
#

I wonder if I can get a minimal sub set of it going

#

For just the bug

#

Otherwise it may be better for me to commit

#

And then for you to make a PR with the improvements

rotund furnace
#

there

hazy saddle
#

sorry for doubting you mint yaaar

rotund furnace
#

& badapple works

hazy saddle
#

Zamm

rotund furnace
#

okay

hazy saddle
#

How is doom

rotund furnace
#

do not run doom and badapple at the same

hazy saddle
#

Wdym

rotund furnace
#

I had both doom

#

and badapple

#

running at the same time

#

on top of eachother

#

but yeah doom did work

hazy saddle
#

Get me that memory map

rotund furnace
#

ugh

hazy saddle
#

I wana see that cursed shit in all its glory

rotund furnace
#

LMAO

#

your limine memmap to string function doesn't work

#

for ACPI_TABLES

hazy saddle
#

Damn

#

Let me fix that

rotund furnace
#

not shown are the entries that go off the screen 😭

hazy saddle
rotund furnace
#

only like

#

4-5

hazy saddle
#

qemu memory map for reference

rotund furnace
#

that are uninteresting

#

lenovo sucks at firmware

#

let's just shove all acpi tables

#

1 page apart

#

BUT

#

also kinda nice

hazy saddle
#

that firmware looks like they emebeded the crack inside the the fucking bios chip

rotund furnace
#

because in theory you can guard page in between

#

¯_(ツ)_/¯

hazy saddle
hazy saddle
#

It’s reclaimable anyways

#

Just gave it be zeroed memory but not show it in that fuck ass map

rotund furnace
#

it's all gonna be acpi tables anyway

hazy saddle
#

That way if somthing goes wrong you get null pointers

#

Instead of whatever the fuck that shit is

rotund furnace
#

if mint wants to do what all os devs eventually have to do

#

which is clean up after the firmware guys

#

then sure

hazy saddle
#

i mean this isnt too bad to clean up after to merge repeated sections like that

#

also i was refering to the firmware devs

#

not mint

rotund furnace
#

oh my god

#

there are gaps in the memory map

hazy saddle
#

what

rotund furnace
#

of like 4 bytes

hazy saddle
#

😭

rotund furnace
#

it goes

#

START, LEN OF TABLE
START + LEN OF TABLE, SOME ADDRESS ABOVE - SOME VALUE
SOME ADDRESS ABOVE - SOME VALUE BUT PAGE ALIGNED, LEN OF TABLE

rotund furnace
#

the lenovo firmware devs doing lines before writing code istg

hazy saddle
#

Just to stop that fucking shit

rotund furnace
#

nope

hazy saddle
#

Wdym?

rotund furnace
#

because what if two memory map regions cross a page boundary

hazy saddle
#

Have a mixed type

rotund furnace
#

shit would break so quick

rotund furnace
#

PLEASE NO

#

WHAT

hazy saddle
#

And then for that type there is a pointer to get the sub types

#

Sorry I’m thinking like a Lenovo firmware dev

rotund furnace
#

ohhh

#

that makes alot of sense

hazy saddle
#

Yeah yeah

#

That way for HHDM you can just go broadly

#

But if you need to be precise you have the sub mappings

#

And you don’t have stupid page issues

#

And you have less messes of that in the main memory map

rotund furnace
#

eh

#

maybe

hazy saddle
#

Or have it be an option on the request for page aligned?

#

That way you can ask for it if it dosnt matter much

#

And give priorities to certain types

rotund furnace
#

who knows bro

hazy saddle
#

Nobody

rotund furnace
#

that's for smarter people to decide

hazy saddle
mild glacier
#

is this a "500 quadrillion bytes off" error again 😭

hazy saddle
#

also in QEMU??

#

fuck kinda dlags are you using

#

i dont even use QEMU with the iso

mild glacier
rotund furnace
#

qemu with iso works fine for me

mild glacier
hazy saddle
#
    qemu-system-x86_64 \
        -machine q35,accel=kvm,smm=on \
        -cpu host,+x2apic,+invtsc \
        -m 512M \
        -cdrom ./evalynOS.iso \
        -boot d \
        -audiodev pa,id=speaker -machine pcspk-audiodev=speaker \
        -serial stdio
#

use that

mild glacier
hazy saddle
#

it works for me

mild glacier
#

🤦‍♂️

hazy saddle
#

though for some reason that breaks acpi in qemu PSP1G_pspTrollar

#

@rotund furnace

mild glacier
#

holy shit backspace is so close to enter 😭

rotund furnace
#

it works for me

#

OJKHASWFHJKLO AFHNJLK AFSKHJ

hazy saddle
#

i have to use OVMF

#

otherwise no ACPI

rotund furnace
rotund furnace
#

hm

hazy saddle
rotund furnace
#

yeah

hazy saddle
#
    qemu-system-x86_64 \
        -machine q35,accel=kvm,smm=on \
        -cpu host,+x2apic,+invtsc \
        -m 512M \
        -drive if=pflash,format=raw,readonly=on,file=./OVMF_CODE.4m.fd \
        -drive if=pflash,format=raw,readonly=on,file=./OVMF_VARS.4m.fd \
        -cdrom ./evalynOS.iso \
        -boot d \
        -audiodev pa,id=speaker -machine pcspk-audiodev=speaker \
        -serial stdio
#

yeah i diddnt before

rotund furnace
hazy saddle
rotund furnace
#

oh lmao

hazy saddle
#

so no shit theres no ACPI when there is no firmware

rotund furnace
#

seabios my guy?

hazy saddle
#

🤷‍♀️

rotund furnace
#

yk

#

I have no idea where the acpi tables are on a real pc

#

or in qemu

#

are they in the bios rom?

#

I assume so

hazy saddle
#

ig seabios yeah

rotund furnace
#

in that case it's qemu's job

hazy saddle
#

ig they dont provide acpi?

#

this is a lil ??

rotund furnace
hazy saddle
#

?????

#

what revison do you get

rotund furnace
#

uacpi info RSDP 0x00000000000F6500 00000014 v00 (BOCHS )

hazy saddle
#

maybe its a qemu thing?

#
    qemu-system-x86_64 \
        -machine q35,accel=kvm,smm=on \
        -cpu host,+x2apic,+invtsc \
        -m 512M \
        -cdrom ./evalynOS.iso \
        -boot d \
        -audiodev pa,id=speaker -machine pcspk-audiodev=speaker \
        -serial stdio

try this with my iso?

rotund furnace
#

no

#

you are just being stupid

#

acpi 1.0 is rev 0

#

and you just ignore it

hazy saddle
#

i dont have acpi 1.0 support

rotund furnace
#

exactly

#

seabios only gives you acpi 1.0

hazy saddle
#

yeah im dumb

rotund furnace
#

no rsdt support?

#

damn

hazy saddle
#

isnt like every x86-64 computer acpi2 anyways

rotund furnace
#

just support it tho

#

it's like

hazy saddle
#

the spec came out before x86-64

rotund furnace
#

no extra work tbh

hazy saddle
#

PSP1G_pspTrollar true

#

just some fucking extra if elses

#

but like

#

Advanced Configuration and Power Interface Specification Version 2.0 – Published Jul. 27, 2000 (1.5 MB)

#

CMON

#

@rotund furnace if sombody finds a machine thats x86-64. with only acpi 1.0. in real life

#

i will bake them a fucking pie

#

and ship it to them

#

and il fix it myself

#

else talk cheap send patches

rotund furnace
#

fuck you

#

because now you know I gotta fix it

hazy saddle
#

XD

rotund furnace
#

how the fuck did you even boot non uefi

hazy saddle
#

I removed the OVMF lines

#

Everyone has ACPI 2.0+ dipshit, it came free with your fucking x86-64 computer.

I didn't get it, I have the oldest x86-64 known to man.

rotund furnace
#

yeah but removing them makes the cdrom not boot

hazy saddle
#

What

#

It works for me

#

Do you have limine installed

rotund furnace
#
tcg:
    ./src/build-scripts/get-deps
    ./src/build-scripts/apply-patches.sh
    make clean
    ./src/build-scripts/generate-all.sh
    make all -j${nproc}
    ./src/build-scripts/undo-patches.sh
    cp ./bin-x86_64/kernel.elf ./src/generated/iso/kernel.elf
    ./src/build-scripts/generate-iso.sh
    qemu-system-x86_64 \
        -machine q35,accel=tcg \
        -m 512M \
        -drive format=raw,file=fat:rw:./src/generated/iso \
        -boot d \
        -audiodev pa,id=speaker -machine pcspk-audiodev=speaker \
        -serial stdio```
hazy saddle
#

So it can do the BIOS pass on the iso

hazy saddle
hazy saddle
#

That method turns a folder into a virtual partition

#

Which is fancy

rotund furnace
#

fuck you

hazy saddle
rotund furnace
hazy saddle
marble ridge
#

did you people figure out the issue?

mild glacier
rotund furnace
#

they were mapping the hhdm wrong by ALIGN_UP the base and ALIGN_DOWN the size, instead of ALIGN_DOWN the base, ALIGN_UP the size

rotund furnace
marble ridge
#

welp

#

i guess it wasn't a rare Limine bug after all :p

hazy saddle
marble ridge
#

well that's "intended" behaviour

#

that firmware must be storing ACPI tables in a reserved entry, so when Limine converts it to ACPI tables entry, it splits it up like that, if the tables aren't contiguous

hazy saddle
#

Oh no that’s fair. Just a lil cursed so no wonder it broke a few things.

#

Sorry for wasting your time

marble ridge
#

no worries lol

#

i mean technically-correct-but-cursed edge cases are good for sorting bugs out

hazy saddle
#

I wonder if there is a better way to handle that in the bootloader to make it look less like that.

But yeah they are really good for that

marble ridge
#

there are options

#

the main issue is that the firmware decided to store ACPI tables data in a reserved region

#

most modern UEFI firmware will store those in an ACPI reclaimable region

#

where then this does not happen as the bootloader won't need to convert any types

hazy saddle
#

What is a reserved region? I assumed it was invalid region

rotund furnace
#

doesn't have to be I assume

marble ridge
#

it depends, it can literally be anything

rotund furnace
#

there is LIMINE_MEMMAP_BAD_MEMORY

#

which I assume is for "invalid" memory

#

(nothing is gonna stop you from reading/writing to it tho)

marble ridge
#

from the kernel's perspective one might as well treat reserved and bad memory the same

rotund furnace
#

reserved memory also contains shit like mmio

#

sometimes

marble ridge
#

that being the same as memory holes not covered by any entry altogether

marble ridge
#

but not always

#

often mmio is not covered by any entries at all

rotund furnace
#

yeah

#

which I guess is reserved

#

I treat it all the same (aka don't map it)

hazy saddle
#

So basically it’s just old firmware jank there isn’t a clean way to work arround

marble ridge
#

for now yes

#

you can assume that

rotund furnace
#

and mmio is mapped itself

hazy saddle
#

I wonder if overlapping memory map regions could help?

marble ridge
#

Limine kind of avoids creating overlapping regions at all, they are only passed if the firmware itself creates them, and only sometimes

#

another solution would be to pad out ACPI tables regions to 4k for base and length and then hope that the regions will coalesce

#

another option is to use base revision 3 with doesn't have this problem at all but then you need to map ACPI tables yourself :p

hazy saddle
#

Are ACPI table memory mappings made by firmware or limine its self

marble ridge
#

ACPI table entries are a base revision 4 meme

#

made by Limine if the firmware doesn't already cover the tables in the other 2 ACPI regions

hazy saddle
#

Wouldn’t it make more sense for them to still be HHDMd but their memory entitled to be part of the RDSP request and allow them to overlap with the other part potentially but have them be page aligned!

marble ridge
#

idk i'll think about a solution, if anything, and let you know

marble ridge
#

feel free to ping me with ideas if you get any

hazy saddle
mild glacier
rotund furnace
#

wait

#

how the fuck does limine map the rsdt entries in the hhdm

#

does it also ident map

rotund furnace
#

because they are uint32_t's

#

oh I'm stupid and misread the protocol

#

whoops

hazy saddle
rotund furnace
#

no I was tripping

#

I misread the spec

hazy saddle
#

@rotund furnace Still seems to be working on deck

#

Although the first attempt it almost gave me a seizure because the OLED panel freaked the fuck out

rotund furnace
#

😭

hazy saddle
#

It did not happen after that

#

I think it’s a thing the steamdeck can just kinda do 🥀

#

With like slightly buggy OS stuff even on Linux

#

If it happens again il try and take a video

mild glacier
#

help no work ;-;

hazy saddle
#

maybe read the documentation

#

and in this world there is no help

#

bad apple is BADAPPLE and doom is DOOM

mild glacier
#

the BADAPPLE extra low tones literally hurt my ears

#

noted: stacking 3x BADAPPLE causes a page fault KEKW

rotund furnace
#

run badapple and doom at the same time

#

🔥

hazy saddle
#

It’s because it renders off the frame buffer

#

Which is?

mild glacier
hazy saddle
#

Invalid memory

#

It’s a page fault

#

I just don’t handle it yet

mild glacier
hazy saddle
#

@rotund furnace Shit I need to commit soon

#

I think the code is all good clean and ready tho right?

#

Also @mild glacier if you get a bigger monitor three will work just fine as on this laptop

hazy saddle
#

The iso will default you to 720p

mild glacier
#

oh

#

well that's some full terms and conditions (in hindi) :/

#

to be clear

hazy saddle
#

There is a reason it does that

#

Because I use 1080p monitors

#

And I don’t want my QEMU taking up the entire screen

#

So it defaults to 720p

mild glacier
hazy saddle
#

looks good to merge right @rotund furnace

hazy saddle
#

i think im going to do a beta1-rc1 release once i redo the PMM Heap and VMM stuff and get a user shell without janky systemcalls

#

may not be a CoW though]

#

it may or may not have the disk drivers though

#

that may come on beta2

#

and rc1 will be removed depending on bugs found

hazy saddle
#

timers are all up and pushed

#

May publish this as a release on my git server but it’s not worth it

#

Plus I have nitro so I can abuse discord as a file server

hazy saddle
#

dosnt make sense to have them on git since its not "nightlys" but just archives

mild glacier
#

how do you make the sound tho
i neeed to take notes

hazy saddle
#

wdym

mild glacier
#

how does EvalynOS create audio
the beeps and boops of Bad Apple

hazy saddle
#

read source code

mild glacier
#

🤦‍♂️

#

agh

hazy saddle
#

I use the PC speaker

#

The driver is really simple

soft snow
#

it is.

hazy saddle
#

And you can see how the things gets called

#

The source code is really simple and self documenting for the most part

mild glacier
hazy saddle
#

What command are you using

#

Wait miss read

mild glacier
#

uhh im lost in the /src directory 😭

#

nvm

#

nvm im actually still lost, this time in /src/kernel/drivers KEKW

hazy saddle
#

/src/kernel/drivers/x86_64/pcspkr.c

mild glacier
#

well uhh you have pcskpr.h and pcspkr.c

hazy saddle
#

Yes

mild glacier
#

skeaper

hazy saddle
#

Those are the functions use to drive the pc speakers

mild glacier
hazy saddle
#

Who cares

mild glacier
#

🤷

hazy saddle
#

Il do a pass of spelling mistakes later

#

But it’s just internal code names

#

It dosnt matter

#

There are way more spelling mistakes elsewhere e