1# Copyright 2021 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5AUTHOR = "ChromeOS Team" 6NAME = "firmware_CbfsMcache" 7PURPOSE = "Ensure the CBFS metadata cache did not overflow." 8ATTRIBUTES = "suite:faft_bios, suite:faft_bios_ro_qual, suite:faft_bios_rw_qual, suite:faft_lv4" 9CRITERIA = "Fail if either RO or RW CBFS mcache overflowed." 10TIME = "SHORT" 11TEST_CATEGORY = "Functional" 12TEST_CLASS = "firmware" 13TEST_TYPE = "client" 14PY_VERSION = 3 15 16DOC = """ 17The CBFS metadata cache size in coreboot is configured by CONFIG_CBFS_MCACHE_SIZE 18(x86) or the size of the CBFS_MCACHE() region defined in memlayout (arm). If the 19mcache overflows, the platform will still boot securely but needs to read data 20from flash more times than necessary, leading to avoidable boot time impact. If 21this test fails, the mcache size should be increased until it doesn't. (If the 22RW mcache overflows by a lot, adjusting CONFIG_CBFS_MCACHE_RW_PERCENTAGE may 23also be interesting.) 24 25""" 26 27job.run_test('firmware_CbfsMcache') 28