summaryrefslogtreecommitdiff
path: root/MdePkg/Include/Protocol/DtFixup.h
blob: 0f6f3849f90f7d33299d3f3e97f46e32806f7ed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/** @file
  Device Tree Fixup Protocol.

  Modifies a device tree in memory to align it with the firmware's view of
  the platform.

  Specification:
  https://github.com/U-Boot-EFI/EFI_DT_FIXUP_PROTOCOL

  Copyright (c) 2025, Heinrich Schuchardt.<BR>
  SPDX-License-Identifier: BSD-2-Clause-Patent

**/

#pragma once

#include <Uefi/UefiBaseType.h>

//
// {60ed6ba9-dfef-4799-ac7b-75e0f833456c}
//
#define DT_FIXUP_PROTOCOL_GUID \
  { 0x60ed6ba9, 0xdfef, 0x4799, { 0xac, 0x7b, 0x75, 0xe0, 0xf8, 0x33, 0x45, 0x6c } }

#define DT_FIXUP_PROTOCOL_REVISION  0x00010000

typedef struct _DT_FIXUP_PROTOCOL DT_FIXUP_PROTOCOL;

typedef
EFI_STATUS
(EFIAPI *DT_FIXUP)(
  IN DT_FIXUP_PROTOCOL *This,
  IN OUT VOID          *Fdt,
  IN OUT UINTN         *BufferSize
  );

struct _DT_FIXUP_PROTOCOL {
  UINT64      Revision;
  DT_FIXUP    Fixup;
};

extern EFI_GUID  gDtFixupProtocolGuid;