iPXE - Open Source Boot Firmware

mirror/etherboot.git
15 years agoPut placeholder routines in UNDI_SHUTDOWN, STOP_UNDI and UNLOAD_STACK mcb30-Eb_5_3_7-PXE_Stage_A
Michael Brown [Wed, 17 Mar 2004 00:13:42 +0000 (00:13 +0000)] 
Put placeholder routines in UNDI_SHUTDOWN, STOP_UNDI and UNLOAD_STACK
to deactivate our PXE stack and return success.

15 years agoSplit [de]activate_pxe_stack out from {install,remove}_pxe_stack; we need
Michael Brown [Wed, 17 Mar 2004 00:05:58 +0000 (00:05 +0000)] 
Split [de]activate_pxe_stack out from {install,remove}_pxe_stack; we need
to be able to deactivate the PXE stack (i.e. unhook interrupt vectors)
without zapping it completely and without freeing up the base memory.

Only hide the in-use portion of the heap, otherwise there's not enough
memory left to load an operating system.

15 years agoWhen using the dedicated real-mode stack in base memory, ensure that
Michael Brown [Tue, 16 Mar 2004 15:57:41 +0000 (15:57 +0000)] 
When using the dedicated real-mode stack in base memory, ensure that
%ss is set so as to make it impossible to overrun the stack space.

15 years agoAlways zero allocated blocks, to prevent them being left marked as "free".
Michael Brown [Tue, 16 Mar 2004 15:55:50 +0000 (15:55 +0000)] 
Always zero allocated blocks, to prevent them being left marked as "free".

15 years agoReal-mode stack is allocated from base memory, rather than using the top
Michael Brown [Thu, 11 Mar 2004 12:45:42 +0000 (12:45 +0000)] 
Real-mode stack is allocated from base memory, rather than using the top
of free base memory.  This is necessary if we expect a loaded program to
be able to return to us.

15 years agoserial_fini() will flush the output buffer but won't disable further
Michael Brown [Thu, 11 Mar 2004 12:17:27 +0000 (12:17 +0000)] 
serial_fini() will flush the output buffer but won't disable further
use of the serial port.  This means that debug messages printed during
e.g. relocation will still go to the serial port as well as the
console.

15 years agoAdded explanatory note.
Michael Brown [Thu, 11 Mar 2004 00:46:29 +0000 (00:46 +0000)] 
Added explanatory note.

15 years ago16-bit exit path is now existent again! :)
Michael Brown [Thu, 11 Mar 2004 00:45:12 +0000 (00:45 +0000)] 
16-bit exit path is now existent again!  :)

15 years agoi386_rm_in_call_data_t structure: pad field has dual purpose as record for
Michael Brown [Thu, 11 Mar 2004 00:30:51 +0000 (00:30 +0000)] 
i386_rm_in_call_data_t structure: pad field has dual purpose as record for
prefix's %sp.

15 years agoOnly set flag EB_CALL_FROM_REAL_MODE when we actually *have* entered from
Michael Brown [Thu, 11 Mar 2004 00:29:40 +0000 (00:29 +0000)] 
Only set flag EB_CALL_FROM_REAL_MODE when we actually *have* entered from
real mode.
Fixed typo in 32-bit exit path.

15 years agoSet up i386_rm_in_call_data_t structure on stack, to match that set up
Michael Brown [Thu, 11 Mar 2004 00:27:54 +0000 (00:27 +0000)] 
Set up i386_rm_in_call_data_t structure on stack, to match that set up
by rm_in_call().

15 years agoAdded INT 1A (PXE installation check) hook routine.
Michael Brown [Wed, 10 Mar 2004 20:51:53 +0000 (20:51 +0000)] 
Added INT 1A (PXE installation check) hook routine.

15 years agoCalling cleanup() from within done() is now optional.
Michael Brown [Wed, 10 Mar 2004 18:27:38 +0000 (18:27 +0000)] 
Calling cleanup() from within done() is now optional.

15 years agoDocumented use of serial-console.
Michael Brown [Wed, 10 Mar 2004 14:04:59 +0000 (14:04 +0000)] 
Documented use of serial-console.

15 years agoSet correct terminal settings on STDIN.
Michael Brown [Wed, 10 Mar 2004 13:55:24 +0000 (13:55 +0000)] 
Set correct terminal settings on STDIN.

15 years agoAlmost working. Need to set controlling tty to raw.
Michael Brown [Wed, 10 Mar 2004 04:43:12 +0000 (04:43 +0000)] 
Almost working.  Need to set controlling tty to raw.

15 years agoSkeleton version: parse options, create pty, patch (and restore) bochsrc
Michael Brown [Wed, 10 Mar 2004 01:33:32 +0000 (01:33 +0000)] 
Skeleton version: parse options, create pty, patch (and restore) bochsrc
file.  Doesn't yet do anything useful.

15 years agoAccidentally checked in with MEMSIZES_DEBUG enabled. Whoops.
Michael Brown [Tue, 9 Mar 2004 18:58:31 +0000 (18:58 +0000)] 
Accidentally checked in with MEMSIZES_DEBUG enabled.  Whoops.

15 years agomemsize(): correct mismatch between order of parameters in out_stack
Michael Brown [Tue, 9 Mar 2004 18:37:13 +0000 (18:37 +0000)] 
memsize(): correct mismatch between order of parameters in out_stack
and order of pushw instructions.

15 years agoAlso hide the heap via E820 memory map mangling.
Michael Brown [Tue, 9 Mar 2004 17:48:36 +0000 (17:48 +0000)] 
Also hide the heap via E820 memory map mangling.

15 years agosmc9462tx flash rom utility written by David Ashley
Timothy Legge [Tue, 9 Mar 2004 00:06:44 +0000 (00:06 +0000)] 
smc9462tx flash rom utility written by David Ashley

15 years agoPXE INT15 memory mangler now seems to be working.
Michael Brown [Mon, 8 Mar 2004 17:37:35 +0000 (17:37 +0000)] 
PXE INT15 memory mangler now seems to be working.

15 years agoTypo in the debugging code.
Michael Brown [Mon, 8 Mar 2004 17:36:00 +0000 (17:36 +0000)] 
Typo in the debugging code.

15 years agoParagraph-align pxe_stack_t.arch_data, to make it possible to use
Michael Brown [Mon, 8 Mar 2004 17:35:08 +0000 (17:35 +0000)] 
Paragraph-align pxe_stack_t.arch_data, to make it possible to use
real-mode PIC code.

15 years agoE820 (and E801, 88) mangling code tested and working.
Michael Brown [Mon, 8 Mar 2004 15:57:38 +0000 (15:57 +0000)] 
E820 (and E801, 88) mangling code tested and working.

15 years agoINT 15,{E820,E801,88} interception code written, not yet tested.
Michael Brown [Mon, 8 Mar 2004 02:11:51 +0000 (02:11 +0000)] 
INT 15,{E820,E801,88} interception code written, not yet tested.

15 years agoexclude_memory_range now correctly handles addresses > 2GB (i.e. use
Michael Brown [Mon, 8 Mar 2004 00:54:30 +0000 (00:54 +0000)] 
exclude_memory_range now correctly handles addresses > 2GB (i.e. use
unsigned comparisons instead of signed) and accepts a "truncate high
end only" flag in %di, to allow use for INT 15,88 and INT 15,E801
interception as well as INT 15,E820.

15 years agoContains possibly the smallest memory range exclusion algorithm in the
Michael Brown [Fri, 5 Mar 2004 20:00:56 +0000 (20:00 +0000)] 
Contains possibly the smallest memory range exclusion algorithm in the
world.

15 years agoAcknowledge driver sponsor
Timothy Legge [Wed, 3 Mar 2004 11:10:02 +0000 (11:10 +0000)] 
Acknowledge driver sponsor

15 years agoTiny via-rhine patch
Timothy Legge [Tue, 2 Mar 2004 11:31:00 +0000 (11:31 +0000)] 
Tiny via-rhine patch

15 years agoFix typo in vsprint
Timothy Legge [Mon, 1 Mar 2004 22:57:17 +0000 (22:57 +0000)] 
Fix typo in vsprint

15 years agoDon't include ISA .o files for etherboot-pci.
Ken Yap [Sat, 28 Feb 2004 01:19:14 +0000 (01:19 +0000)] 
Don't include ISA .o files for etherboot-pci.

15 years agoDoug Ambrisko fixed bugs in the FreeBSD loader.
Ken Yap [Sat, 28 Feb 2004 01:15:51 +0000 (01:15 +0000)] 
Doug Ambrisko fixed bugs in the FreeBSD loader.

15 years agoMore robust transmit and poll
Timothy Legge [Fri, 20 Feb 2004 01:29:22 +0000 (01:29 +0000)] 
More robust transmit and poll

15 years agoChecking in working versions. Not tidy, just working.
Michael Brown [Fri, 20 Feb 2004 00:37:19 +0000 (00:37 +0000)] 
Checking in working versions.  Not tidy, just working.

15 years agoFall-through from _start to in_call, instead of calling as a
Michael Brown [Thu, 19 Feb 2004 21:08:10 +0000 (21:08 +0000)] 
Fall-through from _start to in_call, instead of calling as a
subroutine.  This is necessary because the physical return address may
no longer be valid by the time we want to return from in_call.

15 years agoAdded global variable as_main_program to indicate whether or not Etherboot
Michael Brown [Thu, 19 Feb 2004 21:06:34 +0000 (21:06 +0000)] 
Added global variable as_main_program to indicate whether or not Etherboot
is running as the main (foreground) program.  This has a similar function
to the old pxeemu_nbp_active variable.

15 years agoRenamed callbacks_arch.c to callbacks.c, since there is no longer an
Michael Brown [Thu, 19 Feb 2004 18:40:56 +0000 (18:40 +0000)] 
Renamed callbacks_arch.c to callbacks.c, since there is no longer an
architecture-independent callbacks.c.

15 years agoMain callbacks.c file no longer contains any code.
Michael Brown [Thu, 19 Feb 2004 18:36:58 +0000 (18:36 +0000)] 
Main callbacks.c file no longer contains any code.

15 years agoAll code removed to start32.S or realmode_asm.S
Michael Brown [Thu, 19 Feb 2004 18:34:27 +0000 (18:34 +0000)] 
All code removed to start32.S or realmode_asm.S

15 years agoUse new real_call() mechanism.
Michael Brown [Thu, 19 Feb 2004 18:33:47 +0000 (18:33 +0000)] 
Use new real_call() mechanism.

15 years agoOld _real_call mechanism is now obsolete.
Michael Brown [Thu, 19 Feb 2004 18:29:17 +0000 (18:29 +0000)] 
Old _real_call mechanism is now obsolete.

15 years agoxstart16 moved to tagged_loader.c
Michael Brown [Thu, 19 Feb 2004 18:21:46 +0000 (18:21 +0000)] 
xstart16 moved to tagged_loader.c

15 years agoNeed to specify "ax" and @progbits for .text16 section, now that
Michael Brown [Thu, 19 Feb 2004 18:19:13 +0000 (18:19 +0000)] 
Need to specify "ax" and @progbits for .text16 section, now that
pcbios.S is obsolete.

15 years agoSplit _real_call() into assembly wrapper and prepare_real_call() C
Michael Brown [Thu, 19 Feb 2004 18:17:40 +0000 (18:17 +0000)] 
Split _real_call() into assembly wrapper and prepare_real_call() C
routine; there's no other feasible way to ensure that we know where
%esp points to at the time of our call to the real-mode trampoline.

15 years agoSymbols created by *_RM_FRAGMENT should be global.
Michael Brown [Thu, 19 Feb 2004 18:16:13 +0000 (18:16 +0000)] 
Symbols created by *_RM_FRAGMENT should be global.
FRAGMENT_SIZE() should return a size_t.

15 years agoint 16,0 (getc) returns in al, not ax.
Michael Brown [Thu, 19 Feb 2004 17:16:23 +0000 (17:16 +0000)] 
int 16,0 (getc) returns in al, not ax.

15 years ago(completeness) Add .text16.*
Michael Brown [Thu, 19 Feb 2004 17:05:14 +0000 (17:05 +0000)] 
(completeness) Add .text16.*

15 years agoAdd support for National Semiconductor 83820 based nics
Timothy Legge [Tue, 17 Feb 2004 21:29:36 +0000 (21:29 +0000)] 
Add support for National Semiconductor 83820 based nics

15 years agoRemoved pcbios.S, added bios.c and console.c.
Michael Brown [Tue, 17 Feb 2004 12:50:42 +0000 (12:50 +0000)] 
Removed pcbios.S, added bios.c and console.c.

15 years agoAll code now removed to .c files.
Michael Brown [Tue, 17 Feb 2004 12:48:25 +0000 (12:48 +0000)] 
All code now removed to .c files.

15 years agoReal-mode calls now integrated instead of being in pcbios.S.
Michael Brown [Tue, 17 Feb 2004 12:47:17 +0000 (12:47 +0000)] 
Real-mode calls now integrated instead of being in pcbios.S.

15 years agoEnable/disable interrupts around disk calls.
Michael Brown [Tue, 17 Feb 2004 12:46:31 +0000 (12:46 +0000)] 
Enable/disable interrupts around disk calls.

15 years agoMoved console routines to separate file.
Michael Brown [Mon, 16 Feb 2004 18:47:28 +0000 (18:47 +0000)] 
Moved console routines to separate file.
bios.c now contains all the "miscellaneous" real-mode BIOS calls.

15 years agoNow self-contained; no longer relies on routine from pcbios.S.
Michael Brown [Mon, 16 Feb 2004 17:44:58 +0000 (17:44 +0000)] 
Now self-contained; no longer relies on routine from pcbios.S.

15 years agoRemoved ext_call mechanism (too ugly to live).
Michael Brown [Mon, 16 Feb 2004 17:42:48 +0000 (17:42 +0000)] 
Removed ext_call mechanism (too ugly to live).

_in_call uses _phys_to_virt instead of direct GDT manipulation.

_virt_to_phys and _phys_to_virt preserve all possible registers and
flags, to make it easy to write code that needs to call out to
external routines with physical addresses.

15 years agofake_irq() now uses the new real_call() mechanism.
Michael Brown [Fri, 13 Feb 2004 23:00:48 +0000 (23:00 +0000)] 
fake_irq() now uses the new real_call() mechanism.
The trivial IRQ handler is implemented in pic8259.c using RM_FRAGMENT().

15 years agoUse new, neater real_call() mechanism.
Michael Brown [Fri, 13 Feb 2004 22:04:34 +0000 (22:04 +0000)] 
Use new, neater real_call() mechanism.

15 years agoFix IMAGE_FREEBSD bugs.
Ken Yap [Thu, 12 Feb 2004 13:21:20 +0000 (13:21 +0000)] 
Fix IMAGE_FREEBSD bugs.

15 years agoNeater, simpler real_call mechanism that is re-entrant and allows for
Michael Brown [Thu, 12 Feb 2004 02:03:33 +0000 (02:03 +0000)] 
Neater, simpler real_call mechanism that is re-entrant and allows for
passing and returning stack parameters.
This is a safety check-in only; these files are not part of the default
build yet.

15 years agoFix relocation bug.
Ken Yap [Mon, 9 Feb 2004 19:56:56 +0000 (19:56 +0000)] 
Fix relocation bug.

15 years agoext_call mechanism moved to start32.S.
Michael Brown [Mon, 9 Feb 2004 18:22:51 +0000 (18:22 +0000)] 
ext_call mechanism moved to start32.S.
real_call() in place.
Old _real_call renamed to _old_real_call.
Real-mode routines not yet rewritten in C.

15 years agoFix bogus year in comment.
Ken Yap [Wed, 4 Feb 2004 21:14:21 +0000 (21:14 +0000)] 
Fix bogus year in comment.

15 years agoUse dd to write to floppy. *BSD systems don't like partial blocks for writes.
Ken Yap [Wed, 4 Feb 2004 19:17:49 +0000 (19:17 +0000)] 
Use dd to write to floppy. *BSD systems don't like partial blocks for writes.

15 years agoEnable forcedeth Multicast Support
Timothy Legge [Wed, 4 Feb 2004 02:17:30 +0000 (02:17 +0000)] 
Enable forcedeth Multicast Support

15 years agoCleaned up forcedeth, should be usable
Timothy Legge [Wed, 4 Feb 2004 01:04:07 +0000 (01:04 +0000)] 
Cleaned up forcedeth, should be usable

15 years agoCleanup required, loads and starts kernel
Timothy Legge [Tue, 3 Feb 2004 11:21:45 +0000 (11:21 +0000)] 
Cleanup required, loads and starts kernel

15 years agoWill receive 256 packets only
Timothy Legge [Tue, 3 Feb 2004 02:33:28 +0000 (02:33 +0000)] 
Will receive 256 packets only

15 years agoNew utility and Makefile rule to generate legacy floppy emulation ISO
Ken Yap [Sun, 1 Feb 2004 09:58:38 +0000 (09:58 +0000)] 
New utility and Makefile rule to generate legacy floppy emulation ISO
boot images.

15 years agoReverse sort the PCI filenames so that 3c90x is in front of 3c595
Ken Yap [Sun, 1 Feb 2004 02:12:09 +0000 (02:12 +0000)] 
Reverse sort the PCI filenames so that 3c90x is in front of 3c595
as the latter misdetects many 3c90x NICs.

15 years agov_ext_call(): stack fragments should always be placed below trampoline
Michael Brown [Sat, 31 Jan 2004 23:58:14 +0000 (23:58 +0000)] 
v_ext_call(): stack fragments should always be placed below trampoline
fragments.

15 years agov_ext_call: default segment registers to flat physical values, to save
Michael Brown [Fri, 30 Jan 2004 00:51:29 +0000 (00:51 +0000)] 
v_ext_call: default segment registers to flat physical values, to save
caller having to always specify these.
v_ext_call: allow va_lists to contain references to further va_lists.

15 years agoSimplification of _prot_to_real, _real_to_prot and _real_in_call.
Michael Brown [Thu, 29 Jan 2004 20:36:43 +0000 (20:36 +0000)] 
Simplification of _prot_to_real, _real_to_prot and _real_in_call.

15 years agoSimplified _v_ext_call: now will only call to flat physical addresses.
Michael Brown [Thu, 29 Jan 2004 18:59:43 +0000 (18:59 +0000)] 
Simplified _v_ext_call: now will only call to flat physical addresses.
Also appends far return address to end of trampoline code, enabling
trampoline fragments to discard the return address at the head of the
stack if so desired.  This will make real-mode calls a lot simpler.

15 years agoMinor update.
Michael Brown [Thu, 29 Jan 2004 17:49:43 +0000 (17:49 +0000)] 
Minor update.

15 years agoEnable magic breakpoints in bochs.
Michael Brown [Thu, 29 Jan 2004 17:32:07 +0000 (17:32 +0000)] 
Enable magic breakpoints in bochs.

15 years agoCommit patch inadvertantly reversed
Timothy Legge [Thu, 29 Jan 2004 00:47:57 +0000 (00:47 +0000)] 
Commit patch inadvertantly reversed

15 years agomain() now accepts an in_call_data_t * and a va_list.
Michael Brown [Wed, 28 Jan 2004 17:55:01 +0000 (17:55 +0000)] 
main() now accepts an in_call_data_t * and a va_list.

15 years ago_in_call moved from callbacks_asm.S to first32.S.
Michael Brown [Wed, 28 Jan 2004 16:14:06 +0000 (16:14 +0000)] 
_in_call moved from callbacks_asm.S to first32.S.

15 years agoEnsure that flags stored by _in_call are the actual flags on entry.
Michael Brown [Wed, 28 Jan 2004 16:05:31 +0000 (16:05 +0000)] 
Ensure that flags stored by _in_call are the actual flags on entry.
Do not restore interrupt status after reloading Etherboot's GDT; the IDT
almost certainly will contain inappropriate descriptors.  Restore
interrupt status only on return from _in_call.

15 years agoTypos which caused compiling with RARP_NOT_BOOTP to fail.
Ken Yap [Wed, 28 Jan 2004 10:19:35 +0000 (10:19 +0000)] 
Typos which caused compiling with RARP_NOT_BOOTP to fail.

15 years agoDefine DEFAULT_PROTO_NFS that allows non-URLs to use NFS.
Ken Yap [Wed, 28 Jan 2004 09:25:55 +0000 (09:25 +0000)] 
Define DEFAULT_PROTO_NFS that allows non-URLs to use NFS.

15 years agopxenv_get_cached_info(): do actually copy in the DHCP vendor options.
Michael Brown [Tue, 27 Jan 2004 16:01:36 +0000 (16:01 +0000)] 
pxenv_get_cached_info(): do actually copy in the DHCP vendor options.

15 years agoChange prototype of await_pxe_udp() to take into account new TCP support.
Michael Brown [Tue, 27 Jan 2004 00:54:48 +0000 (00:54 +0000)] 
Change prototype of await_pxe_udp() to take into account new TCP support.

15 years agoUgh. We don't have a protected-mode IDT, which means we have to
Michael Brown [Mon, 26 Jan 2004 23:59:30 +0000 (23:59 +0000)] 
Ugh.  We don't have a protected-mode IDT, which means we have to
ensure interrupts are disabled while in pmode.

15 years agoAccidentally checked in with hex_dump() call still in place.
Michael Brown [Mon, 26 Jan 2004 15:49:09 +0000 (15:49 +0000)] 
Accidentally checked in with hex_dump() call still in place.

15 years agoImplemented enough of the PXE API to support use of pxelinux (UDP transmit
Michael Brown [Mon, 26 Jan 2004 15:46:11 +0000 (15:46 +0000)] 
Implemented enough of the PXE API to support use of pxelinux (UDP transmit
and receive).

15 years agoPXENV_EXIT_t now defined in pxe.h
Michael Brown [Mon, 26 Jan 2004 15:44:09 +0000 (15:44 +0000)] 
PXENV_EXIT_t now defined in pxe.h

15 years agoAdded payload to struct udphdr, to avoid ugly sizeof() calculations.
Michael Brown [Mon, 26 Jan 2004 15:40:13 +0000 (15:40 +0000)] 
Added payload to struct udphdr, to avoid ugly sizeof() calculations.
Added struct udppacket.

15 years agoAdded support for TCP and downloading of images over HTTP. There are currently
Markus Gutschke [Mon, 26 Jan 2004 01:18:50 +0000 (01:18 +0000)] 
Added support for TCP and downloading of images over HTTP. There are currently
a few limitations to the TCP code:
 - window sizing and delaying of acks is broken, and I disabled it for now.
   There should be performance improvements, if this gets fixed.
 - block sizes are limited to 512 bytes. This can only be fixed after
   implementing TCP option negotiation and path MTU discovery. Again, I
   expect some performance improvements by doing so.

15 years agoSync e1000 with the latest linux driver
Georg Baum [Sun, 25 Jan 2004 17:44:29 +0000 (17:44 +0000)] 
Sync e1000 with the latest linux driver

15 years agoxstartpxe() is now implemented in C. :)
Michael Brown [Thu, 22 Jan 2004 02:34:45 +0000 (02:34 +0000)] 
xstartpxe() is now implemented in C.  :)

15 years agoRenamed pxe_arch.h to pxe_types.h; there are other architecture-specific
Michael Brown [Thu, 22 Jan 2004 02:33:54 +0000 (02:33 +0000)] 
Renamed pxe_arch.h to pxe_types.h; there are other architecture-specific
PXE header files, so pxe_arch.h was too generic a name.

15 years agoThis file now deals only with the PXE type definitions for segments and
Michael Brown [Thu, 22 Jan 2004 02:29:26 +0000 (02:29 +0000)] 
This file now deals only with the PXE type definitions for segments and
offsets.

15 years agoAdded pxe_callbacks.c
Michael Brown [Thu, 22 Jan 2004 02:27:11 +0000 (02:27 +0000)] 
Added pxe_callbacks.c

15 years agoexport_pxe.c renamed to pxe_export.c
Michael Brown [Thu, 22 Jan 2004 02:26:57 +0000 (02:26 +0000)] 
export_pxe.c renamed to pxe_export.c

15 years agoMoved to pxe_export.c
Michael Brown [Thu, 22 Jan 2004 02:26:23 +0000 (02:26 +0000)] 
Moved to pxe_export.c

15 years agoAll architecture-specific bits moved to arch/i386.
Michael Brown [Thu, 22 Jan 2004 02:25:45 +0000 (02:25 +0000)] 
All architecture-specific bits moved to arch/i386.
Renamed from export_pxe.c to pxe_export.c (for consistency with
-DPXE_EXPORT).

15 years agoAdded PXE in_call mechanisms.
Michael Brown [Thu, 22 Jan 2004 02:23:07 +0000 (02:23 +0000)] 
Added PXE in_call mechanisms.

15 years agoSet up PXE stack before invoking NBP, tear it down afterwards.
Michael Brown [Thu, 22 Jan 2004 02:22:00 +0000 (02:22 +0000)] 
Set up PXE stack before invoking NBP, tear it down afterwards.