You've already forked slimbootloader
mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-03-06 15:26:20 -08:00
Add SetDeviceAddr() for device table update
Currently SBL library has GetDeviceAddr() to get the device address based on device type and instance. This patch adds SetDeviceAddr() to update a given device type and address so that platform could update the device table dynamically. Signed-off-by: Guo Dong <guo.dong@intel.com>
This commit is contained in:
@@ -559,6 +559,29 @@ GetDeviceAddr (
|
||||
IN UINT8 DeviceInstance
|
||||
);
|
||||
|
||||
/**
|
||||
Set device address in device table
|
||||
|
||||
If the device is PCI device, the device address format is 0x00BBDDFF, where
|
||||
BB, DD and FF are PCI bus, device and function number.
|
||||
If the device is MMIO device, the device address format is 0xMMxxxxxx, where
|
||||
MM should be non-zero value, xxxxxx could be any value.
|
||||
|
||||
@param[in] DeviceType The device type, refer OS_BOOT_MEDIUM_TYPE.
|
||||
@param[in] DeviceInstance The device instance number starting from 0.
|
||||
@param[in] DeviceAddr The device address.
|
||||
|
||||
@retval EFI_SUCCESS If the given device type and instance are found and set.
|
||||
EFI_NOT_FOUND The given device type and instance are not found.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SetDeviceAddr (
|
||||
IN UINT8 DeviceType,
|
||||
IN UINT8 DeviceInstance,
|
||||
IN UINT32 DeviceAddr
|
||||
);
|
||||
|
||||
/**
|
||||
This function retrieves container list pointer.
|
||||
|
||||
Reference in New Issue
Block a user