diff mbox

[MULTIBOOT2,DOC,v2,06/11] multiboot2: Add description of EFI image handle tags

Message ID 1480020010-18421-7-git-send-email-daniel.kiper@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Kiper Nov. 24, 2016, 8:40 p.m. UTC
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 doc/multiboot.texi |   28 ++++++++++++++++++++++++++++
 doc/multiboot2.h   |   16 ++++++++++++++++
 2 files changed, 44 insertions(+)

Comments

Andrei Borzenkov Nov. 28, 2016, 5:59 p.m. UTC | #1
24.11.2016 23:40, Daniel Kiper пишет:
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
>  doc/multiboot.texi |   28 ++++++++++++++++++++++++++++
>  doc/multiboot2.h   |   16 ++++++++++++++++
>  2 files changed, 44 insertions(+)
> 
> diff --git a/doc/multiboot.texi b/doc/multiboot.texi
> index cc1edab..dca3e62 100644
> --- a/doc/multiboot.texi
> +++ b/doc/multiboot.texi
> @@ -1288,6 +1288,34 @@ u32     | size = 8          |
>  
>  This tag indicates ExitBootServices wasn't called
>  
> +@subsection EFI 32-bit image handle pointer
> +@example
> +@group
> +        +-------------------+
> +u32     | type = 19         |
> +u32     | size = 12         |
> +u32     | pointer           |

Why it is not u_phys or u_virt as appropriate?

> +        +-------------------+
> +@end group
> +@end example
> +
> +This tag contains pointer to EFI i386 image handle.
> +Usually it is boot loader image handle.
> +
> +@subsection EFI 64-bit image handle pointer
> +@example
> +@group
> +        +-------------------+
> +u32     | type = 20         |
> +u32     | size = 16         |
> +u64     | pointer           |

Same. Again, why there are two tags in the first place? It sounds like
perfect fit for "data of the same size as target architecture
[virtual|physical] address size".
Daniel Kiper Nov. 29, 2016, 9:18 a.m. UTC | #2
On Mon, Nov 28, 2016 at 08:59:38PM +0300, Andrei Borzenkov wrote:
> 24.11.2016 23:40, Daniel Kiper ?????:
> > Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> > ---
> >  doc/multiboot.texi |   28 ++++++++++++++++++++++++++++
> >  doc/multiboot2.h   |   16 ++++++++++++++++
> >  2 files changed, 44 insertions(+)
> >
> > diff --git a/doc/multiboot.texi b/doc/multiboot.texi
> > index cc1edab..dca3e62 100644
> > --- a/doc/multiboot.texi
> > +++ b/doc/multiboot.texi
> > @@ -1288,6 +1288,34 @@ u32     | size = 8          |
> >
> >  This tag indicates ExitBootServices wasn't called
> >
> > +@subsection EFI 32-bit image handle pointer
> > +@example
> > +@group
> > +        +-------------------+
> > +u32     | type = 19         |
> > +u32     | size = 12         |
> > +u32     | pointer           |
>
> Why it is not u_phys or u_virt as appropriate?

Because I mimic EFI 32-bit/64-bit system table pointer definitions.

> > +        +-------------------+
> > +@end group
> > +@end example
> > +
> > +This tag contains pointer to EFI i386 image handle.
> > +Usually it is boot loader image handle.
> > +
> > +@subsection EFI 64-bit image handle pointer
> > +@example
> > +@group
> > +        +-------------------+
> > +u32     | type = 20         |
> > +u32     | size = 16         |
> > +u64     | pointer           |
>
> Same. Again, why there are two tags in the first place? It sounds like

Ditto.

> perfect fit for "data of the same size as target architecture
> [virtual|physical] address size".

Well, I agree that we should remove u_phys/u_virt mess. However, I prefer
to do that later (after 2.02 release) as a part of larger cleanup.

Daniel
diff mbox

Patch

diff --git a/doc/multiboot.texi b/doc/multiboot.texi
index cc1edab..dca3e62 100644
--- a/doc/multiboot.texi
+++ b/doc/multiboot.texi
@@ -1288,6 +1288,34 @@  u32     | size = 8          |
 
 This tag indicates ExitBootServices wasn't called
 
+@subsection EFI 32-bit image handle pointer
+@example
+@group
+        +-------------------+
+u32     | type = 19         |
+u32     | size = 12         |
+u32     | pointer           |
+        +-------------------+
+@end group
+@end example
+
+This tag contains pointer to EFI i386 image handle.
+Usually it is boot loader image handle.
+
+@subsection EFI 64-bit image handle pointer
+@example
+@group
+        +-------------------+
+u32     | type = 20         |
+u32     | size = 16         |
+u64     | pointer           |
+        +-------------------+
+@end group
+@end example
+
+This tag contains pointer to EFI amd64 image handle.
+Usually it is boot loader image handle.
+
 @node Examples
 @chapter Examples
 
diff --git a/doc/multiboot2.h b/doc/multiboot2.h
index 240400d..b85cb13 100644
--- a/doc/multiboot2.h
+++ b/doc/multiboot2.h
@@ -60,6 +60,8 @@ 
 #define MULTIBOOT_TAG_TYPE_NETWORK           16
 #define MULTIBOOT_TAG_TYPE_EFI_MMAP          17
 #define MULTIBOOT_TAG_TYPE_EFI_BS            18
+#define MULTIBOOT_TAG_TYPE_EFI32_IH          19
+#define MULTIBOOT_TAG_TYPE_EFI64_IH          20
 
 #define MULTIBOOT_HEADER_TAG_END  0
 #define MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST  1
@@ -372,6 +374,20 @@  struct multiboot_tag_efi_mmap
   multiboot_uint8_t efi_mmap[0];
 }; 
 
+struct multiboot_tag_efi32_ih
+{
+  multiboot_uint32_t type;
+  multiboot_uint32_t size;
+  multiboot_uint32_t pointer;
+};
+
+struct multiboot_tag_efi64_ih
+{
+  multiboot_uint32_t type;
+  multiboot_uint32_t size;
+  multiboot_uint64_t pointer;
+};
+
 #endif /* ! ASM_FILE */
 
 #endif /* ! MULTIBOOT_HEADER */