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

i386 kernel build fixes #1722

Merged
merged 4 commits into from
Jun 28, 2023
Merged

i386 kernel build fixes #1722

merged 4 commits into from
Jun 28, 2023

Conversation

bsdjhb
Copy link
Collaborator

@bsdjhb bsdjhb commented Jun 21, 2023

  • Enable common PMAP macros on all platforms.
  • vm: Update a few printf formats to uintmax_t to pacify 32-bit build.
  • proc_cheri_cap_page: Use PHYS_TO_DMAP_PAGE.
  • OFED: Fix a few places that use get_user_pages.

This fixes the build on i386 and other architectures which didn't
have a definition of PHYS_TO_DMAP_PAGE but which do have a stub
for PHYS_TO_DMAP.

Also, one can't use #if PMAP_HAS_DMAP, PMAP_HAS_DMAP is a runtime-only
macro as it maps to a variable (not a constant) on powerpc.

Use uintmax_t casts to print PAs while here to pacify the build on
32-bit platforms as well as i386 which has 64-bit PAs.
This was a lost race due to PIOD_WRITE_CHERI_CAP landing before the
introduction of PHYS_TO_DMAP_PAGE.
@bsdjhb bsdjhb requested a review from qwattash June 21, 2023 17:27
@bsdjhb
Copy link
Collaborator Author

bsdjhb commented Jun 21, 2023

This doesn't get an i386 kernel fully building for me. For some reason the compiler can't find compiler intrinsic headers like wmmintrin.h, so a bunch of crypto drivers fail to compile. ZFS also fails to compile but I will fix that on the next ZFS merge.

The first argument needs to be a void * now rather than an integer.

cheribuild doesn't notice this for amd64 since it disables OFED even
for non-cheri platforms.
@bsdjhb bsdjhb merged commit d703635 into CTSRD-CHERI:dev Jun 28, 2023
19 of 20 checks passed
@bsdjhb bsdjhb deleted the i386_kernel branch June 28, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants