#uACPI - a portable and easy-to-integrate ACPI implementation

1 messages · Page 40 of 1

gentle peak
#

that sounds interesting

#

does ironclad have a website or where is this list located

lofty dragon
gentle peak
#

ah sick

strong heath
#

the list you gotta ask me

#

depends on whats there

calm latch
#

pmOS without UC stuff is faster on 5900X than on 13700 for some reason

gentle peak
#

probably the same locking stuff that proxima suffers from

lofty dragon
#

also #1006539285039697981

#

for ironclad talk

#

it also has a discord and a matrix but it has a very criminally underutilised channel here

#

let's not clobber this one

strong heath
#

Why does this have to happen, I have ACPI

gentle peak
#

seems to me like the first error cascaded into the other ones

strong heath
#

@fiery turtle do you happen to know where VDID actually is? I was checking it at offset 2 in the PCI config space, but it doesnt seem like enough

gentle peak
#

@lofty dragon if you're still available to test, i moved around some ordering stuff and suddenly the performance jumped from 7M to 8.5M so i figured it's worth testing on intel as well

lofty dragon
#

about 6.5/6.6

#

good improvement

gentle peak
#

that's a lot of improvement for simply moving save_disable_irq from before enable_preempt to after

#

sometimes i do not understand why the things i do improve performance

lofty dragon
#

lmao

gentle peak
#

this was supposed to just be cleanup

lofty dragon
#

the arcane art of optimisation

fiery turtle
#

Vdid is just the vendor id field

#

Why do u even care btw

#

Just return Fs if you believe this device doesn't exist

#

Or trust the firmware and do what it tells you to do

strong heath
#

returning Fs is disguting

#

I am just checking VDID manually for it

fiery turtle
#

What was you workaround attempt

gentle peak
#

dealing with firmware is disgusting

fiery turtle
strong heath
#

I am reading the PCI config space

gentle peak
#

offset 0 is vendor id

strong heath
#

checking for FFFFFFFF in the stuff

fiery turtle
strong heath
#

yeah, in the search function

fiery turtle
#

And what do u do if its FFs

strong heath
#

I return the mockup

fiery turtle
#

That should work

strong heath
#

yeah I was just asking you the offset

#

because it wasnt 2

gentle peak
#

when does the mockup return Fs?

strong heath
#

turns out its 0x100

fiery turtle
strong heath
#

what do you mean no

frank canopy
#

no its 0

gentle peak
#

the vendor id is at offset 0

frank canopy
#

the vendor id offset is always 0

fiery turtle
#

Vendor ID is the first field

strong heath
#

huh

#

well that does make it simpler

frank canopy
#

0x100 would imply youre accessing the wrong device i think

fiery turtle
#

BTW you dont have to care about which field, reading from any field of a non existent device will return Fs

frank canopy
#

for port io access that is

gentle peak
frank canopy
#

also before i forget, @fiery turtle INFO (uacpi): successfully loaded 1 AML blob, 1708 ops in 1ms (avg 1504436/s) new number for imaginarium when i turn uncacheable to false like its supposed to have been lol

#

mightve already sent, im very forgetful today

#

but may as well get it in text since if i did before it was a screengrab

fiery turtle
#

Kvm off 7M is impossible

#

What are you measuring?

fiery turtle
#

Oh nvm

#

Uncacheable false means cacheable

frank canopy
fiery turtle
#

Yeah ikr

frank canopy
#

500x speedup way bigger than i was expecting tho

fiery turtle
#

Wait I thought it was a legal iso from ci

gentle peak
#

apparently not

fiery turtle
#

Daaamn

#

Dreams shattered

gentle peak
#

CI is currently building a legal iso which i will test once it is done (usually takes ~20m)

kindred beacon
#

bruh

fiery turtle
slim panther
green valve
#

My uacpi_kernel_get_nanoseconds_from_boot impl was calculating the current timestamp wrong, that does explain the >100M ops/s with KVM on lol

fiery turtle
#

indeed

strong heath
#

your kernel is just slow

#

100M is archievable

green valve
fiery turtle
#

thats not bad

gentle peak
fiery turtle
#

back to the old score ig?

gentle peak
#

slightly better and more consistent but yeah

fiery turtle
#

yeah

#

oh well

gentle peak
lofty dragon
#

7.1

#

🎉

gentle peak
#

still lower than i'd like considering many kernels are much faster on your cpu than mine but it's definitely a great improvement

lofty dragon
#

streaks should try this first though, on his faster 13900KS

#

my 12900 is slower

gentle peak
#

oh is it?

lofty dragon
#

of course

gentle peak
#

i thought 12900 was better than 5800x

#

ah you were saying in comparison to 13900ks

strong heath
#

sorry my qemu lost the ability to run with smm off

#

I cannot run your OS anymore

#

unlucky

gentle peak
#

this one doesn't break with smm

lofty dragon
#

it's 8.4

gentle peak
#

damn

#

on the 13900ks or?

lofty dragon
#

yes

gentle peak
#

also do you have an exact number so i can put it in the lb submission

lofty dragon
#

no @strong heath please send a screenshot

strong heath
mortal yoke
#

Ill also post my thing here in case someone else wants to test meme

gentle peak
strong heath
#

I wont

#

I have stuff to do

#

ill get to it later

fiery turtle
#

damn

#

streaks with nasa cpu

lofty dragon
#

command line?

gentle peak
#

the one i used was qemu-system-x86_64 -accel kvm -cpu host,migratable=off -M q35,smm=off -cdrom image.iso

lofty dragon
#

6.5

#

you can extrapolate how fast it would be on streaks's CPU based on mine

#

without bothering him

#

and it will very very very likely be extremely accurate

mortal yoke
gentle peak
#

assuming linear, 7.7M on 13900KS

#

actually the type of scaling doesn't apply here since it's only 2 datapoints anyway

lofty dragon
#

now i am double curious to double check the result but for getting the last one out of him i was literally screamt at so loud that my ears hurt so

gentle peak
#

so just "assuming the bottlenecks are the same as for proxima"

mortal yoke
#

idk why does the score vary so much tho, like if mint got 6.5 and I think I have also seen that myself (but with an even lower score like 5M or whatever)

mortal yoke
#

and sometimes I get something stupid like 10M lol

strong heath
#

idk who hurt you to do this but get a psychiatrist

mortal yoke
#

its a font that staticsaga sent at some point lol (iirc at least)

gentle peak
#

the font isn't that bad imo the main issue is the double newlines

mortal yoke
#

thanks for testing it tho

mortal yoke
frank canopy
#

what is the ideal cache type for what uacpi maps btw?

#

rn im using writethrough

dense steppe
#

WB is sufficient on x86 because of MTRR

frank canopy
#

oh cool

dense steppe
#

no... cursed because IMO caching should be explicit

frank canopy
#

lmao

#

agreed but also makes it easier imo

dense steppe
#

but there's no easy way to get the correct caching mode to apply to a memory range on x86, besides maybe getting attributes from the EFI memmap

frank canopy
#

RIP

dense steppe
frank canopy
#

i mean you can probably read the MTRRs

#

but also

dense steppe
#

double cursed

frank canopy
#

yeah

gentle peak
#

obviously prefer the attributes from EFI mmap if available but it's a decent fallback

#

or on x86 scan the mtrrs but at that point just map as wb

lofty dragon
#

the last thing you said is unironically brain damage sorry lol

#

if anyone does that they are just doing things to look smart

lofty dragon
#

i don't think it should ever map anything from a usable entry though

#

are you sure you didn't mean reserved/non-present-in-memmap?

#

where you map that as UC and you map the ACPI reclaimable as WB?

gentle peak
# lofty dragon usable?

I meant wb when usable or reclaimable, UC otherwise - of course, acpi should never touch usable memory, but wb is the correct memory type for it and you never know what crazy firmware dev hacks you might have to accommodate

dense steppe
#

if AML tries to access anything within usable, kill it.

lofty dragon
#

i don't think it should ever ever ever touch usable entries

#

that's insanity

#

like literally kill it

fiery turtle
#

aml can map acpi reclaim memory

#

and acpi nvs memory

#

both are normal ram

lofty dragon
#

yeah

#

those are WB

fiery turtle
#

ye

gentle peak
#

idk I wouldn't be surprised if there's systems out there that try to detect the os by some magic signature that it happens to put in a fixed location in physical ram

dense steppe
#

like maybe you can be lenient and allow it access into <1M usable regions that the kernel otherwise doesn't use

fiery turtle
#

i mean linux allows aml to map itself

gentle peak
#

it's awful and please kill it but it's out there probably

fiery turtle
#

as RO

dense steppe
gentle peak
fiery turtle
dense steppe
#

I currently only reserve like the zeropage

#

as in

#

page zero

lofty dragon
#

ok so map ACPI NVS/reclaim as WB, usable as WB/RO (forced), any other region as UC

gentle peak
#

I don't even do that

gentle peak
#

if the bootloader tells me a page is usable I will use it

mortal yoke
#

or just map everything as wb and let it be handled by the mttr's

dense steppe
lofty dragon
#

no

#

that's just fancy shmancy bs

#

too fancy for me, waste of time (do it if you want idc lol)

gentle peak
#

it doesn't do anything except maybe indicate firmware bugs (wrong setup of mtrrs)

lofty dragon
#

yeah in which case it's not like you can do much anyways

dense steppe
#

it is better to be aware of firmware bugs than to keep yourself in the dark.

#

like

gentle peak
#

but even that is dubious since memory map based detection will almost certainly falsely mark some regions with a more restrictive cache mode than necessary

dense steppe
#

at least you can scream at the firmware devs

lofty dragon
#

btw RE: why some people ignore memory below 1M: i guess because GRUB and not trusting the BIOS/more primitive bootloaders

#

any proper sane bootloader with a spec like e.g. Limine's will guarantee things that don't take into account below or above 1M

#

so you shouldn't really care either

gentle peak
#

makes sense

fiery turtle
#

daily limine ad complete trl

#

but yeah true

lofty dragon
#

i mean i assume it's the same for Hyper and Ultra

fiery turtle
#

it is

#

it allocates backwards from max phys anyway so i doubt u would see anything below 1m allocated

#

but its marked as loader reclaim

lofty dragon
#

Limine allocates itself below 1M on BIOS + the SMP trampolines

fiery turtle
#

oh yeah hyper also allocates itself

#

nvm

torpid root
#

@fiery turtle pleadyeehaw

fiery turtle
north holly
fiery turtle
#

i have tons of stuff scheduled for the leaderboad now

#

btw ironclad should be added too now or?

fiery turtle
lofty dragon
fiery turtle
#

5M not enough? trl

lofty dragon
fiery turtle
#

ah sure

hallow marten
kindred beacon
#

@fiery turtle you haven't posted about the 1.0 release in the osdev.org thread

fiery turtle
#

True

#

Idk if anyone even looks there tbh

#

But I should anyway

kindred beacon
#

yeah there were two recent replies

fiery turtle
#

Oh yeah? Haven't looked there in months lol

fiery turtle
kindred beacon
#

obligatory mlibc shilling included

strong heath
#

I have fixed all timing innacuracies in Ironclad

#

and the score stabilized at 5 million

#

it does get very slow on real hardware though, because the allocator behaves much better in small bursts

surreal current
#

what was causing them

strong heath
#

from 5 million to 1

#

TSC innacuracies and bad calibration code

#

TSC is a mess for wallclock, I just moved it to default to HPET for those usecases

strong heath
slim panther
strong heath
#

yeah

#

but that is because of my code

slim panther
#

hm

#

weird because on real hw im around twice as fast

median crest
#

I mean it depends on the aml it runs

slim panther
#

similar amount of ops

#

1900

#

i think

median crest
#

Yes but different ops probably

strong heath
#

thing is, as I said, Ironclad's slowest link is the allocator

#

and its because its bursty with the latest changes ive done

#

so smaller AMLs -> less allocations

#

less allocations -> shorter loads

#

real machine AML is much much bigger, thus it gets slower

median crest
#

Damn ironclad got 5 mil

#

I should ask infy to remove astral this is EMBARASSING my score is so low I gotta lock in 😭

median crest
slim panther
median crest
#

So true

#

Did infy do any big perf improvements on 1.0 I havent tested in so long

strong heath
median crest
#

Oh

#

Have you written anything about the funny seal os anywhere Im curious about what you do

strong heath
#

I do talks about the OS regularly in big events

#

if you are curious about the internals its a good starting point

median crest
#

Epic Ill look into it at some point

#

Right now I am in "alarm set to 2 hours from now" territory which means I should probably sleep

strong heath
#

good night mate

fiery turtle
#

You really cant compare the runtime of two completely different aml programs lol

#

Like it can literally call sleep() and your score will go down

slim panther
#

lmao

fiery turtle
#

I'll probably add this comment in pci_device_open

#

might be a bit too verbose but

#

at least it explains well why it's needed

slim panther
#

i forget, is uacpi-rs a thing yet

left orbit
#

i dont believe so

#

i think there was an attempt by @\shinribo or smth

#

idr the username

fiery turtle
slim panther
#

ah

#

i'll use bindgen for now then

fiery turtle
#

it's linked in pins

slim panther
#

thx

rustic compass
#

im working on it

fiery turtle
#

no more 99999999999999999999 ops/s

left orbit
#

it will not print the stats if timer returns bad values?

fiery turtle
#

yup

left orbit
#

noooooooooo

#

how will i surpass proxima now

fiery turtle
#
static int invocation = 1;
return invocation++;

trl

dense steppe
#

1705 ops in 0ms (avg 1705000000000/s) letsgo

torpid root
#

this post was fact checked by real osdevers: true

lofty dragon
#

Vinix will be #1 just you wait :^)

dense steppe
#

I'm sorry, I cannot let you do that god

fiery turtle
#

depends on your current rev

median crest
fiery turtle
#

yeah dunno

#

i was gonna update astral anyway

#

soon ™️

median crest
#

I will continue working on astral soon™️

#

If the urge to rrwrite doesnt overcome me

fiery turtle
#

what do u want to change?

median crest
#

Mostly just fix the unreadable code and actually make good designs

fiery turtle
#

well ngl sounds tempting

#

if u unfuck the build system as well

median crest
#

Yeah

#

It would take so long to get back to where I am which sucks but eh

#

Especially now that I dont have as much free time as a a year ago

fiery turtle
#

yeah

median crest
#

I would probably snatch some more recent stuff over like the new locking code

fiery turtle
#

yeah you could probably copy over a lot of things

#

just rewrite what actually matters

median crest
#

Yeah Ill think about it more and see if its something I really wannaa do

vast kestrel
#

Is there any aarch64 board with full acpi? And not just hardware reduced acpi?

#

Also can you configure qemu with full acpi?

fiery turtle
#

not to my knowledge

#

full acpi is only x86 and itanium afaik

vast kestrel
#

When running on hardware reduced do I need to choose it at compile time, or would uacpi compiled without the ifdef still work?

north holly
#

you need the compiler define iirc

kindred beacon
#

@slim panther was pumped about getting some aarch64 board with UEFI today, I don't recall whether it had ACPI tho

#

orion o6 has ACPI afaict?

#

not sure whether it's hw reduced or not

vast kestrel
#

I think it might be nice to have runtime support for both hw reduced and full acpi if it's not too much. I think the fadt has a detection bit for it no?

gentle peak
#

I'm pretty sure the define is for when you want a uacpi version that's only capable of handling reduced hw, and the full version can still handle reduced hw machines

vast kestrel
#

I see, nice

slim panther
#

it came today

#

ill hop on vc tonight

kindred beacon
#

based

slim panther
#

70,34€ taxes

kindred beacon
#

bruh

calm latch
slim panther
#

yes

#

need to solder the pins

#

but otherwise yes

fiery turtle
left orbit
#

the define is there to compile out non-hw-reduced stuff i assume

#

so if you know you will only run on reduced acpi hardware you can use that?

fiery turtle
#

Yeah just so you can strip some code on aarch64 etc

left orbit
#

aarch64 is hw reduced?

#

cringe

fiery turtle
#

Yeah

left orbit
#

what does that even mean

fiery turtle
#

No events and stuff like that

left orbit
#

oh

#

so cringe

#

got it

fiery turtle
#

Yup

left orbit
#

but u still get power states and shit

fiery turtle
#

Nothing stops them from shipping a full acpi implementation I think tho

left orbit
#

u can suspend, sleep and all

fiery turtle
#

There just hasn't been one yet Iirc

fiery turtle
left orbit
#

nice i see, thanks

fiery turtle
#

Np

vast kestrel
#

All I asked for is an acpi timer for calibrating the systick 😔

flat badge
#

On arm, you can usually just get the timer frequency from the dt

#

Doesn't acpi have an alternative mechanism for that?

hollow elm
flat badge
#

Ah i see

hollow elm
#

cntfrq_el0

vast kestrel
#

Yeah but I hate dt

vale isle
#

timebase-freq

#

does acpi have a mechanism for that in risc-v? afaik there's no other way to get that

gentle peak
#

yes

#

it's in rhct iirc

fiery turtle
#

Just implemented "support" for the cursed Unload opcode, which has been deprecated and removed quite a long time ago, but now at least it won't be treated as invalid, and will instead be a no-op

median crest
#

stop being a COWARD and unload the table smh

fiery turtle
#

this is what ACPICA does

#

and then proceeds to actually unload the objects

#

so if you have a reference to some node you will just UAF it

median crest
#

Unload( GDT )

fiery turtle
#

Unloading GDT... SUCCESS

sterile egret
fiery turtle
#

yeah, it uses some esoteric operation region types

loud ice
fiery turtle
#

at least it logged a warning right

kindred beacon
fiery turtle
#

"vacation" trl

vast kestrel
fiery turtle
#

thats why my PR hasnt been reviewed in a month i guess

sterile egret
#

Lmao

hollow elm
#

lol my friend has a laptop where linux fails to shut down due to acpi shenanigans

#

seems to be stuck in an infinite loop with a Stall(118) in the middle since acpica complains about the stall time exceeding the maximum

dense steppe
#

Unironically I think my 2024-ish desktop (a damn good computer) has ACPI problems. Last time I tried, reboot didn't work. It just kinda gets stuck somewhere. Shutdown works fine though.

#

Note that this was on Linux/ACPICA and not a hobby kernel/uACPI or whatever. I'm unsure if NT reboot works.

dense steppe
fiery turtle
calm latch
#

you can try pmOS trl

#

though it has a major timers/scheduling issue atm, so it might be broken on its own so potentially not representative

hollow elm
#

not gonna bother him with this now

#

but i just found it funny that you can apparently fuck up shutdown

#

it shouldn't surprise me since it's arbitrary aml and yet it did

sterile egret
#

What's the status of uAPI?

fiery turtle
#

marvin is the "maintainer" of uAPI

#

so u should probably ask in the uDRM thread

urban galleon
#

Yeah on my system76 system linux entered an inf loop when trying to suspend to ram

vale isle
#

an infy loop???

median crest
#

Red circle red arrow surprised face exclamation mark exclamation mark

slim panther
slim panther
#

made asserts not be there in release mode

median crest
#

I should do that some day

north holly
#

is Astral secretely an assertos clone???

#

exposed!!!

slim panther
#

assertpilled

median crest
#

if you disable asserts it wont work

north holly
#

that sounds bad

median crest
#

because I do som,e things like assert(shitpiss_init() == 0)

north holly
#

now that I remember, I do stuff like that too

fiery turtle
north holly
#
#if OBOS_DEBUG
#    define OBOS_ASSERT(expression) do { if (!(expression)) { OBOS_Panic(OBOS_PANIC_ASSERTION_FAILED, "Assertion failed in function %s. File: %s, line %d. %s\n", __func__, __FILE__, __LINE__, #expression); } } while(0)
#else
#    define OBOS_ASSERT(expression) do { (void)(expression); } while(0)
#endif```
but I worked around it like this ![meme](https://cdn.discordapp.com/emojis/575445094589661215.webp?size=128 "meme")
median crest
#

wait infy

#

what do you think of the style I've bee going for

#

like here

north holly
#

wait what does for (;;) do again

#

I forgot

#

uh

#

infinite loop maybe

median crest
#

for(all;of;eternity)

median crest
north holly
#

I will fix my code style one day™️

#

bro what the fuck happened to the ™️ emoji

fiery turtle
jaunty fox
#

uacpi info: successfully loaded 1 AML blob, 1705 ops in 0ms (avg 4013691/s) i'll throw in this updated submission for keyronex

#

inlined spl routines got that

fiery turtle
#

very cool

calm latch
#

Can I submit this? chad

fiery turtle
#

i dont remember the context

#

is it legit or not

calm latch
#

It should be

#

I can double check

fiery turtle
#

if it is u can submit it sure why not

jaunty fox
#

it was a stroke of genius for you to add this statistic to uacpi

#

now as well as an allocator test uacpi is an osdev benchmark

fiery turtle
#

lol yeah

#

it started as a gimmick i wasnt even sure i should've went with

dense steppe
#

I like how the uACPI benchmark has become a de-facto standard

frank canopy
#

it pointed out an issue with my code too but I was too dumb to realise that it was an issue worth investigating until I accidentally fixed it later lmao

fiery turtle
#

I think it's unironically a decent performance wellness check for a kernel

frank canopy
#

yeah

#

I don't care about where I am on the leaderboard but I sure do like having the number as a quick general wellness check

calm latch
#

Is calibrated frequency 104978500 vs -cpu tsc-frequency=100000000 acceptable?

#

This gives this result

fiery turtle
#

could you fix your calibration? idk if thats too big of a skew

calm latch
#

It's consistently above 5 million though

fiery turtle
#

its like 5% faster?

calm latch
#

I can hardcode it...

fiery turtle
#

thats fine for the sake of the submission accuracy

jaunty fox
#

try using the kvm clock

#

it's cheap and easy

median crest
#

^

dense steppe
#

that's like 5% off

calm latch
#

I'm planning to eventually replace my timers subsystem

#

So I'm not in a mood of changing it now

dense steppe
#

sure

#

out of curiosity, do you calibrate against PIT or against HPET (or against something else)?

slim panther
#

i'd also like to submit a new score

median crest
#

how are yall so fast 😭

slim panther
calm latch
#

With hardcoded 1:1 tsc to ns

fiery turtle
slim panther
#

ye

fiery turtle
median crest
#

weird

fiery turtle
dense steppe
#

I calibrate against HPET with a fast calibration loop of like 50ms and I consistently get measurements within like 0.1% of my CPU's clock speed

slim panther
#

i got a 200k ish boost from putting that all over my allocators

dense steppe
calm latch
#

53 403 075

#

Yeah

dense steppe
#

or is 53M a new record?

calm latch
#

Nope

#

It can't be

dense steppe
#

✨ blazingly fast ✨

fiery turtle
#

ah u fucked it up lol

calm latch
#

bruh tsc-frequency=100000000

#

5354445 on Ryzen 9 5900X

fiery turtle
calm latch
#

although with wsl2 it's it's fluctuating a lot

dense steppe
calm latch
#

idk if that's acceptable

median crest
#

my laptop is shit and wsl doesnt help

fiery turtle
calm latch
#

it's repeatable

#

but sometimes dips to 4.9M or so

dense steppe
#

blame it on the host

median crest
#

better than wsl who decides that sometimes it'll give me 1.7mil and sometimes 800k meme

calm latch
fiery turtle
median crest
#

wtf

calm latch
#

or 4.6

dense steppe
median crest
slim panther
#

i'm on intel

#

the virt is worse than amd

median crest
calm latch
dense steppe
median crest
#

I dont think so

dense steppe
#

I was a bit surprised to learn that on some X3D CPUs, half the cores (those with more cache) run at a lower clock speed

#

and so what CPU QEMU gets scheduled to affects the benchmark

calm latch
#

With AMD and chiplets, if you have Ryzen 9, half of the cores are just slower

slim panther
#

ovmf required

#

qemu-system-x86_64 -smp 1 -drive format=raw,file=menix.img,if=none,id=disk -device nvme,serial=deadbeef,drive=disk -cpu host -accel kvm -machine q35,smm=off -bios <ovmf>

calm latch
median crest
dense steppe
slim panther
#

that's better ye

calm latch
slim panther
#

lmfao

#

i tried running uacpi on my pc with the broken aml for the first time

#

it's apparently still parsing the blobs

#

after like 2 minutes

#

doesn't timeout either

frank canopy
# slim panther

of curiosity, how can you know what PCI segment(s) exist with any certainty before the blobs are parsed and namespaces initialized?

frank canopy
#

ah ok, just assuming always 0 then?

slim panther
#

yes

slim panther
frank canopy
#

in practice usually not

#

segment 0 bus 0 being the root is standard but its a do you trust firmware devs thing tbh

slim panther
#

never

#

i would like to know wtf is going on here though

frank canopy
#

it still not finished? if so dang

slim panther
#

i could make it print to console every 5 or so seconds to see if its still alive

frank canopy
#

impressively whack aml there

slim panther
#

i know the aml is borked because acpica has a stroke on boot

#

does uacpi print parser errors?

strong heath
#

@fiery turtle id like to report the first score obtained from an actually comitted Ironclad kernel for leaderboard consideration, booted with qemu-system-x86_64 -M q35,smm=off -smp 1 -m 4G -drive format=raw,file=gloire.iso -serial stdio -enable-kvm -cpu host

#

I hope to soon bump it to top 3, but being faster than managarm is good enough for me

median crest
#

the seal grows

fiery turtle
#

Uacpi has loop timeouts

fiery turtle
#

I think your kernel just hung

#

Can you try running e.g. pmos or something on it

#

Also post the dump I guess

fiery turtle
strong heath
#

formally verified, hard real-time capable kernel written in SPARK and Ada.

fiery turtle
#

im thinking of adding a uacpi version printout as the first thing it logs

#

thoughts on this?

#

so it's easy to see which version a person is using by their logs

#

I'm also making registers.h public API as apparently there are cases when a kernel needs to be able to write arbitrary FADT regs

#

since haiku uses that for some cpu idling stuff

#

I'm also going to add something like uacpi_namespace_node_get_next for people that dont want to use for_each_node (like haiku)

left orbit
#

yaaaay iterator api

fiery turtle
#

bruh so many new osses and leaderboard changes this time

fiery turtle
strong heath
vast kestrel
#

I suggest maybe even printing a shortrev

#

But for the love of god cut it manually and not using the actual short rev command

fiery turtle
vast kestrel
#

Hmmmm true

fiery turtle
#

otherwise id of course add -dirty and stuff

vast kestrel
#

I mean, shouldn't it be basically CFLAGS += -DUACPI_REV=$(shell git -C ...)

fiery turtle
#

yeah

vast kestrel
#

And anyone not using make would probably be able to figure out how to convert it to his favorite build system

fiery turtle
#

still this will break every existing build

vast kestrel
#

True

mortal yoke
#

you could just check if its defined

fiery turtle
#

perhaps

vast kestrel
#

If it's not defined you could either have an empty string or something

#

Like, at work we always print both the version and the revision

fiery turtle
#

ill probably just have this in the header at first

vast kestrel
#

Since we have had cases of stuff being compiled not from master of people actually just forgetting to increment the version lol

fiery turtle
#

lol

#

this is the updated leaderboard (not yet merged) pls verify if you made a submission, I might've forgotten something

mortal yoke
#

I should also make a submission at some point but I want to get above davix again meme the average score that I have now is 6M because in the old score some cr8/gs writes were getting optimized out (it was actually a lot worse than this but I got rid of unconditional cr8 writes in lower irql and instead do a cli + check if cr8 was modified + write if it was + sti)

fiery turtle
#

lol sure

#

davix might score higher than proxima tbh

#

if its run on a 13900KS

gentle peak
#

probably not, davix's current score was measured on a 13700K, which is better than my 5800X (and on my 5800X that proxima build gets like 7.5M iirc?)

fiery turtle
#

maybe not then

jaunty fox
#

i am still in favour of someone acting as a clearinghouse for scores using a consistent testing machine and environment

gentle peak
#

yeah same

fiery turtle
#

if there's a volunteer for that with a good CPU im down

jaunty fox
mortal yoke
left orbit
#

i need to move to native linux

gentle peak
#

good point

#

i might try the davix iso myself later just for comparison

left orbit
#

man i hate linux desktop tho

fiery turtle
#

same

left orbit
#

i might just virtualize windows

fiery turtle
#

it just cant handle scaling man idk

torpid root
fiery turtle
#

i've tried every DE there is

left orbit
#

i might have to patch the linux kernel for anti cheats to work properly but oh well

torpid root
jaunty fox
#

every time the linux desktop is about to get good they release a new major version of KDE, GNOME, GTK+, QT, etc and go back to zero features

left orbit
#

i might try wayland this time

fiery turtle
mortal yoke
left orbit
#

lack of native discord screenshare was a big thing that prevented me from trying it out

fiery turtle
torpid root
#

I had a second monitor hooked up one time and I could drag windows between monitors

mortal yoke
#

ig I can try to update to it and see, would be nice if it would

gentle peak
kindred beacon
torpid root
left orbit
kindred beacon
#

discord has screensharing now tho

left orbit
#

well

#

not try

left orbit
#

i am a gnome user, just not wayland

strong heath
#

mate remains the bulwark

jaunty fox
strong heath
#

thats why bonkers is porting it to Gloire

jaunty fox
#

it just works and they don't badly reinvent the "uSeR eXpErIeNcE" based on nothing but vibes every 3 years

vast kestrel
#

But if I do that I would prefer to do it in bulk, and ideally have it be printed to serial or debugcon 3sGudaEhehe

dense steppe
#

just read the backlog a bit. feel free to ping me whenever you are discussing my kernel (davix)

#

also I still haven't upstreamed any 'fix' for the AMD skill issues that my kernel has (mapping memory as UC- in uacpi_kernel_map). iirc this doesn't affect the score on Intel CPUs (most likely has to do with how caching modes are handled on SVM and VMX respectively)

strong heath
#

I will do it with my power station CPU with no conditions

#

But

#

I will cook results so ironclad is top 1

#

You will have to accept that

gentle peak
#

seems fair

#

all other kernels are tested while compiling gcc

dense steppe
left orbit
#

13900ks probably

strong heath
#

128 core threadripper

dense steppe
left orbit
#

this shit has bad single core performance tho

#

if you do actually have one

strong heath
#

I don't

left orbit
#

not very good for uacpi benchmarks

strong heath
#

Its the KS

left orbit
#

very specific

#

so i was probably right

#

or 14900ks

dense steppe
#

anyway I need to select a nice console font for my kernel's fbcon lol.

fiery turtle
#

maybe we should have a github issues page where people would submit their ISOs

#

idk

dense steppe
#

I should really setup CI or something for building davix ISOs

#

but I won't right now (because I'm lazy)

rustic compass
#

how to get the best uacpi score:

  1. have friends that hold the world record for a overclocked x86_64 cpu
  2. ask them to repeat the record with your os running in qemu
  3. success
dense steppe
fiery turtle
#

@slim panther would this comment be sufficient to understand what is meant by this helper?

left orbit
#

very nice

#

if you can't understand that then you are brian damage (half joke)

dense steppe
fiery turtle
#

port io seems a bit overloaded no?

dense steppe
#

maybe

fiery turtle
#

so many things have ports

#

but yeah idk

dense steppe
#

zero probability of a misunderstanding (unless brian damage)

rustic compass
#

"On x86, the SystemIO address space corresponds to the port IO added with the i386."

vast kestrel
#

I'll probably automate it just so it happens automatically lol

fiery turtle
#

could be nice

vast kestrel
#

Given it should just run qemu | grep avg

fiery turtle
#

like a website where u submit an image and it automatically posts on github issues lol

vast kestrel
#

:^)

gentle peak
#

that sounds like asking for things that exploit vm escapes

vast kestrel
#

Tbf I don't run my PC 24/7, too much power lol

fiery turtle
#

it could schedule images to run ig

vast kestrel
#

But yeah I would rather it's images given directly by people we know on the server

gentle peak
#

also, maybe running in docker or similar would be a good idea, to keep qemu version constant

#

and/or keep the latest tested image for a given kernel around to retest if qemu is updated

vast kestrel
#

Tbf even kernel version can change it

#

But I can just say what the kernel and qemu version I am using are

gentle peak
#

yeah so linux or qemu update triggers global retest

vast kestrel
#

I just have a standard Ubuntu 24 lel

fiery turtle
#

yeah maybe u could store the latest iso for each leaderboard entry

vast kestrel
#

I might switch to Fedora eventually but yeah

rustic compass
#

if security is a concern one could run it on a independant machine with a configured linux with custom secure boot and full chain of trust

#

or just auto reinstall after each run

vast kestrel
#

I do have secure boot, but I ain't trusting Linux usermode enough for that

#

But having a dedicated computer just for that is a bit expensive 3sGudaEhehe

vast kestrel
#

Like we could rent a server but at this point...

fiery turtle
#

that would be nested virt

#

which would hinder perf

left orbit
#

u can rent a dedicated server

fiery turtle
slim panther
#

i have a powerful vps

rustic compass
#

we could for example use a n100 board as the reference server, cheap and serial interface

left orbit
#

eh $50-60 a month isnt too bad

#

but yeah

gentle peak
#

imo just "restrict it to manually submitted images from people known from this server and well-established oses built locally" provides good enough security

left orbit
#

still i am so tempted to build a thing where u can submit isos and test then

#

something like managarm xbbs

fiery turtle
#

that would be cool

#

if it also automatically made PRs for leaderboard updates lol

left orbit
#

that would be easy enough

rustic compass
vast kestrel
#

I can have the script just look at issues and create pull requests on demand

gentle peak
#

also i don't think nested virt would be that bad for this, sure it'd be quite a bit slower than regular virt but the most important thing is environmental consistency

left orbit
#

boring

vast kestrel
#

Also given it's notable kernels, aka not every random on the server but the bigger projects on the server

slim panther
#

technically, wouldn't an actual benchmark using uacpi kernel api be awesome? like seperated into mutex, alloactions, etc

fiery turtle
gentle peak
#

ah true

fiery turtle
#

even for the memory bus bandwidth etc

visual bridge
#

t

rustic compass
visual bridge
#

so much activity here

vast kestrel
#

I would run it one at a time obviously

gentle peak
#

nah, test all the kernels at once

fiery turtle
#

in a virtualized env u would basically get wsl2 skewing all the time

vast kestrel
#

Also one thing to think is how much memory and how many cores we give it

#

Like not all kernels support smp, and some kernels like smp more than others

gentle peak
#

-smp 1 -m 4G is the standard for the benchmark i believe?

rustic compass
#

is a n100 board actually that bad, i wanted to buy one to tinker with it

fiery turtle
#

yeah

vast kestrel
#

Then I might want to pin it to a p-core as well

#

Some poor soul would randomly get an e-core for their benchmark :^)

gentle peak
#

also worth thinking about is how to make sure host scheduling doesn't affect it

#

i have a homogenous cpu and even i have multiple very different performance ranges

rustic compass
#

also try to pin the frequency

fiery turtle
#

ideally u want to isolcpus=

vast kestrel
#

True

gentle peak
#

taskset isn't enough

left orbit
#

good enough

vast kestrel
#

Cgroups has a way to isolate a core

gentle peak
#

it restricts it to a specific cpu but that still leaves things like cpufreq

fiery turtle
#

yeah u just want to isolate a cpu, then allocate a cgroup, pin that cpu to it, and then run qemu there

dense steppe
#

we are really, really overengineering the benchmark right now lol

rustic compass
#

maybe disable variable frequency in uefi and set a fixed multiplier?

vast kestrel
fiery turtle
dense steppe
#

yea lol

vast kestrel
#

Like, as long as it ends up as a single script I come home and run I don't mind doing it even every day lol

#

That's the main bottleneck, ensuring everyone is using either serial or debugcon to output the info, so I won't need to manually copy things out

#

I don't mind running a command over serial automatically if need be, but nothing manual

gentle peak
#

i feel like thats not too much to ask from kernel devs

fiery turtle
#

like every kernel here has serial or debugcon

vast kestrel
left orbit
#

not pmos i think

fiery turtle
#

hm

gentle peak
#

also kinda off topic but does anyone know if there's a way to make qemu riscv virt use non-hardware-reduced acpi?

fiery turtle
gentle peak
#

that sucks

fiery turtle
#

they're actively working on it tho

fiery turtle
#

so far only itanium and x86 have seen full acpi

gentle peak
#

i was looking forward to seeing uacpi riscv performance :/

#

on tcg but still

fiery turtle
#

i mean there's still a namespace

gentle peak
#

nope, there's not even a dsdt

fiery turtle
#

i think your qemu is just old

gentle peak
#

i'm on 9.2.0

fiery turtle
#

because keyronex definitely did run a dsdt on riscv

fiery turtle
jaunty fox
#

i'm not sure if you need a special qemu branch

gentle peak
#

yeah

jaunty fox
#

possibly you do

dense steppe
jaunty fox
#

i thought it was merged

fiery turtle
gentle peak
#

yes

fiery turtle
#

btw hardware reduced doesnt mean there's no DSDT

hallow marten
fiery turtle
#

no DSDT is not compliant impl

gentle peak
#

oh really?

fiery turtle
#

yeah

#

hw reduced just means no global lock and general purpose events

dense steppe
gentle peak
hallow marten
#

yes

gentle peak
#

on all the hardware i have the most low-level debugging is framebuffer

#

so i just use triple fault debugging

#

or, if i'm trying to get rid of a triple fault, halt loop debugging

dense steppe
#
.macro hcf
42:     cli
        hlt
        jmp 42b
.endm
#

so fkin useful

#

the reason that I'm doing fbcon right now is because I kinda want to test on a very old laptop

#

and for that, I need output somehow

fiery turtle
#

u do look at x_dsdt as well right

gentle peak
#

ngl i completely forgot that dsdt isn't in rsdt/xsdt

fiery turtle
#

lol

#

yeah it's pointed to by fadt

calm latch
gentle peak
#

yep false alarm

fiery turtle
#

ye

calm latch
#

So like do I just log to COM0 unconditionally?

gentle peak
#

the 'proper' way to do it would be to find it in the ACPI namespace

#

but then it obviously can't be used for uacpi benchmark

calm latch
#

or that

#

but after I find the port, how do I know that it's not an UPS or a mouse, idk

gentle peak
#

no real way to tell

fiery turtle
gentle peak
#

that'd work yeah but then you'd have to have a separate uacpi benchmark build mode

calm latch
gentle peak
#

also the results would be invalid because the 2nd run has better cache stuff

calm latch
#

My log server buffers certain amount of lines

fiery turtle
#

true

calm latch
gentle peak
#

that'd work yeah

calm latch
gentle peak
#

that is fundamentally unknowable

#

the only difference is the protocol being used

calm latch
#

But stuff like SPCR explicitly tells you that a serial output should be used for logs

gentle peak
#

you just have to trust that, when the user tells you to (f.ex) use COM1 for logging, it's not connected to a mouse or ups

calm latch
#

(or for the console)

#

I guess I could make it a boot option

gentle peak
#

kind of like linux's console= option

calm latch
#

Yeah

vast kestrel
#

Isn't there a debug table that the bios can provide? I think in qemu it points to debugcon

#

Debug Port Table 2

north holly
#

@fiery turtle is there anything new I could test in uacpi?

fiery turtle
#

Soon

#

New api but nothing big

#

Its feature complete

#

For the most part

north holly
#

or well not waiting

#

but more of an asynchronous read

dense steppe
#

ask him to ping you. when he does, that is an interrupt

north holly
#

yes

torpid root
#

you installed an interrupt handler

north holly
#

then if I am in bed or taking a shit, I will register a DPC so I can do it when the IPL lowers (I wake up or finish taking a shit)

fiery turtle
#

Who said you couldn't do programming while taking a shit

north holly
#

true

#

but I would still prefer deferring it

#

thank god none of my real life friends that are in this server

#

well there are two

#

but none of htem look here

vale isle
#

@ oberrow irl friends

north holly
median crest
#

at everyone are you oberrow friend

torpid root
#

@everyone says: yes

dense steppe
#

@left orbit was it you who tested my kernel on an i7-13700K? because I'm curious about how this image would perform:

lofty dragon
#

curious about a 13900KS?

dense steppe
#

that would also be interesting

lofty dragon
#

well @strong heath has one

strong heath
dense steppe
#

as long as it isn't tested concurrently with a GCC compilation

strong heath
#

whats a command you would like the davix software distribution to be run with

dense steppe
#

qemu-system-x86_64 -enable-kvm -cpu host -M q35,smm=off -m 256M -cdrom davix.iso this should work

left orbit
#

but 13900ks should do a bit better than 13700k

fiery turtle
#

Virtualize in the brain trl

left orbit
#

higher clocks and slightly better single core performance will do

strong heath
#

bind PCI bro

dense steppe
#

yeah I really should implement those routines

#

... but there's like a million other things I also should implement

strong heath
#

such is life

dense steppe
#

indeed

#

like it's interesting because I consistently get results approximately in the range of 4.4-4.8M on an AMD CPU

strong heath
#

yeah well its AMD

#

slow ass cpu

#

next purchase make it intel

lofty dragon
#

if it still exists

strong heath
median crest
#

soon it will all be loongarch

strong heath
#

bad joke bad joke

mortal yoke
# mortal yoke I should also make a submission at some point but I want to get above davix agai...

new score is 6.7M as I realized that cli + sti was unnecessary, basically its enough to first write the software irql to the cpu local so then all interrupts that happen after that point can only set the hw irql to the new irql (which is fine, then no cr8 change is needed inside the lower irql function) and after that load the hw irql from a cpu local + do cr8 change if its greater than new irql (as the hw irql could have been changed to the previous irql before the first write of new irql to the software irql cpu local)

fiery turtle
#

damn

#

i havent merged the updates yet, you can still add yours

left orbit
lofty dragon
#

btw

#

to @gentle peak but to everyone else really, Limine 9.0.0 is out and it features SMP wait loops using monitor/mwait

#

idk why i am saying it in the uACPI thread

#

shit

#

i should've used the #1282508189698625619 thread probably

calm latch
#

uACPI thread needs to be renamed into lounge2

kindred beacon
#

updated managarm score: 5618646/s

#

still on my 14700K btw

fiery turtle
slim panther
#

i need to get my game up again

calm latch
#

beating pmOS again sadmeme

mortal yoke
calm latch
#

although not by much and on a faster CPU meme

slim panther
#

@fiery turtle my bad btw, the new score is on an Intel Core Ultra 7 265KF

median crest
#

@fiery turtle if I make a shitty allocator just for uacpi that only cares about speed and not about memory usage would that be accepted meme

dense steppe
#

just use the shitty allocator in the entire kernel

flat badge
#

imo making a shitty allocator that is used exclusively for uacpi is gaming the benchmark

#

if you use it in the entire kernel it's fine

fiery turtle
#

Yeah

vocal geyser
#

i fixed my shit allocator and got this

#

i have amd ryzen 5 3600 (i bought it in 2020-2021)

hollow elm
#

(3) still has 1 early reference(s)! seems a bit worrying

#

are you on an older version of uacpi?

vocal geyser
dense steppe
#

why do you initialize uACPI before setting up the APIC etc.?

vocal geyser
#

i initialize early tables

#

first

#

after init hpet

#

and finally init uacpi

#

here with non fixed allocator

vocal geyser
fiery turtle
#

Aka not calling table_unref

north holly
#

wiat what

#

I should probably fix that

fiery turtle
#

Basically a safeguard warning because a lot of kernels handle early mappings in a different way from late mappings

vocal geyser
#

can i get into this table 👉 👈

fiery turtle
median crest
#

dear lord its embarassing to see astral that low

fiery turtle
#

Yeah

median crest
#

I need to buy a good computer

vocal geyser
#

or you already have

fiery turtle
#

Link, cpu used for measuring, short description

north holly
#

I need to optimize my kernel one day

median crest
#

I got 4.5mil on streak's but he didnt send the full score grrr

fiery turtle
north holly
#

I'd probably be able to optimize it greatly if I did one thing...

mortal yoke
fiery turtle
#

Letsgo

median crest
#

wait qwinci your computer is good right

vocal geyser
#

i trying to add a unix-like features in soon

fiery turtle
#

Sure

north holly
#

lets go

#

obos will be 3rd last instead of 2nd last

mortal yoke
fiery turtle
north holly
#

I was talking about his kernel

fiery turtle
#

That's the non fixed allocator

vocal geyser
north holly
#

oh

#

obos will forever stay at 2nd last

vocal geyser
#

now my kheap allocator is good

mortal yoke
#

do the cr8 optimizations that I did

north holly
#

will do

#

but I want to optimize my entire allocator interface first

median crest
north holly
#

it currently kinda uses function pointers

#

which sucks

median crest
#

I guess it did letsgooo

mortal yoke
#

this makes sense considering streak's cpu is better than mine

median crest
#

its crazy how much cpu speed matters

#

on my laptop I get like 1.8-1.9 mil

median crest
#

thats it trying to get the root device but failing because theres no nvme in the vm

#

the default options picks nvme0n1 as the root

vocal geyser
fiery turtle
#

maybe get qwinci to run your os as well so u get a better score

mortal yoke
#

you are compiling uacpi test runner into your kernel lol

#

can you send an iso

fiery turtle
#

wait what

mortal yoke