#Nyaux

1 messages ยท Page 32 of 1

surreal path
#

its litearrly directly from limine

#

@wicked loom

#

^

kind root
#

flanterm_fb_queue_item is not related to the framebuffer

surreal path
#

yea i have no idea

#

thats not my problem

#

i just init

#

and ask flanterm to put a char

#

thats it

silver yarrow
#

I have the alignment sanitization turned off idk

surreal path
#

no UB?

#

WTF

#

THERE WAS

#

NO UB PRINT

#

NONE

#

@silver yarrow wtf

silver yarrow
#

unfortunate

#

ubsan doesnt catch everything

#

just some basic UB

#

prolly something more complex going on

#

what exactly is the issue anyway

surreal path
#

it just hangs

#

on some other hardware

#

it works completely fine ๐Ÿ˜ญ

#

all vms load nyaux fine

silver yarrow
#

well things dont really "just hang"

surreal path
#

vbox

#

qemu

#

kvm

surreal path
#

it didnt triple fault

#

OH WAIT

#

IT DIDNT TRTIPLE FAULT

#

IT DIDNT TRIPLE FAULT???

#

framebuffer issue

#

its a framebuffer issue

#

fuck me

silver yarrow
# surreal path no UB?

ubsan catches ub "when it happens" so prolly worth running this on the hardware that dont work

surreal path
#

to connect to

silver yarrow
#

well

orchid dawn
surreal path
#

wait

orchid dawn
#

then it's possible its a framebuffer issue
or it's possible your code is crashing

surreal path
#

asking uacpi to reset

#

i could try

#

@kind root how to ask uacpi to shutdown

#

oh hold on

#

nvm

#

sorry for the ping

#

found the wiki

kind root
#

yeah

#

it wont work btw because you return error on install_interrupt_handler

surreal path
#

oh because i didnt load an idt

molten grotto
#

no

#

tbh I didn't look at it after I found those two bugs, I got busy hating google

surreal path
kind root
surreal path
#

like

#

it shutdonw

#

as ud expect

kind root
#

ah

surreal path
#

@molten grotto since ur here

#

cause i have something important opened i cant restart

molten grotto
#

maybe I should plug the laptop back to the ethernet cable, it would make testing easier with pxe just that then my website is going to die lol

surreal path
#

๐Ÿ˜ญ

molten grotto
#

I should buy an another cable, not that it matters that much as the website is literally just empty git server + a text file with hello world + a main page with links to those

#

anyway now I can try it

surreal path
#

alr coolss

molten grotto
#

no it just gets stuck after giving address

surreal path
#

so it didnt reset

#

so its NOT a framebuffer issue

#

even tho

#

i removed the idt

#

tested it on my laptop

#

didnt triple fault

#

even tho

#

i put back the idt and at the end of init

#

just request to shutdown

#

WTF

#

yea something very complex is going on

#

we may be stuck on this for weeks

#

inb4

flat nymph
#

gdbserver from monitor

molten grotto
#

its in real hw

surreal path
#

^

molten grotto
#

with the git build it does reboot

surreal path
#

it does

#

okay so

#

framebuffer issue

#

welp

#

FUN!!!

#

why isnt the framebuffer reappearing

#

wtf

molten grotto
#

where did you add the triple fault code

surreal path
#

i removed the idt to test if its the page tables

#

it didnt triple fault

#

theres no triple fault code

molten grotto
#

what are you using for the reboot then?

surreal path
#

uacpi

#

i readded the idt

#

and then

#

had this

#

@molten grotto

molten grotto
#

does the git code even have some code that intentionally causes a reboot

surreal path
#

it has no idt

#

ohhh

#

so it did triple fault

#

thats the git code

#

okay

#

and ubsan

#

didnt say shit

#

@molten grotto weve got a complicated issue

#

fun

elder shoal
#

in case you're curious, last I checked astral can boot to bash with as low as like 29 mbs of ram if you consider memory used

#

I checked it once when removing the limine backgrounhd

#

it boots to fvwm with like 128 mb

surreal path
#

nice

flat nymph
#

Limine uses a lot of memory...

surreal path
#

how much

#

i should really reclaim it

#

WHEN THIS BUG

#

GETS FIXED

#

I CANNOT FIGURE IT OUT

#

KILL ME CHAT

#

SEND ME A GLOCK M14 OVER MAIL

edgy pilot
flat nymph
surreal path
#

it does the same

#

yep

#

@flat nymph

#

ill remove the idt

#

so it can triple fault

#

okay?

#

holy shit i just crashed wsl2

#

@flat nymph take this iso

#

does it triple fault yes or no

#

let me knoqw

edgy pilot
#

smh

surreal path
#

sadly

#

๐Ÿ˜”

flat nymph
#

Me too

edgy pilot
#

smh x2

flat nymph
#

Though I installed Linux yesterday

edgy pilot
#

which distro

flat nymph
#

To put printfs inside the kernel risc

#

Fedora

edgy pilot
#

based

flat nymph
#

But it led to us discovering why the power button wasn't working with uACPI

surreal path
edgy pilot
surreal path
#

anyways

#

did u test on real hardware

edgy pilot
#

no

surreal path
#

pain

#

im going to sleep

#

im too frustrated

edgy pilot
flat nymph
surreal path
#

i insert a node into each page

#

lol

#

anyways

#

im too frustrated to figure anything out

#

im going to sleep

edgy pilot
surreal path
#

i hope a miracle will happen and maybe one of you spot something but thats obviously not gonna happen we are gonna be stuck for fucking weeks

#

goodnight

edgy pilot
flat nymph
#

Triple faults after freelist created

surreal path
#

HUH???

#

WAIT SERIOUSLY

#

triple faults after freelist created...

#

mhm.

surreal path
#

okay so this is like advanced UB

edgy pilot
#

dream up some solutions

flat nymph
#

I think

surreal path
#

that ubsan didnt spot

flat nymph
#

It printed something and triple faulted

flat nymph
surreal path
#

idk

#

could be anything

flat nymph
#

It can be heap corruption or something

surreal path
#

memory corruption

#

yea

edgy pilot
#

it's shrimply an issue of krill

surreal path
#

could be litearrly anything

#

thats fucking impossible to debug

#

wish i could attach a gdb debugger to real hardware chat

flat nymph
#

Like something shitting in all the pointers

surreal path
#

i took gdb for granted

edgy pilot
#

you can

surreal path
#

i dont have a serial port

#

so no prints

#

ubsan is enabled

edgy pilot
#

have you checked your mobo?

surreal path
#

btw

#

yep

edgy pilot
#

internal pins

surreal path
#

its a laptop

flat nymph
#

See when it freezes and when it crashes

surreal path
#

i cant do that

edgy pilot
#

yes you can

flat nymph
#

(but with asm inside)

surreal path
#

because i need to sleep

edgy pilot
#

eep first

#

debug later

flat nymph
#

That's how I was debugging my OS at some point

surreal path
#

wait i have an idea

#

hold on

edgy pilot
#

sleep?

#

I'm telling people to sleep at 3am smh

#

good night

surreal path
#

i put it here

#

before switching page tables

#

just to verify

edgy pilot
#

tripple

flat nymph
#

Why don't you install a double fault handler at least?

surreal path
#

i already have one

#

it just hangs

#

doesnt execute anything

#

when an idt is installed

#

and it switches page tables

#

nothing else js hangs

#

so js try please

edgy pilot
#

private nyauxmaster
you are given a direct order to sleep

elder shoal
#

go to sleep, programming tired wont do any good

flat nymph
surreal path
#

yep its the page tables

#

for which some hardware doesnt care

#

some does

#

like ur one and my laptop

surreal path
#

goodnight for real this time

tawdry mirage
#

are you sure the physical mem you're using is actually free memory

surreal path
#

yep

#

i ignore everything but usable

#

if u need further context or have any questions u can look at the code here im sleeping

wicked loom
surreal path
wicked loom
#

ur issue

surreal path
#

how

#

im not even giving it my allocator or anything

wicked loom
#

i ran ubsan and asan and fuzzed flanterm many times

#

in userland

#

without an issue

surreal path
#

maybe its an old version then

#

to be fair i havent updated flanterm in a while

wicked loom
#

update it

surreal path
#

will do when i finish sleeping

#

lol

wicked loom
#

ok lol

kind root
#

this man can chat about osdev while sleeping

surreal path
#

its because i have my phone notifying me cause i have my phone under my pillow

#

still havent slept but eyes are really tired

#

ima power off my phone

surreal path
#

morning

#

soooo

#

i guess we will

#

update flanterm

#

ask i said i would

#

as*

#

hopefully that will clear all ubsan messages

#

then idk

#

figure out SOME way to get closer to the actual issue

#

does anyone here have a computer with a serial port?

#

and something to read that serial port?

#

also tbh

#

its very out of spec for some cpus to outright refuse to load my page tables

#

and hang

#

but some do

#

ill try to make an issue on the forums as well

#

lets hope mint didnt change the api for the billionth time

#

๐Ÿ’€

#

okay good

#

damn no commit in 2 months

#

ehhhhh

surreal path
flat nymph
#

Two computers with serial ports

#

And a modem cable

#

One with AMD A10 and one with Ryzen 9 5900X

surreal path
#

okay

flat nymph
#

So relatively new and 10 years old hardware

surreal path
#

ill js disable the warning

molten grotto
#

yes or alternatively just pass -z noexecstack to the linker

surreal path
#

yea

#

that solved it

#

hold on while i enable ubsan

#

and remove the flanterm checkj

#

its still mad?

#

mint said its my problem

#

okay

kind root
#

perhaps it is a flanterm bug

surreal path
#

no because mints code is never wrong!

kind root
#

maybe its relying on some alignment that is not guaranteed

surreal path
surreal path
#

so

#

๐Ÿคทโ€โ™‚๏ธ

kind root
#

doesnt guarantee anything

surreal path
#

yea i guess

kind root
#

i also run uacpi with both but still have ub uncovered every once in a while

surreal path
#

should tell mint this

#

obos reference?

#

anyways

#

how are we gonna figure out our stupid hanging issue

#

any ideas

#

guessing not

#

come on there has to be SOMETHING we can do

#

gdb pt dump?

#

maybe?

#

well i will try

#

i have no other options lmao

#

BRO ITS A PYTHON FILE

haughty kite
#

fucking what

#

you tried running a file with a .py file extension as a shell script

#

also its a gdb plugin iirc

surreal path
#

they said source it

#

so im sourcing it

haughty kite
#

IN GDB

surreal path
#

ohhh

#

thanks for the heads up

molten grotto
#

btw the flanterm issues are very likely because the flanterm bump alloc doesn't guarantee any kind of alignment from the looks of it

surreal path
#

understandable

#

mint should fix that ngl

kind root
#

yes

surreal path
#

but thats not our issue rn

kind root
surreal path
#

heres what it looks like

#

anything weird?

kind root
#

you tell us

surreal path
#

looks fine

#

ill walk through each one

#

oh thats 2mb

#

also with this?

#

this looks fine

#

that as well

#

and this too

#

okay

#

the only weird one

surreal path
#

why is it 0x0

#

tf

#

and why doesnt the vm care

molten grotto
#

because its the start of the hhdm that maps to physical addr 0?

surreal path
#

oh yea

#

thanks

#

sorry

surreal path
#

oh its the memory map

#

yea so

#

gdb pt dump says the page tables are fine

#

okay

#

so wtf

surreal path
#

yea doing that changed nothing

kind root
#

do u have -Wpedantic?

surreal path
#

no ill enable that

cinder plinth
surreal path
#

yea it is

kind root
surreal path
#

yea i dont see anything much

#

fun

#

okay if pt dump said my page tables were fine

#

i dont have any more ideas

#

someone give me ideas please

flat nymph
#

Are you clearing pages when building page tables?

surreal path
#

yep

flat nymph
#

(also, limine had memory randomization)

kind root
haughty kite
#

oh cool

flat nymph
#

-Wall?

kind root
#

not included there

#

not even in -Wextra

flat nymph
#

Wtf, how was it even a feature

#

The old style declarations

thorn bramble
#

you realize right

#

moving into cr3 does not cause the page tables to be read

surreal path
#

ik

thorn bramble
#

if it works in a virtual machine it means you're not handling memory correctly somewhere

#

which is what i gathered from two days worth of messages so far

#

works in qeme under tcg and kvm but doesnt on real hw

#

make sure you're zeroing out the pages you allocate for page tables before using them

surreal path
#

i am tho

thorn bramble
#

and make sure you are constructing the page table entries correctly

surreal path
#

ii even randomized the ram and used it as memory on qemu

#

i am

#

gdb pt dump says nothing suspicous

#

looks all good

#

i dont know what to do

flat nymph
#

Put while (1) ;'s

surreal path
#

I DID

flat nymph
#

Put printfs everythere

surreal path
#

i know where it happens

#

switching to cr3

#

that where it dies

#

i put printfs everywhere too as well

flat nymph
#

Then you're not mapping kernel regions correctly

surreal path
#

but gdb pt dump says everything is fine?

#

so like

#

how

finite summit
#

You're leaving stuff out

surreal path
#

wdym

#

say rn

#

@finite summit

#

what am i leaving out

finite summit
#

Forgetting to map stuff

surreal path
finite summit
#

Up to you to find out

surreal path
#

i mapped the memory map, kernel, hhdm, and i map vmm regions

rigid fable
#

why nyaux is archived

surreal path
surreal path
finite summit
surreal path
#

yea

rigid fable
surreal path
rigid fable
surreal path
#

i have gone through many rewrites

rigid fable
#

you got a star from duck ๐Ÿฆ†

surreal path
#

thanks duck

rigid fable
#

another pml4

#

and put into it all usable entries and etc

surreal path
#

thats what i do

rigid fable
#

ye

#

i have kernel pml4 and pml4 for pmm and vmm (all mapped)

surreal path
#

wha

rigid fable
surreal path
#

@finite summit

#

how would it work

rigid fable
#

i have two pml4

surreal path
#

if im missing something to map

#

wouldnt the vm also die

#

like

#

why does it happen only on real hardware

rigid fable
surreal path
#

and well

#

im mapping everything

#

look at that clearly default case

#

like

#

i dont understand

rigid fable
surreal path
rigid fable
#
void vmmMapEntry(uint64_t* pml4,uint16_t type,uint64_t flags) {
    struct limine_memmap_entry* current_entry;
    for(uint64_t i = 0; i < getMemMap()->response->entry_count;i++) {
        current_entry = getMemMap()->response->entries[i];
        if(current_entry->type == type) {
            for(uint64_t i = current_entry->base;i < current_entry->base + current_entry->length;i+=PAGE_SIZE) {
                vmmMapPage(pml4,i,(uint64_t)phys2Virt(i),flags);

            }
        }
    }
}
surreal path
#

i know what im doing

#

i already map the memory map

rigid fable
surreal path
rigid fable
#

if it page faults

surreal path
#

it doesnt

#

it hangs when switching to cr3

#

and triple faults with no idt

#

so

rigid fable
surreal path
rigid fable
#

map kernel

surreal path
#

i clearly map it

rigid fable
#

send code idk

surreal path
surreal path
#

hold on

thorn bramble
rigid fable
#

to map kernel after mapping a entrys

surreal path
surreal path
thorn bramble
#

6 here and still counting

#

get on my level

surreal path
rigid fable
#

after mapping entrys map kernel

surreal path
#

i know that wont change anything

rigid fable
surreal path
#

it doesnt matter what order

rigid fable
#

?

#

it comfortable

surreal path
#

then i have to save my session

#

then i have to fucking idk

thorn bramble
#

excuses excuses

surreal path
rigid fable
#

physical or virtual

surreal path
#

virtual

#

i have to unadd the hhdm offset before utilizing it

#

to which i do in every instance

#

if i didnt

#

page fault

#

which the vm would catch

thorn bramble
surreal path
thorn bramble
#

it shouldn't tho

surreal path
#

my code doesnt wrok like that

rigid fable
surreal path
#

even my code isnt that shit

rigid fable
#

i think this is anti copy paste defence

surreal path
#

good halfmemeright

#

its messy on purpose i swear

molten grotto
#

the style that you use is annoying to read

#

like who tf unironically uses 2 space tabs in their own project or literally no newlines whatsoever lol

surreal path
#

๐Ÿ˜ญ

#

idk man

rigid fable
surreal path
#

vscode has formatting enabled so

rigid fable
surreal path
#

okay

#

step 1

#

figure out why some real hardware works no problem

#

but some real hardware doesnt

#

maybe by finding this out we could get closer

#

okay so

#

@orchid dawn @flat nymph did u try nyaux on a laptop or desktop, cause i know yall reported nyaux hanged as well

#

@molten grotto as well as u qwinci

flat nymph
#

laptop

surreal path
#

okay

#

2 laptops

#

interesting

finite summit
#

If it hangs on smp

surreal path
#

not on smp

#

hangs on switching page tables

finite summit
#

Well it might hang on smp sometime later

molten grotto
finite summit
surreal path
#

no cause we know its triple faulting from the tables

surreal path
#

the git didnt

#

okay thats 3 laptops

rigid fable
surreal path
#

no

rigid fable
#

and test on real hw

#

!

surreal path
#

im not rewriting shit

#

im done with that hell

surreal path
rigid fable
surreal path
#

that is interesting

rigid fable
#

๐Ÿ˜ญ

molten grotto
#

well idk if anyone has even tested it on a desktop lol

surreal path
#

works fine

#

on my hp desktop that my sister has

molten grotto
#

I also could but its the pc that I normally use so its annoying

#

and you don't really gain anything from it even if it works

surreal path
#

well

#

we would know that there is a connection between hanging and laptops

#

that would be helpful maybe

#

idfk

molten grotto
#

it very likely doesn't really help with finding the problem

surreal path
#

man im so out of ideas for how to fix this ive gone schizo

#

๐Ÿ’€

surreal path
#

do u have better ideas?

#

no?

flat nymph
#

Intel/AMD?

surreal path
#

both intel cpus the laptop and desktop i tried

#

13th gen on my laptop

#

some 9th gen i5 on the desktop\

flat nymph
#

Most of my PCs are AMD

molten grotto
surreal path
#

whos the debugging god now

#

nobody!

molten grotto
#

or well except looking more at the code lol

surreal path
#

i barely slept looking at the code

#

yea im lost

flat nymph
#

2MB?

#

It's 1MB on AMD64

surreal path
#

2MB?

#

1MB?

#

huh?

flat nymph
#

You're passing 2MB everywhere

molten grotto
#

no its 2mb pages on x86_64

#

1mb is for 32-bit iirc

surreal path
#

yuh

#

okay

#

heres what im gonna do

#

nothing

#

but

#

just beg a bunch of forums or something for help

#

๐Ÿ’€

#

yea idfk

flat nymph
#

Use 4KB pages and that's it

surreal path
#

2MB pages are fine

#

plus kernel dies without them for the hhdm

#

cause we run out of memory

#

which is expected

#

for how much i map

flat nymph
#

Oh I'm stupid

surreal path
#

lol

#

okay time to ask #osdev-misc-0 , osdev forums and the osdev irc channel

#

there has to be ONE answer that might get us closer

#

i hope

#

i will ask all three when i arrive at my moms, currently waiting for my step mom to collect me

flat nymph
#

No you're mapping 2mb pages

#
void map2mb(uint64_t *pt, uint64_t phys, uint64_t virt, uint64_t flags) {
  uint64_t *f = find_pte_and_allocate2mb(pt, virt);
  *f = (phys & ~0x1ffffful) | flags | PAGE2MB;
}
surreal path
#

what about that

#

lol

flat nymph
#

This (1fffff) masks 21 bits

flat nymph
surreal path
#

uhhhhh its the same on x86-64

#

lol

#

i think for both

flat nymph
#

No

#

Think

#

Hmm

molten grotto
#

there are 21 offset bits for 2mb

flat nymph
#

Never mind

#

It's 4MB on ia32

#

I need some sleep

#

Sorry

surreal path
#

its fine dw

#

at least ur trying to help

flat nymph
#

It's 1GB 2MB 4KB

surreal path
#

which i appreciate a lot

molten grotto
#

btw the memset is still wrong, rn you don't tell the compiler that the input is modified (but this is very likely unrelated as I don't think the output from it is used by the compiler)

flat nymph
#

Are you only mapping 4GB?

molten grotto
flat nymph
#

Thonk you're mapping everything

#

Btw, your hhdm_pages accounting is probably wrong

#

But it shouldn't affect anything

#

Can you make a function which prints the page mappings and print that in VM and on physical hw?

#

Your paging code is very convoluted

#

Like walking the page tables

edgy pilot
#

I think it might have been a different script

flat nymph
#

Like the code looks correct enough to me

#

But like if it's crashing loading cr3, then you have garbage in page tables

rigid fable
flat nymph
#

or that

#

But still, it's something that leads to garbage in page tables

rigid fable
flat nymph
#

ะฝะตั‚

rigid fable
#

ia dumayu on nepravilno zamapil yadro

flat nymph
#

@surreal path how do I compile your kernel

surreal path
#

sorry im back

rigid fable
flat nymph
#

Your makefiles are broken

surreal path
#

how

#

they work fine

#

show me error

flat nymph
#
misha@Yoga:~/NyauxKC$ make
./kernel/get-deps
+ dirname ./kernel/get-deps
+ srcdir=./kernel
+ test -z ./kernel
+ cd ./kernel
+ clone_repo_commit https://github.com/osdev0/freestnd-c-hdrs-0bsd.git freestnd-c-hdrs-0bsd 0353851fdebe0eb6a4d2c608c5393040d310bf35
+ test -d freestnd-c-hdrs-0bsd/.git
+ git -C freestnd-c-hdrs-0bsd reset --hard
HEAD is now at 0353851 Update macro names and include guards
+ git -C freestnd-c-hdrs-0bsd clean -fd
+ git -C freestnd-c-hdrs-0bsd checkout 0353851fdebe0eb6a4d2c608c5393040d310bf35
HEAD is now at 0353851 Update macro names and include guards
+ test -d freestnd-c-hdrs-0bsd
+ clone_repo_commit https://github.com/osdev0/cc-runtime.git cc-runtime 9c281448fe40498a6341d74f55c9af4f642c0b1d
+ test -d cc-runtime/.git
+ test -d cc-runtime
+ set +x
error: 'cc-runtime' is not a Git repository
make: *** [GNUmakefile:161: kernel-deps] Error 1
rigid fable
surreal path
#

thats the ./get-deps

#

not mine

#

from mints

#

try cleaning everything

#

and try again

#

if u have any more problems hop into vc ill try to help

rigid fable
surreal path
#

i already have one

#

in the root of the directory

#

i will add it for cc-runtime

rigid fable
surreal path
rigid fable
#

if yes then it's bad

molten grotto
surreal path
molten grotto
#

+D and +c should be in the output section

surreal path
rigid fable
molten grotto
#

doesn't really matter

flat nymph
#

Wtf is THE_REAL and AMONG_US?

#

Why are you doing it this way?

rigid fable
surreal path
#

its stupid but

#

it works

flat nymph
#

Are you sure the long part is the pmm initialization and not mappings?

rigid fable
rigid fable
surreal path
#

wait hold on

molten grotto
#

...

surreal path
#

HOLD ON

#

QWINCI

#

RELAX

#

๐Ÿ˜ญ

rigid fable
#

but for now you only need a framebuffer, usable memory and bootloader reclaimable

molten grotto
#
  • stack
#

actually nvm that's within the bl reclaim

rigid fable
surreal path
#

okay i did it properly

#

but compiler still mad

rigid fable
molten grotto
surreal path
#

okay i fixed

molten grotto
surreal path
#

is the memcpy also wrong qwinici?

thorn bramble
surreal path
#

or is it fine

thorn bramble
#

also i love how i can understand that weird language

surreal path
#

nah memcpy is fine it seems

thorn bramble
#

why u write it like that

rigid fable
thorn bramble
#

instead of using cyrillic

molten grotto
surreal path
#

yea

#

i forgor lol

rigid fable
thorn bramble
#

fair

surreal path
#

if so hop in a vc and screenshare ill try to help

rigid fable
surreal path
#

ish

#

not rlly

#

but wtv

rigid fable
surreal path
#

i just added a few flags

thorn bramble
#

iirc his kernel is based on the limine c template

rigid fable
#

its easy

thorn bramble
#

don't write it yourself

#

don't listen to him pls

surreal path
#

i hate writing makefiles

surreal path
#

i would never

rigid fable
flat nymph
surreal path
thorn bramble
#

because mint already wrote a better one than anyone will ever write in 5 minutes

surreal path
#

mhm

#

and mint will insta flam me

#

if i tried

flat nymph
#

It's not compiling

molten grotto
#

is it still the same thing

surreal path
#

hold on

surreal path
#

im upstreaming uacpi changes

#

hold on

#

can u pull my commit rq

#

remove this folder

#

go into

#

kernel

#

./git-deps

#

get*

#

and then try to make it

rigid fable
#

just write makefile yourself

flat nymph
#

fatal: No url found for submodule path 'kernel/cc-runtime' in .gitmodules

flat nymph
#

Idk

surreal path
#

just wait

#

if u mind lol

surreal path
#

ive had that issue before

#

its been solved

flat nymph
#

Entries almost certainly overlap

surreal path
#

how are u sure

flat nymph
#

my kernel prints mappings at the beginnings

surreal path
#

if there was something wrong

#

it wouldve shown

#

on the vm

surreal path
#

like show me the full output

rigid fable
surreal path
#

its really simple

#

i doubt anything with it

rigid fable
#

try to test it on real hw

surreal path
#

we've already done so

rigid fable
#

stress test pmm ๐Ÿ˜ˆ

haughty kite
#

does it still hang if you turn off uacpi shit

surreal path
#

like not load uacpi

haughty kite
#

yeah

surreal path
#

i dont load uacpi until after i switch page tables

haughty kite
#

does it still break

flat nymph
haughty kite
#

ah okay

flat nymph
#

Look at it on physical hw

surreal path
rigid fable
surreal path
#

ngl

rigid fable
#

same timing

flat nymph
#

Wdym

surreal path
#

also @flat nymph please show the full output of ur command please

rigid fable
#

or caching

surreal path
#

let me help

flat nymph
#

There will be a lot of contiguous ones

surreal path
#

like it should compile

flat nymph
# flat nymph my kernel prints mappings at the beginnings
Finding the largest memory region...
 Memory map region 0: 0x1000 - 0x2000, type 5
 Memory map region 1: 0x2000 - 0xA0000, type 0
 Memory map region 2: 0x100000 - 0x800000, type 0
 Memory map region 3: 0x800000 - 0x808000, type 3
 Memory map region 4: 0x808000 - 0x80B000, type 0
 Memory map region 5: 0x80B000 - 0x80C000, type 3
 Memory map region 6: 0x80C000 - 0x811000, type 0
 Memory map region 7: 0x811000 - 0x900000, type 3
 Memory map region 8: 0x900000 - 0x796FE000, type 0
 Memory map region 9: 0x796FE000 - 0x79704000, type 5
 Memory map region 10: 0x79704000 - 0x79826000, type 6
 Memory map region 11: 0x79826000 - 0x79827000, type 5
 Memory map region 12: 0x79827000 - 0x79829000, type 0
 Memory map region 13: 0x79829000 - 0x7982A000, type 5
 Memory map region 14: 0x7982A000 - 0x79900000, type 6
 Memory map region 15: 0x79900000 - 0x79905000, type 5
 Memory map region 16: 0x79905000 - 0x79A6F000, type 6
 Memory map region 17: 0x79A6F000 - 0x79A74000, type 5
 Memory map region 18: 0x79A74000 - 0x79B71000, type 6
 Memory map region 19: 0x79B71000 - 0x79B76000, type 5
 Memory map region 20: 0x79B76000 - 0x79C68000, type 6
 Memory map region 21: 0x79C68000 - 0x79C6D000, type 5
 Memory map region 22: 0x79C6D000 - 0x79DA7000, type 6
 Memory map region 23: 0x79DA7000 - 0x79DAC000, type 5
 Memory map region 24: 0x79DAC000 - 0x79E98000, type 6
 Memory map region 25: 0x79E98000 - 0x79E9D000, type 5
 Memory map region 26: 0x79E9D000 - 0x79EFF000, type 6
 Memory map region 27: 0x79EFF000 - 0x79F04000, type 5
 Memory map region 28: 0x79F04000 - 0x79F6A000, type 6
 Memory map region 29: 0x79F6A000 - 0x79F6D000, type 5
 Memory map region 30: 0x79F6D000 - 0x79FC8000, type 6
 Memory map region 31: 0x79FC8000 - 0x7A019000, type 6
 Memory map region 32: 0x7A019000 - 0x7A204000, type 5
 Memory map region 33: 0x7A204000 - 0x7A207000, type 0
 Memory map region 34: 0x7A207000 - 0x7A23C000, type 5
 Memory map region 35: 0x7A23C000 - 0x7BB5C000, type 0
 Memory map region 36: 0x7BB5C000 - 0x7BBA4000, type 5
 Memory map region 37: 0x7BBA4000 - 0x7E28E000, type 0
 Memory map region 38: 0x7E28E000 - 0x7E293000, type 1
 Memory map region 39: 0x7E293000 - 0x7E2A4000, type 0
 Memory map region 40: 0x7E2A4000 - 0x7E311000, type 5
 Memory map region 41: 0x7E311000 - 0x7E31C000, type 1
 Memory map region 42: 0x7E31C000 - 0x7EA7E000, type 0
 Memory map region 43: 0x7EA7E000 - 0x7EB08000, type 1
 Memory map region 44: 0x7EB08000 - 0x7F4ED000, type 0
 Memory map region 45: 0x7F4ED000 - 0x7F5ED000, type 1
 Memory map region 46: 0x7F5ED000 - 0x7F6ED000, type 1
 Memory map region 47: 0x7F6ED000 - 0x7F76D000, type 1
 Memory map region 48: 0x7F76D000 - 0x7F77F000, type 2
 Memory map region 49: 0x7F77F000 - 0x7F7FF000, type 3
 Memory map region 50: 0x7F7FF000 - 0x7FE00000, type 0
 Memory map region 51: 0x7FE00000 - 0x7FE4F000, type 5
 Memory map region 52: 0x7FE4F000 - 0x7FE92000, type 0
 Memory map region 53: 0x7FE92000 - 0x7FE96000, type 1
 Memory map region 54: 0x7FE96000 - 0x7FE98000, type 3
 Memory map region 55: 0x7FE98000 - 0x7FEDC000, type 0
 Memory map region 56: 0x7FEDC000 - 0x7FF60000, type 1
 Memory map region 57: 0x7FF60000 - 0x80000000, type 3
 Memory map region 58: 0x80000000 - 0x803E8000, type 7
 Memory map region 59: 0xE0000000 - 0xF0000000, type 1
 Memory map region 60: 0xFD00000000 - 0x10000000000, type 1
Found the largest memory region at 0x900000, size 0x78DFE000
#

Limine allocates a lot of size 0x1000 stuff

surreal path
#

no i mean ur compiling command

flat nymph
#

On my PC at home it had 130 entries lol

surreal path
#

what did u do

flat nymph
#
misha@Yoga:~/NyauxKC$ make
./kernel/get-deps
+ dirname ./kernel/get-deps
+ srcdir=./kernel
+ test -z ./kernel
+ cd ./kernel
+ clone_repo_commit https://github.com/osdev0/freestnd-c-hdrs-0bsd.git freestnd-c-hdrs-0bsd 0353851fdebe0eb6a4d2c608c5393040d310bf35
+ test -d freestnd-c-hdrs-0bsd/.git
+ git -C freestnd-c-hdrs-0bsd reset --hard
HEAD is now at 0353851 Update macro names and include guards
+ git -C freestnd-c-hdrs-0bsd clean -fd
+ git -C freestnd-c-hdrs-0bsd checkout 0353851fdebe0eb6a4d2c608c5393040d310bf35
HEAD is now at 0353851 Update macro names and include guards
+ test -d freestnd-c-hdrs-0bsd
+ clone_repo_commit https://github.com/osdev0/cc-runtime.git cc-runtime 9c281448fe40498a6341d74f55c9af4f642c0b1d
+ test -d cc-runtime/.git
+ test -d cc-runtime
+ set +x
error: 'cc-runtime' is not a Git repository
make: *** [GNUmakefile:161: kernel-deps] Error 1
rigid fable
flat nymph
molten grotto
surreal path
#

or that

#

js do that

molten grotto
#

the script is kinda stupid tbh

surreal path
#

yea

flat nymph
#

It woekd

surreal path
#

cool

flat nymph
#
src/term/../flanterm/backends/../flanterm.h:61:5: error: unknown type name โ€˜boolโ€™
   61 |     bool autoflush;
      |     ^~~~
src/term/../flanterm/backends/../flanterm.h:62:5: error: unknown type name โ€˜boolโ€™
   62 |     bool cursor_enabled;
rigid fable
surreal path
#

lol what?

flat nymph
molten grotto
#

what gcc version do you have

surreal path
#

run gcc --version

#

show the output

rigid fable
#

why not clang

surreal path
#

nyaux is compiled by default on -std=gnu2x

#

if this is causing issues

#

go into the makefile and change that

#

its js a flag

surreal path
#

or well

#

i dont use it for C

flat nymph
#
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
rigid fable
#

write makefile yourself: โŒ
fix it yourself: โœ…

molten grotto
surreal path
#

kernel/makefile

#

change

molten grotto
#

changing the flag isn't going to fix it if you use c23 features

surreal path
#

i dont rlly use c23 features atm

#

but i plan to in the future

#

ANYWAYs

#

change that flag for now

#

gnu11 or whatever u wanna use

rigid fable
#

I never thought about it

flat nymph
#

Anyway

#

Why am I doing debugging for you

surreal path
flat nymph
#

Printf page mappings

#

Coalesce them so there aren't too many of them

#

The error will become immediately appartent

surreal path
#

fine u want me to print them so bad

#

fine

#

ill print every mapping

#

but can u still try to compile nyaux halfmemeright

#

prewtty plewease

#

guess not

rigid fable
# surreal path guess not

great nyaux master don't be sad soon nyaux will be better than windows linux and macos in 9999 times meme

surreal path
#

okay i printed every mapping

#

complete dump

kind root
surreal path
#

i am not getting spoonfed

#

hes just

#

a nice person whos gonna debug the entire kernel for me instead of me having to do any work

#

/j

kind root
#

tru

flat nymph
#

Well here's your answer ```
vmm(x86_64)(): mapped 0xffff800000800000 to 0xffff800002000000 : from phys 0x800000 to 0x2000000
vmm(x86_64)(): mapped 0xffff800001e00000 to 0xffff800002000000 : from phys 0x1e00000 to 0x2000000
vmm(x86_64)(): mapped 0xffff800001e00000 to 0xffff800002200000 : from phys 0x1e00000 to 0x2200000

kind root
#

like if u dont learn to debug ez stuff like this its only downhill from here

surreal path
surreal path
#

im js lazy sometimes

surreal path
rigid fable
surreal path
#

hold that thought

rigid fable
hexed mango
kind root
surreal path
#

ok back

flat nymph
hexed mango
flat nymph
#

So one of the mappings is gotta be incorrect

surreal path
#

this is a good question

#

but why do i have overlapping mappings

#

i js map the 4GiB like a good boy

rigid fable
hexed mango
rigid fable
#

I am always mapping the kernel after entry map

flat nymph
surreal path
#

is this bad

rigid fable
#

Anything can happen

surreal path
#

becauase i both map 4Gib and the memory map

#

am i doing something wrong

#

obviously yes but what is it exactly

flat nymph
rigid fable
surreal path
rigid fable
#

you mapping 4 gb

#

and after mapping all entries ?

surreal path
#

yea

#

is that bad

#

๐Ÿ˜ญ

rigid fable
surreal path
#

no because if i didnt do it nyaux dies

#

look ill remove the mapping 4gib code

rigid fable
#

That's how you map these miserable 4 GB

flat nymph
#

Could it be that 4GB mappings are correct and it works in a VM, but on my PC with 32GB of ram there's a bunch of stuff that's beyond it and so it breaks?

rigid fable
surreal path
#

i have 16gb of ram

#

that desktop had 8

#

hold on im gonna give the vm like an absurb amount of ra

#

ram

flat nymph
#

No

#

Find a PC where it breaks

#

Print the mappings

#

And check that they are correct

surreal path
#

i.e. my laptop

#

oh yeah removing the 4gib mappings obviously breaks nyaux

#

for obvious reasons

flat nymph
#

Optionally, look at the code and fix the overlapping mappings

surreal path
#

i am looking at the code

#

i js dont understand why its overrlapping

#

now hold on ill reboot my pc into nyaux

flat nymph
surreal path
#

so i know if its coming from the memory map or

#

the 4gib mappings

flat nymph
#

You don't need 4gb

surreal path
surreal path
#

i need to map the hhdm

#

this seems to be from the memorymap

rigid fable
#

think with brain

surreal path
#

not the 4gib mappings

rigid fable
#

absolutely all physical memory

#

you don't need 4gb mapping

surreal path
#

yea arent u supposed to do that thats the point of ze hhdm lol

surreal path
#

right

#

wait tho

#

wait

#

nonono

#

hold on

flat nymph
#

Idk I don't even use hhdm ultrameme

rigid fable
surreal path
flat nymph
#

Hhdm is direct mapping

rigid fable
#

0x1000 phys to 0x1000 virtual and etc

flat nymph
#

No

#

I don't use that

rigid fable
#

hooray

surreal path
#

as per suggestions i added this as well