Compare commits

..

4 Commits

3 changed files with 33 additions and 25 deletions

42
flake.lock generated
View File

@ -11,11 +11,11 @@
"src-pythonparser": "src-pythonparser" "src-pythonparser": "src-pythonparser"
}, },
"locked": { "locked": {
"lastModified": 1734418848, "lastModified": 1738745577,
"narHash": "sha256-FiK84edtdmpJ3FUA58XAUmDDp4oVPgupmf1CcgJ6rC0=", "narHash": "sha256-3pOrZSUb9XHyR6zSG5Ykfo+1+piMXTUjf6RYu/JziNU=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "366bb0fc59dbe4d5f544908b0f3e31f8eb19f7c1", "rev": "9558dd20e1cf3aa0afcaf1acf29202350c040cdc",
"revCount": 9121, "revCount": 9146,
"type": "git", "type": "git",
"url": "https://github.com/m-labs/artiq.git" "url": "https://github.com/m-labs/artiq.git"
}, },
@ -37,11 +37,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1720768567, "lastModified": 1734270714,
"narHash": "sha256-3VoK7o5MtHtbHLrc6Pv+eQWFtaz5Gd/YWyV5TD3c5Ss=", "narHash": "sha256-7bzGn/hXLIsLQHGQsvo+uoIFUrw9DjXSlMC449BY4ME=",
"owner": "m-labs", "owner": "m-labs",
"repo": "artiq-comtools", "repo": "artiq-comtools",
"rev": "f93570d8f2ed5a3cfb3e1c16ab00f2540551e994", "rev": "7e3152314af8f5987370e33b347b2ec2697567ed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -70,11 +70,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1733940404, "lastModified": 1736883708,
"narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=", "narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713", "rev": "eb62e6aa39ea67e0b8018ba8ea077efe65807dc8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -158,11 +158,11 @@
"src-migen": { "src-migen": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1727677091, "lastModified": 1737001477,
"narHash": "sha256-Zg3SQnTwMM/VkOGKogbPyuCC2NhLy8HB2SPEUWWNgCU=", "narHash": "sha256-5Rv7R8OO/CsjdDreo+vCUO7dIrTD+70meV5rIvHOGDk=",
"owner": "m-labs", "owner": "m-labs",
"repo": "migen", "repo": "migen",
"rev": "c19ae9f8ae162ffe2d310a92bfce53ac2a821bc8", "rev": "28e913e7114dae485747ccd8f9fd436ada2195f0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -174,11 +174,11 @@
"src-misoc": { "src-misoc": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1729234629, "lastModified": 1737003678,
"narHash": "sha256-TLsTCXV5AC2xh+bS7EhBVBKqdqIU3eKrnlWcFF9LtAM=", "narHash": "sha256-YGswRUz5QH28FsVK0j4n/Op6ptFTPPdEOir0JkxfSa0=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "6085a312bca26adeca6584e37d08c8ba2e1d6e38", "rev": "3c2054c43309d2fa3b72c5435f90c2357f2908af",
"revCount": 2460, "revCount": 2465,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/m-labs/misoc.git" "url": "https://github.com/m-labs/misoc.git"
@ -229,11 +229,11 @@
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1734668221, "lastModified": 1736951160,
"narHash": "sha256-X0U2yPmlsD3VLBZQyfWv8qw04Qn0qFWIONJUPPigB0U=", "narHash": "sha256-bOiSeKEIwSJb62qjT7mqb0JQiqSEYMt6eFuDdGi+7Cw=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "213529cf7a50aa1b2d9ffdf575e3e38202ff9bd6", "rev": "19efdafce7b212cce95ea9b3a20e6f1d388aba9e",
"revCount": 666, "revCount": 667,
"type": "git", "type": "git",
"url": "https://git.m-labs.hk/m-labs/zynq-rs" "url": "https://git.m-labs.hk/m-labs/zynq-rs"
}, },

View File

@ -85,7 +85,7 @@ unsafe fn get_ttype_entry(
encoding | DW_EH_PE_pcrel, encoding | DW_EH_PE_pcrel,
ttype_base, ttype_base,
) )
.map(|v| (v != ttype_base).then(|| v as *const u8)) .map(|v| (v != 0).then(|| v as *const u8))
} }
pub unsafe fn find_eh_action( pub unsafe fn find_eh_action(
@ -275,6 +275,11 @@ unsafe fn read_encoded_pointer_with_base(reader: &mut DwarfReader, encoding: u8,
_ => return Err(()), _ => return Err(()),
}; };
if result == 0 {
// null is just encoded as 0, even if a relative encoding is used for the table.
return Ok(0);
}
result += if (encoding & 0x70) == DW_EH_PE_pcrel { result += if (encoding & 0x70) == DW_EH_PE_pcrel {
original_ptr as usize original_ptr as usize
} else { } else {

View File

@ -411,29 +411,32 @@ pub mod drtio {
} }
Ok(Packet::DestinationOkReply) => (), Ok(Packet::DestinationOkReply) => (),
Ok(Packet::DestinationSequenceErrorReply { channel }) => { Ok(Packet::DestinationSequenceErrorReply { channel }) => {
let global_ch = ((destination as u32) << 16) | channel as u32;
error!( error!(
"[DEST#{}] RTIO sequence error involving channel 0x{:04x}:{}", "[DEST#{}] RTIO sequence error involving channel 0x{:04x}:{}",
destination, destination,
channel, channel,
resolve_channel_name(channel as u32) resolve_channel_name(global_ch)
); );
unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_SEQUENCE_ERROR }; unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_SEQUENCE_ERROR };
} }
Ok(Packet::DestinationCollisionReply { channel }) => { Ok(Packet::DestinationCollisionReply { channel }) => {
let global_ch = ((destination as u32) << 16) | channel as u32;
error!( error!(
"[DEST#{}] RTIO collision involving channel 0x{:04x}:{}", "[DEST#{}] RTIO collision involving channel 0x{:04x}:{}",
destination, destination,
channel, channel,
resolve_channel_name(channel as u32) resolve_channel_name(global_ch)
); );
unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_COLLISION }; unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_COLLISION };
} }
Ok(Packet::DestinationBusyReply { channel }) => { Ok(Packet::DestinationBusyReply { channel }) => {
let global_ch = ((destination as u32) << 16) | channel as u32;
error!( error!(
"[DEST#{}] RTIO busy error involving channel 0x{:04x}:{}", "[DEST#{}] RTIO busy error involving channel 0x{:04x}:{}",
destination, destination,
channel, channel,
resolve_channel_name(channel as u32) resolve_channel_name(global_ch)
); );
unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_BUSY }; unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_BUSY };
} }