*
* This work is licensed under the terms of the GNU LGPLv3.
*/
-#include "bmp.h" // struct bmp_decdata
#include "malloc.h" // malloc_tmphigh
#include "string.h" // memcpy
+#include "util.h" // struct bmp_decdata
+
+struct bmp_decdata {
+ struct tagRGBQUAD *quadp;
+ unsigned char *datap;
+ int width;
+ int height;
+ int bpp;
+};
#define bmp_load4byte(addr) (*(u32 *)(addr))
#define bmp_load2byte(addr) (*(u16 *)(addr))
}
}
+/* allocate decdata struct */
struct bmp_decdata *bmp_alloc(void)
{
struct bmp_decdata *bmp = malloc_tmphigh(sizeof(*bmp));
return bmp;
}
+/* extract information from bmp file data */
int bmp_decode(struct bmp_decdata *bmp, unsigned char *data, int data_size)
{
if (data_size < 54)
return 0;
}
+/* get bmp properties */
void bmp_get_size(struct bmp_decdata *bmp, int *width, int *height)
{
*width = bmp->width;
*height = bmp->height;
}
-
+/* flush flat picture data to *pc */
int bmp_show(struct bmp_decdata *bmp, unsigned char *pic, int width
, int height, int depth, int bytes_per_line_dest)
{
+++ /dev/null
-#ifndef BMP_H
-#define BMP_H
-#include "types.h"
-
-struct bmp_decdata {
- struct tagRGBQUAD *quadp;
- unsigned char *datap;
- int width;
- int height;
- int bpp;
-};
-
-/* allocate decdata struct */
-struct bmp_decdata *bmp_alloc(void);
-
-/* extract information from bmp file data */
-int bmp_decode(struct bmp_decdata *bmp, unsigned char *data, int data_size);
-
-/* get bmp properties */
-void bmp_get_size(struct bmp_decdata *bmp, int *width, int *height);
-
-/* flush flat picture data to *pc */
-int bmp_show(struct bmp_decdata *bmp, unsigned char *pic, int width
- , int height, int depth, int bytes_per_line_dest);
-#endif
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "boot.h" // boot_init
#include "block.h" // struct drive_s
#include "bregs.h" // struct bregs
#include "config.h" // CONFIG_*
+++ /dev/null
-// Storage for boot definitions.
-#ifndef __BOOT_H
-#define __BOOT_H
-
-#include "types.h" // u16
-
-// boot.c
-void boot_init(void);
-void boot_add_bev(u16 seg, u16 bev, u16 desc, int prio);
-void boot_add_bcv(u16 seg, u16 ip, u16 desc, int prio);
-struct drive_s;
-void boot_add_floppy(struct drive_s *drive_g, const char *desc, int prio);
-void boot_add_hd(struct drive_s *drive_g, const char *desc, int prio);
-void boot_add_cd(struct drive_s *drive_g, const char *desc, int prio);
-void boot_add_cbfs(void *data, const char *desc, int prio);
-void interactive_bootmenu(void);
-void bcv_prepboot(void);
-struct pci_device;
-int bootprio_find_pci_device(struct pci_device *pci);
-int bootprio_find_scsi_device(struct pci_device *pci, int target, int lun);
-int bootprio_find_ata_device(struct pci_device *pci, int chanid, int slave);
-int bootprio_find_fdc_device(struct pci_device *pci, int port, int fdid);
-int bootprio_find_pci_rom(struct pci_device *pci, int instance);
-int bootprio_find_named_rom(const char *name, int instance);
-struct usbdevice_s;
-int bootprio_find_usb(struct usbdevice_s *usbdev, int lun);
-
-#endif // __BOOT_H
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "bmp.h" // bmp_alloc
#include "bregs.h" // struct bregs
#include "config.h" // CONFIG_*
#include "farptr.h" // FLATPTR_TO_SEG
-#include "jpeg.h" // jpeg_alloc
#include "malloc.h" // free
#include "output.h" // dprintf
#include "romfile.h" // romfile_loadfile
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "block.h" // MAXDESCSIZE
-#include "boot.h" // boot_add_cbfs
#include "byteorder.h" // be32_to_cpu
#include "config.h" // CONFIG_*
#include "hw/pci.h" // pci_probe_devices
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "boot.h"
#include "bregs.h"
#include "config.h" // CONFIG_*
#include "farptr.h" // MAKE_FLATPTR
#include "malloc.h" // csm_malloc_preinit
#include "memmap.h"
#include "output.h" // dprintf
-#include "post.h"
#include "stacks.h" // wait_threads
#include "std/acpi.h" // RSDP_SIGNATURE
#include "std/bda.h" // struct bios_data_area_s
#include "ata.h" // ATA_CB_STAT
#include "biosvar.h" // GET_GLOBAL
#include "blockcmd.h" // CDB_CMD_READ_10
-#include "boot.h" // add_bcv_hd
#include "ioport.h" // inb
#include "malloc.h" // free
#include "output.h" // dprintf
#include "biosvar.h" // GET_GLOBAL
#include "block.h" // struct drive_s
#include "blockcmd.h" // CDB_CMD_READ_10
-#include "boot.h" // boot_add_hd
#include "byteorder.h" // be16_to_cpu
#include "cmos.h" // inb_cmos
#include "ioport.h" // inb
#include "biosvar.h" // GET_GLOBAL
#include "block.h" // struct disk_op_s
#include "blockcmd.h" // struct cdb_request_sense
-#include "boot.h" // boot_add_hd
#include "byteorder.h" // be32_to_cpu
#include "esp-scsi.h" // esp_scsi_cmd_data
#include "lsi-scsi.h" // lsi_scsi_cmd_data
#include "biosvar.h" // GET_GLOBAL
#include "block.h" // struct drive_s
#include "blockcmd.h" // scsi_drive_setup
-#include "boot.h" // bootprio_find_scsi_device
#include "config.h" // CONFIG_*
#include "fw/paravirt.h" // runningOnQEMU
#include "malloc.h" // free
#include "biosvar.h" // SET_BDA
#include "block.h" // struct drive_s
-#include "boot.h" // boot_add_floppy
#include "bregs.h" // struct bregs
#include "cmos.h" // inb_cmos
#include "config.h" // CONFIG_FLOPPY
#include "biosvar.h" // GET_GLOBAL
#include "block.h" // struct drive_s
#include "blockcmd.h" // scsi_drive_setup
-#include "boot.h" // bootprio_find_scsi_device
#include "config.h" // CONFIG_*
#include "fw/paravirt.h" // runningOnQEMU
#include "malloc.h" // free
#include "biosvar.h" // GET_GLOBAL
#include "block.h" // struct drive_s
#include "blockcmd.h" // scsi_drive_setup
-#include "boot.h" // bootprio_find_scsi_device
#include "config.h" // CONFIG_*
#include "malloc.h" // free
#include "output.h" // dprintf
#include "biosvar.h" // GET_GLOBAL
#include "block.h" // struct drive_s
-#include "boot.h" // boot_add_floppy
#include "bregs.h" // struct bregs
#include "malloc.h" // malloc_fseg
#include "memmap.h" // add_e820
#include "biosvar.h" // GET_GLOBAL
#include "block.h" // DTYPE_USB
#include "blockcmd.h" // cdb_read
-#include "boot.h" // bootprio_find_usb
#include "config.h" // CONFIG_USB_MSC
#include "malloc.h" // free
#include "output.h" // dprintf
#include "string.h" // memset
#include "usb.h" // struct usb_s
#include "usb-msc.h" // usb_msc_setup
+#include "util.h" // bootprio_find_usb
struct usbdrive_s {
struct drive_s drive;
#include "biosvar.h" // GET_GLOBAL
#include "block.h" // DTYPE_USB
#include "blockcmd.h" // cdb_read
-#include "boot.h" // bootprio_find_usb
#include "config.h" // CONFIG_USB_UAS
#include "malloc.h" // free
#include "output.h" // dprintf
#include "string.h" // memset
#include "usb.h" // struct usb_s
#include "usb-uas.h" // usb_uas_init
+#include "util.h" // bootprio_find_usb
#define UAS_UI_COMMAND 0x01
#define UAS_UI_SENSE 0x03
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // GET_GLOBAL
-#include "boot.h" // boot_add_hd
#include "config.h" // CONFIG_*
#include "block.h" // struct drive_s
#include "malloc.h" // free
#include "biosvar.h" // GET_GLOBAL
#include "block.h" // struct drive_s
#include "blockcmd.h" // scsi_drive_setup
-#include "boot.h" // bootprio_find_scsi_device
#include "config.h" // CONFIG_*
#include "malloc.h" // free
#include "output.h" // dprintf
#define __LITTLE_ENDIAN
#include "malloc.h"
-#include "jpeg.h"
#include "string.h"
+#include "util.h"
#define ISHIFT 11
#define IFIX(a) ((int)((a) * (1 << ISHIFT) + .5))
+++ /dev/null
-#ifndef __JPEG_H
-#define __JPEG_H
-
-struct jpeg_decdata;
-struct jpeg_decdata *jpeg_alloc(void);
-int jpeg_decode(struct jpeg_decdata *jpeg, unsigned char *buf);
-void jpeg_get_size(struct jpeg_decdata *jpeg, int *width, int *height);
-int jpeg_show(struct jpeg_decdata *jpeg, unsigned char *pic, int width
- , int height, int depth, int bytes_per_line_dest);
-
-#endif
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "boot.h" // IPL
#include "bregs.h" // struct bregs
#include "config.h" // CONFIG_*
#include "farptr.h" // FLATPTR_TO_SEG
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // SET_BDA
-#include "boot.h" // boot_init
#include "bregs.h" // struct bregs
#include "config.h" // CONFIG_*
#include "fw/paravirt.h" // qemu_cfg_preinit
#include "malloc.h" // malloc_init
#include "memmap.h" // add_e820
#include "output.h" // dprintf
-#include "post.h" // interface_init
#include "string.h" // memset
#include "util.h" // kbd_init
+++ /dev/null
-#ifndef __POST_H
-#define __POST_H
-
-void interface_init(void);
-void device_hardware_setup(void);
-void prepareboot(void);
-void startBoot(void);
-void reloc_preinit(void *f, void *arg);
-
-#endif // __POST_H
void apm_shutdown(void);
void handle_1553(struct bregs *regs);
+// bmp.c
+struct bmp_decdata *bmp_alloc(void);
+int bmp_decode(struct bmp_decdata *bmp, unsigned char *data, int data_size);
+void bmp_get_size(struct bmp_decdata *bmp, int *width, int *height);
+int bmp_show(struct bmp_decdata *bmp, unsigned char *pic, int width
+ , int height, int depth, int bytes_per_line_dest);
+
+// boot.c
+void boot_init(void);
+void boot_add_bev(u16 seg, u16 bev, u16 desc, int prio);
+void boot_add_bcv(u16 seg, u16 ip, u16 desc, int prio);
+void boot_add_floppy(struct drive_s *drive_g, const char *desc, int prio);
+void boot_add_hd(struct drive_s *drive_g, const char *desc, int prio);
+void boot_add_cd(struct drive_s *drive_g, const char *desc, int prio);
+void boot_add_cbfs(void *data, const char *desc, int prio);
+void interactive_bootmenu(void);
+void bcv_prepboot(void);
+struct pci_device;
+int bootprio_find_pci_device(struct pci_device *pci);
+int bootprio_find_scsi_device(struct pci_device *pci, int target, int lun);
+int bootprio_find_ata_device(struct pci_device *pci, int chanid, int slave);
+int bootprio_find_fdc_device(struct pci_device *pci, int port, int fdid);
+int bootprio_find_pci_rom(struct pci_device *pci, int instance);
+int bootprio_find_named_rom(const char *name, int instance);
+struct usbdevice_s;
+int bootprio_find_usb(struct usbdevice_s *usbdev, int lun);
+
+// jpeg.c
+struct jpeg_decdata *jpeg_alloc(void);
+int jpeg_decode(struct jpeg_decdata *jpeg, unsigned char *buf);
+void jpeg_get_size(struct jpeg_decdata *jpeg, int *width, int *height);
+int jpeg_show(struct jpeg_decdata *jpeg, unsigned char *pic, int width
+ , int height, int depth, int bytes_per_line_dest);
+
// optionroms.c
struct rom_header;
void callrom(struct rom_header *rom, u16 bdf);
void handle_1ab1(struct bregs *regs);
void bios32_init(void);
+// post.c
+void interface_init(void);
+void device_hardware_setup(void);
+void prepareboot(void);
+void startBoot(void);
+void reloc_preinit(void *f, void *arg);
+
// fw/acpi.c
extern struct rsdp_descriptor *RsdpAddr;
extern u32 acpi_pm1a_cnt;
void acpi_reboot(void);
// fw/csm.c
-struct pci_device;
int csm_bootprio_fdc(struct pci_device *pci, int port, int fdid);
int csm_bootprio_ata(struct pci_device *pci, int chanid, int slave);
int csm_bootprio_pci(struct pci_device *pci);