FlorenceOS / Florence

The Renaissance of Operating Systems
BSD Zero Clause License
156 stars 1 forks source link

platform/aarch64: Page fault on `virt` target #51

Closed notYuriy closed 3 years ago

notYuriy commented 3 years ago

Running zig build virt yields the following output from QEMU

Could not open option rom 'vgabios-ramfb.bin': No such file or directory
fw_cfg kernel of size 0028D0F0
Allocating kernel memory
Bytes allocated for kernel: 0000000000180000
Loading kernel into memory
Starting display
ramfb_fw_cfg_write: 1024x768 @ 0x4051d000
Found ramfb!
Starting SMP
Number of CPUs found: 00000004
Found XSDT!
Entering kernel...
Stivale2: Registered UART
Bootloader: Sabaton - Forged in Valhalla by the hammer of Thor
Bootloader version: virt - ReleaseSmall
Parsed stivale2 tags:
  Memmap: 4 entries:
    Base: 0x40000000, length: 0x390000, type=0x1000
    Base: 0x40390000, length: 0x180000, type=0x1001
    Base: 0x40510000, length: 0xD000, type=0x1000
    Base: 0x40827000, length: 0xFF7D9000, type=0x1

  Framebuffer: 0x4051D000, 1024x768, bpp=32, pitch=4096
  RSDP: 1082265600
  SMP: phys 0x4081D000
  DTB: 0x100000 bytes at 0x40000000
  UART: 0x9000000
  UART with status: null

Stivale2: Parsed devicetree blob!
Stivale: Consuming 0x40827000 to 0x140000000
Doing vmm
Initializing vmm with base 0xFFFFE00000000000
Doing framebuffer
VESAlog: Screen cleared.
VESAlog: width=1024, height=768, pitch=4096, bpp=4
Doing scheduler
Doing SMP
All cores are ready for tasks!
Registering rsdp: 0x40821000!
ACPI: Revision: 2
ACPI: MADT found on unsupported architecture!
[LAI UNK]: loaded AML table 'DSDT', total 18556 bytes of AML code.
[LAI UNK]: ACPI namespace created, total of 254 predefined objects.
PCI: [00:00:0]{1b36:0008} (06:00:00) Host bridge
PCI: [00:01:0]{1af4:1000} (02:00:00) Ethernet controller
PCI: [00:02:0]{1af4:1050} (03:80:00) Virtio display controller
Platform: Unhandled page fault on Write at 0xfffffffffffffff0, present: false
FRAME DUMP:
X0 =ffffffff801985c0 X1 =0000000000000000 X2 =0000000000000280 X3 =0000000000000008
X4 =0000000000000000 X5 =ffffffff8013222c X6 =000000007fe689c0 X7 =ffffffff8017f2b8
X8 =0000000000000280 X9 =ffffffff8017f699 X10=ffffffff8017f919 X11=0000000000000000
X12=000000000000aaaa X13=00000000ffffffff X14=0000000000000080 X15=00000000ffffffff
X16=0000000000010024 X17=0000000000000020 X18=0000000000000000 X19=ffffffff8017f9d8
X20=ffffc08000007000 X21=ffffffff801ab478 X22=0000000000000000 X23=0000000000000001
X24=0000000000000000 X25=ffffc08000004000 X26=0000000000000000 X27=ffffc08000005000
X28=0000000000010000 X29=ffffc08000006000 X30=ffffffff801337c0 X31=0000000000000000
PC =ffffffff80144140 SP =ffffffff8017efd0 SPSR=00000000000003c5
Dumping ip=0xffffffff80144140, bp=0xffffc08000006000
Opening debug info
Opened debug info
Couldn't find the compile unit at ffffffff80144140: MissingDebugInfo
PANIC 1: CPU 0: Page fault!
idfk I didn't get a stack trace.

I don't need to state that its not expected behaviour :^)

notYuriy commented 3 years ago

Page fault occurs in PCI init

N00byEdge commented 3 years ago

I believe this was fixed in this commit. I mean, aarch64 is still not working but this specific issue has been fixed :)