After Rob pointed out there's a non-ancient version of the
devicetree bindings for pstore/ramoops, I figured it would be
worth migrating over to using it.
So this series adds pstore/ramoops support to hikey, and its
much more tidy compared to the last patch for this.
Would love any extra feedback and review.
The reserved ramoops address is mostly chosen at random, and
while the bootloader doesn't seen to clear that memory, I suspect
we will need a change to make sure that memory is protected by
the bootloader and UEFI applications don't scribble over it. So
help there would be appreciated!
thanks
-john
Cc: Rob Herring <rob.herring(a)linaro.org>
Cc: Arnd Bergmann <arnd.bergmann(a)linaro.org>
Cc: Haojian Zhuang <haojian.zhuang(a)linaro.org>
Cc: Guodong Xu <guodong.xu(a)linaro.org>
Cc: Vishal Bhoj <vishal.bhoj(a)linaro.org>
Greg Hackmann (1):
pstore-ram: add Device Tree bindings
John Stultz (1):
hikey: dts: Add pstore support for HiKey
Documentation/ramoops.txt | 6 +-
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 13 +++
arch/arm64/configs/hikey_defconfig | 7 ++
fs/pstore/ram.c | 114 ++++++++++++++++++++++++-
4 files changed, 134 insertions(+), 6 deletions(-)
--
1.9.1
Hi,
> 在 2015年12月31日,22:48,Arnd Bergmann <arnd(a)arndb.de> 写道:
>>
>>> So in case of 4K pages, the minimum amount of free memory is 3MB, and
>>> almost always there are less than 8 MB free, . This is expected.
>>>
>>> In contrast, for the 64KB page case, we never have less than 512MB
>>> RAM free, and it's usually between 512 and 520MB, which is very surprising
>>> and indicates that there is a bug somewhere, either in the accounting
>>> or in the code in mm/page_alloc.c that tries to reserve some RAM for
>>> __GFP_HIGH allocations. Can you have a look at that code?
>>>
>>
The root cause is that CMA reserved 512M memory in 64K page size, and buddy allocator
can not eat those memory. Some guys explain that ext4 filesystem don’t support
migration page well, I didn’t dig into it yet. After unset CONFIG_CMA, the free memory
can down to very low in 64K page size.
Besides that, I found some weird problems in db410c.
1. there is no ZONE_NORMAL, only ZONE_DMA. I don’t know if there are bad influences,
or bug in zone_sizes_init(). I have try to hard code max_dma to 64M in zone_sizes_init(),
and it works.
2. 512M CMA memory in 64K page. Is the number normal? As I know, 4K page size only
have 64M CMA memory. I have tracked the code, and found that the size passed to
cma_declare_contiguous() function is the same as 4K page, but after call ALIGN(), the
size increase to 512M.
3. As the test data indicated, CMA memory in 4K page can be consumed, but in 64K page,
the result is not the same. A bug here?
Pingbo
Hi,
Does anyone run KASan on db410c successfully? I merged arm64-upstream branch
over integration-linux-qcomlt, and enable KASan feature, compiled with gcc 5.1.
But the kernel hanged before start_kernel(), no log output.
Please tell me if I miss something here.
Pingbo
We are happy to announce the 15.12 release for the reference software
platform project!
This is our second release and for the first time also including
support for the Enterprise Edition. Since there is still no
availability for the 96Boards HuskyBoard, the first EE RPB was
produced using the current enterprise development boards that are
available in Linaro, such as HiSilicon D02 and AMD Overdrive (same SoC
from HuskyBoard, known as Seattle). Once HuskBoard is available, the
work for making it supported by the EE RPB should be minimal.
A lot of work was put in place for the EE RPB, covering firmware
(UEFI/EDK2), Linux 4.4 (with ACPI), Debian Jessie/CentOS 7 network
installers, OpenStack Liberty, Hadoop, Spark and a few others,
consolidating the work from several other Linaro groups and teams as
well as from community and members.
For the Consumer Edition the CE AOSP RPB for Hikey is now using a 4.1
based kernel, closer to what is provided directly by AOSP. We decided
to not push major updates and rebases for the CE Debian RPB kernel
since we want the changes to follow the same kernel policy as used by
the EE kernel (https://github.com/96boards/documentation/wiki/RP-Kernel-Policy).
The goal of having one single tree for both CE and EE, with a strict
upstream-based policy, will continue, and we hope to have more news on
that in the upcoming weeks.
The work for the CE OE/Yocto RPB was also started, but unfortunately
not yet covering single 96boards machine (due lack of a common
kernel). Please check https://github.com/96boards/meta-rpb and
https://github.com/96boards/oe-rpb-manifest to see what is already
done for OpenEmbedded.
Highlights for this release:
Enterprise Edition:
- UEFI/EDK2 support for D02, provided by OpenPlatformPkg
- 4.4-rc4 based kernel, including support for D02 and Overdrive
- ACPI support for D02 and Overdrive (mandatory for the enterprise edition)
- Debian 8.2 "Jessie" network installer (using the 4.4-rc4 based
kernel). CentOS 7 network installer available in alpha state.
- Components:
* Docker 1.9.1
* OpenStack Liberty
* ODPi BigTop (Hadoop, Spark, etc)
* OpenJDK 8
Consumer Edition:
CE Debian RPB for DragonBoard410 and HiKey (including support for the
LeMaker version):
- Debian 8.2 “Jessie”
- 4.3 kernel (with additional patches)
- OpenJDK 8 included by default
- 96Boards artwork and default settings
CE AOSP RPB for HiKey (including support for the LeMaker version):
- AOSP Android Marshmallow 6.0
- 4.1 based kernel
Install instructions, known issues, test reports and instructions to
build from source are all published at
https://github.com/96boards/documentation/wiki/RP-Release-2015.12.
Please also check
https://github.com/96boards/documentation/wiki/ReferenceSoftwareEE for
documentation covering the components released as part of the EE RPB.
For general questions or support requests, please go to the
96boards.org Community forum (https://www.96boards.org/forums/). For
development questions and topics, please use the 96Boards.org
development mailing-list (dev(a)lists.96boards.org).
For bugs related to the 96Boards platforms, please use the 96Boards
bug tracking system (https://bugs.96boards.org/). For bugs related to
the reference software platform release, but on development boards
that are not officially part of 96Boards, please use
https://bugs.linaro.org instead (e.g. AMD Overdrive and HiSilicon
D02).
For IRC support, please go to the #96boards channel at Freenode.
Challenges for the next release (15.03):
- Add support for HiKey and Dragonboard410c at our common 96Boards
kernel tree (by following
https://github.com/96boards/documentation/wiki/RP-Kernel-Policy)
- Extended support for CE OE/Yocto
- Support for CE AOSP for Dragonboard410c (with freedreno)
- Compliance process and check-list
We hope you enjoy the release!
On behalf of the Linaro 96Boards team,
Ricardo Salveti
Hi all,
I found that the arm64 kernel doesn't support for compressed kernel image.
In this way, the bootimage with android may be much bigger than compressed version.
Who can tell the reason of this? I will be appreciated it!
Feng,
This allows the bootloader to user a reserved page to
read if the kernel requested we boot into fastboot
mode or normal bootup.
This allows users to reboot into fastboot mode w/o
having to modify jumpers on J15
This change requires the kernel to support the
communication of the reboot reason to the bootloader.
I'm really not sure the method I'm using here is right
(ie: setting a pointer to a physaddr and reading/writing
to it). So any extra feedback or review would be
appreciated!
Cc: Vishal Bhoj <vishal.bhoj(a)linaro.org>
Cc: haojian.zhuang(a)linaro.org
Cc: guodong.xu(a)linaro.org
Signed-off-by: John Stultz <john.stultz(a)linaro.org>
---
.../HiKeyPkg/Drivers/HiKeyDxe/InstallBootMenu.c | 26 ++++++++++++++++++++++
HisiPkg/HiKeyPkg/Library/HiKeyLib/HiKeyMem.c | 1 +
2 files changed, 27 insertions(+)
diff --git a/HisiPkg/HiKeyPkg/Drivers/HiKeyDxe/InstallBootMenu.c b/HisiPkg/HiKeyPkg/Drivers/HiKeyDxe/InstallBootMenu.c
index 84fdea1..90507d2 100644
--- a/HisiPkg/HiKeyPkg/Drivers/HiKeyDxe/InstallBootMenu.c
+++ b/HisiPkg/HiKeyPkg/Drivers/HiKeyDxe/InstallBootMenu.c
@@ -375,6 +375,31 @@ HiKeyTestLed (
}
}
+
+#define REBOOT_REASON_ADDR 0x05F01000
+#define REBOOT_REASON_BOOTLOADER 0x77665500
+#define REBOOT_REASON_NONE 0x77665501
+STATIC
+VOID
+EFIAPI
+HiKeyDetectRebootReason (
+ IN VOID
+ )
+{
+ UINT32 *addr = (UINT32*)REBOOT_REASON_ADDR;
+ UINT32 val;
+
+ val = *addr;
+ /* Check to see if "reboot booloader" was specified */
+ if (val == REBOOT_REASON_BOOTLOADER) {
+ mBootIndex = 0;
+ }
+ /* Write NONE to the reason address to clear the state */
+ *addr = REBOOT_REASON_NONE;
+
+ return;
+}
+
STATIC
VOID
EFIAPI
@@ -540,6 +565,7 @@ HiKeyOnEndOfDxe (
}
HiKeyDetectJumper ();
+ HiKeyDetectRebootReason ();
// Check boot device.
// If boot device is eMMC, it's always higher priority.
diff --git a/HisiPkg/HiKeyPkg/Library/HiKeyLib/HiKeyMem.c b/HisiPkg/HiKeyPkg/Library/HiKeyLib/HiKeyMem.c
index d7d15b5..e0ae73f 100644
--- a/HisiPkg/HiKeyPkg/Library/HiKeyLib/HiKeyMem.c
+++ b/HisiPkg/HiKeyPkg/Library/HiKeyLib/HiKeyMem.c
@@ -37,6 +37,7 @@ STATIC struct HiKeyReservedMemory {
EFI_PHYSICAL_ADDRESS Size;
} HiKeyReservedMemoryBuffer [] = {
{ 0x05E00000, 0x00100000 }, // MCU
+ { 0x05F01000, 0x00001000 }, // ADB REBOOT "REASON"
{ 0x06DFF000, 0x00001000 }, // MAILBOX
{ 0x0740F000, 0x00001000 }, // MAILBOX
{ 0x3E000000, 0x02000000 } // TEE OS
--
1.9.1
Trying to update firmware on a hikey that was previously running
u-boot just fine, I followed the "Board Recovery" section of the
Getting Started page[1], but end up with the init sequence getting
stuck in TEE-CORE init (console log below[2])
Any ideas what's going wrong?
I'm trying to update the firmware so I get serial output on the UART
board. I'm currently only using the UART pins on the main board.
Kevin
[1] https://github.com/96boards/documentation/wiki/HiKeyGettingStarted#section-4
[2]
debug EMMC boot: print init OK
debug EMMC boot: send RST_N .
debug EMMC boot: start eMMC boot......
load fastboot1!
Switch to aarch64 mode. CPU0 executes at 0xf9801000!
INF TEE-CORE:init_primary_helper:322: Initializing (2f04385 #2 Sat Nov
28 10:50:14 UTC 2015 aarch64)
INF TEE-CORE:init_teecore:81: teecore inits done