nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [incubator-nuttx] btashton edited a comment on pull request #979: PCI-E support with x86_64/qemu example
Date Thu, 07 May 2020 15:30:32 GMT

btashton edited a comment on pull request #979:

   > I am quite uncertain that `pci_cfg_read` should directly return the value or not.

   > Need suggestions.
   > Yes, it more convenient to use and the semantics are much better if we driectly return
the content.
   > However, I get quite paranoid about the fact that someone might give an invalid size
to read.
   > Of course, we can make 4 functions: read8, read16, read32 and read64, but the code
will bloat.
   For what it is worth freebsd uses basically the same prototype. 
        pcie_read_config(device_t dev, int	reg, int width);
   I think if we put a debug assert in we should be fine since the code is broken either way.
 I don't see a case where the read or write length should be dynamic. 
   While I'm not following this exactly I am using this for inspiration of interfaces.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message