H. Peter Anvin [Wed, 14 May 2008 01:30:20 +0000 (18:30 -0700)]
Document GPT boot protocol; add !GPT signature
Document the GPT boot protocol; add additional assurance by
requiring that EAX contains "!GPT" for the GPT information
to be valid.
H. Peter Anvin [Wed, 14 May 2008 00:59:21 +0000 (17:59 -0700)]
Add NEWS for 3.64
H. Peter Anvin [Wed, 14 May 2008 00:52:26 +0000 (17:52 -0700)]
Merge commit 'origin/gptmbr'
Stefan Bucur [Mon, 12 May 2008 18:47:23 +0000 (21:47 +0300)]
Fixed the various Makefiles so that SYSLINUX compiles on platforms with GCC -fstack-protector flag enabled by default.
Sergey Vlasov [Thu, 24 Apr 2008 19:33:54 +0000 (23:33 +0400)]
chain.c32: fix booting from logical partitions
Booting from a logical partition failed with the "Requested logical
partition not found" error due to a wrong test for partition signature
in find_logical_partition().
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
H. Peter Anvin [Sun, 20 Apr 2008 04:57:05 +0000 (00:57 -0400)]
Next version on this branch would be 3.64
H. Peter Anvin [Sun, 20 Apr 2008 04:55:29 +0000 (00:55 -0400)]
localboot.inc: file missing from previous checkin
H. Peter Anvin [Sat, 19 Apr 2008 15:40:10 +0000 (11:40 -0400)]
Support LOCALBOOT (ISOLINUX-style) in SYSLINUX/EXTLINUX
Add support for ISOLINUX-style LOCALBOOT in SYSLINUX/EXTLINUX. No way
to do the same for PXELINUX, due to the keyword collision. Suck.
Maciej W. Rozycki [Thu, 17 Apr 2008 22:46:08 +0000 (23:46 +0100)]
syslinux 3.63: Use $(CC) for examining compiler options
Following changes to other Makefiles use $(CC) for examining compiler
options here as well.
Maciej W. Rozycki [Thu, 17 Apr 2008 22:57:52 +0000 (23:57 +0100)]
syslinux 3.63: Rename $GZIP to $GZIPPROG
If the variable GZIP exists in the environment, overriding it in the
Makefile exports it into the environment, causing failures:
gzip -cd syslogo.ppm.gz | \
../ppmtolss16 \#000000=0 \#d0d0d0=7 \#f6f6f6=15 \
> syslogo.lss
gzip.gz: No such file or directory
204480 pixels, 25715 bytes, (74.85% compression)
Use $GZIPPROG instead.
H. Peter Anvin [Wed, 9 Apr 2008 23:23:06 +0000 (16:23 -0700)]
NEWS: Add link to MSDN article on how to build a ramdisk image.
Hopefully other users might have better luck than me :-/
H. Peter Anvin [Wed, 9 Apr 2008 17:56:09 +0000 (10:56 -0700)]
movebits: rewrite significant chunks of the algorithm
Rewrite the algorithm to prefer entries which can be directly moved
into their target slots; this should reduce the number of descriptors
in most cases (although not necessarily *all* cases.)
Try to clean up the code some while we're at it... the code is
confusing enough as it is.
H. Peter Anvin [Wed, 9 Apr 2008 17:49:51 +0000 (10:49 -0700)]
zonelist.c: Fix the coalescing of identical ranges
The old code could fail to coalesce backwards in the case where a
range is totally obliterated. For now, just scan the whole list.
H. Peter Anvin [Wed, 9 Apr 2008 00:00:05 +0000 (17:00 -0700)]
3.63: update NEWS
H. Peter Anvin [Tue, 8 Apr 2008 23:53:49 +0000 (16:53 -0700)]
memdisk: allow up to 1024 e820 descriptors
There are plenty of systems out there with more than 64 e820
descriptors. The hard-coded limit is only used during initialization,
so we might as well go nuts.
H. Peter Anvin [Tue, 8 Apr 2008 23:52:21 +0000 (16:52 -0700)]
sdi.c32: be a tad more verbose.
Print minimal message while loading.
H. Peter Anvin [Tue, 8 Apr 2008 23:47:12 +0000 (16:47 -0700)]
movebits: use the memmap data structure for the freelist
Use the syslinux_memmap data structure for the free memory list. This
means we get range coalescing; this sometimes generates lists that are
vastly shorter than without range coalescing.
H. Peter Anvin [Tue, 8 Apr 2008 23:02:40 +0000 (16:02 -0700)]
movebits: handle the case of an upward overlap move with obstacles
Handle the case of an upward move when there is something in the way.
This happens when loading an SDI image.
H. Peter Anvin [Mon, 7 Apr 2008 23:39:15 +0000 (16:39 -0700)]
extlinux: Correct the directory block end condition
ext2/3 directory blocks are *not* ended with inode == 0; that reflects
a deleted block (like 0xe5 in FAT.) Directory blocks are ended by
directory block exhaustion; the last block is simply made as large as
the whole directory block.
H. Peter Anvin [Mon, 31 Mar 2008 20:11:32 +0000 (13:11 -0700)]
COM32 module to load a Microsoft System Deployment Image
COM32 module to load a Microsoft System Deployment Image (SDI) file.
H. Peter Anvin [Sun, 23 Mar 2008 00:38:23 +0000 (17:38 -0700)]
Add target to install into /tftpboot
H. Peter Anvin [Thu, 20 Mar 2008 23:37:17 +0000 (16:37 -0700)]
pxelinux: allow class E addresses as unicast
Class E IPv4 addresses are expected to be reassigned as available for
unicast addresses (probably for site-local use, but that is a major
usage domain of PXE.)
H. Peter Anvin [Thu, 20 Mar 2008 23:36:34 +0000 (16:36 -0700)]
Sebastian Herbszt [Sat, 8 Mar 2008 21:56:53 +0000 (22:56 +0100)]
Fixing wrong offsets in dmi
DMI code have some wrong offsets.
This patch fixes this offsets and improve the grammar.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Erwan [Sat, 8 Mar 2008 21:51:54 +0000 (22:51 +0100)]
PCI detection code doesn't corrupt memory anymore (2nd try)
From : Erwan Velu <erwan.velu@free.fr>
This patch fixes the pci detection stuff demo'd in pcitest.c32
- Fix a wrong type in malloc
- Incorrect use of strdup
- Replacing strncpy by strnlcpy (thx hpa)
This two fixes makes pcitest.c32 working far better, no more crash when
running it twice.
I'd like to thank Sebastian Herbszt for its reports and tests.
This patch was made for 3.62-pre16 but applies fine on 3.63-pre1.
Signed-off-by:Erwan Velu <erwan.velu@free.fr>
--------------------------------------------------------------------------------
Les opinions et prises de position emises par le signataire du present
message lui sont propres et ne sauraient engager la responsabilite de la
societe SEANODES.
Ce message ainsi que les eventuelles pieces jointes constituent une
correspondance privee et confidentielle a l'attention exclusive du
destinataire designe ci-dessus. Si vous n'etes pas le destinataire du
present message ou une personne susceptible de pouvoir le lui delivrer, il
vous est signifie que toute divulgation, distribution ou copie de cette
transmission est strictement interdite. Si vous avez recu ce message par
erreur, nous vous remercions d'en informer l'expediteur par telephone ou de
lui retourner le present message, puis d'effacer immediatement ce message de
votre systeme.
The views and opinions expressed by the author of this message are personal.
SEANODES shall assume no liability, express or implied for such message.
This e-mail and any attachments is a confidential correspondence intended
only for use of the individual or entity named above. If you are not the
intended recipient or the agent responsible for delivering the message to
the intended recipient, you are hereby notified that any disclosure,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender by phone
or by replying this message, and then delete this message from your system.
H. Peter Anvin [Sat, 8 Mar 2008 10:12:47 +0000 (11:12 +0100)]
Remove reference to readpit.c32, an experimental module
Remove reference to readpit.c32, an experimental module never intended
for release.
H. Peter Anvin [Thu, 6 Mar 2008 06:31:00 +0000 (22:31 -0800)]
Use $(CC) in gcc_ok macro, not plain gcc
Use $(CC) in gcc_ok macro, not plain gcc. This seems to work, iff the
gcc_ok macro is declared with =, not :=
H. Peter Anvin [Tue, 4 Mar 2008 06:10:20 +0000 (22:10 -0800)]
win32/Makefile: clean hello.exe on "make tidy"
hello.exe isn't really anything we care about; clean it up on "make tidy".
H. Peter Anvin [Tue, 4 Mar 2008 05:59:10 +0000 (21:59 -0800)]
Add stuff to "make dist" to clean up crap that shouldn't be there
H. Peter Anvin [Tue, 4 Mar 2008 05:23:52 +0000 (21:23 -0800)]
Clean up .*.d files for "make tidy" in libutil
H. Peter Anvin [Tue, 4 Mar 2008 04:19:24 +0000 (20:19 -0800)]
The next release on *this* branch would be 3.63
H. Peter Anvin [Tue, 4 Mar 2008 04:18:10 +0000 (20:18 -0800)]
Prevent inclusion of system include files when inappropriate
Use "-nostdinc -iwithprefix include" to prevent the inclusion of
system header files, but still permitting *compiler* header files.
H. Peter Anvin [Mon, 3 Mar 2008 06:20:08 +0000 (22:20 -0800)]
simple menu: break off execute() into its own source file
Break off execute() into its own source file, with the intent of being
able to re-use it for a CLI module.
Erwan [Sun, 2 Mar 2008 09:09:54 +0000 (10:09 +0100)]
License change for CPU detection modules
H. Peter Anvin wrote:
> Erwan: I would have to get you to do this, since it would mean
> changing the license (trying to keep libcom32 under the BSD/MIT
> licenses), and you have them under your own copyright (as opposed to
> mine), which means I can't do this change.
Please find attached the patch to changing the license to MIT on modules
I did contribute in com32/modules/.
H. Peter Anvin [Sun, 2 Mar 2008 00:04:05 +0000 (16:04 -0800)]
Move mboot documentation to the doc/ directory
H. Peter Anvin [Sat, 1 Mar 2008 23:56:29 +0000 (15:56 -0800)]
Fix two *.doc files which sadly didn't get renamed...
H. Peter Anvin [Sat, 1 Mar 2008 20:46:54 +0000 (12:46 -0800)]
Add a slightly edited version of SubmittingPatches.
H. Peter Anvin [Fri, 29 Feb 2008 20:02:36 +0000 (12:02 -0800)]
Document the file renaming from .doc -> .txt
H. Peter Anvin [Fri, 29 Feb 2008 00:04:08 +0000 (16:04 -0800)]
Rename text documentation from *.doc to *.txt
Rename plaintext documentation from doc/*.doc to doc/*.txt, to avoid
the chronic problem of web sites thinking they're in MS-Word format.
Sigh. As if Microsoft somehow had a monopoly on the word "document".
H. Peter Anvin [Wed, 27 Feb 2008 23:09:08 +0000 (15:09 -0800)]
Don't use "syslinux.cfg" to refer to config files in general
When printing error messages about configuration files, don't
necessarily call it "syslinux.cfg".
H. Peter Anvin [Tue, 26 Feb 2008 22:50:05 +0000 (14:50 -0800)]
Remove pngtopnm dependency from the samples/ directory
Ship syslogo.ppm.gz instead of syslogo.png, thereby eliminating a
dependency on pngtopnm which apparently isn't installed by default on
some distros.
H. Peter Anvin [Tue, 26 Feb 2008 05:10:12 +0000 (21:10 -0800)]
extlinux: compile hack for old distros
Some old distros would have <linux/fs.h> poison the namespace with a
non-glibc "struct statfs". Hack around it.
H. Peter Anvin [Tue, 26 Feb 2008 00:59:54 +0000 (16:59 -0800)]
gptmbr: use cltq to extend a zero %eax into %edx
Using cltq (cdq) to clear %edx when %eax is zero is cheaper by one
byte.
H. Peter Anvin [Mon, 25 Feb 2008 23:45:27 +0000 (15:45 -0800)]
gptmbr: Add comment
H. Peter Anvin [Mon, 25 Feb 2008 23:44:24 +0000 (15:44 -0800)]
gptmbr: save phdr -> bootsect on the stack, saving one byte
H. Peter Anvin [Mon, 25 Feb 2008 23:31:48 +0000 (15:31 -0800)]
gptmbr: another confusion of start and end fields
Use the start field for the boot sector address...
H. Peter Anvin [Mon, 25 Feb 2008 23:29:47 +0000 (15:29 -0800)]
gptmbr: fix confusion between start and end fields
Fix a case of bad confusion of the start and end fields
(length = end-start+1, so we can't easily reuse the load of the start
field.)
H. Peter Anvin [Mon, 25 Feb 2008 23:25:29 +0000 (15:25 -0800)]
gptmbr: use xchgw %ax,... instead of movw %ax,... when %ax is dead
xhcgw with %ax and a register is one byte shorter than movw with %ax
if %ax is then dead.
H. Peter Anvin [Mon, 25 Feb 2008 23:23:47 +0000 (15:23 -0800)]
gptmbr: Use %bp for references into phdr and the stack
Set up %bp as a permanent frame pointer and use it to reference stack
and phdr fields; by putting phdr in the bootsect slot we can use it
for phdr references with small displacements. This saves 5 bytes.
H. Peter Anvin [Mon, 25 Feb 2008 23:11:28 +0000 (15:11 -0800)]
gptmbr: since %bx is advanced, we can test -2(%bx) == (bootsec+510)
With %bx advanced to the end of the boot sector, we can use -2(%bx)
instead of (bootsec+510), thus saving one byte.
H. Peter Anvin [Mon, 25 Feb 2008 23:10:20 +0000 (15:10 -0800)]
gptmbr: addw $512, %bx -> addb $2, %bh
Save one byte...
H. Peter Anvin [Mon, 25 Feb 2008 23:05:02 +0000 (15:05 -0800)]
gptmbr: offsets into phdr are decimal, not hex
The offsets into phdr, from the EFI spec, are in decimal, not hex.
H. Peter Anvin [Mon, 25 Feb 2008 23:02:04 +0000 (15:02 -0800)]
gptmbr: move advancing %bx into read_sector
Move the advancing of %bx into read_sector, saving 3 bytes.
H. Peter Anvin [Mon, 25 Feb 2008 22:57:11 +0000 (14:57 -0800)]
gptmbr: need to set %bx -> bootsec
Need to tell read_sector where to load the boot sector (unlike the MBR
code, where we always loaded into 0x7c00, this code uses multiple
buffers.)
H. Peter Anvin [Mon, 25 Feb 2008 22:55:45 +0000 (14:55 -0800)]
gptmbr: shuffle slightly to reduce register pressure
Shuffle some code slightly to reduce register pressure; no size change
but this might make the code easier to follow and/or change.
H. Peter Anvin [Mon, 25 Feb 2008 22:53:31 +0000 (14:53 -0800)]
gptmbr: shuffle slightly to save 3 bytes
Shuffle some code to reduce the total size by 3 bytes
H. Peter Anvin [Mon, 25 Feb 2008 22:47:43 +0000 (14:47 -0800)]
rep; cmpsw -> repe; cmpsw
Same instruction, but repe is more correct for cmpsw
H. Peter Anvin [Mon, 25 Feb 2008 22:22:54 +0000 (14:22 -0800)]
Master boot record for GPT partition tables
Beginnings of a master boot record for GPT partition tables.
H. Peter Anvin [Fri, 22 Feb 2008 19:16:45 +0000 (11:16 -0800)]
Allow MENU EXIT to specify a menu tag
Allow MENU EXIT to "exit" to an arbitrary menu. This is really just a
variant of "MENU GOTO", but it allows displaying an exit marker.
H. Peter Anvin [Fri, 22 Feb 2008 19:03:34 +0000 (11:03 -0800)]
Fix the handling of hotkeys in MENU LABEL on submenus
Two bugs:
- We didn't strip ^ symbols inheriting from MENU LABEL to MENU TITLE
- We did consider_for_hotkey() with the wrong menu (the submenu
itself, as opposed to the parent menu.)
As part of these changes, make a function available to create an
uninitialized, mutable refstring (that can be constructed and then
used as a refstring, that is.)
H. Peter Anvin [Fri, 22 Feb 2008 02:49:43 +0000 (18:49 -0800)]
NEWS: Document Bruce Robson's Adaptec bug fix
H. Peter Anvin [Fri, 22 Feb 2008 02:17:49 +0000 (18:17 -0800)]
realloc(): try to protect a block in the path of a growing object
When we realloc() a block larger, try to protect the free block
following it from being immediately allocated by something else by
placing it at the end of the freelist instead of the beginning.
H. Peter Anvin [Fri, 22 Feb 2008 01:59:56 +0000 (17:59 -0800)]
realloc(): better implementation allowing in-place growth
Change the realloc() implementation to allow in-place growth. This is
an important step in handling files without knowing their sizes a
priori.
H. Peter Anvin [Wed, 20 Feb 2008 23:56:33 +0000 (15:56 -0800)]
"begin Ymodem download" is supposed to be an imperative...
H. Peter Anvin [Wed, 20 Feb 2008 02:40:37 +0000 (18:40 -0800)]
Fix MENU TITLE -> MENU LABEL inheritance
Correctly make it so MENU TITLE can be inherited upward as MENU TITLE
unless one is provided.
H. Peter Anvin [Wed, 20 Feb 2008 02:34:14 +0000 (18:34 -0800)]
Make sure color directives get attached to the proper menu.
Color directives would always end up attached to the root menu, no
matter what menu declaration they where actually located in.
H. Peter Anvin [Wed, 20 Feb 2008 02:27:35 +0000 (18:27 -0800)]
simple menu: fix the handling of '+' and '-' given disabled entries
When encountering disabled entries, we want to keep going. Given that
these particular keys have nonstandard scrolling, but the handling there.
H. Peter Anvin [Wed, 20 Feb 2008 02:25:08 +0000 (18:25 -0800)]
Fix the scrollbar handling for insanely huge menus
The handling of the scrollbar for insanely huge menus was broken,
causing it to disappear off the bottom of the menu window.
H. Peter Anvin [Wed, 20 Feb 2008 02:21:08 +0000 (18:21 -0800)]
simple menu: remember the cursor position on a per-menu basis
For each menu, remember what the current position of the cursor and
the scroll is.
H. Peter Anvin [Wed, 20 Feb 2008 02:14:24 +0000 (18:14 -0800)]
Add support for MENU EXIT; no marker for MENU GOTO
H. Peter Anvin [Wed, 20 Feb 2008 02:13:47 +0000 (18:13 -0800)]
When entering a new menu, go to the default entry for that menu.
H. Peter Anvin [Wed, 20 Feb 2008 01:15:18 +0000 (17:15 -0800)]
Document MENU START
H. Peter Anvin [Wed, 20 Feb 2008 00:52:36 +0000 (16:52 -0800)]
Whitespace cleanup...
H. Peter Anvin [Wed, 20 Feb 2008 00:48:21 +0000 (16:48 -0800)]
com32: remove dependency files for "make tidy"
H. Peter Anvin [Wed, 20 Feb 2008 00:47:09 +0000 (16:47 -0800)]
Add dependency generation for com32 samples.
H. Peter Anvin [Wed, 20 Feb 2008 00:45:42 +0000 (16:45 -0800)]
Add dependency generation for com32 modules.
H. Peter Anvin [Wed, 20 Feb 2008 00:44:52 +0000 (16:44 -0800)]
Add dependency generation for the simple menu system
H. Peter Anvin [Wed, 20 Feb 2008 00:42:40 +0000 (16:42 -0800)]
Set m->title for both root and submenus
H. Peter Anvin [Wed, 20 Feb 2008 00:41:44 +0000 (16:41 -0800)]
Allow MENU LABEL <-> MENU TITLE for submenus to work both ways
Allow either "MENU LABEL" or "MENU TITLE" to default for each other.
H. Peter Anvin [Wed, 20 Feb 2008 00:37:50 +0000 (16:37 -0800)]
Allow an included file to be treated as a submenu.
H. Peter Anvin [Wed, 20 Feb 2008 00:25:26 +0000 (16:25 -0800)]
Document hierarchial menus so far...
H. Peter Anvin [Wed, 20 Feb 2008 00:16:03 +0000 (16:16 -0800)]
simple menu: The use of realloc() requires indirect pointers
Since we store pointers to struct menu_entry, we can't put it in
storage that is subject to realloc(). Accordingly, make menu_entries
an indirect array instead.
H. Peter Anvin [Tue, 19 Feb 2008 23:33:36 +0000 (15:33 -0800)]
simple menu: first cut at working submenus
With this edit, the submenu system seems to have minimal
functionality.
H. Peter Anvin [Tue, 19 Feb 2008 23:33:15 +0000 (15:33 -0800)]
refstr: handle NULL in refstr[n]dup()
H. Peter Anvin [Tue, 19 Feb 2008 22:08:50 +0000 (14:08 -0800)]
Simple menu: use refstrings consistently; now works again
Switch consistently to using refstrings; we now seem to have original
functionality back.
H. Peter Anvin [Tue, 19 Feb 2008 22:08:06 +0000 (14:08 -0800)]
refstr_get(): handle NULL, force inline
Make refstr_get() handle NULL correctly; force it to be an inline
since it seems to make no difference for code size.
H. Peter Anvin [Tue, 19 Feb 2008 22:07:44 +0000 (14:07 -0800)]
[v]rsprintf(): actually set the return pointer...
H. Peter Anvin [Tue, 19 Feb 2008 19:15:20 +0000 (11:15 -0800)]
submenu snapshot: it compiles now...
H. Peter Anvin [Mon, 18 Feb 2008 23:58:01 +0000 (15:58 -0800)]
Actually implement strnlen()
Actually implement strnlen(), which was in the header files but not in
the library.
H. Peter Anvin [Mon, 18 Feb 2008 23:55:53 +0000 (15:55 -0800)]
Actually implement syslinux_ipappend_strings()
Actually implement the library function syslinux_ipappend_strings(),
which had been in the header files but not in the actual library.
H. Peter Anvin [Sun, 17 Feb 2008 22:11:13 +0000 (14:11 -0800)]
Submenu support: development snapshot
Development snapshot before converting to refstrings
H. Peter Anvin [Tue, 19 Feb 2008 02:09:03 +0000 (18:09 -0800)]
memdump: fix typo
H. Peter Anvin [Sun, 17 Feb 2008 03:16:40 +0000 (19:16 -0800)]
VESA: work around bug in the Bochs VESA BIOS
The Bochs VESA BIOS returns a value other than 1 for the number of
banks in unbanked modes. Ignore the number of banks if bank_size == 0
(the spec says that for unbanked modes, banks == 1 && bank_size == 0;
for banked modes banks > 1 and bank_size != 0).
H. Peter Anvin [Sun, 17 Feb 2008 02:44:57 +0000 (18:44 -0800)]
rllback: improve compression by allowing two-byte run lengths
With the command line size being set to 2K, it's common to need longer
runs. Allow runs up to 8K.
Bruce Robson [Sun, 17 Feb 2008 00:06:18 +0000 (16:06 -0800)]
ISOLINUX: Adaptec bug fix: handle the case of DL missing bit 7
Intel Classic R+ computer with Adaptec 1542CP BIOS 1.02 passes garbage
in sp_drive, and the drive number originally passed in DL does not
have 80h bit set. Check for this case and compensate if appropriate.
H. Peter Anvin [Sat, 16 Feb 2008 08:32:53 +0000 (00:32 -0800)]
Get rid of 4096-entry limit in the simple menu system
Use a dynamic array instead of a static array which we would simply
crash on overflow. Always make it a power-of-two sized so we don't
end up doing a realloc() and a full array copy on every extend.
H. Peter Anvin [Sat, 16 Feb 2008 08:13:50 +0000 (00:13 -0800)]
If we're showing a scrollbar, always show at least one unit
In the simple menu system, if we're showing a scrollbar at all, always
show at least one unit of it.
H. Peter Anvin [Sat, 16 Feb 2008 06:51:46 +0000 (22:51 -0800)]
Put virtual kernels (CLI labels) in high memory
Support putting virtual kernels in high memory instead of using a
dedicated segment for it. This both reduces the low memory footprint
by 64K, and allows for functionally unlimited labels (tested with over
a hundred thousand.)
H. Peter Anvin [Sat, 16 Feb 2008 06:50:29 +0000 (22:50 -0800)]
hello.c: print arguments, no input section
Make "Hello, World!" a little bit more plain, but do print out its
arguments, if any. Useful for testing.
H. Peter Anvin [Sat, 16 Feb 2008 06:35:18 +0000 (22:35 -0800)]
Don't close the A20 gate; leave it open
Don't close the A20 gate (restore to previous state); leave it open.
This is good for performance, but also avoids a nasty race condition
when leaving protected mode to then quickly re-enter protected mode.