Skip to content
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设置为64K PageSize后 无法启动 #47

Open
Xinmudotmoe opened this issue Mar 5, 2024 · 7 comments
Open

Kernel设置为64K PageSize后 无法启动 #47

Xinmudotmoe opened this issue Mar 5, 2024 · 7 comments

Comments

@Xinmudotmoe
Copy link

image

同时 大多数elf的配置中对齐为0x4000(16k) 这可能与ld.bfd的代码有关

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000027a6c 0x0000000000027a6c  R E    `0x4000`
  LOAD           0x000000000002af30 0x000000000002af30 0x000000000002af30
                 0x00000000000021f0 0x0000000000002390  RW     `0x4000`
  DYNAMIC        0x000000000002bec0 0x000000000002bec0 0x000000000002bec0
                 0x0000000000000140 0x0000000000000140  RW     0x8
  GNU_EH_FRAME   0x00000000000242b0 0x00000000000242b0 0x00000000000242b0
                 0x000000000000088c 0x000000000000088c  R      0x4
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RW     0x10
  GNU_RELRO      0x000000000002af30 0x000000000002af30 0x000000000002af30
                 0x00000000000010d0 0x00000000000010d0  R      0x1
@Xinmudotmoe

This comment was marked as resolved.

@chenhuacai
Copy link

不能构建那前面的panic从何而来?

@Xinmudotmoe
Copy link
Author

不能构建那前面的panic从何而来?

关掉透明大页配置后构建出来的

@chenhuacai
Copy link

ARCH_FORCE_MAX_ORDER设置的是多少?

@Xinmudotmoe
Copy link
Author

ARCH_FORCE_MAX_ORDER设置的是多少?

CONFIG_ARCH_FORCE_MAX_ORDER=11
CONFIG_PAGE_SIZE_64KB=y

不过看arch/loongarch/Kconfig 的话, ARCH_FORCE_MAX_ORDER有default "13" if PAGE_SIZE_64KB
问题是否出在make defconfig?

@chenhuacai
Copy link

make defconfig应该做不到非常智能地解决这个问题。

@xry111
Copy link
Member

xry111 commented Mar 7, 2024

Just put a static_assert to reject invalid ARCH_FORCE_MAX_ORDER + PAGE_SIZE combinations and tell the user to adjust ARCH_FORCE_MAX_ORDER?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants