linux-surface / surface-pro-x

Tracking and meta repository for Surface Pro X support.
83 stars 6 forks source link

Some GRUB versions do not work #12

Open qzed opened 2 years ago

qzed commented 2 years ago

Some GRUB versions, notably the ones provided by Arch Linux ARM and Fedora, do not seem to work well with the Surface Pro X and prevent the kernel from booting. The device seems to lock up even before the kernel exits the EFI stub. This may be an issue with kernel loader changes introduced by Red Hat, as plain upstream GRUB sources seem to behave well. We should find out what exactly causes this issue.

Known working GRUB images can be found at https://github.com/linux-surface/grub-image-aarch64.

qzed commented 2 years ago

See https://github.com/linux-surface/grub/issues/1 for more information.

qzed commented 2 years ago

It looks like the Pro X is one of the few devices that actually care about different memory types and the redhat patches allocate data-type memory for the kernel. When we try to execute that on the Pro X, it stalls. Allocating code-type memory instead fixes this: https://github.com/linux-surface/grub/commit/55b95a388414a3d850e24fd2ae8fac100ffd9319. I've submitted a PR with this commit to rhboot/grub2: https://github.com/rhboot/grub2/pull/101.