device/pci_rom: Add simple pci_rom_free()
It adds simple function, which frees the memory which could be allocated by pci_rom_probe(). In the next step it will be modified to free only memory, which was mapped from CBFS. BUG=b:278264488 TEST=Build and run with additional debug prints added to confirm that data are correctly unmapped Change-Id: Ibc9aad34b6bf101a3a0c06b92ed2dc6f2d7b9b33 Signed-off-by: Grzegorz Bernacki <bernacki@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74778 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Himanshu Sahdev <himanshu.sahdev@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
d34dbe5888
commit
e6b4597fef
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <endian.h>
|
||||
#include <acpi/acpi.h>
|
||||
#include <cbfs.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define PCI_ROM_HDR 0xAA55
|
||||
|
@ -42,6 +43,11 @@ struct rom_header *pci_rom_probe(const struct device *dev);
|
|||
struct rom_header *pci_rom_load(struct device *dev,
|
||||
struct rom_header *rom_header);
|
||||
|
||||
static inline void pci_rom_free(struct rom_header *rom_header)
|
||||
{
|
||||
cbfs_unmap(rom_header);
|
||||
}
|
||||
|
||||
unsigned long
|
||||
pci_rom_write_acpi_tables(const struct device *device,
|
||||
unsigned long current,
|
||||
|
|
Loading…
Reference in New Issue