Skip to content

portio also doesn't work on 32bit#302

Merged
JohnAZoidberg merged 1 commit intomainfrom
portio-no-32bit
Mar 26, 2026
Merged

portio also doesn't work on 32bit#302
JohnAZoidberg merged 1 commit intomainfrom
portio-no-32bit

Conversation

@JohnAZoidberg
Copy link
Copy Markdown
Member

Fixes 371da5f

We don't have any 32bit system, so we don't need to do portio on those.

Fixes 371da5f

We don't have any 32bit system, so we don't need to do portio on those.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
@JohnAZoidberg
Copy link
Copy Markdown
Member Author

@nadzyah this should fix x86

@JohnAZoidberg
Copy link
Copy Markdown
Member Author

If you still have issues, they are probably related to libraries that I link to?

You can post the error message here or we can ignore x86 and s390x

@nadzyah
Copy link
Copy Markdown
Contributor

nadzyah commented Mar 26, 2026

Thank you so much!

here are the errors I get on i386:

error[E0308]: mismatched types
    --> src/chromium_ec/portio.rs:115:26
     |
 115 |         let res = ioperm(EC_LPC_ADDR_HOST_ARGS as u64, 8 + 0xFF, 1);
     |                   ------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u64`
     |                   |
     |                   arguments to this function are incorrect
     |
note: function defined here
    --> /usr/share/cargo/registry/libc-0.2.178/src/unix/linux_like/linux/mod.rs:5706:20
     |
5706 |             pub fn ioperm(from: c_ulong, num: c_ulong, turn_on: c_int) -> c_int;
     |                    ^^^^^^
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
     |
 115 |         let res = ioperm((EC_LPC_ADDR_HOST_ARGS as u64).try_into().unwrap(), 8 + 0xFF, 1);
     |                          +                            +++++++++++++++++++++

error[E0308]: mismatched types
    --> src/chromium_ec/portio.rs:122:26
     |
 122 |         let res = ioperm(EC_LPC_ADDR_HOST_CMD as u64, 1, 1);
     |                   ------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u64`
     |                   |
     |                   arguments to this function are incorrect
     |
note: function defined here
    --> /usr/share/cargo/registry/libc-0.2.178/src/unix/linux_like/linux/mod.rs:5706:20
     |
5706 |             pub fn ioperm(from: c_ulong, num: c_ulong, turn_on: c_int) -> c_int;
     |                    ^^^^^^
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
     |
 122 |         let res = ioperm((EC_LPC_ADDR_HOST_CMD as u64).try_into().unwrap(), 1, 1);
     |                          +                           +++++++++++++++++++++

error[E0308]: mismatched types
    --> src/chromium_ec/portio.rs:124:26
     |
 124 |         let res = ioperm(EC_LPC_ADDR_HOST_DATA as u64, 1, 1);
     |                   ------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u64`
     |                   |
     |                   arguments to this function are incorrect
     |
note: function defined here
    --> /usr/share/cargo/registry/libc-0.2.178/src/unix/linux_like/linux/mod.rs:5706:20
     |
5706 |             pub fn ioperm(from: c_ulong, num: c_ulong, turn_on: c_int) -> c_int;
     |                    ^^^^^^
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
     |
 124 |         let res = ioperm((EC_LPC_ADDR_HOST_DATA as u64).try_into().unwrap(), 1, 1);
     |                          +                            +++++++++++++++++++++

error[E0308]: arguments to this function are incorrect
    --> src/chromium_ec/portio.rs:127:19
     |
 127 |         let res = ioperm(NPC_MEMMAP_OFFSET as u64, super::EC_MEMMAP_SIZE as u64, 1);
     |                   ^^^^^^ ------------------------  ---------------------------- expected `u32`, found `u64`
     |                          |
     |                          expected `u32`, found `u64`

s390x has 12 failing tests, the buildlog can be found here: https://buildd.debian.org/status/fetch.php?pkg=rust-framework-lib&arch=s390x&ver=0.6.1-3&stamp=1774464471&raw=0

@JohnAZoidberg
Copy link
Copy Markdown
Member Author

here are the errors I get on i386:

Ah yeah, so this PR here should fix it.

Copy link
Copy Markdown
Contributor

@nadzyah nadzyah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for working on that! Looking forward to seeing this released on crates.io (together with the shell completions!)

@JohnAZoidberg JohnAZoidberg merged commit 3f2deb2 into main Mar 26, 2026
10 checks passed
@JohnAZoidberg JohnAZoidberg deleted the portio-no-32bit branch March 26, 2026 14:25
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