-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel/aarch64: Perform an ISB after setting TTBR*_EL1 #25557
Conversation
@implicitfield does this also fix your page fault issue when running with hvf? |
Changes to ARM system registers are not guaranteed to be visible until a context synchronization event, like performing an ISB.
44a835d
to
6b3edc5
Compare
Yes, this does fix the page faults, and now the system appears to boot fine. Unfortunately, nothing appears on the framebuffer, and qemu itself crashes a few seconds after the system has finished starting up, as it hits this assertion. I found a somewhat similar issue on the qemu bug tracker, so could it be that we're not accessing some MMIO region properly somewhere? Kernel log[Kernel]: No early framebuffer console available, initializing dummy console
[Kernel]: Starting SerenityOS...
[Kernel]: DeviceTree: Attached device "timer" to driver ARMv8TimerDriver
[Kernel]: DeviceTree: Attached device "intc@8000000" to driver GICDriver
[Kernel]: TimeManagement: System timer: ARMv8 Timer
0.000 [Kernel]: KernelRng: Using bad entropy source TimeManagement
0.000 [#0 Kernel]: VFSRootContext(0): Root ("/") FileSystemID 1, Mounting RAMFS at inode 1:1 with flags 0
0.000 [#0 Kernel]: VFSRootContext(0): Context is artificially made, detach from global list
0.000 [#0 colonel(0:0)]: Scheduler[0]: idle loop running
0.237 [init_stage2(1:1)]: PCI [0000:00:00:00] PCI::HardwareID [1b36:0008]
0.237 [init_stage2(1:1)]: PCI [0000:00:01:00] PCI::HardwareID [8086:244e]
0.242 [init_stage2(1:1)]: PCI [0000:01:00:00] PCI::HardwareID [1b36:0010]
0.242 [init_stage2(1:1)]: PCI [0000:00:02:00] PCI::HardwareID [1234:1111]
0.310 [#0 init_stage2(1:1)]: Framebuffer Console: taking 3145728 bytes
0.314 [#0 init_stage2(1:1)]: Framebuffer Console: taking 3145728 bytes
0.314 [#0 init_stage2(1:1)]: VC 0: Resized to 113 x 48
0.314 [#0 init_stage2(1:1)]: VC 1: Resized to 113 x 48
0.314 [#0 init_stage2(1:1)]: VC 2: Resized to 113 x 48
0.314 [#0 init_stage2(1:1)]: VC 3: Resized to 113 x 48
0.314 [#0 init_stage2(1:1)]: VC 4: Resized to 113 x 48
0.314 [#0 init_stage2(1:1)]: VC 5: Resized to 113 x 48
0.320 [#0 init_stage2(1:1)]: AudioManagement: no audio controller was initialized.
0.324 [#0 VFS Sync Task(4:4)]: VFS SyncTask is running
2.322 [#0 init_stage2(1:1)]: GUIDPartitionTable: bad signature 0x00000000 0x00000000
2.322 [#0 init_stage2(1:1)]: VFSRootContext(1): Root ("/") FileSystemID 2, Mounting RAMFS at inode 2:1 with flags 0
2.322 [init_stage2(1:1)]: Ext2FS: Mount successful, setting superblock to error state.
2.326 [#0 init_stage2(1:1)]: VirtualFileSystem: Unmounting file system 2 for the last time...
2.326 [#0 init_stage2(1:1)]: VirtualFileSystem: Unmounting file system 2...
2.326 [#0 init_stage2(1:1)]: VFSRootContext(1): Root mount set to FileSystemID 3, Mounting Ext2FS at inode 3:2 with flags 0
2.326 [init_stage2(1:1)]: Write-protected kernel symbols after init.
2.326 [init_stage2(1:1)]: Unmapped 272 KiB of kernel text after init! :^)
2.326 [init_stage2(1:1)]: Running first user process: /init
2.326 [init_stage2(1:1)]: Init (first) process args: [ ]
2.342 [Network Task(7:7)]: NetworkTask: LoopbackAdapter network adapter found: hw={13:55:02:09:55:aa}
2.354 init(6): Spawning mount -a to mount all filesystems.
2.358 mount(8): Mounting all filesystems...
2.358 mount(8): Skipping mounting root
2.358 mount(8): Mounting /bin (bind) on /bin
2.358 [#0 mount(8:8)]: VFSRootContext(1): Bind-mounting inode 3:115272 at inode 3:115272
2.362 mount(8): Mounting /etc (bind) on /etc
2.362 [#0 mount(8:8)]: VFSRootContext(1): Bind-mounting inode 3:119379 at inode 3:119379
2.362 mount(8): Mounting /home (bind) on /home
2.362 [#0 mount(8:8)]: VFSRootContext(1): Bind-mounting inode 3:12290 at inode 3:12290
2.362 mount(8): Mounting /root (bind) on /root
2.362 [#0 mount(8:8)]: VFSRootContext(1): Bind-mounting inode 3:33364 at inode 3:33364
2.362 mount(8): Mounting /var (bind) on /var
2.362 [#0 mount(8:8)]: VFSRootContext(1): Bind-mounting inode 3:102996 at inode 3:102996
2.362 mount(8): Mounting /www (bind) on /www
2.362 [#0 mount(8:8)]: VFSRootContext(1): Bind-mounting inode 3:90708 at inode 3:90708
2.362 mount(8): Mounting /usr/Tests (bind) on /usr/Tests
2.362 [#0 mount(8:8)]: VFSRootContext(1): Bind-mounting inode 3:33092 at inode 3:33092
2.362 mount(8): Mounting /usr/local (bind) on /usr/local
2.362 [#0 mount(8:8)]: VFSRootContext(1): Bind-mounting inode 3:41304 at inode 3:41304
2.362 mount(8): Mounting /usr/Ports (bind) on /usr/Ports
2.362 [#0 mount(8:8)]: VFSRootContext(1): Bind-mounting inode 3:127325 at inode 3:127325
2.366 [#0 init(6:6)]: VirtualFileSystem: Remounting inode 3:2
2.366 [#0 init(6:6)]: VFSRootContext(1): FileSystemID 4, Mounting ProcFS at inode 3:8193 with flags 4
2.366 [#0 init(6:6)]: VFSRootContext(1): FileSystemID 5, Mounting SysFS at inode 3:86612 with flags 0
2.366 [#0 init(6:6)]: VFSRootContext(1): FileSystemID 6, Mounting RAMFS at inode 3:53844 with flags 262
2.366 [#0 init(6:6)]: VFSRootContext(1): FileSystemID 7, Mounting RAMFS at inode 3:119380 with flags 5
2.366 init(6): Creating /tmp/system/devicemap directory
2.366 [#0 init(6:6)]: VFSRootContext(1): FileSystemID 8, Mounting RAMFS at inode 7:3 with flags 7
2.374 [#0 init(6:6)]: VFSRootContext(1): FileSystemID 9, Mounting DevPtsFS at inode 6:10 with flags 0
2.374 [#0 init(6:6)]: VFSRootContext(1): FileSystemID 10, Mounting DevLoopFS at inode 6:11 with flags 0
2.378 init(6): Creating /tmp/coredump directory
2.378 init(6): Setting /tmp/coredump as the coredump directory
2.378 init(6): Creating /tmp/semaphore directory
2.395 SystemServer(6): Read system_mode: text
2.399 SystemServer(6): No such file or directory (errno=2)
2.399 SystemServer(6): No such file or directory (errno=2)
2.399 SystemServer(6): No such file or directory (errno=2)
2.399 SystemServer(6): Activating 4 services...
2.455 LookupServer(11): Using network config file at /etc/LookupServer.ini
2.476 NetworkServer(12): Interfaces to configure: [ ep1s0 ]
2.480 SystemServer(6): Service NetworkServer has exited with exit code 0
Assertion failed: (isv), function hvf_vcpu_exec, file hvf.c, line 1230.
|
Changes to ARM system registers are not guaranteed to be visible until a context synchronization event, like performing an ISB.