summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-01-22usb: add special keys handling to the HID driverVincent Palatin
Generate ANSI 3.64 sequences to handle arrow keys, Fx and other special keyboard keys. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:7666 TEST=on Stumpy in recovery mode, press arrow keys and see the language of the message change. Change-Id: I4560ca0c68ea5a9da4cde8247ea5ecc74938f84a Reviewed-on: https://gerrit.chromium.org/gerrit/14596 Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Terry Lambert <tlambert@chromium.org> Commit-Ready: Terry Lambert <tlambert@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@google.com> (cherry picked from commit 93954c89f388f3f36149504ebbcd6f6a70fd3a8f) Reviewed-on: https://gerrit.chromium.org/gerrit/14606 Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
2012-01-19CHROMIUM: Arm: tegra: mmc: change bounce buffer printf to debugPuneet Saxena
BUG=chromium-os:23496 TEST=Built ok for Cardhu Walgui and Seaboard. Tested on Waluigi. Change-Id: I86d029e09713b0d8f885b97d7ec34119266dfe11 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: https://gerrit.chromium.org/gerrit/13699 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Reviewed-by: Tom Warren <twarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-19Enable frequency selection in VbExBeep().Bill Richardson
BUG=none TEST=manual In dev-mode, press "Ctrl-U" with no USB stick inserted. If "crossystem dev_boot_usb" is 0, you'll hear two 400Hz beeps. If "crossystem dev_boot_usb" is 1, you'll hear one 200Hz beep. Signed-off-by: Bill Richardson <wfrichar@google.com> Change-Id: Ifd45a067ec8b922863331f13f3f4525ef40f7346 Reviewed-on: https://gerrit.chromium.org/gerrit/14529 Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Commit-Ready: Bill Richardson <wfrichar@chromium.org>
2012-01-18Make the memory wiping code use arch_phys_memsetGabe Black
By using arch_phys_memset, the wiping code doesn't need to worry about what addresses can be accessed by memset or how to actually get at them. BUG=chrome-os-partner:7579 TEST=From the original, larger patch: Built and booted on Lumpy, Stumpy, and Kaen. Looked at the log to see that the regions in high memory are listed as cleared. Artificially injected a range to "clear" with 0xA5 and then 0x5A which was over the framebuffer and covered part or all of the screen on Lumpy. Verified that the screen was partially or completely filled with an appropriate looking color. Had U-Boot print the PDTs it was generating to verify that the high address bits were preserved. Identity mapped only some of memory and verified that things that should be mapped were accessible and things that shouldn't be weren't. Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: Ia1859e8df5a0bbe41839a697829dfc775e1b1e48 Reviewed-on: https://gerrit.chromium.org/gerrit/14419 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Gabe Black (Do Not Use) <gabeblack@google.com> Tested-by: Gabe Black (Do Not Use) <gabeblack@google.com>
2012-01-18X86: Implement arch_phys_memset so that it can wipe memory above 4GBGabe Black
Implement arch_phys_memset so that it can set memory at physical addresses above 4GB using PAE paging. Because there are only 5 page tables in PAE mode, 1 PDPT and 4 PDTs, those tables are statically allocated in the BSS. The tables must be 4K page aligned and are declared that way, and because U-Boot starts as 4K aligned and the relocation code relocates it to a 4K aligned address, the tables work as intended. While paging is turned on, all 4GB are identity mapped except for one 2MB page which is used as the window into high memory. This way, U-Boot will continue to work as expected when running code that expects to access memory freely, but the code can still get at high memory through its window. The window is put at 2MB so that it's 2MB page aligned, low in memory to be out of the way of things U-Boot is likely to care about, and above the lowest 1MB where lots of random things live. BUG=chrome-os-partner:7579 TEST=From the original, larger patch: Built and booted on Lumpy, Stumpy, and Kaen. Looked at the log to see that the regions in high memory are listed as cleared. Artificially injected a range to "clear" with 0xA5 and then 0x5A which was over the framebuffer and covered part or all of the screen on Lumpy. Verified that the screen was partially or completely filled with an appropriate looking color. Had U-Boot print the PDTs it was generating to verify that the high address bits were preserved. Identity mapped only some of memory and verified that things that should be mapped were accessible and things that shouldn't be weren't. Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: I1b3a038009de4312edba56ced1a91f9b0f6858b4 Reviewed-on: https://gerrit.chromium.org/gerrit/14418 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Gabe Black (Do Not Use) <gabeblack@google.com> Tested-by: Gabe Black (Do Not Use) <gabeblack@google.com>
2012-01-18Introduce arch_phys_memset which works like memset but on physical memoryGabe Black
The default implementation of this function is just memset, but other implementations will be needed when physical memory isn't accessible by U-Boot using normal addressing mechanisms. BUG=chrome-os-partner:7579 TEST=From the original, larger patch: Built and booted on Lumpy, Stumpy, and Kaen. Looked at the log to see that the regions in high memory are listed as cleared. Artificially injected a range to "clear" with 0xA5 and then 0x5A which was over the framebuffer and covered part or all of the screen on Lumpy. Verified that the screen was partially or completely filled with an appropriate looking color. Had U-Boot print the PDTs it was generating to verify that the high address bits were preserved. Identity mapped only some of memory and verified that things that should be mapped were accessible and things that shouldn't be weren't. Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: Ie1ba5bbb8ee2847f450d0057611deee397c316cf Reviewed-on: https://gerrit.chromium.org/gerrit/14417 Reviewed-by: Gabe Black (Do Not Use) <gabeblack@google.com> Tested-by: Gabe Black (Do Not Use) <gabeblack@google.com>
2012-01-18X86: Don't assume U-Boot extends to the end of memory when wipingGabe Black
On ARM, U-Boot is put at the end of memory, and the code that records the unused areas of memory to be wiped uses the end of RAM as the upper bound for the region occupied by U-Boot. On x86, U-Boot may have been relocated to somewhere lower than the end of RAM because it can normally only address a 32 bit address space. This change makes the wiping code calculate where U-Boot actually ends on x86 so the areas with large addresses will be wiped properly. BUG=chrome-os-partner:7579 TEST=Built and booted on Lumpy, Stumpy, and Kaen. On Lumpy, verified that the area with physical addresses above 4GB was now in the list to be wiped. Change-Id: Ib7e0818e85daf512b76f85f4e68f88230d301cea Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/14223
2012-01-18X86: Fix some minor bugs in the code that picks a relocation addressGabe Black
When this code picked an area for U-Boot to relocate to, it was making sure that there was enough space for U-Boot's various sections. It wasn't taking into account the space needed for the heap and stack, however, so if it happened to pick a very small region those areas might overlap with something they shouldn't. This change fixes that. Also, this change replaces the ROUND macro with the new rounddown introduced in a previous change. It was assumed that ROUND rounded down, in contrast to the other rounding function in common.h, roundup. It turns out that ROUND rounds up even more agressively than roundup. If the value being rounded is already exactly a multiple of the rounding amount, ROUND will still increase it to the next multiple. Because the region U-Boot had been choosing has plenty of space, there should be no functional difference with this change. BUG=chrome-os-partner:7579 TEST=Built and booted on Lumpy, Stumpy, and Kaen. Change-Id: I39a45be6487ed0f60ea0900fb10632da5b312ebe Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/14222
2012-01-18configs: waluigi: remove pmuboard kernel argPuneet Saxena
BUG=chromium-os:23496 TEST=Build ok for Waluigi,Cardhu and Seaboard. "printenv bootargs" shows the changed kernel arg on Waluigi. Change-Id: I87934f9a887c367098152ac753f98681760ec160 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: https://gerrit.chromium.org/gerrit/13797 Reviewed-by: Tom Warren <twarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Commit-Ready: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Olof Johansson <olofj@chromium.org>
2012-01-18usb: workaround non-working keyboards.Vincent Palatin
If the USB keyboard is not answering properly the first request on its interrupt endpoint, just skip it and try the next one. This workarounds an issue with a wireless mouse dongle which presents itself both as a keyboard and a mouse but has a non-functional keyboard interface. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:7559 TEST=Boot a stumpy with the wireless mouse and the keyboard plugged in such a way that the mouse enumerates first. Check we are booting properly and the key strokes are working in the firmware. Change-Id: I574f2a4bdb3bc7824b5bd747a237ef0b79dd83ac Reviewed-on: https://gerrit.chromium.org/gerrit/14362 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org> (cherry picked from commit 012bbf0ce0301be2482857e3f03b481dd15c2340) Reviewed-on: https://gerrit.chromium.org/gerrit/14379
2012-01-17Add generation of ANSI 3.64 escape sequences.Terry Lambert
This adds support for generation of ANSI 3.64 escape sequences to the PS/2 keyboard driver. This change significantly refactors the code: o It adds an FSA to support 0xE0 and 0xE1 multibyte PS/2 scan code sequences. o It converts the PS/2 scan codes to USB scan code values to facilitate sharing upper level code in future changes. Reasons to use USB scan codes: o Standard o Simple conversion to ASCII / ANSI 3.64 o Ability to share complex processing / state code o Shared international keymaps in higher level code o It adds an ANSI 3.64 escape sequence generator for USB special keys; the intent of doing this is to allow the transparent use of PS/2, USB, and network or serial devices using the same upper level u-boot clients. o It adds an input FIFO which is an almost verbatim copy of the Tegra matrix keyboard driver; future changes are expected to share the FIFOcode among all keyboard drivers. International keyboard support is expected to be handled at a higher layer in the future, using a much smaller NRCS (National Replacement Character Set) table instead of a duplicat table. Combined, the changes reduce the overall source file size by about 5K, and removes about 4K from the data segment as well. Note: Use of typedef for FSA states allows compiler to prohibit switch statement without default case from omitting states. BUG=chrome-os-partner:6580 TEST=Removed backslash from generated 3.64 sequences, stopped boot at command line, verified character sequence generation. Signed-off-by: tlambert@chromium.org Change-Id: I00200c5ccefd44679335fb643b21794e5d77663a modified: drivers/input/i8042.c modified: include/i8042.h Change-Id: I22c692f7bd65da5848908fc71c6cd7d04753f135 Reviewed-on: https://gerrit.chromium.org/gerrit/14218 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Reviewed-by: Gabe Black (Do Not Use) <gabeblack@google.com> Tested-by: Terry Lambert <tlambert@chromium.org> Commit-Ready: Terry Lambert <tlambert@chromium.org>
2012-01-17CHROMIUM: x86: Fix off-by-one error in do_elf_reloc_fixups()Duncan Laurie
The use of post-increment with a do-while loop results in the loop going one step too far when handling relocation fixups. In about 1/100 cases this would cause it to hang. BUG=chromium-os:25121 TEST=boot with serial enabled and extra debug to dump the relocation addresses to ensure that it stops when getting to the end of the rel.dyn section. Change-Id: I4d3686d9c90ccfd0df0dd4d8a6483c534c93d3f2 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/14290 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Ronald G. Minnich <rminnich@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2012-01-17Clean up interaction with vboot library.Bill Richardson
The implementation of the twostop code blurs the boundary between the vboot_reference API and the U-Boot implementation. This cleans it up a bit. BUG=none TEST=none Change-Id: I518b4c436bbc52a97820705a9cc2ee949a58e438 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/14182 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-01-13X86: Override calculate_relocation_address to use the e820 mapGabe Black
Because calculate_relocation_address now uses the e820 map, it will be able to avoid addresses over 32 bits and regions that are at high addresses but not big enough for U-Boot. It also means we can remove the hack which limitted U-Boot's idea of the size of memory to less than 4GB. BUG=None TEST=Built and booted on Lumpy. Built on Kaen. Change-Id: I3ada4e5325ae3a0e652cf79486970e967aef6da6 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/14152
2012-01-13Declare __text_start and __bss_end which will be used in the next commitGabe Black
The way these are declared is different upstream, so these are being added in a separate change to make rebasing easier. BUG=None TEST=Built and booted on Lumpy. Change-Id: If84e0c36bd3615a561dec80eb71741c78db869b3 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/14211
2012-01-13X86: Make calculate_relocation_address an overridable functionGabe Black
Different systems may have different mechanisms for picking a suitable place to relocate U-Boot to. BUG=None TEST=Built and booted on Lumpy. Built for Kaen. Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: If3b9983865917307a4f546e8a1c35260a5dba7a4 Reviewed-on: https://gerrit.chromium.org/gerrit/14151 Commit-Ready: Gabe Black (Do Not Use) <gabeblack@google.com> Reviewed-by: Gabe Black (Do Not Use) <gabeblack@google.com> Tested-by: Gabe Black (Do Not Use) <gabeblack@google.com>
2012-01-13Coreboot: Compile out disk partition and file system codeGabe Black
The code which provides GPT support has some potential security issues in it. Since we're not using it anyway, we might as well just turn it off. BUG=chromium-os:25041 BUG=chromium-os:25042 TEST=Built and booted on Lumpy with various options turned on and off. Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: I7618ba1a34e553094c1cd96bfe892c9c6d0f02ba Reviewed-on: https://gerrit.chromium.org/gerrit/14180 Reviewed-by: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org>
2012-01-13X86: Increase the size of the phys_size_t and phys_addr_t typesGabe Black
These types should be 64 bits long to reflect the fact that physical addresses and the size of physical areas of memory are more than 32 bits long. BUG=None TEST=Built and booted on Lumpy. Change-Id: I58bc69051db027d6eb718ec1c92a3d4afa2b7561 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/14150 Reviewed-by: Simon Glass <sjg@chromium.org>
2012-01-13Make the memory wipe code handle 64 bit addresses properlyGabe Black
When telling the memory wipe infrastructure about regions it should and shouldn't wipe, some of those addresses may be 64 bits on x86. This change makes the infrastructure pass around those addresses intact instead of truncating them, and then simply ignore the regions that are unaddressable by U-Boot. BUG=None TEST=Built and booted on Lumpy. Built on Kaen Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: I657cd5480ca9a33614b032bf2a727d1a74d38b48 Reviewed-on: https://gerrit.chromium.org/gerrit/14149 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Ready: Gabe Black (Do Not Use) <gabeblack@google.com> Tested-by: Gabe Black (Do Not Use) <gabeblack@google.com>
2012-01-13Disk: Make the disk partition code work with no specific partition typesGabe Black
Currently, if the disk partition code is compiled with all of the parition types compiled out, it hits an #error which stops the build. This change adjusts that file so that those functions will fall through to their defaults in those cases instead of breaking the build. These functions are needed because other code calls them, and that code is needed because other config options are overly broad and bring in support we don't need along with support we do. BUG=chromium-os:25041 BUG=chromium-os:25042 TEST=Built and booted on Lumpy with various options turned on and off, built for Kaen. Change-Id: I1307563c0a70a8a011a180ec0457113b54a65095 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/14179 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org> Reviewed-by: Gabe Black <gabeblack@chromium.org>
2012-01-13usb: properly re-initialize the USB keyboard.Vincent Palatin
Allow to reconfigure properly the USB keyboard driver when we enumerate several times the USB devices and its position in the device tree has changes. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:7188 chrome-os-partner:7430 chrome-os-partner:7432 chrome-os-partner:7559 TEST=On lumpy with usb keyboard configured, run in recovery mode, insert a bad key, press tab, remove the key, press tab. The recovery info are displayed properly. Change-Id: I5a4c0f5a85e6946a51bc5d0f1ad0860979e84113 Reviewed-on: https://gerrit.chromium.org/gerrit/14189 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2012-01-13config: coreboot: allow to unregister input devicesVincent Palatin
Allow to reconfigure properly the USB keyboard driver when we enumerate several times the USB devices and its position in the device tree has changes. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:7188 chrome-os-partner:7430 chrome-os-partner:7432 chrome-os-partner:7559 TEST=On lumpy with usb keyboard configured, run in recovery mode, insert a bad key, press tab, remove the key, press tab. The recovery info are displayed properly. Change-Id: Ief5e25879fe75fb6371a089a310c5d6af662252f Reviewed-on: https://gerrit.chromium.org/gerrit/14188 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2012-01-13ehci: add timeout on interrupt endpoint operationsVincent Palatin
ensure we cannot get stuck in the keyboard scanning if something wrong happens (USB device unplugged or fatal I/O error) Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:7188 chrome-os-partner:7430 chrome-os-partner:7432 chrome-os-partner:7559 TEST=On lumpy with usb keyboard configured, stress the USB stack and check the keyboard traces. Change-Id: I019ddefa073852ae1abfd4f223ba4c2d6a7bc054 Reviewed-on: https://gerrit.chromium.org/gerrit/14187 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2012-01-13stdio: remove useless strncpyVincent Palatin
The name is already copied when we memcopy the whole structure. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:7188 chrome-os-partner:7430 chrome-os-partner:7432 chrome-os-partner:7559 TEST=On lumpy with usb keyboard configured, run in recovery mode, insert a bad key, press tab, remove the key, press tab. The recovery info are displayed properly. Change-Id: Id719858901544403de9f7b8defd5df661510d48e Reviewed-on: https://gerrit.chromium.org/gerrit/14186 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2012-01-13stdio: fix stack memory corruptionVincent Palatin
When copying the device name, the temporary target variable was twice smaller than the copy size. Create a define to ensure this won't break again. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:7188 chrome-os-partner:7430 chrome-os-partner:7432 chrome-os-partner:7559 TEST=On lumpy with usb keyboard configured, run in recovery mode, insert a bad key, press tab, remove the key, press tab. The recovery info are displayed properly. Change-Id: Ia9e765555d2f4efba81b8c389be2778cf2b92db0 Reviewed-on: https://gerrit.chromium.org/gerrit/14185 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2012-01-13X86: Make the upper bound on relocated symbols closed instead of openGabe Black
When relocating symbols, U-Boot only relocates the ones that fall within the range of address that are actually being moved. This change makes the upper bound of that region closed (less than or equal to) instead of open (less than) so that the __bss_end symbol is processed as well. BUG=None TEST=Built and booted on Lumpy. Built on Kaen. Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: Ic1ee7402621dc266b3776ea5bdf3254ef51bc4ac Reviewed-on: https://gerrit.chromium.org/gerrit/14148 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Gabe Black (Do Not Use) <gabeblack@google.com> Tested-by: Gabe Black (Do Not Use) <gabeblack@google.com>
2012-01-12CHROMIUM: x86: Align the header for the MRC data cache.Duncan Laurie
This is to match a change made in coreboot to align both the header and the data to 16 bytes. BUG=none TEST=several cold boots to ensure that the MRC data cache is not written out on every boot. Change-Id: I6c9a01933264d6bd65958ddb93e8944c35e853c6 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/14096 Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2012-01-11CHROMIUM: x86: Add entry in ACPI NVS table for the ME hashDuncan Laurie
BUG=chromium-os:24151 TEST=verify ME hash in the OS Change-Id: I752bdb9e7fedc3a25772ba33b00d981b9e3db4b0 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/13994 Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2012-01-10CHROMIUM: x86: Ignore memory >4GB when parsing Coreboot tablesDuncan Laurie
U-boot is unable to actually use that memory and it can cause problems with relocation if it tries to. BUG=chrome-os-partner:6730 TEST=successfully boot on stumpy with a memory map that ends up having 6MB remapped above 4GB. Change-Id: I9ecde227bc0337145a7c0a6a929cfe0636fc2178 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/13923 Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2012-01-09[x86]: Add environment section to flash map.Stefan Reinauer
dev_cfg is used by vboot_reference, hence we can't store our u-boot environment there anymore. So create a section rw-environment for that purpose. Signed-off-by: Stefan Reinauer <reinauer@google.com> BUG=chrome-os-partner:7264 TEST=boot tested on Stumpy Change-Id: I15479f0f1a2aa111b742d2792052f48d660d122c Reviewed-on: https://gerrit.chromium.org/gerrit/13022 Tested-by: Stefan Reinauer <reinauer@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
2012-01-09usb: add numeric keypad support to HID driverVincent Palatin
When keys are pressed on the numeric keypad, emit key codes for the numbers, operators, dot and enter. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:7436 TEST=On lumpy with USB keyboard activated, boot in dev mode and press enter (on the numeric keypad) to boot. Change-Id: I4a50a26c8dca17c015743c16475833447769765b Reviewed-on: https://gerrit.chromium.org/gerrit/13890 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
2012-01-06Fix u-boot on x86Stefan Reinauer
This fixes the breakage introduced by https://gerrit.chromium.org/gerrit/#change,13371 BUG=none TEST=emerge-stumpy chromeos-u-boot does not fail anymore Signed-off-by: Stefan Reinauer <reinauer@google.com> Change-Id: If969ea2aab6a29d6c22053a63ef1b155d3fb42fa Reviewed-on: https://gerrit.chromium.org/gerrit/13842 Reviewed-by: David Hendricks <dhendrix@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org> Commit-Ready: Stefan Reinauer <reinauer@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2012-01-06Get burst length at init timeSimon Glass
Rather than requesting the burst length on every transaction, just do it at the start. This saves 30ms on Kaen (TPM time now 325ms). BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I8a1b028882c28cd6089c2f7514bee285ef349f24 Reviewed-on: https://gerrit.chromium.org/gerrit/13374 Reviewed-by: Rong Chang <rongchang@chromium.org> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Commit-Ready: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-06slb9635_i2c: Add more debuggingSimon Glass
Add debugging options around most transactions. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I71dd48b59a4eefd39eccc29b61bfcd512d63aa56 Reviewed-on: https://gerrit.chromium.org/gerrit/13376 Reviewed-by: Rong Chang <rongchang@chromium.org> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Commit-Ready: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-06Collect statistics for TPM failuresSimon Glass
The TPM fails every second transaction because it goes to sleep and fails to wake up in time. Add stats for how many transactions are performed and the number of retries required for each. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I079da55e71e637e3afdacfe38c27b8742da09dc5 Reviewed-on: https://gerrit.chromium.org/gerrit/13373 Reviewed-by: Rong Chang <rongchang@chromium.org> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Commit-Ready: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-06CHROMIUM: Support vboot without a displaySimon Glass
This allows booting without a display, mostly as a way of calculating the time that LCD init and maintenance costs us. Perhaps we might integrate the lcd and video APIs within U-Boot - it would be a much nicer solution. With that in mind I feel it is not work refactoring this into three separate (lcd, video, none) files to implement the display API. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: Iea4656f8939f7f2fd78292827091de4ee379954b Reviewed-on: https://gerrit.chromium.org/gerrit/13369 Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
2012-01-05slb9635_i2c: Do writes in one transactionSimon Glass
Since burst_length is now set up at init time, it can never be < 0, and we don't need to write the last byte in a separate I2C transaction. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I0050dd49ba151ee267f2790b550c0ffea4cd976f Reviewed-on: https://gerrit.chromium.org/gerrit/13375 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05Don't show bootstage report on silent console unless askedSimon Glass
This behaviour is not expected, so remove it. For devs the fdt config option bootstage-force-report is provided to generate this report. BUG=chromium-os:20020 TEST=build and boot on Kaen, see that message does not appear Change-Id: I0394aacfbfed79594dbe44157a557562c2947345 Reviewed-on: https://gerrit.chromium.org/gerrit/13378 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05Track lcd wait time using bootstageSimon Glass
The intent is for LCD init to happen such that we never need to call udelay(). Add tracking that this is indeed the case, and report it with the boot time report. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I78e458a6b878a4237e4e059525bae4fa47844ed9 Reviewed-on: https://gerrit.chromium.org/gerrit/13377 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05Indent TPM debug messages for easier readingSimon Glass
Indent all but the top-level messages which indicate a new transaction. This makes it much easier to follow the debug trace. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I3259c4e266f87ce4da8ce590f837542e5b219539 Reviewed-on: https://gerrit.chromium.org/gerrit/13372 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05Add bootstage timing to TPM operationsSimon Glass
Records the total time taken by TPM operations for display as part of the bootstage report. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I7ce6efa3c2bb90858d17ab6613724e6ae73d918b Reviewed-on: https://gerrit.chromium.org/gerrit/13371 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05Add bootstage accumulationSimon Glass
This adds a new type of boot timer, which records the time taken by an operation, rather than marking the instant when it occurred. This is useful to track the amount of time spent in a repeating activity during boot. To use this, call bootstage_start() at the start of the activity, then bootstage_accum() at the end, to add this segment of time to the total. You can call them (start first, then accum) as many times as you like. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I3f1b536dc140c91a4a780188f6974dc37780f4f0 Reviewed-on: https://gerrit.chromium.org/gerrit/13370 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05hack: Change relocation over to use memset/memcpySimon Glass
While we wait for the new relocation stuff to come down from upstream, this uses memset/memcpy() to do the business. Saves about 20ms on boot. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I958b9f53f27c67d4da2fa0f7a2148c59ed48f7aa Reviewed-on: https://gerrit.chromium.org/gerrit/13215 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05Add option to tftp kernel then boot from eMMCSimon Glass
The mmc0_tftpboot option reads a kernel using TFTP but then boots from eMMC. This allows kernel development without resorting to NFS root (which changes some parts of the boot process). BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I23c0890f76dc63dde128d7137d8891341761c884 Reviewed-on: https://gerrit.chromium.org/gerrit/13280 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05CHROMIUM: config: Skip LCD final init for secure bootSimon Glass
The vboot command makes sure that the LCD init is completed so we don't need this in board_late_init(). Overall the LCD init optimization reduces boot time by about 150ms. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: Idcefb81108d0499bb208f8b3d90df65ca4cb6349 Reviewed-on: https://gerrit.chromium.org/gerrit/13206 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05tegra: config: Enable BOARD_LATE_INIT to complete LCD initSimon Glass
LCD final init is now kept in board_late_init(), so we need to enable this feature in the config. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: Ib895c2768359439349714805cea6ff636c2307b3 Reviewed-on: https://gerrit.chromium.org/gerrit/13214 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05tegra: Use board_late_init() to finalize LCD initSimon Glass
We need to make sure that the LCD is ready before we complete booting, so put this code into board_late_init(). BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I97bd1fce6ac93d0639dd8fdb17bf83e8a78d2645 Reviewed-on: https://gerrit.chromium.org/gerrit/13213 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05tegra: Delay exact screen size selection until laterSimon Glass
Prior to relocation it is expensive to find out the LCD dimensions. Instead we select the maximum possible size and allow lcd_ctrl_init() to correct this later. This works since the only purpose of this early init is to set the LCD frame buffer size. So long as we set it to the largest value that could possible be requested, all will be well. BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: I850ee5cb2b6bf051e32c6a52c42c368a940ea045 Reviewed-on: https://gerrit.chromium.org/gerrit/13212 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Commit-Ready: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05tegra: Tidy up LCD init code to use a state machineSimon Glass
The LCD init takes place over five stages. We want to hide this init behind other operations, so turn it into a state machine which we can call at any time. For now, call it in lcd_enable(). BUG=chromium-os:22938 TEST=build and boot on Kaen Change-Id: Ia0b50ec74108ac4e015de12b7a9628426ea17656 Reviewed-on: https://gerrit.chromium.org/gerrit/13211 Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2012-01-05usb: fix aliasing issue in EHCI interrupt codeVincent Palatin
The interrupt endpoint handling code stores the buffer pointer in the QH padding field. We need to make it the size of a pointer to avoid strict aliasing issue with the compiler. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chromium-os:24760 TEST=emerge-lumpy chromeos-u-boot ; emerge-tegra2_kaen chromeos-u-boot Change-Id: Iecbfa0610591d24452106b79de61abb033c36f2e Reviewed-on: https://gerrit.chromium.org/gerrit/13732 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>