From 68612146c4003082aa8ed61030df075ab1cee6fb Mon Sep 17 00:00:00 2001 From: hailin cai Date: Fri, 19 Feb 2016 12:22:02 -0500 Subject: [PATCH] Update Booting/linux-bootstrap-2md.md --- Booting/linux-bootstrap-2md.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Booting/linux-bootstrap-2md.md b/Booting/linux-bootstrap-2md.md index fcedf19..53824b0 100644 --- a/Booting/linux-bootstrap-2md.md +++ b/Booting/linux-bootstrap-2md.md @@ -337,13 +337,14 @@ ENDPROC(memset) ```C char *stack_end; - + + //%P1 is (-STACK_SIZE) if (boot_params.hdr.loadflags & CAN_USE_HEAP) { asm("leal %P1(%%esp),%0" : "=r" (stack_end) : "i" (-STACK_SIZE)); ``` -`stack_end = esp - STACK_SIZE`. +换言之`stack_end = esp - STACK_SIZE`. Then there is the `heap_end` calculation: ```c