mirror of
https://github.com/ipxe/ipxe
synced 2026-01-25 16:21:53 +03:00
[efi] Create a copy of the system flattened device tree, if present
EFI configuration tables may be freed at any time, and there is no way to be notified when the table becomes invalidated. Create a copy of the system flattened device tree (if present), so that we do not risk being left with an invalid pointer. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -78,9 +78,9 @@ struct fdt {
|
||||
/** Tree data */
|
||||
union {
|
||||
/** Tree header */
|
||||
const struct fdt_header *hdr;
|
||||
struct fdt_header *hdr;
|
||||
/** Raw data */
|
||||
const void *raw;
|
||||
void *raw;
|
||||
};
|
||||
/** Length of tree */
|
||||
size_t len;
|
||||
@@ -107,7 +107,7 @@ extern int fdt_u64 ( struct fdt *fdt, unsigned int offset, const char *name,
|
||||
uint64_t *value );
|
||||
extern int fdt_mac ( struct fdt *fdt, unsigned int offset,
|
||||
struct net_device *netdev );
|
||||
extern int fdt_parse ( struct fdt *fdt, const struct fdt_header *hdr,
|
||||
extern int fdt_parse ( struct fdt *fdt, struct fdt_header *hdr,
|
||||
size_t max_len );
|
||||
|
||||
#endif /* _IPXE_FDT_H */
|
||||
|
||||
Reference in New Issue
Block a user