VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/BIOS/scsi.h@ 82176

Last change on this file since 82176 was 82162, checked in by vboxsync, 5 years ago

PC/BIOS: Move cdb_rw10 and cdb_rw16 into the generic SCSI header so it can be used from other drivers as well

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/* $Id: scsi.h 82162 2019-11-25 10:30:40Z vboxsync $ */
2/** @file
3 * PC BIOS - SCSI definitions.
4 */
5
6/*
7 * Copyright (C) 2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef VBOX_INCLUDED_SRC_PC_BIOS_scsi_h
19#define VBOX_INCLUDED_SRC_PC_BIOS_scsi_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Command opcodes. */
25#define SCSI_SERVICE_ACT 0x9e
26#define SCSI_INQUIRY 0x12
27#define SCSI_READ_CAP_10 0x25
28#define SCSI_READ_10 0x28
29#define SCSI_WRITE_10 0x2a
30#define SCSI_READ_CAP_16 0x10 /* Not an opcode by itself, sub-action for the "Service Action" */
31#define SCSI_READ_16 0x88
32#define SCSI_WRITE_16 0x8a
33
34#pragma pack(1)
35
36/* READ_10/WRITE_10 CDB layout. */
37typedef struct {
38 uint16_t command; /* Command. */
39 uint32_t lba; /* LBA, MSB first! */
40 uint8_t pad1; /* Unused. */
41 uint16_t nsect; /* Sector count, MSB first! */
42 uint8_t pad2; /* Unused. */
43} cdb_rw10;
44
45/* READ_16/WRITE_16 CDB layout. */
46typedef struct {
47 uint16_t command; /* Command. */
48 uint64_t lba; /* LBA, MSB first! */
49 uint32_t nsect32; /* Sector count, MSB first! */
50 uint8_t pad1; /* Unused. */
51 uint8_t pad2; /* Unused. */
52} cdb_rw16;
53
54#pragma pack()
55
56ct_assert(sizeof(cdb_rw10) == 10);
57ct_assert(sizeof(cdb_rw16) == 16);
58
59#endif /* !VBOX_INCLUDED_SRC_PC_BIOS_scsi_h */
60
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette