#Nyaux
1 messages ยท Page 39 of 1
@flat nymph u trying the iso now
Which
^
its because u flashed it
๐
yeah
nah i dont use any intel only instructions
doesn't tripple fault 
okay
so @thorn bramble theory is probs right
although I've also had some skill issues with framebuffer on other PCs
(hopefully)
well im happy its not a problem with my code (it is in that i die if the framebuffer is outside 4gib but fuck u)
i dont know ask mint
as in limine gives picture
i didnt make limine
one of the PCs seems to be having a serial port skill issue
make sure you aren't using ft_ctx anywhere anymore
im not
But I'm using it as a server...
sprintf only prints to serial
To host home assistant among other things
So without it home dumb
I don't see you waiting for buffer to be empty
sprintf
And that as well
But it's having skill issue on pmOS with 9600
thats what imt rying to do
But that PC has a 12 years old Aerocool PSU
(fire hazard)
Idk how it survived that long
@kind root probably knows
What I'm talking about
lol
13 what
lol my drawer has some interesting finds
can isee ur serial init code
pmos for mips when
nvm
its now 9600 baud
and I can't find the third serial lead 
well it kinda worked
d its me
anyways now its not a bug
i can go back to WORKING ON ROUTE IRQ
IN PIECE
PEACE
@kind root most stable framebuffer
(its a bug not a feature nyaux does not support above 4gb framebuffers)
ask @wicked loom
lfg
why flanterm no work on my pc
Ok it was a PSU issue hi world its me nyaux hates this framebuffer land!
@surreal path can you install idt before flanterm, and try to initialize it?
k
oh yeah
nyaux is way faster when not printing shit
like
WAY
faster
on tcg btw
anyways
@flat nymph
go and try ig
4745/s ๐
fair
I think I need a PXE server
And I could log to network in pmOS
This should probably be the easiest thing to implement
kmain(): Hello World ITS THE HERE
DEMOUS LAST WORDS HERES FUNNY NUMBOW WE USPRINTF 69420
Welt loadednit(): idt loade: The HHDM is 0x
(): Freepmm_init(): Free6752694
80000000mapping 0xffff800000000000 to ffff800100000000 : phys 0x0 to 0x100000000vmm(x86_64)(): Above 4Gib Mapped! Mapping Memory Map!
vmm(): H000000
length: 872448
next: 0x0
}
vmm(): Kernel is now in its own pagemap :)
vmetup!
get_symbols(): found elf signature ELF
kpder: type 0
get_symbols(): Nyaux Symbol Resource Created and Stored on Heap
init_acpi(): initing uacpi
uacpi: RSDP 0x00000000CA8B8014 00000024 v02 (ALASKA)
uacpi: XSDT 0x00000000CA8B7728 000000EC v01 (ALASKA A M I )
uacpi: DSDT 0x00000000CA89C000 0000B767 v02 (ALASKA A 038 v01 00CA7A7000 0000003C v01 (ALASKA A M I CA7A6000000006E v02 (AMD AmdTable)
ua(AMD 00000000E v02 (AMD Ar ```
wel
nyaux forgot \r\n
\r as well?
I think my PCs now hate me for booting Nyaux on them
lol
serial wants both
anyways cool nyaux runs
k hold on
and tripple faults

well you could configure the host to translate \n to \r\n via termios
not sure if you can tell screen to do that but ```
$ stty -F /dev/ttyS0 speed 115200 raw nl
$ cat /dev/ttyS0
its normal to triple fault?
so nyaux didnt triple fault from the serial info it seems
no]
there is an idt installed so if we were abt to even fault
it would have been caught
idk why it didnt
but not my problem idc i dont support framebuffers over 4gib
:^)
i dont want to think about it i dont hear you lalalalala
doubt
doubt x2 ur statement

do not try to make me die from pain trying to debug something for hardware i dont support
i.e framebuffers over 4g
i do not care i do not want to deal with it and it runs on most hw fine anyway
also it is a waste of time for me to be debugging this, i need to be the fourth hobby os kernel with ec

the gpu probably has a large bar that cant fit under 4g
probs
so the bios obviously allocated it higher
btw what is a bar
like a chocolate bar?
like u eat it?
nom nom?
Base address register
sounds cool
sounds like chocolate
teto is love
teto is life
brainrot
nyaux will infect ur pc
with brainrot
whats the difference between edge leveled triggered interrupts
and level triggered interrupts
edge triggered gets triggered when the signal changes from low to high (or from high to low depending on the polarity), level triggered continuously triggers when the signal is high (or low based on the polarity)
will i just default the flag to edge triggered
no
for isa irqs the default is active high + edge iirc
then if there is an override you take whatever the override specifies
okay
but it also depends on what exactly you are configuring, for eg. the acpi sci the default is active low + level
acpi sci?
the interrupt that uacpi installs
oh okay
whats intr init, extint etc etc
i know what smi is
but anything else of this
is there an sdm page/chapter that describes that these signels are?
probably but for the io-apic you don't really need any of the others than fixed (or maybe lowest priority if you want)
okay
and maybe nmi if you want to create some sort of watchdog that interrupts the cpu regardless whether interrupts are enabled or not
is it important to know what these signels are?
?
likely no at least at this stage
okay
did we just
...
fault
nvm
wait not nvm
why did he fault
this vm run?
weird
time to test the vm 15 times
tested it 15 times
no fault
weird
@molten grotto is extracting the flags like this correct?
from the isos
also they are all zero for some reason
ummm
i think thats correct?
polarity is low 2 bits, trigger is the next 2 bits after that
101 is init
the override flags don't encode anything else than polarity and trigger
oh okay
why does polarity need 2 bits
same with trigger
cant they just be one bit each
umm
thanks
first guy is active high and edge triggered
second is none
so no override map as ud like
ew acpi 6.4
this is genuinely so cringe but idc
acpi follows a pattern thats similar to the apic bits so im doing this

it just happened to be what I had visited 
oh yeah
im bitshifting the wrong way everywhere
its <<
not >>
nvm im not
cool
56 not 32 whoops
most normal nyaux code
lit repeated code
fuck why is polarity reversed
um
code
brother
hey you said it
so why tf is it return -1
binary print
%b binary
thats not standard is it
no
its after c23
anyway try fixing the ub within that fn to see if it makes any difference
theres... no ub within that fn?
you don't return anything at the end
oh yeah
when would checker be null
did it call itself
idk
fair
ill js check if i is not 16
well my bad
looks like theres a null deref
shouldnt happen tho
weird
yea and there is no iso
for irq 1
and it said it found something
cringe
hold on
i think i know what it is
okay i solved some skill issues
lemme solve some more skill issues
i think i solved it
nvm pressing the keyboard is doing nothing
@molten grotto how to check ioapic logs from qemu
is there like a way to do tghat
yea no delivered interrupts for irq 1

this should be correct
hold on
i solved the if statement that didnt solve it
hmmmmmmmmmmmmmmmmmmmmmmmmmmmm
gave this parathisis
didnt fix it
hmmmmm
yall have an idea
like any idea as to why its not working?
im going to manually try to map irq 1 in populate ioapic
and see if its the function
manually mapping it doesnt work either?
@molten grotto am i doing something wrong here?
im just manually trying to map the irq at this point
and it doesnt work
thats lit the entire code

is the bit shifting in correct?
incorrect*
it doesnt look incorrect
thats assembled data in binary
ummm
why does it look like that????????????????????????
control value
i turned off bit 11
no change
value in binary
how do you know that its not working?
pressing keyboard does nothing
you can look at info pic to see the status of it
(in qemu monitor)
true!
Indeed
๐
welp
so if everything is masked
its either
the ioapic is refusing to accpet my values
or the registers are wrong
which they arent at least
Show ioapic write
Looks like you're writing zeroes
Who else
idk but it spams it even when booting up the vm
this isn't right, the first statement does nothing, you want to write the offset to the apic addr, value to + 0x10 like you already do
it literally doesn't do anything lol
it just loads some random value from some random addr and discards it
it worked
but pressing the keyboard does nothing chat, maybe the keyboard queue is full?
ps2 keyboard*
time to test route irq function
U can test it via a fixed event handler
oh thats completely wrong?
wdym
k hold on
If u install the handler first ofc
i pretend i do 
i just report success to uacpi
Well route it properly
seems we have a bug with the scanning of the isos
oh wait we dont
im just stupid
hold on
No way

What the fuck is it doing
checking for the ioapic we need to use to route the irq
๐
Most readable nyaux code
cause i wanna write ec so bad
bro I thought obos code was unreadable (it is)
โ ๏ธ
yet required for the EC...

and trust me, EC is boringer
sure
flex
Trust me it's the most plain shit you can do
much
okay fine ill clean up the if statement
ummm
is bro stuck
or smt
thanks ubsan
got it working
how to make ubsan shut up
its not out of bounds?
__attribute__((no_sanitize(undefined)))
no
shift out of bounds
Id trust it
^^
the shift out of bounds is on purpose?
why
I don't need to shift out of bounds for my ioapic code
Out of bounds means higher than width of type
explain
OHHHHHHHHHHHH
nyaux moment
also why duplicate the expression instead of using the variable
because my brain is fried
ill clean up the code
unfry it
lol
btw, nyauxmaster, people would probably stop seeing your kernel as some cursed mess if you stopped posting a message for each small bug
*20 messages
nah I'm not complaining
I'm trying to say, if you always depict your kernel as having infinite bugs, that's how people will see it, if you don't want that, stay more quiet about your bugs
but no one here minds the spam usually
^
like if it works for you its fine and I am not here to shit on you but to me the code is barely readable

One day ill get you to read ULE
Some variable names are weird 
I should read ULE
whats wrong with e
And space your code out a bit

fair
x3
if you guys want truly unreadable code, go shit on obos instead
and figure out a way to abstract architecture specific code
i did
using macros
It's fine
If you program in Go
But you aren't

see the new variable names i added in ioapic if ur scared of that
oh god the error bubbling in go
nightmares
like nyauxmaster can read his code
I have put "Abandon all hope, ye who enter here" to some files because not even I can read it

static int pnp_pci_driver_cmp(const void* a_, const void* b_, void* udata)
{
OBOS_UNUSED(udata);
// NOTE(oberrow): If this fails, gl and have fun.
const pci_hid* a = &((struct pnp_device*)a_)->pci_key;
const pci_hid* b = &((struct pnp_device*)b_)->pci_key;
if (((int8_t)a->indiv.classCode - (int8_t)b->indiv.classCode) != 0)
return (int8_t)a->indiv.classCode - (int8_t)b->indiv.classCode;
if (((int8_t)a->indiv.subClass - (int8_t)b->indiv.subClass) != 0)
return (int8_t)a->indiv.subClass - (int8_t)b->indiv.subClass;
if (((int8_t)a->indiv.progIf - (int8_t)b->indiv.progIf) != 0)
return (int8_t)a->indiv.progIf - (int8_t)b->indiv.progIf;
return 0;
}```
To me it's ok because of defer
they should unironically make a way to bubble errors with one statement or something
ehhh
ig
I had one project
I did in go
20% of the code was bubbling errors
You haven't used C++ without exceptions
Go is 10x better after you experience that
fair
real
though I dont suggest writing a compiler in C. I got pretty far and it is a nightmare
lol
are you nyauxsexual?
attracted to nyaux
real
YESSS
I miss templates and "proper" (as if it is in C++
) type system though
I will never willjngly touch go
the only thing I have missed from C++ is RAII
It's very nice for network stuff
And that yeah
first off i gotta learn what a embedded controller actually DOES
then figure out how to talk to it
then yea
Because of its threading model
Networks are for weirdos, all the real homies use completely disconnected systems
like this one
(daily obos shilling complete)
i need to learn what it actually does tho @finite summit
Wikipedia has an article on it
okay
basically it's so that AML can do IO to firmware stuffs
Because of that, ChatGPT should also be able to explain it
and also so firmware can tell you when certain events happen
such as laptop lid close/open, battery status, etc.
chatgpt: 20 great articles -> one acceptable article
oh i seeee
Power button
whats a acpi gpe
ngl I dont understand peoples fascination with turning off a computer
pmOS is second
It's very cursed and overcomplicated
?
general purpose event
oh i see
stuff like power button press
battery status change
lid open/close
FN key pressed
thats what I am saying, ppl be putting effort into turning computer off before they have working userspace
I find it funny
I have uACPI in userspace
based
So that's a good test that it's working I guess
ok sure
๐ญ
You can have C++ type compatibility in C
There's a flag
but yeah templates are cool
In my kernel I try to avoid classes and templates unless they make sense
Like most of the OOP code is scheduler + drivers
i have a ghost ping from here
i remember someone pinging u here
but they deleted their message
sorry about that
helo mankey ๐
idc lol i was just curious what happened
on base revision 2 yea
OKAY NO MORE BEING LAZY
EMBEDDED CONTROLELR TIME
okay this makes sense
now how exactly will i talk to it?
and initizie it?
lets see the acpi spec!
oaky this makes sense
yoyoyoyo hold up
whats an smi
@finite summit do u know
software management interrupt
oh yeah
but why is the embedded controller involved with it???
like isnt smi something that shouldnt even be ACCESSED by the kernel
plus thats a cpu thing
??????????????????????
U can ignore this bit, its for the bios not u
oh okay
and sci?
whats that
exactly
oh yeah
makes sense
okay
i see there are 2 modes to the controller
is this something i have to worry about @kind root
This is the most important bit
i see
It tells you the EC wants to run AML
i see
SCI is what they call the acpi interrupt
you can take my ec driver as a reference
(obos shilling complete)
im good thanks
so do i have to constantly check this register?
(you'd know that if you read obos' source as a reference)
so i have to make a GPE handler for the embedded controller

yes
okay
whats the exact different betqween brust and normal mode
in this context
nvm found the section in the acpi spec
nvm
wait
what sa opsm
ospm
i have a spasm
get it

ohhh
*kernel
do i need to constantly turn on burst enable, issue comamnds and then disable when talking to the EC?
you are confusing
bru
in what situations do u use brust enable tho
burst*
???
cause i see u use it everywhere in obos
source
because managarm did so 
Thats just more code
what is IRQL_GPE
Oh no 
one byte per ec irq? aw hell nah
like the data for read write
and the offset
like general protection exception or am i mixing up my acronyms
mixing up acronyms
is this for if uacpi wants to read or write something to the EC?
or is this just a easier way to
write to the EC
and read
GPE is general purpose event here
fair
it's the thing that uacpi passes to you
oh so im guessing its like your dispatch level/ipldpc
when aml makes a r/w to the EC
ohhh makes sense
Thats gpf
since this is acpi-related, I decided to count it as a device IRQ (which it is), which afaik usually have higher levels
well it actually looks quite simple
so it's defined as 8, since that's in the middle
and I like that number
oh ok i dont have anything interesting to say about that
all i need to do is,
find the ec
on gpe query ec if it wants to execute aml
thats it?
is that literarly it?
one more thing
what else
you need to install handlers for ec read/write
wdym
check source
sorry if this is a stupid question
aml can make reads/writes to EC, but you're the one handling it
okay
it's what uacpi_region_rw_data does
is this installed handlers for it?
yes
okay quite simple
i will start by creating an ec source file and stealing some of ur macros in ur source

dw, I stole them from managarm

just keeping a list of what i need to do
find ec
if it exists install handlers for read and writes to it
on handler check if sci
give aml some functions to read and write to ec
and yeah
i also see there MIGHT be an acpi table for the ec
that COULD
exist
called the ECDT?
so if it does exist find the ec via there
Sci
yea that makes sense
sci my bad*
super cool interrupt

i thought ec would be EXTREMELY difficult
basically:
BEFORE NAMESPACE LOAD!!
if ECDT
init_from_ecdt
AFTER NAMESPACE INIT!!!
if !ECDT
init_from_namespace```
but its actually easy?
yes
yea makes sense
we were just scaring you so you don't brick your pc 
so why am i going to be the 4th hobby os to do it, why dont more hobby oses do it?
if its so easy
since I'm bored, I'll watch
qemu doesn't have it
join
fuck
nor do any VMs, afaik
^
#575111534825439252 message
whats the gpe bit?
or well
ec_gpe_idx
does that tell u which gpe is coming from the ec?
??
do you not like to sleep?
no
@finite summit
acpi spec does not mention it
or well
i cant find where it mentions it
yes
okay thanks
you get it from evaluating _GPE in the EC node
and taking it as an integer
uacpi_eval_integer
np
MIT
yea thats fine
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
OK
DO YOU GET THAT??
/lh
What is nyaux going to do with lid events
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
decode it to morse code
have that as his stdin
True
(since his keyboard driver triple faults)
Lmao
it does not
yet
bru
Aml + ec events is still more reliable to get input than a ps2 driver
cc @elder shoal
ps2 is really weird
indeed
and seems to break in every way possible
(as Astral found out the hard way)
ah
But generally it worked on everything I threw at it
waiting for the day infy makes ultraos
ultraos will replace linux!1!11!1!!!
and windows!!1!!1!1
speaking of
@elder shoal my laptop has native ps/2
can you send me the latest astral iso, maybe I can test it
what is a address space handler
my laptop also has it because the built-in keyboard uses it
hold on lemme make a minimal iso
??
if that's the case, I can just download it
actually nvm
I can't
yes
what is it
@elder shoal nvm I have an astral iso
shit that causes the ec driver to handle teh AML EC R/W
oh okayyyy
@finite summit what is the ign bit in the ec
what
your point?
am i looking at the wrong thing
yes
wheres data sheet for
look at the command set
thanks
somewhere in that same chapter, idr where
np
got these beautiful functions now
time to
make the thingys for uacpi
lol
that is done
okayyy
@finite summit what ze hell are u doing here
my brain is fried reading this
skill issue
what
what what
???
i dont understand
wdym evulate method
why are u evulating a uacpi method
why
then whats with the _Q
the method name is _Qxx where xx is the number of the query
oh my bad
sorry
this just tells uacpi we finished handling the ec gpe right?
okay fair
obos does it too
so i do it too

anyways ec is nearly done
ima wait til 15 minutes so i can eat the other half of my pizza
then ill finish the ec
@plush hearth no longer streaming lol
alright
nyaux after being automatically better then ever other hobby os project that doesnt have ec because it has efc
ec(
ec*

NEARLY DONE
JUST NEED TO MAKE THE GPE HANDLER
WE HAVE EC
@flat nymph u awake
or anyone with an ec yall awake wanna test thisss
hello nyauxmaster
hi
is this true what you got bald ???
no
so much for testing ec
no hpet lol