module: Allow .c32 files to execute themselves
[syslinux.git] / core / cleanup.c
blob73b63dbf9f83e8d786fc65d476024205ec644aa7
1 /* -----------------------------------------------------------------------
3 * Copyright 2007-2008 H. Peter Anvin - All Rights Reserved
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * -----------------------------------------------------------------------
13 #include <com32.h>
14 #include <core.h>
16 extern void timer_cleanup(void);
17 extern void comboot_cleanup_api(void);
20 * cleanup.c
22 * Some final tidying before jumping to a kernel or bootsector
26 * cleanup_hardware:
28 * Shut down anything transient.
30 __export void cleanup_hardware(void)
33 * TODO
35 * Linux wants the floppy motor shut off before starting the
36 * kernel, at least bootsect.S seems to imply so. If we don't
37 * load the floppy driver, this is *definitely* so!
39 __intcall(0x13, &zero_regs, NULL);
41 call16(comboot_cleanup_api, &zero_regs, NULL);
42 call16(timer_cleanup, &zero_regs, NULL);
44 /* If we enabled serial port interrupts, clean them up now */
45 sirq_cleanup();