How to get IO allocated resource for devices

Hi all,
I am developing a kernel mode driver and I want to use WRITE_PORT_XYZ API to send data to a specific device.
Ref: WRITE_PORT_UCHAR function (wdm.h) - Windows drivers | Microsoft Learn

This function requires an address value of IO memory range.

After some investigate, I see that we can find IO memory range in Device Manager of the device like below figure:
image

How I can get that information programmatically in a kernel mode driver?

Any idea will be appreciated.

You don't own those registers. You aren't expected to write to them unless you are in the driver stack for that device.

The SMBus is owned by the BIOS. You shouldn't be messing with it. What's the overall problem you're trying to solve here? The SMBus driver does offer some internal ioctls to the upper layer drivers in its stack.