# 1 "arch/x86/boot/mca.c" # 1 "/usr/src/linux-2.6.25-gentoo-r7/include/linux/autoconf.h" 1 # 1 "arch/x86/boot/mca.c" 2 # 1 "/usr/src/linux-2.6.25-gentoo-r7/include/linux/autoconf.h" 1 # 1 "arch/x86/boot/mca.c" 2 # 1 "/usr/src/linux-2.6.25-gentoo-r7/arch/x86/boot/code16gcc.h" 1 asm(".code16gcc"); # 1 "arch/x86/boot/mca.c" 2 # 1 "arch/x86/boot/boot.h" 1 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h" 1 3 # 38 "/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h" 3 typedef __builtin_va_list __gnuc_va_list; # 57 "/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h" 3 # 91 "/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h" 3 typedef __gnuc_va_list va_list; # 125 "/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/stdarg.h" 3 # 25 "arch/x86/boot/boot.h" 2 # 1 "include/linux/types.h" 1 # 1 "include/linux/posix_types.h" 1 # 1 "include/linux/stddef.h" 1 # 1 "include/linux/compiler.h" 1 # 36 "include/linux/compiler.h" # 1 "include/linux/compiler-gcc4.h" 1 # 1 "include/linux/compiler-gcc.h" 1 # 39 "include/linux/compiler-gcc.h" # 7 "include/linux/compiler-gcc4.h" 2 # 41 "include/linux/compiler.h" 2 # 1 "include/linux/compiler-intel.h" 1 # 30 "include/linux/compiler-intel.h" # 52 "include/linux/compiler.h" 2 # 74 "include/linux/compiler.h" # 110 "include/linux/compiler.h" # 5 "include/linux/stddef.h" 2 # 12 "include/linux/stddef.h" enum { false = 0, true = 1 }; # 27 "include/linux/stddef.h" # 5 "include/linux/posix_types.h" 2 typedef struct { unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; } __kernel_fd_set; typedef void (*__kernel_sighandler_t)(int); typedef int __kernel_key_t; typedef int __kernel_mqd_t; # 1 "include/asm/posix_types.h" 1 # 1 "include/asm/posix_types_32.h" 1 typedef unsigned long __kernel_ino_t; typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_nlink_t; typedef long __kernel_off_t; typedef int __kernel_pid_t; typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; typedef unsigned int __kernel_size_t; typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; typedef long __kernel_time_t; typedef long __kernel_suseconds_t; typedef long __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef int __kernel_daddr_t; typedef char * __kernel_caddr_t; typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef unsigned short __kernel_old_uid_t; typedef unsigned short __kernel_old_gid_t; typedef unsigned short __kernel_old_dev_t; typedef long long __kernel_loff_t; typedef struct { int val[2]; } __kernel_fsid_t; # 64 "include/asm/posix_types_32.h" # 75 "include/asm/posix_types_32.h" # 4 "include/asm/posix_types.h" 2 # 48 "include/linux/posix_types.h" 2 # 12 "include/linux/types.h" 2 # 1 "include/asm/types.h" 1 typedef unsigned short umode_t; typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; __extension__ typedef __signed__ long long __s64; __extension__ typedef unsigned long long __u64; typedef signed char s8; typedef unsigned char u8; typedef signed short s16; typedef unsigned short u16; typedef signed int s32; typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; typedef u64 dma64_addr_t; typedef u32 dma_addr_t; # 13 "include/linux/types.h" 2 typedef __u32 __kernel_dev_t; typedef __kernel_fd_set fd_set; typedef __kernel_dev_t dev_t; typedef __kernel_ino_t ino_t; typedef __kernel_mode_t mode_t; typedef __kernel_nlink_t nlink_t; typedef __kernel_off_t off_t; typedef __kernel_pid_t pid_t; typedef __kernel_daddr_t daddr_t; typedef __kernel_key_t key_t; typedef __kernel_suseconds_t suseconds_t; typedef __kernel_timer_t timer_t; typedef __kernel_clockid_t clockid_t; typedef __kernel_mqd_t mqd_t; typedef _Bool bool; typedef __kernel_uid32_t uid_t; typedef __kernel_gid32_t gid_t; typedef __kernel_uid16_t uid16_t; typedef __kernel_gid16_t gid16_t; typedef unsigned long uintptr_t; typedef __kernel_old_uid_t old_uid_t; typedef __kernel_old_gid_t old_gid_t; typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; typedef __kernel_ssize_t ssize_t; typedef __kernel_ptrdiff_t ptrdiff_t; typedef __kernel_time_t time_t; typedef __kernel_clock_t clock_t; typedef __kernel_caddr_t caddr_t; typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef unsigned char unchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; typedef __u8 u_int8_t; typedef __s8 int8_t; typedef __u16 u_int16_t; typedef __s16 int16_t; typedef __u32 u_int32_t; typedef __s32 int32_t; typedef __u8 uint8_t; typedef __u16 uint16_t; typedef __u32 uint32_t; typedef __u64 uint64_t; typedef __u64 u_int64_t; typedef __s64 int64_t; typedef u64 sector_t; typedef unsigned long blkcnt_t; # 179 "include/linux/types.h" typedef __u16 __le16; typedef __u16 __be16; typedef __u32 __le32; typedef __u32 __be32; typedef __u64 __le64; typedef __u64 __be64; typedef __u16 __sum16; typedef __u32 __wsum; typedef unsigned gfp_t; typedef u32 resource_size_t; struct ustat { __kernel_daddr_t f_tfree; __kernel_ino_t f_tinode; char f_fname[6]; char f_fpack[6]; }; # 26 "arch/x86/boot/boot.h" 2 # 1 "include/linux/edd.h" 1 # 44 "include/linux/edd.h" # 52 "include/linux/edd.h" # 68 "include/linux/edd.h" struct edd_device_params { __u16 length; __u16 info_flags; __u32 num_default_cylinders; __u32 num_default_heads; __u32 sectors_per_track; __u64 number_of_sectors; __u16 bytes_per_sector; __u32 dpte_ptr; __u16 key; __u8 device_path_info_length; __u8 reserved2; __u16 reserved3; __u8 host_bus_type[4]; __u8 interface_type[8]; union { struct { __u16 base_address; __u16 reserved1; __u32 reserved2; } __attribute__ ((packed)) isa; struct { __u8 bus; __u8 slot; __u8 function; __u8 channel; __u32 reserved; } __attribute__ ((packed)) pci; struct { __u64 reserved; } __attribute__ ((packed)) ibnd; struct { __u64 reserved; } __attribute__ ((packed)) xprs; struct { __u64 reserved; } __attribute__ ((packed)) htpt; struct { __u64 reserved; } __attribute__ ((packed)) unknown; } interface_path; union { struct { __u8 device; __u8 reserved1; __u16 reserved2; __u32 reserved3; __u64 reserved4; } __attribute__ ((packed)) ata; struct { __u8 device; __u8 lun; __u8 reserved1; __u8 reserved2; __u32 reserved3; __u64 reserved4; } __attribute__ ((packed)) atapi; struct { __u16 id; __u64 lun; __u16 reserved1; __u32 reserved2; } __attribute__ ((packed)) scsi; struct { __u64 serial_number; __u64 reserved; } __attribute__ ((packed)) usb; struct { __u64 eui; __u64 reserved; } __attribute__ ((packed)) i1394; struct { __u64 wwid; __u64 lun; } __attribute__ ((packed)) fibre; struct { __u64 identity_tag; __u64 reserved; } __attribute__ ((packed)) i2o; struct { __u32 array_number; __u32 reserved1; __u64 reserved2; } __attribute__ ((packed)) raid; struct { __u8 device; __u8 reserved1; __u16 reserved2; __u32 reserved3; __u64 reserved4; } __attribute__ ((packed)) sata; struct { __u64 reserved1; __u64 reserved2; } __attribute__ ((packed)) unknown; } device_path; __u8 reserved4; __u8 checksum; } __attribute__ ((packed)); struct edd_info { __u8 device; __u8 version; __u16 interface_support; __u16 legacy_max_cylinder; __u8 legacy_max_head; __u8 legacy_sectors_per_track; struct edd_device_params params; } __attribute__ ((packed)); struct edd { unsigned int mbr_signature[16]; struct edd_info edd_info[6]; unsigned char mbr_signature_nr; unsigned char edd_info_nr; }; extern struct edd edd; # 27 "arch/x86/boot/boot.h" 2 # 1 "include/asm/boot.h" 1 # 28 "arch/x86/boot/boot.h" 2 # 1 "include/asm/setup.h" 1 char *machine_specific_memory_setup(void); # 1 "include/linux/pfn.h" 1 # 18 "include/asm/setup.h" 2 # 1 "include/asm/bootparam.h" 1 # 1 "include/linux/screen_info.h" 1 struct screen_info { __u8 orig_x; __u8 orig_y; __u16 ext_mem_k; __u16 orig_video_page; __u8 orig_video_mode; __u8 orig_video_cols; __u16 unused2; __u16 orig_video_ega_bx; __u16 unused3; __u8 orig_video_lines; __u8 orig_video_isVGA; __u16 orig_video_points; __u16 lfb_width; __u16 lfb_height; __u16 lfb_depth; __u32 lfb_base; __u32 lfb_size; __u16 cl_magic, cl_offset; __u16 lfb_linelength; __u8 red_size; __u8 red_pos; __u8 green_size; __u8 green_pos; __u8 blue_size; __u8 blue_pos; __u8 rsvd_size; __u8 rsvd_pos; __u16 vesapm_seg; __u16 vesapm_off; __u16 pages; __u16 vesa_attributes; __u32 capabilities; __u8 _reserved[6]; } __attribute__((packed)); # 54 "include/linux/screen_info.h" extern struct screen_info screen_info; # 80 "include/linux/screen_info.h" # 6 "include/asm/bootparam.h" 2 # 1 "include/linux/apm_bios.h" 1 typedef unsigned short apm_event_t; typedef unsigned short apm_eventinfo_t; struct apm_bios_info { __u16 version; __u16 cseg; __u32 offset; __u16 cseg_16; __u16 dseg; __u16 flags; __u16 cseg_len; __u16 cseg_16_len; __u16 dseg_len; }; struct apm_info { struct apm_bios_info bios; unsigned short connection_version; int get_power_status_broken; int get_power_status_swabinminutes; int allow_ints; int forbid_idle; int realmode_power_off; int disabled; }; # 86 "include/linux/apm_bios.h" extern struct apm_info apm_info; # 126 "include/linux/apm_bios.h" # 148 "include/linux/apm_bios.h" # 169 "include/linux/apm_bios.h" # 186 "include/linux/apm_bios.h" # 211 "include/linux/apm_bios.h" # 1 "include/linux/ioctl.h" 1 # 1 "include/asm/ioctl.h" 1 # 1 "include/asm-generic/ioctl.h" 1 extern unsigned int __invalid_size_argument_for_IOC; # 65 "include/asm-generic/ioctl.h" # 2 "include/asm/ioctl.h" 2 # 5 "include/linux/ioctl.h" 2 # 216 "include/linux/apm_bios.h" 2 # 7 "include/asm/bootparam.h" 2 # 1 "include/asm/e820.h" 1 struct e820entry { __u64 addr; __u64 size; __u32 type; } __attribute__((packed)); struct e820map { __u32 nr_map; struct e820entry map[128]; }; # 1 "include/asm/e820_32.h" 1 # 1 "include/linux/ioport.h" 1 struct resource { resource_size_t start; resource_size_t end; const char *name; unsigned long flags; struct resource *parent, *sibling, *child; }; struct resource_list { struct resource_list *next; struct resource *res; struct pci_dev *dev; }; # 48 "include/linux/ioport.h" # 88 "include/linux/ioport.h" extern struct resource ioport_resource; extern struct resource iomem_resource; extern int request_resource(struct resource *root, struct resource *new); extern int release_resource(struct resource *new); extern int insert_resource(struct resource *parent, struct resource *new); extern int allocate_resource(struct resource *root, struct resource *new, resource_size_t size, resource_size_t min, resource_size_t max, resource_size_t align, void (*alignf)(void *, struct resource *, resource_size_t, resource_size_t), void *alignf_data); int adjust_resource(struct resource *res, resource_size_t start, resource_size_t size); extern struct resource * __request_region(struct resource *, resource_size_t start, resource_size_t n, const char *name); extern int __check_region(struct resource *, resource_size_t, resource_size_t); extern void __release_region(struct resource *, resource_size_t, resource_size_t); static inline __attribute__((always_inline)) int __attribute__((deprecated)) check_region(resource_size_t s, resource_size_t n) { return __check_region(&ioport_resource, s, n); } struct device; extern struct resource * __devm_request_region(struct device *dev, struct resource *parent, resource_size_t start, resource_size_t n, const char *name); extern void __devm_release_region(struct device *dev, struct resource *parent, resource_size_t start, resource_size_t n); # 16 "include/asm/e820_32.h" 2 extern struct e820map e820; extern void update_e820(void); extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type); extern int e820_any_mapped(u64 start, u64 end, unsigned type); extern void find_max_pfn(void); extern void register_bootmem_low_pages(unsigned long max_low_pfn); extern void add_memory_region(unsigned long long start, unsigned long long size, int type); extern void update_memory_range(u64 start, u64 size, unsigned old_type, unsigned new_type); extern void e820_register_memory(void); extern void limit_regions(unsigned long long size); extern void print_memory_map(char *who); extern void init_iomem_resources(struct resource *code_resource, struct resource *data_resource, struct resource *bss_resource); static inline __attribute__((always_inline)) void e820_mark_nosave_regions(void) { } # 34 "include/asm/e820.h" 2 # 9 "include/asm/bootparam.h" 2 # 1 "include/asm/ist.h" 1 struct ist_info { __u32 signature; __u32 command; __u32 event; __u32 perf_level; }; extern struct ist_info ist_info; # 10 "include/asm/bootparam.h" 2 # 1 "include/video/edid.h" 1 struct edid_info { unsigned char dummy[128]; }; extern struct edid_info edid_info; # 11 "include/asm/bootparam.h" 2 struct setup_header { __u8 setup_sects; __u16 root_flags; __u32 syssize; __u16 ram_size; __u16 vid_mode; __u16 root_dev; __u16 boot_flag; __u16 jump; __u32 header; __u16 version; __u32 realmode_swtch; __u16 start_sys; __u16 kernel_version; __u8 type_of_loader; __u8 loadflags; __u16 setup_move_size; __u32 code32_start; __u32 ramdisk_image; __u32 ramdisk_size; __u32 bootsect_kludge; __u16 heap_end_ptr; __u16 _pad1; __u32 cmd_line_ptr; __u32 initrd_addr_max; __u32 kernel_alignment; __u8 relocatable_kernel; __u8 _pad2[3]; __u32 cmdline_size; __u32 hardware_subarch; __u64 hardware_subarch_data; } __attribute__((packed)); struct sys_desc_table { __u16 length; __u8 table[14]; }; struct efi_info { __u32 efi_loader_signature; __u32 efi_systab; __u32 efi_memdesc_size; __u32 efi_memdesc_version; __u32 efi_memmap; __u32 efi_memmap_size; __u32 efi_systab_hi; __u32 efi_memmap_hi; }; struct boot_params { struct screen_info screen_info; struct apm_bios_info apm_bios_info; __u8 _pad2[12]; struct ist_info ist_info; __u8 _pad3[16]; __u8 hd0_info[16]; __u8 hd1_info[16]; struct sys_desc_table sys_desc_table; __u8 _pad4[144]; struct edid_info edid_info; struct efi_info efi_info; __u32 alt_mem_k; __u32 scratch; __u8 e820_entries; __u8 eddbuf_entries; __u8 edd_mbr_sig_buf_entries; __u8 _pad6[6]; struct setup_header hdr; __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; __u32 edd_mbr_sig_buffer[16]; struct e820entry e820_map[128]; __u8 _pad8[48]; struct edd_info eddbuf[6]; __u8 _pad9[276]; } __attribute__((packed)); # 34 "include/asm/setup.h" 2 # 67 "include/asm/setup.h" # 29 "arch/x86/boot/boot.h" 2 extern struct setup_header hdr; extern struct boot_params boot_params; static inline __attribute__((always_inline)) void outb(u8 v, u16 port) { asm volatile("outb %0,%1" : : "a" (v), "dN" (port)); } static inline __attribute__((always_inline)) u8 inb(u16 port) { u8 v; asm volatile("inb %1,%0" : "=a" (v) : "dN" (port)); return v; } static inline __attribute__((always_inline)) void outw(u16 v, u16 port) { asm volatile("outw %0,%1" : : "a" (v), "dN" (port)); } static inline __attribute__((always_inline)) u16 inw(u16 port) { u16 v; asm volatile("inw %1,%0" : "=a" (v) : "dN" (port)); return v; } static inline __attribute__((always_inline)) void outl(u32 v, u16 port) { asm volatile("outl %0,%1" : : "a" (v), "dN" (port)); } static inline __attribute__((always_inline)) u32 inl(u32 port) { u32 v; asm volatile("inl %1,%0" : "=a" (v) : "dN" (port)); return v; } static inline __attribute__((always_inline)) void io_delay(void) { const u16 DELAY_PORT = 0x80; asm volatile("outb %%al,%0" : : "dN" (DELAY_PORT)); } static inline __attribute__((always_inline)) u16 ds(void) { u16 seg; asm("movw %%ds,%0" : "=rm" (seg)); return seg; } static inline __attribute__((always_inline)) void set_fs(u16 seg) { asm volatile("movw %0,%%fs" : : "rm" (seg)); } static inline __attribute__((always_inline)) u16 fs(void) { u16 seg; asm volatile("movw %%fs,%0" : "=rm" (seg)); return seg; } static inline __attribute__((always_inline)) void set_gs(u16 seg) { asm volatile("movw %0,%%gs" : : "rm" (seg)); } static inline __attribute__((always_inline)) u16 gs(void) { u16 seg; asm volatile("movw %%gs,%0" : "=rm" (seg)); return seg; } typedef unsigned int addr_t; static inline __attribute__((always_inline)) u8 rdfs8(addr_t addr) { u8 v; asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr)); return v; } static inline __attribute__((always_inline)) u16 rdfs16(addr_t addr) { u16 v; asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr)); return v; } static inline __attribute__((always_inline)) u32 rdfs32(addr_t addr) { u32 v; asm volatile("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr)); return v; } static inline __attribute__((always_inline)) void wrfs8(u8 v, addr_t addr) { asm volatile("movb %1,%%fs:%0" : "+m" (*(u8 *)addr) : "qi" (v)); } static inline __attribute__((always_inline)) void wrfs16(u16 v, addr_t addr) { asm volatile("movw %1,%%fs:%0" : "+m" (*(u16 *)addr) : "ri" (v)); } static inline __attribute__((always_inline)) void wrfs32(u32 v, addr_t addr) { asm volatile("movl %1,%%fs:%0" : "+m" (*(u32 *)addr) : "ri" (v)); } static inline __attribute__((always_inline)) u8 rdgs8(addr_t addr) { u8 v; asm volatile("movb %%gs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr)); return v; } static inline __attribute__((always_inline)) u16 rdgs16(addr_t addr) { u16 v; asm volatile("movw %%gs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr)); return v; } static inline __attribute__((always_inline)) u32 rdgs32(addr_t addr) { u32 v; asm volatile("movl %%gs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr)); return v; } static inline __attribute__((always_inline)) void wrgs8(u8 v, addr_t addr) { asm volatile("movb %1,%%gs:%0" : "+m" (*(u8 *)addr) : "qi" (v)); } static inline __attribute__((always_inline)) void wrgs16(u16 v, addr_t addr) { asm volatile("movw %1,%%gs:%0" : "+m" (*(u16 *)addr) : "ri" (v)); } static inline __attribute__((always_inline)) void wrgs32(u32 v, addr_t addr) { asm volatile("movl %1,%%gs:%0" : "+m" (*(u32 *)addr) : "ri" (v)); } static inline __attribute__((always_inline)) int memcmp(const void *s1, const void *s2, size_t len) { u8 diff; asm("repe; cmpsb; setnz %0" : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); return diff; } static inline __attribute__((always_inline)) int memcmp_fs(const void *s1, addr_t s2, size_t len) { u8 diff; asm volatile("fs; repe; cmpsb; setnz %0" : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); return diff; } static inline __attribute__((always_inline)) int memcmp_gs(const void *s1, addr_t s2, size_t len) { u8 diff; asm volatile("gs; repe; cmpsb; setnz %0" : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); return diff; } static inline __attribute__((always_inline)) int isdigit(int ch) { return (ch >= '0') && (ch <= '9'); } extern char _end[]; extern char *HEAP; extern char *heap_end; static inline __attribute__((always_inline)) char *__get_heap(size_t s, size_t a, size_t n) { char *tmp; HEAP = (char *)(((size_t)HEAP+(a-1)) & ~(a-1)); tmp = HEAP; HEAP += s*n; return tmp; } static inline __attribute__((always_inline)) bool heap_free(size_t n) { return (int)(heap_end-HEAP) >= (int)n; } void copy_to_fs(addr_t dst, void *src, size_t len); void *copy_from_fs(void *dst, addr_t src, size_t len); void copy_to_gs(addr_t dst, void *src, size_t len); void *copy_from_gs(void *dst, addr_t src, size_t len); void *memcpy(void *dst, void *src, size_t len); void *memset(void *dst, int c, size_t len); int enable_a20(void); int query_apm_bios(void); int cmdline_find_option(const char *option, char *buffer, int bufsize); int cmdline_find_option_bool(const char *option); int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr); int validate_cpu(void); void query_edd(void); void __attribute__((noreturn)) die(void); int query_mca(void); int detect_memory(void); void __attribute__((noreturn)) go_to_protected_mode(void); void __attribute__((noreturn)) protected_mode_jump(u32 entrypoint, u32 bootparams); int sprintf(char *buf, const char *fmt, ...); int vsprintf(char *buf, const char *fmt, va_list args); int printf(const char *fmt, ...); int strcmp(const char *str1, const char *str2); size_t strnlen(const char *s, size_t maxlen); unsigned int atou(const char *s); void puts(const char *); void putchar(int); int getchar(void); void kbd_flush(void); int getchar_timeout(void); void set_video(void); void vesa_store_edid(void); int query_voyager(void); # 18 "arch/x86/boot/mca.c" 2 int query_mca(void) { u8 err; u16 es, bx, len; asm("pushw %%es ; " "int $0x15 ; " "setc %0 ; " "movw %%es, %1 ; " "popw %%es" : "=acd" (err), "=acdSD" (es), "=b" (bx) : "a" (0xc000)); if (err) return -1; set_fs(es); len = rdfs16(bx); if (len > sizeof(boot_params.sys_desc_table)) len = sizeof(boot_params.sys_desc_table); copy_from_fs(&boot_params.sys_desc_table, bx, len); return 0; }