diff for duplicates of <cover.1348652044.git.lv.zheng@intel.com> diff --git a/a/1.txt b/N1/1.txt index 2e8ac4e..627f327 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -17,17 +17,112 @@ Then you need to append the following kernel parameter to the kernel command line in your the boot loader configuration file: earlyprintk=acpi +There is a dilemma in designing this patch set. There should be three +steps to enable an early console for an operating system: +1. Probe: In this stage, the Linux kernel can detect the early consoles + and the base address of their register block can be determined. + This can be done by parsing the descriptors in the ACPI DBGP/DBG2 + tables. Note that acpi_table_init() must be called before + parsing. +2. Setup: In this stage, the Linux kernel can apply user specified + configuration options (ex. baudrate of serial ports) for the + early consoles. This is done by parsing the early parameters + passed to the kernel from the boot loaders. Note that + parse_early_params() is called very early to allow parameters to + be passed to other kernel subsystems. +3. Start: In this stage, the Linux kernel can make the console available + to output messages. Since early consoles are always used for + kernel boot up debugging, this must be done as early as possible + to arm the kernel with more testability the kernel subsystems. + Note that, this stage happens when the register_console() is + called. +The preferred sequence for the above steps is: + +-----------------+ +-------------------+ +--------------------+ + | ACPI DBGP PROBE | -> | EARLY_PARAM SETUP | -> | EARLY_RPINTK START | + +-----------------+ +-------------------+ +--------------------+ +But unfortunately, in the current x86 implementation, early parameters and +early printk initialization are called before acpi_table_init() which +requires early memory mapping facility. +There are some choices for me to design this patch set: +1. Invoking acpi_table_init() before parse_early_param() to maintain the + sequence: + +-----------------+ +-------------------+ +--------------------+ + | ACPI DBGP PROBE | -> | EARLY_PARAM SETUP | -> | EARLY_RPINTK START | + +-----------------+ +-------------------+ +--------------------+ + This requires other subsystem maintainers' review to ensure no + regressions will be introduced. As far as I know, one kind of issue + might be found in EFI subsystsm: + The EFI boot services and runtime services are mixed up in the x86 + specific initialization process before the ACPI table initialization. + Things are much worse that you even cannot disable the runtime services + while still allow the boot services codes to be executed in the kernel + compilation stage. Enabling the early consoles after the ACPI table + initialization will make it difficult to debug the runtime BIOS bugs. + If any progress is made to the kernel boot sequences, please let me + know. I'll be willing to redesign the ACPI DBGP/DBG2 console probing + facility. You can reach me at <zetalog@gmail.com>. +2. Modifying above sequece to make it look like: + +-------------------+ +-----------------+ +--------------------+ + | EARLY_PARAM SETUP | -> | ACPI DBGP PROBE | -> | EARLY_RPINTK START | + +-------------------+ +-----------------+ +--------------------+ + Early consoles started in this style will lose some debuggabilities in + the kernel boot up. If the system does not crash very early, + developers still can see the bufferred kernel outputs when the + register_console() is called. + Current early console implementation need to be modified to split their + initialization codes into tow part: + 1. Detecting hardware. This can be called in the PROBE stage. + 2. Applying user parameters. This can be called in the SETUP stage. + Individual early console drver maintainers need to be involved to avoid + regressions that might occur on this modification as the maintainers + might offer the real tests rather than I can do. +3. Introducing a barely new debugging facility that does not relate to the + current early console implementation to allow automatic detection for + the early consoles. + +-------------------+ +--------------------+ + | EARLY_PARAM SETUP | -> | EARLY_RPINTK START | + +-------------------+ +--------------------+ + +-----------------+ +--------------------+ + | ACPI DBGP PROBE | -> | EARLY_RPINTK START | + +-----------------+ +--------------------+ + This is what the patch set has done to enable this new usage model. + It is known as "ACPI early console launcher mode". + Early consoles started in this style will lose some debuggabilities in + the kernel boot up. If the system does not crash very early, + developers still can see the bufferred kernel outputs when the + register_console() is called. + Note that the user configuration can not be applied to the registered + early consoles in this way as the acpi_table_init() is still called + after the parse_early_param(). Instead, the early consoles should + derive the hardware settings used in the BIOS/bootloaders. + As a launcher, ACPI DBGP will not actually output kernel messages + without the real early console drivers, that's why the + CONFIG_EARLY_PRINTK_INTEL_MID_SPI is still need to be enabled along + along with the CONFIG_EARLY_PRINTK_ACPI. + In order to disable this facility by default and enable it at runtime, + an kernel parameter "earlyprintk=acpi" is introduced. This makes the + actual sequence looks like: + +-------------------+ +--------------------+ + | EARLY_PARAM SETUP | -> | EARLY_RPINTK START | + +-------------------+ +....................+ +-----------------+ + | ACPI DBGP LAUNCH | -> | ACPI DBGP PROBE | -> + +--------------------+ +-----------------+ + +--------------------+ + -> | EARLY_RPINTK START | + +--------------------+ + Version 3 of this patch set is the first version that will be published in the Linux community. Earlier versions are reviewed internally in Intel. This patch set keeps the version number to track the history that is known to Intel internal developers. +Version 4 of this patch set fixed bunch of CodingStyle issues. Lv Zheng (2): ACPI: Add early console framework for DBGP/DBG2. ACPI: Add Intel MID SPI early console support. - Documentation/kernel-parameters.txt | 1 + - arch/x86/Kconfig.debug | 25 ++++ + Documentation/kernel-parameters.txt | 2 + + arch/x86/Kconfig.debug | 38 +++++ arch/x86/include/asm/mrst.h | 2 +- arch/x86/kernel/acpi/boot.c | 1 + arch/x86/kernel/early_printk.c | 25 +++- @@ -40,7 +135,7 @@ Lv Zheng (2): include/acpi/actbl2.h | 1 + include/linux/acpi.h | 24 +++ include/linux/intel_mid_early.h | 12 ++ - 14 files changed, 526 insertions(+), 181 deletions(-) + 14 files changed, 540 insertions(+), 181 deletions(-) create mode 100644 drivers/acpi/early_printk.c create mode 100644 drivers/platform/x86/early/Makefile create mode 100644 drivers/platform/x86/early/intel_mid_spi.c diff --git a/a/content_digest b/N1/content_digest index 618f55e..0016473 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,12 +1,10 @@ "ref\0cover.1347453194.git.zetalog@gmail.com\0" "From\0Lv Zheng <lv.zheng@intel.com>\0" - "Subject\0[PATCH v3 0/2] ACPI: DBGP/DBG2 early console support for LPIA.\0" - "Date\0Thu, 27 Sep 2012 16:40:47 +0800\0" - "To\0Linux ACPI <linux-acpi@vger.kernel.org>\0" - "Cc\0Len Brown <len.brown@intel.com>" - Robert Moore <robert.moore@intel.com> - Ying Huang <ying.huang@intel.com> - Rui Zhang <rui.zhang@intel.com> + "Subject\0[PATCH v4 0/2] ACPI: DBGP/DBG2 early console support for LPIA.\0" + "Date\0Fri, 28 Sep 2012 10:39:59 +0800\0" + "To\0Len Brown <len.brown@intel.com>\0" + "Cc\0<linux-kernel@vger.kernel.org>" + linux-acpi@vger.kernel.org " Lv Zheng <lv.zheng@intel.com>\0" "\00:1\0" "b\0" @@ -29,17 +27,112 @@ "command line in your the boot loader configuration file:\n" " earlyprintk=acpi\n" "\n" + "There is a dilemma in designing this patch set. There should be three\n" + "steps to enable an early console for an operating system:\n" + "1. Probe: In this stage, the Linux kernel can detect the early consoles\n" + " and the base address of their register block can be determined.\n" + " This can be done by parsing the descriptors in the ACPI DBGP/DBG2\n" + " tables. Note that acpi_table_init() must be called before\n" + " parsing.\n" + "2. Setup: In this stage, the Linux kernel can apply user specified\n" + " configuration options (ex. baudrate of serial ports) for the\n" + " early consoles. This is done by parsing the early parameters\n" + " passed to the kernel from the boot loaders. Note that\n" + " parse_early_params() is called very early to allow parameters to\n" + " be passed to other kernel subsystems.\n" + "3. Start: In this stage, the Linux kernel can make the console available\n" + " to output messages. Since early consoles are always used for\n" + " kernel boot up debugging, this must be done as early as possible\n" + " to arm the kernel with more testability the kernel subsystems.\n" + " Note that, this stage happens when the register_console() is\n" + " called.\n" + "The preferred sequence for the above steps is:\n" + " +-----------------+ +-------------------+ +--------------------+\n" + " | ACPI DBGP PROBE | -> | EARLY_PARAM SETUP | -> | EARLY_RPINTK START |\n" + " +-----------------+ +-------------------+ +--------------------+\n" + "But unfortunately, in the current x86 implementation, early parameters and\n" + "early printk initialization are called before acpi_table_init() which\n" + "requires early memory mapping facility.\n" + "There are some choices for me to design this patch set:\n" + "1. Invoking acpi_table_init() before parse_early_param() to maintain the\n" + " sequence:\n" + " +-----------------+ +-------------------+ +--------------------+\n" + " | ACPI DBGP PROBE | -> | EARLY_PARAM SETUP | -> | EARLY_RPINTK START |\n" + " +-----------------+ +-------------------+ +--------------------+\n" + " This requires other subsystem maintainers' review to ensure no\n" + " regressions will be introduced. As far as I know, one kind of issue\n" + " might be found in EFI subsystsm:\n" + " The EFI boot services and runtime services are mixed up in the x86\n" + " specific initialization process before the ACPI table initialization.\n" + " Things are much worse that you even cannot disable the runtime services\n" + " while still allow the boot services codes to be executed in the kernel\n" + " compilation stage. Enabling the early consoles after the ACPI table\n" + " initialization will make it difficult to debug the runtime BIOS bugs.\n" + " If any progress is made to the kernel boot sequences, please let me\n" + " know. I'll be willing to redesign the ACPI DBGP/DBG2 console probing\n" + " facility. You can reach me at <zetalog@gmail.com>.\n" + "2. Modifying above sequece to make it look like:\n" + " +-------------------+ +-----------------+ +--------------------+\n" + " | EARLY_PARAM SETUP | -> | ACPI DBGP PROBE | -> | EARLY_RPINTK START |\n" + " +-------------------+ +-----------------+ +--------------------+\n" + " Early consoles started in this style will lose some debuggabilities in\n" + " the kernel boot up. If the system does not crash very early,\n" + " developers still can see the bufferred kernel outputs when the\n" + " register_console() is called.\n" + " Current early console implementation need to be modified to split their\n" + " initialization codes into tow part:\n" + " 1. Detecting hardware. This can be called in the PROBE stage.\n" + " 2. Applying user parameters. This can be called in the SETUP stage.\n" + " Individual early console drver maintainers need to be involved to avoid\n" + " regressions that might occur on this modification as the maintainers\n" + " might offer the real tests rather than I can do. \n" + "3. Introducing a barely new debugging facility that does not relate to the\n" + " current early console implementation to allow automatic detection for\n" + " the early consoles.\n" + " +-------------------+ +--------------------+\n" + " | EARLY_PARAM SETUP | -> | EARLY_RPINTK START |\n" + " +-------------------+ +--------------------+\n" + " +-----------------+ +--------------------+\n" + " | ACPI DBGP PROBE | -> | EARLY_RPINTK START |\n" + " +-----------------+ +--------------------+\n" + " This is what the patch set has done to enable this new usage model.\n" + " It is known as \"ACPI early console launcher mode\".\n" + " Early consoles started in this style will lose some debuggabilities in\n" + " the kernel boot up. If the system does not crash very early,\n" + " developers still can see the bufferred kernel outputs when the\n" + " register_console() is called.\n" + " Note that the user configuration can not be applied to the registered\n" + " early consoles in this way as the acpi_table_init() is still called\n" + " after the parse_early_param(). Instead, the early consoles should\n" + " derive the hardware settings used in the BIOS/bootloaders.\n" + " As a launcher, ACPI DBGP will not actually output kernel messages\n" + " without the real early console drivers, that's why the\n" + " CONFIG_EARLY_PRINTK_INTEL_MID_SPI is still need to be enabled along\n" + " along with the CONFIG_EARLY_PRINTK_ACPI.\n" + " In order to disable this facility by default and enable it at runtime,\n" + " an kernel parameter \"earlyprintk=acpi\" is introduced. This makes the\n" + " actual sequence looks like:\n" + " +-------------------+ +--------------------+\n" + " | EARLY_PARAM SETUP | -> | EARLY_RPINTK START |\n" + " +-------------------+ +....................+ +-----------------+\n" + " | ACPI DBGP LAUNCH | -> | ACPI DBGP PROBE | ->\n" + " +--------------------+ +-----------------+\n" + " +--------------------+\n" + " -> | EARLY_RPINTK START |\n" + " +--------------------+\n" + "\n" "Version 3 of this patch set is the first version that will be published\n" "in the Linux community. Earlier versions are reviewed internally in\n" "Intel. This patch set keeps the version number to track the history\n" "that is known to Intel internal developers.\n" + "Version 4 of this patch set fixed bunch of CodingStyle issues.\n" "\n" "Lv Zheng (2):\n" " ACPI: Add early console framework for DBGP/DBG2.\n" " ACPI: Add Intel MID SPI early console support.\n" "\n" - " Documentation/kernel-parameters.txt | 1 +\n" - " arch/x86/Kconfig.debug | 25 ++++\n" + " Documentation/kernel-parameters.txt | 2 +\n" + " arch/x86/Kconfig.debug | 38 +++++\n" " arch/x86/include/asm/mrst.h | 2 +-\n" " arch/x86/kernel/acpi/boot.c | 1 +\n" " arch/x86/kernel/early_printk.c | 25 +++-\n" @@ -52,7 +145,7 @@ " include/acpi/actbl2.h | 1 +\n" " include/linux/acpi.h | 24 +++\n" " include/linux/intel_mid_early.h | 12 ++\n" - " 14 files changed, 526 insertions(+), 181 deletions(-)\n" + " 14 files changed, 540 insertions(+), 181 deletions(-)\n" " create mode 100644 drivers/acpi/early_printk.c\n" " create mode 100644 drivers/platform/x86/early/Makefile\n" " create mode 100644 drivers/platform/x86/early/intel_mid_spi.c\n" @@ -61,4 +154,4 @@ "-- \n" 1.7.10 -3d9c4e01ed7e2fe8252cf92627558a694cb75b53c80f081bafdb1f9b434bed6b +6912de6acbfabef59d8bb2507831a0b3e630497a5890396035fec8faa574cb55
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.