Applied, thanks! Damien Zammit, le jeu. 24 oct. 2024 00:10:56 +0000, a ecrit: > --- > i386/include/mach/i386/multiboot.h | 72 ++++++++++++++++++++++++++++++ > 1 file changed, 72 insertions(+) > > diff --git a/i386/include/mach/i386/multiboot.h > b/i386/include/mach/i386/multiboot.h > index c3538c1f..87bcd595 100644 > --- a/i386/include/mach/i386/multiboot.h > +++ b/i386/include/mach/i386/multiboot.h > @@ -43,6 +43,9 @@ > /* Must be provided memory information in multiboot_raw_info structure */ > #define MULTIBOOT_MEMORY_INFO 0x00000002 > > +/* Must pass video information in multiboot_raw_info structure */ > +#define MULTIBOOT_VIDEO_MODE 0x00000004 > + > /* Use the load address fields above instead of the ones in the a.out header > to figure out what to load where, and what to do afterwards. > This should only be needed for a.out kernel images > @@ -62,7 +65,14 @@ > #define MULTIBOOT_AOUT_SYMS 0x00000010 > #define MULTIBOOT_ELF_SHDR 0x00000020 > #define MULTIBOOT_MEM_MAP 0x00000040 > +/* skip some fields from spec */ > +#define MULTIBOOT_FRAMEBUFFER 0x00001000 > + > > +#define MULTIBOOT_VIDEO_MODE_TYPE_LINEARFB 0 > +#define MULTIBOOT_VIDEO_MODE_TYPE_EGA_TEXT 1 > + > +#define MULTIBOOT_VIDEO_PARAM_NO_PREFERENCE 0 > > /* The mods_addr field above contains the physical address of the first > of 'mods_count' multiboot_module structures. */ > @@ -148,6 +158,38 @@ struct multiboot32_module > #define MULTIBOOT_LOADER_SHDR 0x20 > #define MULTIBOOT_LOADER_MMAP 0x40 > > +struct multiboot_header > +{ > + /* Must be MULTIBOOT_MAGIC - see above. */ > + uint32_t magic; > + > + /* Feature flags. */ > + uint32_t flags; > + > + /* The above fields plus this one must equal 0 mod 2^32. */ > + uint32_t checksum; > + > + /* These are only valid if MULTIBOOT_AOUT_KLUDGE is set. */ > + uint32_t header_addr; > + uint32_t load_addr; > + uint32_t load_end_addr; > + uint32_t bss_end_addr; > + uint32_t entry_addr; > + > + /* These are only valid if MULTIBOOT_VIDEO_MODE is set. */ > + uint32_t mode_type; > + uint32_t width; > + uint32_t height; > + uint32_t depth; > +} __packed; > + > +struct multiboot_color > +{ > + uint8_t red; > + uint8_t green; > + uint8_t blue; > +} __packed; > + > /* > * A multiboot module. > */ > @@ -168,6 +210,35 @@ struct multiboot_raw_mmap_entry { > uint32_t type; > } __packed; > > +struct multiboot_framebuffer_info { > + uint64_t framebuffer_addr; > + uint32_t framebuffer_pitch; > + uint32_t framebuffer_width; > + uint32_t framebuffer_height; > + uint8_t framebuffer_bpp; > +#define MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED 0 > +#define MULTIBOOT_FRAMEBUFFER_TYPE_RGB 1 > +#define MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT 2 > + uint8_t framebuffer_type; > + union > + { > + struct > + { > + uint32_t framebuffer_palette_addr; > + uint16_t framebuffer_palette_num_colors; > + }; > + struct > + { > + uint8_t framebuffer_red_field_position; > + uint8_t framebuffer_red_mask_size; > + uint8_t framebuffer_green_field_position; > + uint8_t framebuffer_green_mask_size; > + uint8_t framebuffer_blue_field_position; > + uint8_t framebuffer_blue_mask_size; > + }; > + }; > +} __packed; > + > /* > * Multiboot information structure as passed by the boot loader. > */ > @@ -186,6 +257,7 @@ struct multiboot_raw_info { > uint32_t mmap_length; > uint32_t mmap_addr; > uint32_t unused1[9]; > + struct multiboot_framebuffer_info fb_info; > } __packed; > > /* > -- > 2.45.2 > > >
-- Samuel > Il [e2fsck] a bien démarré, mais il m'a rendu la main aussitot en me > disant "houlala, c'est pas beau à voir votre truc, je préfèrerai que > vous teniez vous même la tronçonneuse" (traduction libre) NC in Guide du linuxien pervers : "Bien configurer sa tronçonneuse."