aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/net/Socket.java
diff options
context:
space:
mode:
authorPat Haugen <pthaugen@us.ibm.com>2004-04-15 17:29:40 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2004-04-15 13:29:40 -0400
commitc87fbb0a83f987c6eeeedd387e6183c250ad798c (patch)
tree1eb21e59b940de94d19bdec1888d773d02653458 /libjava/java/net/Socket.java
parentdb7f3c6929135d58fa1287ba55cc367347e07c59 (diff)
downloadgcc-c87fbb0a83f987c6eeeedd387e6183c250ad798c.zip
gcc-c87fbb0a83f987c6eeeedd387e6183c250ad798c.tar.gz
gcc-c87fbb0a83f987c6eeeedd387e6183c250ad798c.tar.bz2
ra-debug.c (ra_print_rtx): Add break's to case legs.
2004-04-15 Pat Haugen <pthaugen@us.ibm.com> * ra-debug.c (ra_print_rtx): Add break's to case legs. From-SVN: r80725
Diffstat (limited to 'libjava/java/net/Socket.java')
0 files changed, 0 insertions, 0 deletions
='n87' href='#n87'>87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
#ifndef _IPXE_SMBIOS_H
#define _IPXE_SMBIOS_H

/** @file
 *
 * System Management BIOS
 *
 */

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );

#include <stdint.h>
#include <ipxe/api.h>
#include <config/general.h>
#include <ipxe/uaccess.h>

/**
 * Provide an SMBIOS API implementation
 *
 * @v _prefix		Subsystem prefix
 * @v _api_func		API function
 * @v _func		Implementing function
 */
#define PROVIDE_SMBIOS( _subsys, _api_func, _func ) \
	PROVIDE_SINGLE_API ( SMBIOS_PREFIX_ ## _subsys, _api_func, _func )

/* Include all architecture-independent SMBIOS API headers */
#include <ipxe/efi/efi_smbios.h>
#include <ipxe/linux/linux_smbios.h>

/* Include all architecture-dependent SMBIOS API headers */
#include <bits/smbios.h>

/** Signature for 32-bit SMBIOS entry point */
#define SMBIOS_SIGNATURE \
        ( ( '_' << 0 ) + ( 'S' << 8 ) + ( 'M' << 16 ) + ( '_' << 24 ) )

/** Signature for 64-bit SMBIOS entry point */
#define SMBIOS3_SIGNATURE \
        ( ( '_' << 0 ) + ( 'S' << 8 ) + ( 'M' << 16 ) + ( '3' << 24 ) )

/**
 * SMBIOS 32-bit entry point
 *
 * This is the 32-bit version of the table which describes the list of
 * SMBIOS structures.  It may be located by scanning through the BIOS
 * segment or via an EFI configuration table.
 */
struct smbios_entry {
	/** Signature
	 *
	 * Must be equal to SMBIOS_SIGNATURE
	 */
	uint32_t signature;
	/** Checksum */
	uint8_t checksum;
	/** Length */
	uint8_t len;
	/** Major version */
	uint8_t major;
	/** Minor version */
	uint8_t minor;
	/** Maximum structure size */
	uint16_t max;
	/** Entry point revision */
	uint8_t revision;
	/** Formatted area */
	uint8_t formatted[5];
	/** DMI Signature */
	uint8_t dmi_signature[5];
	/** DMI checksum */
	uint8_t dmi_checksum;
	/** Structure table length */
	uint16_t smbios_len;
	/** Structure table address */
	uint32_t smbios_address;
	/** Number of SMBIOS structures */
	uint16_t smbios_count;
	/** BCD revision */
	uint8_t bcd_revision;
} __attribute__ (( packed ));

/**
 * SMBIOS 64-bit entry point
 *
 * This is the 64-bit version of the table which describes the list of
 * SMBIOS structures.  It may be located by scanning through the BIOS
 * segment or via an EFI configuration table.
 */
struct smbios3_entry {
	/** Signature
	 *
	 * Must be equal to SMBIOS3_SIGNATURE
	 */
	uint32_t signature;
	/** Signature extra byte */
	uint8_t extra;
	/** Checksum */
	uint8_t checksum;
	/** Length */
	uint8_t len;
	/** Major version */
	uint8_t major;
	/** Minor version */
	uint8_t minor;
	/** Documentation revision */
	uint8_t docrev;
	/** Entry point revision */
	uint8_t revision;
	/** Reserved */
	uint8_t reserved;
	/** Structure table length */
	uint32_t smbios_len;
	/** Structure table address */
	uint64_t smbios_address;
} __attribute__ (( packed ));

/** An SMBIOS structure header */
struct smbios_header {
	/** Type */
	uint8_t type;
	/** Length */
	uint8_t len;
	/** Handle */
	uint16_t handle;
} __attribute__ (( packed ));

/** SMBIOS structure descriptor */
struct smbios_structure {
	/** Copy of SMBIOS structure header */
	struct smbios_header header;
	/** Offset of structure within SMBIOS */
	size_t offset;
	/** Length of strings section */
	size_t strings_len;
};

/** SMBIOS system information structure */
struct smbios_system_information {
	/** SMBIOS structure header */
	struct smbios_header header;
	/** Manufacturer string */
	uint8_t manufacturer;
	/** Product string */
	uint8_t product;
	/** Version string */
	uint8_t version;
	/** Serial number string */
	uint8_t serial;
	/** UUID */
	uint8_t uuid[16];
	/** Wake-up type */
	uint8_t wakeup;
} __attribute__ (( packed ));

/** SMBIOS system information structure type */
#define SMBIOS_TYPE_SYSTEM_INFORMATION 1

/** SMBIOS base board information structure */
struct smbios_base_board_information {
	/** SMBIOS structure header */
	struct smbios_header header;
	/** Manufacturer string */
	uint8_t manufacturer;
	/** Product string */
	uint8_t product;
	/** Version string */
	uint8_t version;
	/** Serial number string */
	uint8_t serial;
} __attribute__ (( packed ));

/** SMBIOS base board information structure type */
#define SMBIOS_TYPE_BASE_BOARD_INFORMATION 2

/** SMBIOS enclosure information structure */
struct smbios_enclosure_information {
	/** SMBIOS structure header */
	struct smbios_header header;
	/** Manufacturer string */
	uint8_t manufacturer;
	/** Type string */
	uint8_t type;
	/** Version string */
	uint8_t version;
	/** Serial number string */
	uint8_t serial;
	/** Asset tag */
	uint8_t asset_tag;
} __attribute__ (( packed ));

/** SMBIOS enclosure information structure type */
#define SMBIOS_TYPE_ENCLOSURE_INFORMATION 3

/** SMBIOS OEM strings structure type */
#define SMBIOS_TYPE_OEM_STRINGS 11

/** SMBIOS end of table type */
#define SMBIOS_TYPE_END 127

/**
 * SMBIOS entry point descriptor
 *
 * This contains the information from the SMBIOS entry point that we
 * care about.
 */
struct smbios {
	/** Start of SMBIOS structures */
	userptr_t address;
	/** Length of SMBIOS structures */
	size_t len;
	/** Number of SMBIOS structures */
	unsigned int count;
	/** SMBIOS version */
	uint16_t version;
};

/**
 * Calculate SMBIOS version
 *
 * @v major		Major version
 * @v minor		Minor version
 * @ret version		SMBIOS version
 */
#define SMBIOS_VERSION( major, minor ) ( ( (major) << 8 ) | (minor) )

extern int find_smbios ( struct smbios *smbios );
extern int find_smbios_entry ( userptr_t start, size_t len,
			       struct smbios_entry *entry );
extern int find_smbios3_entry ( userptr_t start, size_t len,
				struct smbios3_entry *entry );
extern int find_smbios_structure ( unsigned int type, unsigned int instance,
				   struct smbios_structure *structure );
extern int read_smbios_structure ( struct smbios_structure *structure,
				   void *data, size_t len );
extern int read_smbios_string ( struct smbios_structure *structure,
				unsigned int index,
				void *data, size_t len );
extern int smbios_version ( void );
extern void smbios_clear ( void );

#endif /* _IPXE_SMBIOS_H */