Documentation
¶
Overview ¶
Package firmware contains local Tast tests that exercise the firmware portion of Chrome OS.
This includes the main EC as well as other ECs such as the fingerprint MCU and corresponds to the chromiumos/platform/ec repository.
Index ¶
- func ACVP(ctx context.Context, s *testing.State)
- func Flashrom(ctx context.Context, s *testing.State)
- func FlashromPerf(ctx context.Context, s *testing.State)
- func FlashromWriteProtect(ctx context.Context, s *testing.State)
- func FpUpdaterSucceeded(ctx context.Context, s *testing.State)
- func FpmcuUnittest(ctx context.Context, s *testing.State)
- func FwupdDetectPS175(ctx context.Context, s *testing.State)
- func FwupdDetectRTD2142(ctx context.Context, s *testing.State)
- func FwupdGetDevices(ctx context.Context, s *testing.State)
- func FwupdInhibitSuspend(ctx context.Context, s *testing.State)
- func FwupdInstallRemote(ctx context.Context, s *testing.State)
- func FwupdPluginStartup(ctx context.Context, s *testing.State)
- func FwupdPowerdUpdateCheck(ctx context.Context, s *testing.State)
- func GSCtool(ctx context.Context, s *testing.State)
- func SHANI(ctx context.Context, s *testing.State)
- type BiosService
- func (*BiosService) BackupImageSection(ctx context.Context, req *pb.FWBackUpSection) (*pb.FWBackUpInfo, error)
- func (bs *BiosService) ClearAndSetGBBFlags(ctx context.Context, req *pb.GBBFlagsState) (*empty.Empty, error)
- func (bs *BiosService) CorruptECSection(ctx context.Context, req *pb.CorruptSection) (*empty.Empty, error)
- func (bs *BiosService) EnableAPSoftwareWriteProtect(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (*BiosService) GetGBBFlags(ctx context.Context, req *empty.Empty) (*pb.GBBFlagsState, error)
- func (bs *BiosService) RestoreImageSection(ctx context.Context, req *pb.FWBackUpInfo) (*empty.Empty, error)
- type FpUpdaterService
- type SerialPortService
- func (s *SerialPortService) Close(ctx context.Context, in *pb.PortId) (*empty.Empty, error)
- func (s *SerialPortService) Flush(ctx context.Context, in *pb.PortId) (*empty.Empty, error)
- func (s *SerialPortService) Open(ctx context.Context, in *pb.SerialPortConfig) (*pb.PortId, error)
- func (s *SerialPortService) Read(ctx context.Context, in *pb.SerialReadRequest) (*wrappers.BytesValue, error)
- func (s *SerialPortService) Write(ctx context.Context, in *pb.SerialWriteRequest) (*wrappers.Int64Value, error)
- type UtilsService
- func (*UtilsService) BlockingSync(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (us *UtilsService) CloseChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (us *UtilsService) EvalTabletMode(ctx context.Context, req *empty.Empty) (*fwpb.EvalTabletModeResponse, error)
- func (us *UtilsService) FindPhysicalKeyboard(ctx context.Context, req *empty.Empty) (*fwpb.FindPhysicalKeyboardResponse, error)
- func (us *UtilsService) FindSingleNode(ctx context.Context, req *fwpb.NodeElement) (*empty.Empty, error)
- func (us *UtilsService) GetDetachableBaseValue(ctx context.Context, req *empty.Empty) (*fwpb.CrosConfigResponse, error)
- func (us *UtilsService) NewChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (us *UtilsService) PerformSpeedometerTest(ctx context.Context, req *empty.Empty) (*fwpb.SpeedometerResponse, error)
- func (us *UtilsService) ReadServoKeyboard(ctx context.Context, req *fwpb.ReadServoKeyboardRequest) (*fwpb.ReadServoKeyboardResponse, error)
- func (us *UtilsService) ReuseChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Flashrom ¶
Flashrom runs the flashrom utility and confirms that flashrom was able to communicate with a SPI ROM.
func FlashromPerf ¶
FlashromPerf runs the flashrom utility to verify various expected behaviour is maintained. The function times Flashrom total execution time for a complete probe and read of a given region of the SPI flash.
func FwupdDetectPS175 ¶
FwupdDetectPS175 runs the fwupdmgr utility and verifies that the PS175 device is recognized.
func FwupdDetectRTD2142 ¶
FwupdDetectRTD2142 runs fwupdmgr and verifies that a RTD2142 is recognized.
func FwupdGetDevices ¶
FwupdGetDevices runs the fwupdmgr utility and verifies that it detects devices in the system.
func FwupdInhibitSuspend ¶
FwupdInhibitSuspend runs the fwupdtool utility and makes sure that the system can suspend before and after, but not during an update.
func FwupdInstallRemote ¶
FwupdInstallRemote runs the fwupdtool utility and verifies that it can update a device in the system using a remote repository.
func FwupdPluginStartup ¶
FwupdPluginStartup runs fwupdmgr get-plugins, retrieves the output, and checks that the expected plugins are enabled
func FwupdPowerdUpdateCheck ¶
FwupdPowerdUpdateCheck sets the battery case, runs sequential update commands, and checks that they return with or without errors as appropriate.
Types ¶
type BiosService ¶
type BiosService struct {
// contains filtered or unexported fields
}
BiosService implements tast.cros.firmware.BiosService.
func (*BiosService) BackupImageSection ¶
func (*BiosService) BackupImageSection(ctx context.Context, req *pb.FWBackUpSection) (*pb.FWBackUpInfo, error)
BackupImageSection dumps the image region into temporary file locally and returns its path.
func (*BiosService) ClearAndSetGBBFlags ¶
func (bs *BiosService) ClearAndSetGBBFlags(ctx context.Context, req *pb.GBBFlagsState) (*empty.Empty, error)
ClearAndSetGBBFlags clears and sets specified GBB flags, leaving the rest unchanged.
func (*BiosService) CorruptECSection ¶
func (bs *BiosService) CorruptECSection(ctx context.Context, req *pb.CorruptSection) (*empty.Empty, error)
CorruptECSection writes garbage over part of the specified firmware section.
func (*BiosService) EnableAPSoftwareWriteProtect ¶
func (bs *BiosService) EnableAPSoftwareWriteProtect(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
EnableAPSoftwareWriteProtect enables the AP software write protect.
func (*BiosService) GetGBBFlags ¶
func (*BiosService) GetGBBFlags(ctx context.Context, req *empty.Empty) (*pb.GBBFlagsState, error)
GetGBBFlags gets the flags that are cleared and set.
func (*BiosService) RestoreImageSection ¶
func (bs *BiosService) RestoreImageSection(ctx context.Context, req *pb.FWBackUpInfo) (*empty.Empty, error)
RestoreImageSection restores image region from temporary file locally and restores fw with it.
type FpUpdaterService ¶
type FpUpdaterService struct {
// contains filtered or unexported fields
}
FpUpdaterService implements tast.cros.firmware.FpUpdaterService.
func (*FpUpdaterService) ReadUpdaterLogs ¶
func (*FpUpdaterService) ReadUpdaterLogs(ctx context.Context, req *empty.Empty) (*fwpb.ReadFpUpdaterLogsResponse, error)
ReadUpdaterLogs reads the latest and previous logs from the fingerprint firmware updater.
type SerialPortService ¶
type SerialPortService struct {
// contains filtered or unexported fields
}
SerialPortService implements tast.cros.firmware.SerialPortService
func (*SerialPortService) Open ¶
func (s *SerialPortService) Open(ctx context.Context, in *pb.SerialPortConfig) (*pb.PortId, error)
Open handles the Open rpc call.
func (*SerialPortService) Read ¶
func (s *SerialPortService) Read(ctx context.Context, in *pb.SerialReadRequest) (*wrappers.BytesValue, error)
Read handles the Read rpc call.
func (*SerialPortService) Write ¶
func (s *SerialPortService) Write(ctx context.Context, in *pb.SerialWriteRequest) (*wrappers.Int64Value, error)
Write handles the Write rpc call.
type UtilsService ¶
type UtilsService struct {
// contains filtered or unexported fields
}
UtilsService implements tast.cros.firmware.UtilsService.
func (*UtilsService) BlockingSync ¶
BlockingSync syncs the root device and internal device.
func (*UtilsService) CloseChrome ¶
CloseChrome closes a Chrome session and cleans up the resources obtained by NewChrome.
func (*UtilsService) EvalTabletMode ¶
func (us *UtilsService) EvalTabletMode(ctx context.Context, req *empty.Empty) (*fwpb.EvalTabletModeResponse, error)
EvalTabletMode evaluates tablet mode status.
func (*UtilsService) FindPhysicalKeyboard ¶
func (us *UtilsService) FindPhysicalKeyboard(ctx context.Context, req *empty.Empty) (*fwpb.FindPhysicalKeyboardResponse, error)
func (*UtilsService) FindSingleNode ¶
func (us *UtilsService) FindSingleNode(ctx context.Context, req *fwpb.NodeElement) (*empty.Empty, error)
FindSingleNode finds the specific UI node based on the passed in element.
func (*UtilsService) GetDetachableBaseValue ¶
func (us *UtilsService) GetDetachableBaseValue(ctx context.Context, req *empty.Empty) (*fwpb.CrosConfigResponse, error)
GetDetachableBaseValue retrieves the values of a few detachable-base attributes, such as product-id, usb-path, and vendor-id. The values are saved and returned in a list.
func (*UtilsService) PerformSpeedometerTest ¶
func (us *UtilsService) PerformSpeedometerTest(ctx context.Context, req *empty.Empty) (*fwpb.SpeedometerResponse, error)
PerformSpeedometerTest runs the speedometer test on one external website, and returns the result value.
func (*UtilsService) ReadServoKeyboard ¶
func (us *UtilsService) ReadServoKeyboard(ctx context.Context, req *fwpb.ReadServoKeyboardRequest) (*fwpb.ReadServoKeyboardResponse, error)
ReadServoKeyboard reads from the servo's keyboard emulator.
func (*UtilsService) ReuseChrome ¶
ReuseChrome reuses the existing Chrome session if there's already one.
Source Files
¶
- acvp.go
- bios_service.go
- doc.go
- flashrom.go
- flashrom_perf.go
- flashrom_write_protect.go
- fp_updater_service.go
- fp_updater_succeeded.go
- fpmcu_unittest.go
- fwupd_detect_ps175.go
- fwupd_detect_rtd2142.go
- fwupd_get_devices.go
- fwupd_inhibit_suspend.go
- fwupd_install_remote.go
- fwupd_plugin_startup.go
- fwupd_powerd_update_check.go
- gsctool.go
- serial_port_service.go
- sha_ni.go
- utils_service.go